exports/latest-2019-04-30/ProxyCmdletDefinitions.ps1


# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Add an owner to an application.
.Description
Add an owner to an application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/add-azadapplicationowner
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAddOwnerParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IAddOwnerParameters>: Request parameters for adding a owner to an application.
  [(Any) <Object>]: This indicates any property can be added to this object.
  Url <String>: A owner object URL, such as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user, application, servicePrincipal, group) to be added.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/add-azadapplicationowner
#>

function Add-AzADApplicationOwner {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Add', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Add', Mandatory)]
    [Parameter(ParameterSetName='AddExpanded', Mandatory)]
    [Parameter(ParameterSetName='AddByComponents', Mandatory)]
    [Alias('ApplicationObjectId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the application to which to add the owner.
    ${ObjectId},

    [Parameter(ParameterSetName='Add', Mandatory)]
    [Parameter(ParameterSetName='AddExpanded', Mandatory)]
    [Parameter(ParameterSetName='AddByComponents', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Add', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAddOwnerParameters]
    # Request parameters for adding a owner to an application.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='AddExpanded', Mandatory)]
    [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # A owner object URL, such as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user, application, servicePrincipal, group) to be added.
    ${Url},

    [Parameter(ParameterSetName='AddExpanded')]
    [Parameter(ParameterSetName='AddViaIdentityExpanded')]
    [Parameter(ParameterSetName='AddByComponents')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Collections.Hashtable]
    # Additional Parameters
    ${AdditionalProperties},

    [Parameter(ParameterSetName='AddByComponents', Mandatory)]
    [Alias('OwnerObjectId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The object ID of the owner of the application.
    ${MemberObjectId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Add = 'Az.Resources.private\Add-AzADApplicationOwner_Add';
            AddExpanded = 'Az.Resources.private\Add-AzADApplicationOwner_AddExpanded';
            AddViaIdentity = 'Az.Resources.private\Add-AzADApplicationOwner_AddViaIdentity';
            AddViaIdentityExpanded = 'Az.Resources.private\Add-AzADApplicationOwner_AddViaIdentityExpanded';
            AddByComponents = 'Az.Resources.custom\Add-AzADApplicationOwner_AddByComponents';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Add a member to a group.
.Description
Add a member to a group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/add-azadgroupmember
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IGroupAddMemberParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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.
 
GROUPOBJECT <IAdGroup>: The object representation of the group to add the member(s) to.
  [(Any) <Object>]: This indicates any property can be added to this object.
  [DisplayName <String>]: The display name of the group.
  [Mail <String>]: The primary email address of the group.
  [MailEnabled <Boolean?>]: Whether the group is mail-enabled. Must be false. This is because only pure security groups can be created using the Graph API.
  [MailNickname <String>]: The mail alias for the group.
  [SecurityEnabled <Boolean?>]: Whether the group is security-enable.
 
INPUTOBJECT <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IGroupAddMemberParameters>: Request parameters for adding a member to a group.
  [(Any) <Object>]: This indicates any property can be added to this object.
  Url <String>: A member object URL, such as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the member (user, application, servicePrincipal, group) to be added.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/add-azadgroupmember
#>

function Add-AzADGroupMember {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='AddExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Add', Mandatory)]
    [Parameter(ParameterSetName='AddExpanded', Mandatory)]
    [Parameter(ParameterSetName='AddMemberUpnToGroupId', Mandatory)]
    [Parameter(ParameterSetName='AddMemberIdToGroupId', Mandatory)]
    [Alias('TargetGroupObjectId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the group to which to add the member.
    ${GroupObjectId},

    [Parameter(ParameterSetName='Add', Mandatory)]
    [Parameter(ParameterSetName='AddExpanded', Mandatory)]
    [Parameter(ParameterSetName='AddMemberUpnToGroupId', Mandatory)]
    [Parameter(ParameterSetName='AddMemberIdToGroupId', Mandatory)]
    [Parameter(ParameterSetName='AddMemberUpnToGroupDisplayName', Mandatory)]
    [Parameter(ParameterSetName='AddMemberIdToGroupDisplayName', Mandatory)]
    [Parameter(ParameterSetName='AddMemberUpnToGroupObject', Mandatory)]
    [Parameter(ParameterSetName='AddMemberIdToGroupObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='AddMemberUpnToGroupId', Mandatory)]
    [Parameter(ParameterSetName='AddMemberUpnToGroupDisplayName', Mandatory)]
    [Parameter(ParameterSetName='AddMemberUpnToGroupObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String[]]
    # The user principal name (UPN) of the member(s) to add to the group.
    ${MemberUserPrincipalName},

    [Parameter(ParameterSetName='AddMemberIdToGroupId', Mandatory)]
    [Parameter(ParameterSetName='AddMemberIdToGroupDisplayName', Mandatory)]
    [Parameter(ParameterSetName='AddMemberIdToGroupObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String[]]
    # The object ID of the member(s) to add to the group.
    ${MemberObjectId},

    [Parameter(ParameterSetName='AddMemberUpnToGroupDisplayName', Mandatory)]
    [Parameter(ParameterSetName='AddMemberIdToGroupDisplayName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The display name of the group to add the member(s) to.
    ${GroupDisplayName},

    [Parameter(ParameterSetName='AddMemberUpnToGroupObject', Mandatory)]
    [Parameter(ParameterSetName='AddMemberIdToGroupObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAdGroup]
    # The object representation of the group to add the member(s) to.
    # To construct, see NOTES section for GROUPOBJECT properties and create a hash table.
    ${GroupObject},

    [Parameter(ParameterSetName='Add', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IGroupAddMemberParameters]
    # Request parameters for adding a member to a group.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(ParameterSetName='AddExpanded', Mandatory)]
    [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # A member object URL, such as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the member (user, application, servicePrincipal, group) to be added.
    ${Url},

    [Parameter(ParameterSetName='AddExpanded')]
    [Parameter(ParameterSetName='AddViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Collections.Hashtable]
    # Additional Parameters
    ${AdditionalProperties},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Add = 'Az.Resources.private\Add-AzADGroupMember_Add';
            AddExpanded = 'Az.Resources.private\Add-AzADGroupMember_AddExpanded';
            AddViaIdentity = 'Az.Resources.private\Add-AzADGroupMember_AddViaIdentity';
            AddViaIdentityExpanded = 'Az.Resources.private\Add-AzADGroupMember_AddViaIdentityExpanded';
            AddMemberUpnToGroupId = 'Az.Resources.custom\Add-AzADGroupMember';
            AddMemberIdToGroupId = 'Az.Resources.custom\Add-AzADGroupMember';
            AddMemberUpnToGroupDisplayName = 'Az.Resources.custom\Add-AzADGroupMember';
            AddMemberIdToGroupDisplayName = 'Az.Resources.custom\Add-AzADGroupMember';
            AddMemberUpnToGroupObject = 'Az.Resources.custom\Add-AzADGroupMember';
            AddMemberIdToGroupObject = 'Az.Resources.custom\Add-AzADGroupMember';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Add an owner to a group.
.Description
Add an owner to a group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/add-azadgroupowner
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAddOwnerParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IAddOwnerParameters>: Request parameters for adding a owner to an application.
  [(Any) <Object>]: This indicates any property can be added to this object.
  Url <String>: A owner object URL, such as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user, application, servicePrincipal, group) to be added.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/add-azadgroupowner
#>

function Add-AzADGroupOwner {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='AddExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Add', Mandatory)]
    [Parameter(ParameterSetName='AddExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the application to which to add the owner.
    ${ObjectId},

    [Parameter(ParameterSetName='Add', Mandatory)]
    [Parameter(ParameterSetName='AddExpanded', Mandatory)]
    [Parameter(ParameterSetName='AddByComponents', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='AddByComponents', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the group to which to add the owner.
    ${GroupObjectId},

    [Parameter(ParameterSetName='AddByComponents', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String[]]
    # The object ID of the member(s) to make owner of the group.
    ${MemberObjectId},

    [Parameter(ParameterSetName='Add', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAddOwnerParameters]
    # Request parameters for adding a owner to an application.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(ParameterSetName='AddExpanded', Mandatory)]
    [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # A owner object URL, such as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user, application, servicePrincipal, group) to be added.
    ${Url},

    [Parameter(ParameterSetName='AddExpanded')]
    [Parameter(ParameterSetName='AddViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Collections.Hashtable]
    # Additional Parameters
    ${AdditionalProperties},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Add = 'Az.Resources.private\Add-AzADGroupOwner_Add';
            AddExpanded = 'Az.Resources.private\Add-AzADGroupOwner_AddExpanded';
            AddViaIdentity = 'Az.Resources.private\Add-AzADGroupOwner_AddViaIdentity';
            AddViaIdentityExpanded = 'Az.Resources.private\Add-AzADGroupOwner_AddViaIdentityExpanded';
            AddByComponents = 'Az.Resources.custom\Add-AzADGroupOwner_AddByComponents';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Exports the template used for specified deployment.
.Description
Exports the template used for specified deployment.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/export-azdeploymenttemplate
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentExportResultTemplate
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/export-azdeploymenttemplate
#>

function Export-AzDeploymentTemplate {
[Alias('Save-AzDeploymentTemplate', 'Save-AzResourceGroupDeploymentTemplate')]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentExportResultTemplate])]
[CmdletBinding(DefaultParameterSetName='Export', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Export', Mandatory)]
    [Parameter(ParameterSetName='Export1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the deployment from which to get the template.
    ${DeploymentName},

    [Parameter(ParameterSetName='Export')]
    [Parameter(ParameterSetName='Export1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Export1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='ExportViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='ExportViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Export = 'Az.Resources.private\Export-AzDeploymentTemplate_Export';
            Export1 = 'Az.Resources.private\Export-AzDeploymentTemplate_Export1';
            ExportViaIdentity = 'Az.Resources.private\Export-AzDeploymentTemplate_ExportViaIdentity';
            ExportViaIdentity1 = 'Az.Resources.private\Export-AzDeploymentTemplate_ExportViaIdentity1';
        }
        if (('Export', 'Export1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Captures the specified resource group as a template.
.Description
Captures the specified resource group as a template.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/export-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IExportTemplateRequest
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupExportResult
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IExportTemplateRequest>: Export resource group template request parameters.
  [Option <String>]: The export template options. A CSV-formatted list containing zero or more of the following: 'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization', 'SkipAllParameterization'
  [Resource <String[]>]: The IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/export-azresourcegroup
#>

function Export-AzResourceGroup {
[Alias('Export-AzResourceGroupTemplate')]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupExportResult])]
[CmdletBinding(DefaultParameterSetName='ExportExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Export', Mandatory)]
    [Parameter(ParameterSetName='ExportExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to export as a template.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Export')]
    [Parameter(ParameterSetName='ExportExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='ExportViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='ExportViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Export', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='ExportViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IExportTemplateRequest]
    # Export resource group template request parameters.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='ExportExpanded')]
    [Parameter(ParameterSetName='ExportViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The export template options.
    # A CSV-formatted list containing zero or more of the following: 'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization', 'SkipAllParameterization'
    ${Option},

    [Parameter(ParameterSetName='ExportExpanded')]
    [Parameter(ParameterSetName='ExportViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # The IDs of the resources to filter the export by.
    # To export all resources, supply an array with single entry '*'.
    ${Resource},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Export = 'Az.Resources.private\Export-AzResourceGroup_Export';
            ExportExpanded = 'Az.Resources.private\Export-AzResourceGroup_ExportExpanded';
            ExportViaIdentity = 'Az.Resources.private\Export-AzResourceGroup_ExportViaIdentity';
            ExportViaIdentityExpanded = 'Az.Resources.private\Export-AzResourceGroup_ExportViaIdentityExpanded';
        }
        if (('Export', 'ExportExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Get the keyCredentials associated with an application.
.Description
Get the keyCredentials associated with an application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadapplicationkeycredential
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IKeyCredential
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadapplicationkeycredential
#>

function Get-AzADApplicationKeyCredential {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IKeyCredential])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Application object ID.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADApplicationKeyCredential_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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
The owners are a set of non-admin users who are allowed to modify this object.
.Description
The owners are a set of non-admin users who are allowed to modify this object.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadapplicationowner
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IDirectoryObject
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadapplicationowner
#>

function Get-AzADApplicationOwner {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IDirectoryObject])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the application for which to get owners.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADApplicationOwner_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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Get the passwordCredentials associated with an application.
.Description
Get the passwordCredentials associated with an application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadapplicationpasswordcredential
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IPasswordCredential
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadapplicationpasswordcredential
#>

function Get-AzADApplicationPasswordCredential {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IPasswordCredential])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Application object ID.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADApplicationPasswordCredential_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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Get an application by object ID.
.Description
Get an application by object ID.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadapplication
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IApplication
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadapplication
#>

function Get-AzADApplication {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IApplication])]
[CmdletBinding(DefaultParameterSetName='List2', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get2', Mandatory)]
    [Alias('ApplicationObjectId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Application object ID.
    ${ObjectId},

    [Parameter(ParameterSetName='Get2', Mandatory)]
    [Parameter(ParameterSetName='List2', Mandatory)]
    [Parameter(ParameterSetName='GetByApplicationId', Mandatory)]
    [Parameter(ParameterSetName='GetByDisplayName', Mandatory)]
    [Parameter(ParameterSetName='GetByDisplayNamePrefix', Mandatory)]
    [Parameter(ParameterSetName='GetByIdentifierUri', Mandatory)]
    [Parameter(ParameterSetName='GetDeleted', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='GetViaIdentity2', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='GetDeleted', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.Management.Automation.SwitchParameter]
    # Signals that deleted applications should be returned as well.
    ${IncludeDeleted},

    [Parameter(ParameterSetName='List2')]
    [Parameter(ParameterSetName='GetDeleted')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filters to apply to the operation.
    ${Filter},

    [Parameter(ParameterSetName='GetByApplicationId', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The application id of the application.
    ${ApplicationId},

    [Parameter(ParameterSetName='GetByDisplayName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the application.
    ${DisplayName},

    [Parameter(ParameterSetName='GetByDisplayNamePrefix', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The prefix of the display name of the application.
    ${DisplayNameStartWith},

    [Parameter(ParameterSetName='GetByIdentifierUri', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The identifier URI of the application.
    ${IdentifierUri},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Get2 = 'Az.Resources.private\Get-AzADApplication_Get2';
            GetViaIdentity2 = 'Az.Resources.private\Get-AzADApplication_GetViaIdentity2';
            List2 = 'Az.Resources.private\Get-AzADApplication_List2';
            GetByApplicationId = 'Az.Resources.custom\Get-AzADApplication_GetByApplicationId';
            GetByDisplayName = 'Az.Resources.custom\Get-AzADApplication_GetByDisplayName';
            GetByDisplayNamePrefix = 'Az.Resources.custom\Get-AzADApplication_GetByDisplayNamePrefix';
            GetByIdentifierUri = 'Az.Resources.custom\Get-AzADApplication_GetByIdentifierUri';
            GetDeleted = 'Az.Resources.custom\Get-AzADApplication_GetDeleted';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a specific domain in the current tenant.
.Description
Gets a specific domain in the current tenant.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azaddomain
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IDomain
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azaddomain
#>

function Get-AzADDomain {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IDomain])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Alias('DomainName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # name of the domain.
    ${Name},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='List', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply to the operation.
    ${Filter},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADDomain_Get';
            GetViaIdentity = 'Az.Resources.private\Get-AzADDomain_GetViaIdentity';
            List = 'Az.Resources.private\Get-AzADDomain_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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a collection of object IDs of groups of which the specified group is a member.
.Description
Gets a collection of object IDs of groups of which the specified group is a member.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadgroupmembergroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IGroupGetMemberGroupsParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IGroupGetMemberGroupsParameters>: Request parameters for GetMemberGroups API call.
  [(Any) <Object>]: This indicates any property can be added to this object.
  SecurityEnabledOnly <Boolean>: If true, only membership in security-enabled groups should be checked. Otherwise, membership in all groups should be checked.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadgroupmembergroup
#>

function Get-AzADGroupMemberGroup {
[OutputType([System.String])]
[CmdletBinding(DefaultParameterSetName='GetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='GetExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the group for which to get group membership.
    ${ObjectId},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='GetExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Get', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IGroupGetMemberGroupsParameters]
    # Request parameters for GetMemberGroups API call.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='GetExpanded', Mandatory)]
    [Parameter(ParameterSetName='GetViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # If true, only membership in security-enabled groups should be checked.
    # Otherwise, membership in all groups should be checked.
    ${SecurityEnabledOnly},

    [Parameter(ParameterSetName='GetExpanded')]
    [Parameter(ParameterSetName='GetViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Collections.Hashtable]
    # Additional Parameters
    ${AdditionalProperties},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADGroupMemberGroup_Get';
            GetExpanded = 'Az.Resources.private\Get-AzADGroupMemberGroup_GetExpanded';
            GetViaIdentity = 'Az.Resources.private\Get-AzADGroupMemberGroup_GetViaIdentity';
            GetViaIdentityExpanded = 'Az.Resources.private\Get-AzADGroupMemberGroup_GetViaIdentityExpanded';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets the members of a group.
.Description
Gets the members of a group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadgroupmember
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IDirectoryObject
.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.
 
GROUPOBJECT <IAdGroup>: The object representation of the group.
  [(Any) <Object>]: This indicates any property can be added to this object.
  [DisplayName <String>]: The display name of the group.
  [Mail <String>]: The primary email address of the group.
  [MailEnabled <Boolean?>]: Whether the group is mail-enabled. Must be false. This is because only pure security groups can be created using the Graph API.
  [MailNickname <String>]: The mail alias for the group.
  [SecurityEnabled <Boolean?>]: Whether the group is security-enable.
 
INPUTOBJECT <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadgroupmember
#>

function Get-AzADGroupMember {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IDirectoryObject])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='GetByOwner', Mandatory)]
    [Alias('GroupObjectId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the group whose members should be retrieved.
    ${ObjectId},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='GetByDisplayName', Mandatory)]
    [Parameter(ParameterSetName='GetByObject', Mandatory)]
    [Parameter(ParameterSetName='GetByOwner', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='GetByOwner', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.Management.Automation.SwitchParameter]
    # The object ID of the group whose members should be retrieved.
    ${ShowOwner},

    [Parameter(ParameterSetName='GetByDisplayName', Mandatory)]
    [Alias('GroupDisplayName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the group.
    ${DisplayName},

    [Parameter(ParameterSetName='GetByObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAdGroup]
    # The object representation of the group.
    # To construct, see NOTES section for GROUPOBJECT properties and create a hash table.
    ${GroupObject},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADGroupMember_Get';
            GetViaIdentity = 'Az.Resources.private\Get-AzADGroupMember_GetViaIdentity';
            GetByDisplayName = 'Az.Resources.custom\Get-AzADGroupMember_GetByDisplayName';
            GetByObject = 'Az.Resources.custom\Get-AzADGroupMember_GetByObject';
            GetByOwner = 'Az.Resources.custom\Get-AzADGroupMember_GetByOwner';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets group information from the directory.
.Description
Gets group information from the directory.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadgroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAdGroup
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadgroup
#>

function Get-AzADGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAdGroup])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the user for which to get group information.
    ${ObjectId},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='GetByDisplayName', Mandatory)]
    [Parameter(ParameterSetName='GetByDisplayNamePrefix', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply to the operation.
    ${Filter},

    [Parameter(ParameterSetName='GetByDisplayName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the application.
    ${DisplayName},

    [Parameter(ParameterSetName='GetByDisplayNamePrefix', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The prefix of the display name of the application.
    ${DisplayNameStartsWith},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADGroup_Get';
            GetViaIdentity = 'Az.Resources.private\Get-AzADGroup_GetViaIdentity';
            List = 'Az.Resources.private\Get-AzADGroup_List';
            GetByDisplayName = 'Az.Resources.custom\Get-AzADGroup_GetByDisplayName';
            GetByDisplayNamePrefix = 'Az.Resources.custom\Get-AzADGroup_GetByDisplayNamePrefix';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Get the keyCredentials associated with the specified service principal.
.Description
Get the keyCredentials associated with the specified service principal.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadserviceprincipalkeycredential
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IKeyCredential
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadserviceprincipalkeycredential
#>

function Get-AzADServicePrincipalKeyCredential {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IKeyCredential])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the service principal for which to get keyCredentials.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADServicePrincipalKeyCredential_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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
The owners are a set of non-admin users who are allowed to modify this object.
.Description
The owners are a set of non-admin users who are allowed to modify this object.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadserviceprincipalowner
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IDirectoryObject
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadserviceprincipalowner
#>

function Get-AzADServicePrincipalOwner {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IDirectoryObject])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the service principal for which to get owners.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADServicePrincipalOwner_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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets the passwordCredentials associated with a service principal.
.Description
Gets the passwordCredentials associated with a service principal.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadserviceprincipalpasswordcredential
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IPasswordCredential
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadserviceprincipalpasswordcredential
#>

function Get-AzADServicePrincipalPasswordCredential {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IPasswordCredential])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the service principal.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADServicePrincipalPasswordCredential_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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets service principal information from the directory.
Query by objectId or pass a filter to query by appId
.Description
Gets service principal information from the directory.
Query by objectId or pass a filter to query by appId
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadserviceprincipal
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IServicePrincipal
.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.
 
APPLICATIONOBJECT <IApplication>: The object representation of the application.
  [(Any) <Object>]: This indicates any property can be added to this object.
  [AllowGuestsSignIn <Boolean?>]: A property on the application to indicate if the application accepts other IDPs or not or partially accepts.
  [AllowPassthroughUser <Boolean?>]: Indicates that the application supports pass through users who have no presence in the resource tenant.
  [AppId <String>]: The application ID.
  [AppLogoUrl <String>]: The url for the application logo image stored in a CDN.
  [AppPermission <String[]>]: The application permissions.
  [AppRole <IAppRole[]>]: The collection of application roles that an application may declare. These roles can be assigned to users, groups or service principals.
    [AllowedMemberType <String[]>]: Specifies whether this app role definition can be assigned to users and groups by setting to 'User', or to other applications (that are accessing this application in daemon service scenarios) by setting to 'Application', or to both.
    [Description <String>]: Permission help text that appears in the admin app assignment and consent experiences.
    [DisplayName <String>]: Display name for the permission that appears in the admin consent and app assignment experiences.
    [Id <String>]: Unique role identifier inside the appRoles collection.
    [IsEnabled <Boolean?>]: When creating or updating a role definition, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed.
    [Value <String>]: Specifies the value of the roles claim that the application should expect in the authentication and access tokens.
  [AvailableToOtherTenant <Boolean?>]: Whether the application is available to other tenants.
  [DisplayName <String>]: The display name of the application.
  [ErrorUrl <String>]: A URL provided by the author of the application to report errors when using the application.
  [GroupMembershipClaim <GroupMembershipClaimTypes?>]: Configures the groups claim issued in a user or OAuth 2.0 access token that the app expects.
  [Homepage <String>]: The home page of the application.
  [IdentifierUri <String[]>]: A collection of URIs for the application.
  [InformationalUrlMarketing <String>]: The marketing URI
  [InformationalUrlPrivacy <String>]: The privacy policy URI
  [InformationalUrlSupport <String>]: The support URI
  [InformationalUrlTermsOfService <String>]: The terms of service URI
  [IsDeviceOnlyAuthSupported <Boolean?>]: Specifies whether this application supports device authentication without a user. The default is false.
  [KeyCredentials <IKeyCredential[]>]: A collection of KeyCredential objects.
    [CustomKeyIdentifier <String>]: Custom Key Identifier
    [EndDate <DateTime?>]: End date.
    [KeyId <String>]: Key ID.
    [StartDate <DateTime?>]: Start date.
    [Type <String>]: Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'.
    [Usage <String>]: Usage. Acceptable values are 'Verify' and 'Sign'.
    [Value <String>]: Key value.
  [KnownClientApplication <String[]>]: Client applications that are tied to this resource application. Consent to any of the known client applications will result in implicit consent to the resource application through a combined consent dialog (showing the OAuth permission scopes required by the client and the resource).
  [LogoutUrl <String>]: the url of the logout page
  [Oauth2AllowImplicitFlow <Boolean?>]: Whether to allow implicit grant flow for OAuth2
  [Oauth2AllowUrlPathMatching <Boolean?>]: Specifies whether during a token Request Azure AD will allow path matching of the redirect URI against the applications collection of replyURLs. The default is false.
  [Oauth2Permission <IOAuth2Permission[]>]: The collection of OAuth 2.0 permission scopes that the web API (resource) application exposes to client applications. These permission scopes may be granted to client applications during consent.
    [AdminConsentDescription <String>]: Permission help text that appears in the admin consent and app assignment experiences.
    [AdminConsentDisplayName <String>]: Display name for the permission that appears in the admin consent and app assignment experiences.
    [Id <String>]: Unique scope permission identifier inside the oauth2Permissions collection.
    [IsEnabled <Boolean?>]: When creating or updating a permission, this property must be set to true (which is the default). To delete a permission, this property must first be set to false. At that point, in a subsequent call, the permission may be removed.
    [Type <String>]: Specifies whether this scope permission can be consented to by an end user, or whether it is a tenant-wide permission that must be consented to by a Company Administrator. Possible values are "User" or "Admin".
    [UserConsentDescription <String>]: Permission help text that appears in the end user consent experience.
    [UserConsentDisplayName <String>]: Display name for the permission that appears in the end user consent experience.
    [Value <String>]: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.
  [Oauth2RequirePostResponse <Boolean?>]: Specifies whether, as part of OAuth 2.0 token requests, Azure AD will allow POST requests, as opposed to GET requests. The default is false, which specifies that only GET requests will be allowed.
  [OptionalClaimAccessToken <IOptionalClaim[]>]: Optional claims requested to be included in the access token.
    [AdditionalProperty <IOptionalClaimAdditionalProperties>]:
    [Essential <Boolean?>]: Is this a required claim.
    [Name <String>]: Claim name.
    [Source <String>]: Claim source.
  [OptionalClaimIdToken <IOptionalClaim[]>]: Optional claims requested to be included in the id token.
  [OptionalClaimSamlToken <IOptionalClaim[]>]: Optional claims requested to be included in the saml token.
  [OrgRestriction <String[]>]: A list of tenants allowed to access application.
  [PasswordCredentials <IPasswordCredential[]>]: A collection of PasswordCredential objects
    [CustomKeyIdentifier <Byte[]>]: Custom Key Identifier
    [EndDate <DateTime?>]: End date.
    [KeyId <String>]: Key ID.
    [StartDate <DateTime?>]: Start date.
    [Value <String>]: Key value.
  [PreAuthorizedApplication <IPreAuthorizedApplication[]>]: list of pre-authorized applications.
    [AppId <String>]: Represents the application id.
    [Extension <IPreAuthorizedApplicationExtension[]>]: Collection of extensions from the resource application.
      [Condition <String[]>]: The extension's conditions.
    [Permission <IPreAuthorizedApplicationPermission[]>]: Collection of required app permissions/entitlements from the resource application.
      [AccessGrant <String[]>]: The list of permissions.
      [DirectAccessGrant <Boolean?>]: Indicates whether the permission set is DirectAccess or impersonation.
  [PublicClient <Boolean?>]: Specifies whether this application is a public client (such as an installed application running on a mobile device). Default is false.
  [PublisherDomain <String>]: Reliable domain which can be used to identify an application.
  [ReplyUrl <String[]>]: A collection of reply URLs for the application.
  [RequiredResourceAccess <IRequiredResourceAccess[]>]: Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. This pre-configuration of required resource access drives the consent experience.
    ResourceAccess <IResourceAccess[]>: The list of OAuth2.0 permission scopes and app roles that the application requires from the specified resource.
      Id <String>: The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
      [Type <String>]: Specifies whether the id property references an OAuth2Permission or an AppRole. Possible values are "scope" or "role".
    [ResourceAppId <String>]: The unique identifier for the resource that the application requires access to. This should be equal to the appId declared on the target resource application.
  [SamlMetadataUrl <String>]: The URL to the SAML metadata for the application.
  [SignInAudience <String>]: Audience for signing in to the application (AzureADMyOrganization, AzureADAllOrganizations, AzureADAndMicrosoftAccounts).
  [WwwHomepage <String>]: The primary Web page.
 
INPUTOBJECT <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadserviceprincipal
#>

function Get-AzADServicePrincipal {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IServicePrincipal])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the service principal to get.
    ${ObjectId},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='GetByApplicationId', Mandatory)]
    [Parameter(ParameterSetName='GetByApplicationObject', Mandatory)]
    [Parameter(ParameterSetName='GetByDisplayName', Mandatory)]
    [Parameter(ParameterSetName='GetByDisplayNamePrefix', Mandatory)]
    [Parameter(ParameterSetName='GetBySPN', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply to the operation.
    ${Filter},

    [Parameter(ParameterSetName='GetByApplicationId', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The application id of the application.
    ${ApplicationId},

    [Parameter(ParameterSetName='GetByApplicationObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IApplication]
    # The object representation of the application.
    # To construct, see NOTES section for APPLICATIONOBJECT properties and create a hash table.
    ${ApplicationObject},

    [Parameter(ParameterSetName='GetByDisplayName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the application.
    ${DisplayName},

    [Parameter(ParameterSetName='GetByDisplayNamePrefix', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The prefix of the display name of the application.
    ${DisplayNameBeginsWith},

    [Parameter(ParameterSetName='GetBySPN', Mandatory)]
    [Alias('SPN')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the application.
    ${ServicePrincipalName},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADServicePrincipal_Get';
            GetViaIdentity = 'Az.Resources.private\Get-AzADServicePrincipal_GetViaIdentity';
            List = 'Az.Resources.private\Get-AzADServicePrincipal_List';
            GetByApplicationId = 'Az.Resources.custom\Get-AzADServicePrincipal_GetByApplicationId';
            GetByApplicationObject = 'Az.Resources.custom\Get-AzADServicePrincipal_GetByApplicationObject';
            GetByDisplayName = 'Az.Resources.custom\Get-AzADServicePrincipal_GetByDisplayName';
            GetByDisplayNamePrefix = 'Az.Resources.custom\Get-AzADServicePrincipal_GetByDisplayNamePrefix';
            GetBySPN = 'Az.Resources.custom\Get-AzADServicePrincipal_GetBySPN';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a collection that contains the object IDs of the groups of which the user is a member.
.Description
Gets a collection that contains the object IDs of the groups of which the user is a member.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadusermembergroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IUserGetMemberGroupsParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IUserGetMemberGroupsParameters>: Request parameters for GetMemberGroups API call.
  [(Any) <Object>]: This indicates any property can be added to this object.
  SecurityEnabledOnly <Boolean>: If true, only membership in security-enabled groups should be checked. Otherwise, membership in all groups should be checked.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azadusermembergroup
#>

function Get-AzADUserMemberGroup {
[OutputType([System.String])]
[CmdletBinding(DefaultParameterSetName='GetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='GetExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the user for which to get group membership.
    ${ObjectId},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='GetExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Get', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IUserGetMemberGroupsParameters]
    # Request parameters for GetMemberGroups API call.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='GetExpanded', Mandatory)]
    [Parameter(ParameterSetName='GetViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # If true, only membership in security-enabled groups should be checked.
    # Otherwise, membership in all groups should be checked.
    ${SecurityEnabledOnly},

    [Parameter(ParameterSetName='GetExpanded')]
    [Parameter(ParameterSetName='GetViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Collections.Hashtable]
    # Additional Parameters
    ${AdditionalProperties},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADUserMemberGroup_Get';
            GetExpanded = 'Az.Resources.private\Get-AzADUserMemberGroup_GetExpanded';
            GetViaIdentity = 'Az.Resources.private\Get-AzADUserMemberGroup_GetViaIdentity';
            GetViaIdentityExpanded = 'Az.Resources.private\Get-AzADUserMemberGroup_GetViaIdentityExpanded';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets user information from the directory.
.Description
Gets user information from the directory.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azaduser
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IUser
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azaduser
#>

function Get-AzADUser {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IUser])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='GetByDisplayName', Mandatory)]
    [Parameter(ParameterSetName='GetByDisplayNamePrefix', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Alias('UserPrincipalName', 'Upn', 'ObjectId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID or principal name of the user for which to get information.
    ${UpnOrObjectId},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply to the operation.
    ${Filter},

    [Parameter(ParameterSetName='GetByDisplayName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the user.
    ${DisplayName},

    [Parameter(ParameterSetName='GetByDisplayName')]
    [Parameter(ParameterSetName='GetByDisplayNamePrefix')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The primary email address of the user.
    ${Mail},

    [Parameter(ParameterSetName='GetByDisplayName')]
    [Parameter(ParameterSetName='GetByDisplayNamePrefix')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The mail alias for the user.
    ${MailNickname},

    [Parameter(ParameterSetName='GetByDisplayNamePrefix', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The prefix of the display name of the user.
    ${StartsWith},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzADUser_Get';
            GetViaIdentity = 'Az.Resources.private\Get-AzADUser_GetViaIdentity';
            List = 'Az.Resources.private\Get-AzADUser_List';
            GetByDisplayName = 'Az.Resources.custom\Get-AzADUser';
            GetByDisplayNamePrefix = 'Az.Resources.custom\Get-AzADUser';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Get the specified deny assignment.
.Description
Get the specified deny assignment.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azdenyassignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180701Preview.IDenyAssignment
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azdenyassignment
#>

function Get-AzDenyAssignment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180701Preview.IDenyAssignment])]
[CmdletBinding(DefaultParameterSetName='List2', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Alias('DenyAssignmentId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the deny assignment to get.
    ${Id},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='List3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the deny assignment.
    ${Scope},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource identity.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='List', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource to get deny assignments for.
    ${ResourceName},

    [Parameter(ParameterSetName='List', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='List', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type of the resource.
    ${ResourceType},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='List2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='List2')]
    [Parameter(ParameterSetName='List3')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    # Use $filter=atScope() to return all deny assignments at or above the scope.
    # Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope.
    # Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal.
    # Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal.
    # This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list.
    # Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned.
    ${Filter},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzDenyAssignment_Get';
            Get1 = 'Az.Resources.private\Get-AzDenyAssignment_Get1';
            GetViaIdentity = 'Az.Resources.private\Get-AzDenyAssignment_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzDenyAssignment_GetViaIdentity1';
            List = 'Az.Resources.private\Get-AzDenyAssignment_List';
            List1 = 'Az.Resources.private\Get-AzDenyAssignment_List1';
            List2 = 'Az.Resources.private\Get-AzDenyAssignment_List2';
            List3 = 'Az.Resources.private\Get-AzDenyAssignment_List3';
        }
        if (('List', 'List1', 'List2') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a deployments operation.
.Description
Gets a deployments operation.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azdeploymentoperation
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentOperation
.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.
 
DEPLOYMENTOBJECT <IDeploymentExtended>: The object representation of the deployment.
  ParameterLinkUri <String>: The URI of the parameters file.
  TemplateLinkUri <String>: The URI of the template to deploy.
  [DebugSettingDetailLevel <String>]: Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information you are passing in during deployment. By logging information about the request or response, you could potentially expose sensitive data that is retrieved through the deployment operations.
  [Dependency <IDependency[]>]: The list of deployment dependencies.
    [DependsOn <IBasicDependency[]>]: The list of dependencies.
      [Id <String>]: The ID of the dependency.
      [ResourceName <String>]: The dependency resource name.
      [ResourceType <String>]: The dependency resource type.
    [Id <String>]: The ID of the dependency.
    [ResourceName <String>]: The dependency resource name.
    [ResourceType <String>]: The dependency resource type.
  [Location <String>]: the location of the deployment.
  [Mode <DeploymentMode?>]: The deployment mode. Possible values are Incremental and Complete.
  [OnErrorDeploymentName <String>]: The deployment to be used on error case.
  [OnErrorDeploymentType <OnErrorDeploymentType?>]: The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment.
  [Output <IDeploymentPropertiesExtendedOutputs>]: Key/value pairs that represent deployment output.
  [Parameter <IDeploymentPropertiesExtendedParameters>]: Deployment parameters. Use only one of Parameters or ParametersLink.
  [ParameterLinkContentVersion <String>]: If included, must match the ContentVersion in the template.
  [Provider <IProvider[]>]: The list of resource providers needed for the deployment.
    [Namespace <String>]: The namespace of the resource provider.
  [Template <IDeploymentPropertiesExtendedTemplate>]: The template content. Use only one of Template or TemplateLink.
  [TemplateLinkContentVersion <String>]: If included, must match the ContentVersion in the template.
 
INPUTOBJECT <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azdeploymentoperation
#>

function Get-AzDeploymentOperation {
[Alias('Get-AzResourceGroupDeploymentOperation')]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentOperation])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the deployment.
    ${DeploymentName},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the operation to get.
    ${OperationId},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='Get1')]
    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='GetByDeploymentObject')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='GetByDeploymentObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentExtended]
    # The object representation of the deployment.
    # To construct, see NOTES section for DEPLOYMENTOBJECT properties and create a hash table.
    ${DeploymentObject},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='GetByDeploymentObject')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Int32]
    # The number of results to return.
    ${Top},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzDeploymentOperation_Get';
            Get1 = 'Az.Resources.private\Get-AzDeploymentOperation_Get1';
            GetViaIdentity = 'Az.Resources.private\Get-AzDeploymentOperation_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzDeploymentOperation_GetViaIdentity1';
            List = 'Az.Resources.private\Get-AzDeploymentOperation_List';
            List1 = 'Az.Resources.private\Get-AzDeploymentOperation_List1';
            GetByDeploymentObject = 'Az.Resources.custom\Get-AzDeploymentOperation_GetByDeploymentObject';
        }
        if (('Get', 'Get1', 'List', 'List1', 'GetByDeploymentObject') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a deployment.
.Description
Gets a deployment.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azdeployment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentExtended
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azdeployment
#>

function Get-AzDeployment {
[Alias('Get-AzResourceGroupDeployment')]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentExtended])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Alias('DeploymentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the deployment to get.
    ${Name},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='Get1')]
    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='GetById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='GetById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the deployment.
    ${Id},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    # For example, you can use $filter=provisioningState eq '{state}'.
    ${Filter},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Int32]
    # The number of results to get.
    # If null is passed, returns all deployments.
    ${Top},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzDeployment_Get';
            Get1 = 'Az.Resources.private\Get-AzDeployment_Get1';
            GetViaIdentity = 'Az.Resources.private\Get-AzDeployment_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzDeployment_GetViaIdentity1';
            List = 'Az.Resources.private\Get-AzDeployment_List';
            List1 = 'Az.Resources.private\Get-AzDeployment_List1';
            GetById = 'Az.Resources.custom\Get-AzDeployment_GetById';
        }
        if (('Get', 'Get1', 'List', 'List1', 'GetById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list.
.Description
This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azlocation
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160601.ILocation
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azlocation
#>

function Get-AzLocation {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160601.ILocation])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # Subscription ID.
    ${SubscriptionId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzLocation_List';
        }
        if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets the managed application definition.
.Description
Gets the managed application definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azmanagedapplicationdefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinition
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azmanagedapplicationdefinition
#>

function Get-AzManagedApplicationDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinition])]
[CmdletBinding(DefaultParameterSetName='Get1', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Alias('ApplicationDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the managed application definition.
    ${Name},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='List', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Alias('ApplicationDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
    ${Id},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='Get1')]
    [Parameter(ParameterSetName='GetViaIdentity')]
    [Parameter(ParameterSetName='GetViaIdentity1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzManagedApplicationDefinition_Get';
            Get1 = 'Az.Resources.private\Get-AzManagedApplicationDefinition_Get1';
            GetViaIdentity = 'Az.Resources.private\Get-AzManagedApplicationDefinition_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzManagedApplicationDefinition_GetViaIdentity1';
            List = 'Az.Resources.private\Get-AzManagedApplicationDefinition_List';
        }
        if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets the managed application.
.Description
Gets the managed application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azmanagedapplication
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azmanagedapplication
#>

function Get-AzManagedApplication {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Alias('ApplicationName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the managed application.
    ${Name},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='List', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Alias('ApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the managed application, including the managed application name and the managed application resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
    ${Id},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='Get1')]
    [Parameter(ParameterSetName='GetViaIdentity')]
    [Parameter(ParameterSetName='GetViaIdentity1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzManagedApplication_Get';
            Get1 = 'Az.Resources.private\Get-AzManagedApplication_Get1';
            GetViaIdentity = 'Az.Resources.private\Get-AzManagedApplication_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzManagedApplication_GetViaIdentity1';
            List = 'Az.Resources.private\Get-AzManagedApplication_List';
            List1 = 'Az.Resources.private\Get-AzManagedApplication_List1';
        }
        if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
List all entities that descend from a management group.\n
.Description
List all entities that descend from a management group.\n
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azmanagementgroupdescendant
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IDescendantInfo
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azmanagementgroupdescendant
#>

function Get-AzManagementGroupDescendant {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IDescendantInfo])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Alias('GroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Management Group ID.
    ${GroupId},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # Page continuation token is only used if a previous operation returned a partial result.
    # If a previous response contains a nextLink element, the value of the nextLink element will include a token parameter that specifies a starting point to use for subsequent calls.
    ${Skiptoken},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Int32]
    # Number of elements to return when retrieving results.
    # Passing this in will override $skipToken.
    ${Top},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzManagementGroupDescendant_Get';
            GetViaIdentity = 'Az.Resources.private\Get-AzManagementGroupDescendant_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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Get the details of the management group.
.Description
Get the details of the management group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azmanagementgroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IManagementGroup
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IManagementGroupInfo
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azmanagementgroup
#>

function Get-AzManagementGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IManagementGroup], [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IManagementGroupInfo])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Alias('GroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Management Group ID.
    ${GroupId},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='GetViaIdentity')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The $expand=children query string parameter allows clients to request inclusion of children in the response payload.
    ${Expand},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='GetViaIdentity')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    # Use $filter=atScope() to return all deny assignments at or above the scope.
    # Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope.
    # Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal.
    # Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal.
    # This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list.
    # Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned.
    ${Filter},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='GetViaIdentity')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Management.Automation.SwitchParameter]
    # The $recurse=true query string parameter allows clients to request inclusion of entire hierarchy in the response payload.
    # Note that $expand=children must be passed up if $recurse is set to true.
    ${Recurse},

    [Parameter(ParameterSetName='List')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # Page continuation token is only used if a previous operation returned a partial result.
    # If a previous response contains a nextLink element, the value of the nextLink element will include a token parameter that specifies a starting point to use for subsequent calls.
    ${Skiptoken},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Header')]
    [System.String]
    # Indicates that the request shouldn't utilize any caches.
    ${CacheControl},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzManagementGroup_Get';
            GetViaIdentity = 'Az.Resources.private\Get-AzManagementGroup_GetViaIdentity';
            List = 'Az.Resources.private\Get-AzManagementGroup_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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation retrieves a single policy assignment, given its name and the scope it was created at.
.Description
This operation retrieves a single policy assignment, given its name and the scope it was created at.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azpolicyassignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20151101.IPolicyAssignment
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyAssignment
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azpolicyassignment
#>

function Get-AzPolicyAssignment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyAssignment], [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20151101.IPolicyAssignment])]
[CmdletBinding(DefaultParameterSetName='List3', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Alias('PolicyAssignmentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy assignment to get.
    ${Name},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the policy assignment.
    # Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
    ${Scope},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Alias('PolicyAssignmentId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the policy assignment to get.
    # Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
    ${Id},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='List2', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents2', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition2', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource path.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Parameter(ParameterSetName='List2', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents2', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition2', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents1', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group containing the resource.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='List2', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents2', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition2', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource.
    ${ResourceName},

    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='List2', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents2', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition2', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    # For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines)
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='List2', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents2', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition2', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type.
    ${ResourceType},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='List2')]
    [Parameter(ParameterSetName='List3')]
    [Parameter(ParameterSetName='ListWithDescendents2')]
    [Parameter(ParameterSetName='ListWithDescendents')]
    [Parameter(ParameterSetName='ListByPolicyDefinition2')]
    [Parameter(ParameterSetName='ListByPolicyDefinition')]
    [Parameter(ParameterSetName='ListWithDescendents1')]
    [Parameter(ParameterSetName='ListByPolicyDefinition1')]
    [Parameter(ParameterSetName='ListWithDescendents3')]
    [Parameter(ParameterSetName='ListByPolicyDefinition3')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='List2')]
    [Parameter(ParameterSetName='List3')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    # Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''.
    # If $filter is not provided, no filtering is performed.
    ${Filter},

    [Parameter(ParameterSetName='ListWithDescendents2', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents1', Mandatory)]
    [Parameter(ParameterSetName='ListWithDescendents3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Management.Automation.SwitchParameter]
    # Indicates that the list of returned policy assignments should include all assignments related to the given scope, including those from ancestor scopes and those from descendent scopes.
    ${IncludeDescendent},

    [Parameter(ParameterSetName='ListByPolicyDefinition2', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition1', Mandatory)]
    [Parameter(ParameterSetName='ListByPolicyDefinition3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # Limits the list of returned policy assignments to those assigning the policy definition identified by this fully qualified ID.
    ${PolicyDefinitionId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzPolicyAssignment_Get';
            Get1 = 'Az.Resources.private\Get-AzPolicyAssignment_Get1';
            GetViaIdentity = 'Az.Resources.private\Get-AzPolicyAssignment_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzPolicyAssignment_GetViaIdentity1';
            List = 'Az.Resources.private\Get-AzPolicyAssignment_List';
            List1 = 'Az.Resources.private\Get-AzPolicyAssignment_List1';
            List2 = 'Az.Resources.private\Get-AzPolicyAssignment_List2';
            List3 = 'Az.Resources.private\Get-AzPolicyAssignment_List3';
            ListWithDescendents2 = 'Az.Resources.custom\Get-AzPolicyAssignment';
            ListWithDescendents = 'Az.Resources.custom\Get-AzPolicyAssignment';
            ListByPolicyDefinition2 = 'Az.Resources.custom\Get-AzPolicyAssignment';
            ListByPolicyDefinition = 'Az.Resources.custom\Get-AzPolicyAssignment';
            ListWithDescendents1 = 'Az.Resources.custom\Get-AzPolicyAssignment';
            ListByPolicyDefinition1 = 'Az.Resources.custom\Get-AzPolicyAssignment';
            ListWithDescendents3 = 'Az.Resources.custom\Get-AzPolicyAssignment';
            ListByPolicyDefinition3 = 'Az.Resources.custom\Get-AzPolicyAssignment';
        }
        if (('List', 'List1', 'List2', 'List3', 'ListWithDescendents2', 'ListWithDescendents', 'ListByPolicyDefinition2', 'ListByPolicyDefinition', 'ListWithDescendents1', 'ListByPolicyDefinition1', 'ListWithDescendents3', 'ListByPolicyDefinition3') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation retrieves the policy definition in the given subscription with the given name.
.Description
This operation retrieves the policy definition in the given subscription with the given name.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azpolicydefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyDefinition
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azpolicydefinition
#>

function Get-AzPolicyDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyDefinition])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='WithBuiltIn')]
    [Alias('PolicyDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy definition to get.
    ${Name},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='GetById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the management group.
    ${ManagementGroupName},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='GetById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the policy definition.
    ${Id},

    [Parameter(ParameterSetName='WithBuiltIn', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Management.Automation.SwitchParameter]
    # Signals to retrieve built-in policy definitions.
    ${BuiltIn},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzPolicyDefinition_Get';
            Get1 = 'Az.Resources.private\Get-AzPolicyDefinition_Get1';
            GetViaIdentity = 'Az.Resources.private\Get-AzPolicyDefinition_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzPolicyDefinition_GetViaIdentity1';
            List = 'Az.Resources.private\Get-AzPolicyDefinition_List';
            List1 = 'Az.Resources.private\Get-AzPolicyDefinition_List1';
            GetById = 'Az.Resources.custom\Get-AzPolicyDefinition_GetById';
            WithBuiltIn = 'Az.Resources.custom\Get-AzPolicyDefinition_WithBuiltIn';
        }
        if (('Get', 'List', 'GetById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation retrieves the policy set definition in the given subscription with the given name.
.Description
This operation retrieves the policy set definition in the given subscription with the given name.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azpolicysetdefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinition
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azpolicysetdefinition
#>

function Get-AzPolicySetDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinition])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='WithBuiltIn')]
    [Alias('PolicySetDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy set definition to get.
    ${Name},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='GetById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the management group.
    ${ManagementGroupName},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='GetById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the policy set definition.
    ${Id},

    [Parameter(ParameterSetName='WithBuiltIn', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Management.Automation.SwitchParameter]
    # Signals to retrieve built-in policy set definitions.
    ${BuiltIn},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzPolicySetDefinition_Get';
            Get1 = 'Az.Resources.private\Get-AzPolicySetDefinition_Get1';
            GetViaIdentity = 'Az.Resources.private\Get-AzPolicySetDefinition_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzPolicySetDefinition_GetViaIdentity1';
            List = 'Az.Resources.private\Get-AzPolicySetDefinition_List';
            List1 = 'Az.Resources.private\Get-AzPolicySetDefinition_List1';
            GetById = 'Az.Resources.custom\Get-AzPolicySetDefinition_GetById';
            WithBuiltIn = 'Az.Resources.custom\Get-AzPolicySetDefinition_WithBuiltIn';
        }
        if (('Get', 'List', 'GetById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets provider operations metadata for the specified resource provider.
.Description
Gets provider operations metadata for the specified resource provider.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azprovideroperationsmetadata
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IProviderOperationsMetadata
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azprovideroperationsmetadata
#>

function Get-AzProviderOperationsMetadata {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IProviderOperationsMetadata])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # Specifies whether to expand the values.
    ${Expand},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Get1 = 'Az.Resources.private\Get-AzProviderOperationsMetadata_Get1';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzProviderOperationsMetadata_GetViaIdentity1';
            List1 = 'Az.Resources.private\Get-AzProviderOperationsMetadata_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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a resource group.
.Description
Gets a resource group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresourcegroup
#>

function Get-AzResourceGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Alias('ResourceGroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to get.
    # The name is case insensitive.
    ${Name},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='GetById')]
    [Parameter(ParameterSetName='GetByTag')]
    [Parameter(ParameterSetName='GetByTagNameAndValue')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='GetById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the resource group.
    ${Id},

    [Parameter(ParameterSetName='List')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    #
    # You can filter by tag names and values.
    # For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'
    ${Filter},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='GetByTag')]
    [Parameter(ParameterSetName='GetByTagNameAndValue')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Int32]
    # The number of results to return.
    # If null is passed, returns all resource groups.
    ${Top},

    [Parameter(ParameterSetName='GetByTag', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Collections.Hashtable]
    # The tag hashtable to filter resource groups by.
    # The single key-value pair should be the tag name and value, respectively, to filter by.
    ${Tag},

    [Parameter(ParameterSetName='GetByTagNameAndValue', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The tag name to filter resource groups by.
    ${TagName},

    [Parameter(ParameterSetName='GetByTagNameAndValue')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The tag value to filter resource groups by.
    ${TagValue},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [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.Resources.private\Get-AzResourceGroup_Get';
            GetViaIdentity = 'Az.Resources.private\Get-AzResourceGroup_GetViaIdentity';
            List = 'Az.Resources.private\Get-AzResourceGroup_List';
            GetById = 'Az.Resources.custom\Get-AzResourceGroup_GetById';
            GetByTag = 'Az.Resources.custom\Get-AzResourceGroup_GetByTag';
            GetByTagNameAndValue = 'Az.Resources.custom\Get-AzResourceGroup_GetByTagNameAndValue';
        }
        if (('Get', 'List', 'GetById', 'GetByTag', 'GetByTagNameAndValue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Get a management lock by scope.
.Description
Get a management lock by scope.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresourcelock
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresourcelock
#>

function Get-AzResourceLock {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject])]
[CmdletBinding(DefaultParameterSetName='List2', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='Get2', Mandatory)]
    [Parameter(ParameterSetName='Get3', Mandatory)]
    [Parameter(ParameterSetName='GetTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of lock.
    ${LockName},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='List3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope for the lock.
    ${Scope},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Parameter(ParameterSetName='ListTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # An extra path parameter needed in some services, like SQL Databases.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='Get3', Mandatory)]
    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Parameter(ParameterSetName='GetTopLevelResource', Mandatory)]
    [Parameter(ParameterSetName='ListTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Parameter(ParameterSetName='GetTopLevelResource', Mandatory)]
    [Parameter(ParameterSetName='ListTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource.
    ${ResourceName},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Parameter(ParameterSetName='GetTopLevelResource', Mandatory)]
    [Parameter(ParameterSetName='ListTopLevelResource', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Parameter(ParameterSetName='GetTopLevelResource', Mandatory)]
    [Parameter(ParameterSetName='ListTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The type of the resource.
    ${ResourceType},

    [Parameter(ParameterSetName='Get1')]
    [Parameter(ParameterSetName='Get2')]
    [Parameter(ParameterSetName='Get3')]
    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='List2')]
    [Parameter(ParameterSetName='GetTopLevelResource')]
    [Parameter(ParameterSetName='ListTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='List2')]
    [Parameter(ParameterSetName='List3')]
    [Parameter(ParameterSetName='ListTopLevelResource')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    ${Filter},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzResourceLock_Get';
            Get1 = 'Az.Resources.private\Get-AzResourceLock_Get1';
            Get2 = 'Az.Resources.private\Get-AzResourceLock_Get2';
            Get3 = 'Az.Resources.private\Get-AzResourceLock_Get3';
            GetViaIdentity = 'Az.Resources.private\Get-AzResourceLock_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzResourceLock_GetViaIdentity1';
            GetViaIdentity2 = 'Az.Resources.private\Get-AzResourceLock_GetViaIdentity2';
            GetViaIdentity3 = 'Az.Resources.private\Get-AzResourceLock_GetViaIdentity3';
            List = 'Az.Resources.private\Get-AzResourceLock_List';
            List1 = 'Az.Resources.private\Get-AzResourceLock_List1';
            List2 = 'Az.Resources.private\Get-AzResourceLock_List2';
            List3 = 'Az.Resources.private\Get-AzResourceLock_List3';
            GetTopLevelResource = 'Az.Resources.custom\Get-AzResourceLock_GetTopLevelResource';
            ListTopLevelResource = 'Az.Resources.custom\Get-AzResourceLock_ListTopLevelResource';
        }
        if (('Get1', 'Get2', 'Get3', 'List', 'List1', 'List2', 'GetTopLevelResource', 'ListTopLevelResource') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a list of resource providers.
.Description
Gets a list of resource providers.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresourceprovideroperationdetail
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20151101.IResourceProviderOperationDefinition
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresourceprovideroperationdetail
#>

function Get-AzResourceProviderOperationDetail {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20151101.IResourceProviderOperationDefinition])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Resource identity.
    ${ResourceProviderNamespace},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzResourceProviderOperationDetail_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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a resource.
.Description
Gets a resource.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresource
#>

function Get-AzResource {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='GetTopLevelResource', Mandatory)]
    [Alias('ResourceName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource to get.
    ${Name},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource identity.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='GetTopLevelResource', Mandatory)]
    [Alias('ResourceProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ProviderNamespace},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='GetByTag')]
    [Parameter(ParameterSetName='GetByTagNameAndValue')]
    [Parameter(ParameterSetName='GetTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group containing the resource to get.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='GetTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type of the resource.
    ${ResourceType},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='GetByTag')]
    [Parameter(ParameterSetName='GetByTagNameAndValue')]
    [Parameter(ParameterSetName='GetTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the resource, including the resource name and resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
    ${ResourceId},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='GetViaIdentity', Mandatory)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory)]
    [Parameter(ParameterSetName='GetTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The API version to use for the operation.
    ${ApiVersion},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='GetByTag')]
    [Parameter(ParameterSetName='GetByTagNameAndValue')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The $expand query parameter.
    # You can expand createdTime and changedTime.
    # For example, to expand both properties, use $expand=changedTime,createdTime
    ${Expand},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    #
    # The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.
    #
    # For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'
    #
    # You can use substringof(value, property) in the filter.
    # The properties you can use for substring are: name and resourceGroup.
    #
    # For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)
    #
    # You can link more than one substringof together by adding and/or operators.
    #
    # You can filter by tag names and values.
    # For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'
    #
    # You can use some properties together when filtering.
    # The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId.
    ${Filter},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='GetByTag')]
    [Parameter(ParameterSetName='GetByTagNameAndValue')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Int32]
    # The number of results to return.
    # If null is passed, returns all resources.
    ${Top},

    [Parameter(ParameterSetName='GetByTag', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Collections.Hashtable]
    # The tag hashtable to filter resources by.
    # The single key-value pair should be the tag name and value, respectively, to filter by.
    ${Tag},

    [Parameter(ParameterSetName='GetByTagNameAndValue', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The tag name to filter resources by.
    ${TagName},

    [Parameter(ParameterSetName='GetByTagNameAndValue')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The tag value to filter resources by.
    ${TagValue},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [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.Resources.private\Get-AzResource_Get';
            Get1 = 'Az.Resources.private\Get-AzResource_Get1';
            GetViaIdentity = 'Az.Resources.private\Get-AzResource_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzResource_GetViaIdentity1';
            List = 'Az.Resources.private\Get-AzResource_List';
            List1 = 'Az.Resources.private\Get-AzResource_List1';
            GetByTag = 'Az.Resources.custom\Get-AzResource_GetByTag';
            GetByTagNameAndValue = 'Az.Resources.custom\Get-AzResource_GetByTagNameAndValue';
            GetTopLevelResource = 'Az.Resources.custom\Get-AzResource_GetTopLevelResource';
        }
        if (('Get', 'List', 'List1', 'GetByTag', 'GetByTagNameAndValue', 'GetTopLevelResource') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets the names and values of all resource tags that are defined in a subscription.
.Description
Gets the names and values of all resource tags that are defined in a subscription.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-aztag
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.ITagDetails
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-aztag
#>

function Get-AzTag {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.ITagDetails])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Get-AzTag_List';
        }
        if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Elevates access for a Global Administrator.
.Description
Elevates access for a Global Administrator.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/invoke-azelevateglobaladministratoraccess
.Outputs
System.Boolean
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/invoke-azelevateglobaladministratoraccess
#>

function Invoke-AzElevateGlobalAdministratorAccess {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Elevate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Elevate = 'Az.Resources.private\Invoke-AzElevateGlobalAdministratorAccess_Elevate';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
The resources to move must be in the same source resource group.
The target resource group may be in a different subscription.
When moving resources, both the source group and the target group are locked for the duration of the operation.
Write and delete operations are blocked on the groups until the move completes.
.Description
The resources to move must be in the same source resource group.
The target resource group may be in a different subscription.
When moving resources, both the source group and the target group are locked for the duration of the operation.
Write and delete operations are blocked on the groups until the move completes.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/move-azresource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourcesMoveInfo
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IResourcesMoveInfo>: Parameters of move resources.
  [Resource <String[]>]: The IDs of the resources.
  [TargetResourceGroup <String>]: The target resource group.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/move-azresource
#>

function Move-AzResource {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='MoveExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Move', Mandatory)]
    [Parameter(ParameterSetName='MoveExpanded', Mandatory)]
    [Parameter(ParameterSetName='MoveByComponents', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group containing the resources to move.
    ${SourceResourceGroupName},

    [Parameter(ParameterSetName='Move')]
    [Parameter(ParameterSetName='MoveExpanded')]
    [Parameter(ParameterSetName='MoveByComponents')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='MoveViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='MoveViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Move', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='MoveViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourcesMoveInfo]
    # Parameters of move resources.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(ParameterSetName='MoveExpanded')]
    [Parameter(ParameterSetName='MoveViaIdentityExpanded')]
    [Parameter(ParameterSetName='MoveByComponents')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # The IDs of the resources.
    ${Resource},

    [Parameter(ParameterSetName='MoveExpanded')]
    [Parameter(ParameterSetName='MoveViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The target resource group.
    ${TargetResourceGroup},

    [Parameter(ParameterSetName='MoveByComponents', Mandatory)]
    [Alias('DestinationResourceGroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The target resource group name.
    ${TargetResourceGroupName},

    [Parameter(ParameterSetName='MoveByComponents')]
    [Alias('DestinationSubscriptionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The target subscription id.
    # If not value is provided, the subscription id of the current context will be used.
    ${TargetSubscriptionId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(ParameterSetName='Move')]
    [Parameter(ParameterSetName='MoveExpanded')]
    [Parameter(ParameterSetName='MoveViaIdentity')]
    [Parameter(ParameterSetName='MoveViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Move = 'Az.Resources.private\Move-AzResource_Move';
            MoveExpanded = 'Az.Resources.private\Move-AzResource_MoveExpanded';
            MoveViaIdentity = 'Az.Resources.private\Move-AzResource_MoveViaIdentity';
            MoveViaIdentityExpanded = 'Az.Resources.private\Move-AzResource_MoveViaIdentityExpanded';
            MoveByComponents = 'Az.Resources.custom\Move-AzResource_MoveByComponents';
        }
        if (('Move', 'MoveExpanded', 'MoveByComponents') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Create a new application.
.Description
Create a new application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadapplication
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IApplicationCreateParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IApplication
.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.
 
APPROLE <IAppRole[]>: The collection of application roles that an application may declare. These roles can be assigned to users, groups or service principals.
  [AllowedMemberType <String[]>]: Specifies whether this app role definition can be assigned to users and groups by setting to 'User', or to other applications (that are accessing this application in daemon service scenarios) by setting to 'Application', or to both.
  [Description <String>]: Permission help text that appears in the admin app assignment and consent experiences.
  [DisplayName <String>]: Display name for the permission that appears in the admin consent and app assignment experiences.
  [Id <String>]: Unique role identifier inside the appRoles collection.
  [IsEnabled <Boolean?>]: When creating or updating a role definition, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed.
  [Value <String>]: Specifies the value of the roles claim that the application should expect in the authentication and access tokens.
 
INPUTOBJECT <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
KEYCREDENTIALS <IKeyCredential[]>: A collection of KeyCredential objects.
  [CustomKeyIdentifier <String>]: Custom Key Identifier
  [EndDate <DateTime?>]: End date.
  [KeyId <String>]: Key ID.
  [StartDate <DateTime?>]: Start date.
  [Type <String>]: Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'.
  [Usage <String>]: Usage. Acceptable values are 'Verify' and 'Sign'.
  [Value <String>]: Key value.
 
OAUTH2PERMISSION <IOAuth2Permission[]>: The collection of OAuth 2.0 permission scopes that the web API (resource) application exposes to client applications. These permission scopes may be granted to client applications during consent.
  [AdminConsentDescription <String>]: Permission help text that appears in the admin consent and app assignment experiences.
  [AdminConsentDisplayName <String>]: Display name for the permission that appears in the admin consent and app assignment experiences.
  [Id <String>]: Unique scope permission identifier inside the oauth2Permissions collection.
  [IsEnabled <Boolean?>]: When creating or updating a permission, this property must be set to true (which is the default). To delete a permission, this property must first be set to false. At that point, in a subsequent call, the permission may be removed.
  [Type <String>]: Specifies whether this scope permission can be consented to by an end user, or whether it is a tenant-wide permission that must be consented to by a Company Administrator. Possible values are "User" or "Admin".
  [UserConsentDescription <String>]: Permission help text that appears in the end user consent experience.
  [UserConsentDisplayName <String>]: Display name for the permission that appears in the end user consent experience.
  [Value <String>]: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.
 
OPTIONALCLAIMACCESSTOKEN <IOptionalClaim[]>: Optional claims requested to be included in the access token.
  [AdditionalProperty <IOptionalClaimAdditionalProperties>]:
  [Essential <Boolean?>]: Is this a required claim.
  [Name <String>]: Claim name.
  [Source <String>]: Claim source.
 
OPTIONALCLAIMIDTOKEN <IOptionalClaim[]>: Optional claims requested to be included in the id token.
  [AdditionalProperty <IOptionalClaimAdditionalProperties>]:
  [Essential <Boolean?>]: Is this a required claim.
  [Name <String>]: Claim name.
  [Source <String>]: Claim source.
 
OPTIONALCLAIMSAMLTOKEN <IOptionalClaim[]>: Optional claims requested to be included in the saml token.
  [AdditionalProperty <IOptionalClaimAdditionalProperties>]:
  [Essential <Boolean?>]: Is this a required claim.
  [Name <String>]: Claim name.
  [Source <String>]: Claim source.
 
PARAMETER <IApplicationCreateParameters>: Request parameters for creating a new application.
  DisplayName <String>: The display name of the application.
  [AllowGuestsSignIn <Boolean?>]: A property on the application to indicate if the application accepts other IDPs or not or partially accepts.
  [AllowPassthroughUser <Boolean?>]: Indicates that the application supports pass through users who have no presence in the resource tenant.
  [AppLogoUrl <String>]: The url for the application logo image stored in a CDN.
  [AppPermission <String[]>]: The application permissions.
  [AppRole <IAppRole[]>]: The collection of application roles that an application may declare. These roles can be assigned to users, groups or service principals.
    [AllowedMemberType <String[]>]: Specifies whether this app role definition can be assigned to users and groups by setting to 'User', or to other applications (that are accessing this application in daemon service scenarios) by setting to 'Application', or to both.
    [Description <String>]: Permission help text that appears in the admin app assignment and consent experiences.
    [DisplayName <String>]: Display name for the permission that appears in the admin consent and app assignment experiences.
    [Id <String>]: Unique role identifier inside the appRoles collection.
    [IsEnabled <Boolean?>]: When creating or updating a role definition, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed.
    [Value <String>]: Specifies the value of the roles claim that the application should expect in the authentication and access tokens.
  [AvailableToOtherTenant <Boolean?>]: Whether the application is available to other tenants.
  [ErrorUrl <String>]: A URL provided by the author of the application to report errors when using the application.
  [GroupMembershipClaim <GroupMembershipClaimTypes?>]: Configures the groups claim issued in a user or OAuth 2.0 access token that the app expects.
  [Homepage <String>]: The home page of the application.
  [InformationalUrlMarketing <String>]: The marketing URI
  [InformationalUrlPrivacy <String>]: The privacy policy URI
  [InformationalUrlSupport <String>]: The support URI
  [InformationalUrlTermsOfService <String>]: The terms of service URI
  [IsDeviceOnlyAuthSupported <Boolean?>]: Specifies whether this application supports device authentication without a user. The default is false.
  [KeyCredentials <IKeyCredential[]>]: A collection of KeyCredential objects.
    [CustomKeyIdentifier <String>]: Custom Key Identifier
    [EndDate <DateTime?>]: End date.
    [KeyId <String>]: Key ID.
    [StartDate <DateTime?>]: Start date.
    [Type <String>]: Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'.
    [Usage <String>]: Usage. Acceptable values are 'Verify' and 'Sign'.
    [Value <String>]: Key value.
  [KnownClientApplication <String[]>]: Client applications that are tied to this resource application. Consent to any of the known client applications will result in implicit consent to the resource application through a combined consent dialog (showing the OAuth permission scopes required by the client and the resource).
  [LogoutUrl <String>]: the url of the logout page
  [Oauth2AllowImplicitFlow <Boolean?>]: Whether to allow implicit grant flow for OAuth2
  [Oauth2AllowUrlPathMatching <Boolean?>]: Specifies whether during a token Request Azure AD will allow path matching of the redirect URI against the applications collection of replyURLs. The default is false.
  [Oauth2Permission <IOAuth2Permission[]>]: The collection of OAuth 2.0 permission scopes that the web API (resource) application exposes to client applications. These permission scopes may be granted to client applications during consent.
    [AdminConsentDescription <String>]: Permission help text that appears in the admin consent and app assignment experiences.
    [AdminConsentDisplayName <String>]: Display name for the permission that appears in the admin consent and app assignment experiences.
    [Id <String>]: Unique scope permission identifier inside the oauth2Permissions collection.
    [IsEnabled <Boolean?>]: When creating or updating a permission, this property must be set to true (which is the default). To delete a permission, this property must first be set to false. At that point, in a subsequent call, the permission may be removed.
    [Type <String>]: Specifies whether this scope permission can be consented to by an end user, or whether it is a tenant-wide permission that must be consented to by a Company Administrator. Possible values are "User" or "Admin".
    [UserConsentDescription <String>]: Permission help text that appears in the end user consent experience.
    [UserConsentDisplayName <String>]: Display name for the permission that appears in the end user consent experience.
    [Value <String>]: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.
  [Oauth2RequirePostResponse <Boolean?>]: Specifies whether, as part of OAuth 2.0 token requests, Azure AD will allow POST requests, as opposed to GET requests. The default is false, which specifies that only GET requests will be allowed.
  [OptionalClaimAccessToken <IOptionalClaim[]>]: Optional claims requested to be included in the access token.
    [AdditionalProperty <IOptionalClaimAdditionalProperties>]:
    [Essential <Boolean?>]: Is this a required claim.
    [Name <String>]: Claim name.
    [Source <String>]: Claim source.
  [OptionalClaimIdToken <IOptionalClaim[]>]: Optional claims requested to be included in the id token.
  [OptionalClaimSamlToken <IOptionalClaim[]>]: Optional claims requested to be included in the saml token.
  [OrgRestriction <String[]>]: A list of tenants allowed to access application.
  [PasswordCredentials <IPasswordCredential[]>]: A collection of PasswordCredential objects
    [CustomKeyIdentifier <Byte[]>]: Custom Key Identifier
    [EndDate <DateTime?>]: End date.
    [KeyId <String>]: Key ID.
    [StartDate <DateTime?>]: Start date.
    [Value <String>]: Key value.
  [PreAuthorizedApplication <IPreAuthorizedApplication[]>]: list of pre-authorized applications.
    [AppId <String>]: Represents the application id.
    [Extension <IPreAuthorizedApplicationExtension[]>]: Collection of extensions from the resource application.
      [Condition <String[]>]: The extension's conditions.
    [Permission <IPreAuthorizedApplicationPermission[]>]: Collection of required app permissions/entitlements from the resource application.
      [AccessGrant <String[]>]: The list of permissions.
      [DirectAccessGrant <Boolean?>]: Indicates whether the permission set is DirectAccess or impersonation.
  [PublicClient <Boolean?>]: Specifies whether this application is a public client (such as an installed application running on a mobile device). Default is false.
  [PublisherDomain <String>]: Reliable domain which can be used to identify an application.
  [ReplyUrl <String[]>]: A collection of reply URLs for the application.
  [RequiredResourceAccess <IRequiredResourceAccess[]>]: Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. This pre-configuration of required resource access drives the consent experience.
    ResourceAccess <IResourceAccess[]>: The list of OAuth2.0 permission scopes and app roles that the application requires from the specified resource.
      Id <String>: The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
      [Type <String>]: Specifies whether the id property references an OAuth2Permission or an AppRole. Possible values are "scope" or "role".
    [ResourceAppId <String>]: The unique identifier for the resource that the application requires access to. This should be equal to the appId declared on the target resource application.
  [SamlMetadataUrl <String>]: The URL to the SAML metadata for the application.
  [SignInAudience <String>]: Audience for signing in to the application (AzureADMyOrganization, AzureADAllOrganizations, AzureADAndMicrosoftAccounts).
  [WwwHomepage <String>]: The primary Web page.
  [IdentifierUri <String[]>]: A collection of URIs for the application.
 
PASSWORDCREDENTIALS <IPasswordCredential[]>: A collection of PasswordCredential objects
  [CustomKeyIdentifier <Byte[]>]: Custom Key Identifier
  [EndDate <DateTime?>]: End date.
  [KeyId <String>]: Key ID.
  [StartDate <DateTime?>]: Start date.
  [Value <String>]: Key value.
 
PREAUTHORIZEDAPPLICATION <IPreAuthorizedApplication[]>: list of pre-authorized applications.
  [AppId <String>]: Represents the application id.
  [Extension <IPreAuthorizedApplicationExtension[]>]: Collection of extensions from the resource application.
    [Condition <String[]>]: The extension's conditions.
  [Permission <IPreAuthorizedApplicationPermission[]>]: Collection of required app permissions/entitlements from the resource application.
    [AccessGrant <String[]>]: The list of permissions.
    [DirectAccessGrant <Boolean?>]: Indicates whether the permission set is DirectAccess or impersonation.
 
REQUIREDRESOURCEACCESS <IRequiredResourceAccess[]>: Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. This pre-configuration of required resource access drives the consent experience.
  ResourceAccess <IResourceAccess[]>: The list of OAuth2.0 permission scopes and app roles that the application requires from the specified resource.
    Id <String>: The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
    [Type <String>]: Specifies whether the id property references an OAuth2Permission or an AppRole. Possible values are "scope" or "role".
  [ResourceAppId <String>]: The unique identifier for the resource that the application requires access to. This should be equal to the appId declared on the target resource application.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadapplication
#>

function New-AzADApplication {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IApplication])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded2', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='CreateViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity2', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IApplicationCreateParameters]
    # Request parameters for creating a new application.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the application.
    ${DisplayName},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # A property on the application to indicate if the application accepts other IDPs or not or partially accepts.
    ${AllowGuestsSignIn},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Indicates that the application supports pass through users who have no presence in the resource tenant.
    ${AllowPassthroughUser},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The url for the application logo image stored in a CDN.
    ${AppLogoUrl},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # The application permissions.
    ${AppPermission},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAppRole[]]
    # The collection of application roles that an application may declare.
    # These roles can be assigned to users, groups or service principals.
    # To construct, see NOTES section for APPROLE properties and create a hash table.
    ${AppRole},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Whether the application is available to other tenants.
    ${AvailableToOtherTenants},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # A URL provided by the author of the application to report errors when using the application.
    ${ErrorUrl},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.GroupMembershipClaimTypes])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.GroupMembershipClaimTypes]
    # Configures the groups claim issued in a user or OAuth 2.0 access token that the app expects.
    ${GroupMembershipClaim},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The home page of the application.
    ${Homepage},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # A collection of URIs for the application.
    ${IdentifierUri},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The marketing URI
    ${InformationalUrlMarketing},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The privacy policy URI
    ${InformationalUrlPrivacy},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The support URI
    ${InformationalUrlSupport},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The terms of service URI
    ${InformationalUrlTermsOfService},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Specifies whether this application supports device authentication without a user.
    # The default is false.
    ${IsDeviceOnlyAuthSupported},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IKeyCredential[]]
    # A collection of KeyCredential objects.
    # To construct, see NOTES section for KEYCREDENTIALS properties and create a hash table.
    ${KeyCredentials},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # Client applications that are tied to this resource application.
    # Consent to any of the known client applications will result in implicit consent to the resource application through a combined consent dialog (showing the OAuth permission scopes required by the client and the resource).
    ${KnownClientApplication},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # the url of the logout page
    ${LogoutUrl},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Whether to allow implicit grant flow for OAuth2
    ${Oauth2AllowImplicitFlow},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Specifies whether during a token Request Azure AD will allow path matching of the redirect URI against the applications collection of replyURLs.
    # The default is false.
    ${Oauth2AllowUrlPathMatching},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IOAuth2Permission[]]
    # The collection of OAuth 2.0 permission scopes that the web API (resource) application exposes to client applications.
    # These permission scopes may be granted to client applications during consent.
    # To construct, see NOTES section for OAUTH2PERMISSION properties and create a hash table.
    ${Oauth2Permission},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Specifies whether, as part of OAuth 2.0 token requests, Azure AD will allow POST requests, as opposed to GET requests.
    # The default is false, which specifies that only GET requests will be allowed.
    ${Oauth2RequirePostResponse},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IOptionalClaim[]]
    # Optional claims requested to be included in the access token.
    # To construct, see NOTES section for OPTIONALCLAIMACCESSTOKEN properties and create a hash table.
    ${OptionalClaimAccessToken},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IOptionalClaim[]]
    # Optional claims requested to be included in the id token.
    # To construct, see NOTES section for OPTIONALCLAIMIDTOKEN properties and create a hash table.
    ${OptionalClaimIdToken},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IOptionalClaim[]]
    # Optional claims requested to be included in the saml token.
    # To construct, see NOTES section for OPTIONALCLAIMSAMLTOKEN properties and create a hash table.
    ${OptionalClaimSamlToken},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # A list of tenants allowed to access application.
    ${OrgRestriction},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IPasswordCredential[]]
    # A collection of PasswordCredential objects
    # To construct, see NOTES section for PASSWORDCREDENTIALS properties and create a hash table.
    ${PasswordCredentials},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IPreAuthorizedApplication[]]
    # list of pre-authorized applications.
    # To construct, see NOTES section for PREAUTHORIZEDAPPLICATION properties and create a hash table.
    ${PreAuthorizedApplication},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Specifies whether this application is a public client (such as an installed application running on a mobile device).
    # Default is false.
    ${PublicClient},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Reliable domain which can be used to identify an application.
    ${PublisherDomain},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # A collection of reply URLs for the application.
    ${ReplyUrl},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IRequiredResourceAccess[]]
    # Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources.
    # This pre-configuration of required resource access drives the consent experience.
    # To construct, see NOTES section for REQUIREDRESOURCEACCESS properties and create a hash table.
    ${RequiredResourceAccess},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The URL to the SAML metadata for the application.
    ${SamlMetadataUrl},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Audience for signing in to the application (AzureADMyOrganization, AzureADAllOrganizations, AzureADAndMicrosoftAccounts).
    ${SignInAudience},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The primary Web page.
    ${WwwHomepage},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create2 = 'Az.Resources.private\New-AzADApplication_Create2';
            CreateExpanded2 = 'Az.Resources.private\New-AzADApplication_CreateExpanded2';
            CreateViaIdentity2 = 'Az.Resources.private\New-AzADApplication_CreateViaIdentity2';
            CreateViaIdentityExpanded2 = 'Az.Resources.private\New-AzADApplication_CreateViaIdentityExpanded2';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Create a group in the directory.
.Description
Create a group in the directory.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadgroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IGroupCreateParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAdGroup
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IGroupCreateParameters>: Request parameters for creating a new group.
  [(Any) <Object>]: This indicates any property can be added to this object.
  DisplayName <String>: Group display name
  MailEnabled <Boolean>: Whether the group is mail-enabled. Must be false. This is because only pure security groups can be created using the Graph API.
  MailNickname <String>: Mail nickname
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadgroup
#>

function New-AzADGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAdGroup])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IGroupCreateParameters]
    # Request parameters for creating a new group.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Group display name
    ${DisplayName},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Mail nickname
    ${MailNickname},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Collections.Hashtable]
    # Additional Parameters
    ${AdditionalProperties},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzADGroup_Create';
            CreateExpanded = 'Az.Resources.private\New-AzADGroup_CreateExpanded';
            CreateViaIdentity = 'Az.Resources.private\New-AzADGroup_CreateViaIdentity';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzADGroup_CreateViaIdentityExpanded';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates a service principal in the directory.
.Description
Creates a service principal in the directory.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadserviceprincipal
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IServicePrincipalCreateParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IServicePrincipal
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
KEYCREDENTIALS <IKeyCredential[]>: The collection of key credentials associated with the service principal.
  [CustomKeyIdentifier <String>]: Custom Key Identifier
  [EndDate <DateTime?>]: End date.
  [KeyId <String>]: Key ID.
  [StartDate <DateTime?>]: Start date.
  [Type <String>]: Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'.
  [Usage <String>]: Usage. Acceptable values are 'Verify' and 'Sign'.
  [Value <String>]: Key value.
 
PARAMETER <IServicePrincipalCreateParameters>: Request parameters for creating a new service principal.
  AppId <String>: The application ID.
  [AccountEnabled <Boolean?>]: whether or not the service principal account is enabled
  [AppRoleAssignmentRequired <Boolean?>]: Specifies whether an AppRoleAssignment to a user or group is required before Azure AD will issue a user or access token to the application.
  [KeyCredentials <IKeyCredential[]>]: The collection of key credentials associated with the service principal.
    [CustomKeyIdentifier <String>]: Custom Key Identifier
    [EndDate <DateTime?>]: End date.
    [KeyId <String>]: Key ID.
    [StartDate <DateTime?>]: Start date.
    [Type <String>]: Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'.
    [Usage <String>]: Usage. Acceptable values are 'Verify' and 'Sign'.
    [Value <String>]: Key value.
  [PasswordCredentials <IPasswordCredential[]>]: The collection of password credentials associated with the service principal.
    [CustomKeyIdentifier <Byte[]>]: Custom Key Identifier
    [EndDate <DateTime?>]: End date.
    [KeyId <String>]: Key ID.
    [StartDate <DateTime?>]: Start date.
    [Value <String>]: Key value.
  [ServicePrincipalType <String>]: the type of the service principal
  [Tag <String[]>]: Optional list of tags that you can apply to your service principals. Not nullable.
 
PASSWORDCREDENTIALS <IPasswordCredential[]>: The collection of password credentials associated with the service principal.
  [CustomKeyIdentifier <Byte[]>]: Custom Key Identifier
  [EndDate <DateTime?>]: End date.
  [KeyId <String>]: Key ID.
  [StartDate <DateTime?>]: Start date.
  [Value <String>]: Key value.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadserviceprincipal
#>

function New-AzADServicePrincipal {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IServicePrincipal])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IServicePrincipalCreateParameters]
    # Request parameters for creating a new service principal.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The application ID.
    ${AppId},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # whether or not the service principal account is enabled
    ${AccountEnabled},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Specifies whether an AppRoleAssignment to a user or group is required before Azure AD will issue a user or access token to the application.
    ${AppRoleAssignmentRequired},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IKeyCredential[]]
    # The collection of key credentials associated with the service principal.
    # To construct, see NOTES section for KEYCREDENTIALS properties and create a hash table.
    ${KeyCredentials},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IPasswordCredential[]]
    # The collection of password credentials associated with the service principal.
    # To construct, see NOTES section for PASSWORDCREDENTIALS properties and create a hash table.
    ${PasswordCredentials},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # the type of the service principal
    ${ServicePrincipalType},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # Optional list of tags that you can apply to your service principals.
    # Not nullable.
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzADServicePrincipal_Create';
            CreateExpanded = 'Az.Resources.private\New-AzADServicePrincipal_CreateExpanded';
            CreateViaIdentity = 'Az.Resources.private\New-AzADServicePrincipal_CreateViaIdentity';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzADServicePrincipal_CreateViaIdentityExpanded';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Create a new user.
.Description
Create a new user.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azaduser
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IUserCreateParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IUser
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IUserCreateParameters>: Request parameters for creating a new work or school account user.
  [(Any) <Object>]: This indicates any property can be added to this object.
  AccountEnabled <Boolean>: Whether the account is enabled.
  DisplayName <String>: The display name of the user.
  MailNickname <String>: The mail alias for the user.
  PasswordProfile <IPasswordProfile>: Password Profile
    [(Any) <Object>]: This indicates any property can be added to this object.
    Password <String>: Password
    [ForceChangePasswordNextLogin <Boolean?>]: Whether to force a password change on next login.
  UserPrincipalName <String>: The user principal name (someuser@contoso.com). It must contain one of the verified domains for the tenant.
  [GivenName <String>]: The given name for the user.
  [ImmutableId <String>]: This must be specified if you are using a federated domain for the user's userPrincipalName (UPN) property when creating a new user account. It is used to associate an on-premises Active Directory user account with their Azure AD user object.
  [Surname <String>]: The user's surname (family name or last name).
  [UsageLocation <String>]: A two letter country code (ISO standard 3166). Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. Examples include: "US", "JP", and "GB".
  [UserType <UserType?>]: A string value that can be used to classify user types in your directory, such as 'Member' and 'Guest'.
  [Mail <String>]: The primary email address of the user.
 
PASSWORDPROFILE <IPasswordProfile>: Password Profile
  [(Any) <Object>]: This indicates any property can be added to this object.
  Password <String>: Password
  [ForceChangePasswordNextLogin <Boolean?>]: Whether to force a password change on next login.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azaduser
#>

function New-AzADUser {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IUser])]
[CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IUserCreateParameters]
    # Request parameters for creating a new work or school account user.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Whether the account is enabled.
    ${AccountEnabled},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the user.
    ${DisplayName},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The mail alias for the user.
    ${MailNickname},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IPasswordProfile]
    # Password Profile
    # To construct, see NOTES section for PASSWORDPROFILE properties and create a hash table.
    ${PasswordProfile},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The user principal name (someuser@contoso.com).
    # It must contain one of the verified domains for the tenant.
    ${UserPrincipalName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The given name for the user.
    ${GivenName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # This must be specified if you are using a federated domain for the user's userPrincipalName (UPN) property when creating a new user account.
    # It is used to associate an on-premises Active Directory user account with their Azure AD user object.
    ${ImmutableId},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The primary email address of the user.
    ${Mail},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The user's surname (family name or last name).
    ${Surname},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # A two letter country code (ISO standard 3166).
    # Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries.
    # Examples include: "US", "JP", and "GB".
    ${UsageLocation},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.UserType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.UserType]
    # A string value that can be used to classify user types in your directory, such as 'Member' and 'Guest'.
    ${UserType},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzADUser_Create';
            CreateExpanded = 'Az.Resources.private\New-AzADUser_CreateExpanded';
            CreateViaIdentity = 'Az.Resources.private\New-AzADUser_CreateViaIdentity';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzADUser_CreateViaIdentityExpanded';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates a new managed application definition.
.Description
Creates a new managed application definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azmanagedapplicationdefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinition
.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.
 
ARTIFACT <IApplicationArtifact[]>: The collection of managed application artifacts. The portal will use the files specified as artifacts to construct the user experience of creating a managed application from a managed application definition.
  [Name <String>]: The managed application artifact name.
  [Type <ApplicationArtifactType?>]: The managed application artifact type.
  [Uri <String>]: The managed application artifact blob uri.
 
AUTHORIZATION <IApplicationProviderAuthorization[]>: The managed application provider authorizations.
  PrincipalId <String>: The provider's principal identifier. This is the identity that the provider will use to call ARM to manage the managed application resources.
  RoleDefinitionId <String>: The provider's role definition identifier. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group.
 
INPUTOBJECT <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IApplicationDefinition>: Information about managed application definition.
  SkuName <String>: The SKU name.
  Authorization <IApplicationProviderAuthorization[]>: The managed application provider authorizations.
    PrincipalId <String>: The provider's principal identifier. This is the identity that the provider will use to call ARM to manage the managed application resources.
    RoleDefinitionId <String>: The provider's role definition identifier. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group.
  LockLevel <ApplicationLockLevel>: The managed application lock level.
  [IdentityType <ResourceIdentityType?>]: The identity type.
  [ManagedBy <String>]: ID of the resource that manages this resource.
  [SkuCapacity <Int32?>]: The SKU capacity.
  [SkuFamily <String>]: The SKU family.
  [SkuModel <String>]: The SKU model.
  [SkuSize <String>]: The SKU size.
  [SkuTier <String>]: The SKU tier.
  [Location <String>]: Resource location
  [Tag <IResourceTags>]: Resource tags
    [(Any) <String>]: This indicates any property can be added to this object.
  [Artifact <IApplicationArtifact[]>]: The collection of managed application artifacts. The portal will use the files specified as artifacts to construct the user experience of creating a managed application from a managed application definition.
    [Name <String>]: The managed application artifact name.
    [Type <ApplicationArtifactType?>]: The managed application artifact type.
    [Uri <String>]: The managed application artifact blob uri.
  [CreateUiDefinition <IApplicationDefinitionPropertiesCreateUiDefinition>]: The createUiDefinition json for the backing template with Microsoft.Solutions/applications resource. It can be a JObject or well-formed JSON string.
  [Description <String>]: The managed application definition description.
  [DisplayName <String>]: The managed application definition display name.
  [IsEnabled <String>]: A value indicating whether the package is enabled or not.
  [MainTemplate <IApplicationDefinitionPropertiesMainTemplate>]: The inline main template json which has resources to be provisioned. It can be a JObject or well-formed JSON string.
  [PackageFileUri <String>]: The managed application definition package file Uri. Use this element
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azmanagedapplicationdefinition
#>

function New-AzManagedApplicationDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinition])]
[CmdletBinding(DefaultParameterSetName='Create1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Alias('ApplicationDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the managed application definition.
    ${Name},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Create')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Create1', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Alias('ApplicationDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
    ${Id},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinition]
    # Information about managed application definition.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationProviderAuthorization[]]
    # The managed application provider authorizations.
    # To construct, see NOTES section for AUTHORIZATION properties and create a hash table.
    ${Authorization},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory)]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ApplicationLockLevel])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ApplicationLockLevel]
    # The managed application lock level.
    ${LockLevel},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationArtifact[]]
    # The collection of managed application artifacts.
    # The portal will use the files specified as artifacts to construct the user experience of creating a managed application from a managed application definition.
    # To construct, see NOTES section for ARTIFACT properties and create a hash table.
    ${Artifact},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinitionPropertiesCreateUiDefinition]
    # The createUiDefinition json for the backing template with Microsoft.Solutions/applications resource.
    # It can be a JObject or well-formed JSON string.
    ${CreateUiDefinition},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The managed application definition description.
    ${Description},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The managed application definition display name.
    ${DisplayName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType]
    # The identity type.
    ${IdentityType},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # A value indicating whether the package is enabled or not.
    ${IsEnabled},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Resource location
    ${Location},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinitionPropertiesMainTemplate]
    # The inline main template json which has resources to be provisioned.
    # It can be a JObject or well-formed JSON string.
    ${MainTemplate},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # ID of the resource that manages this resource.
    ${ManagedBy},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The managed application definition package file Uri.
    # Use this element
    ${PackageFileUri},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Int32]
    # The SKU capacity.
    ${SkuCapacity},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU family.
    ${SkuFamily},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU model.
    ${SkuModel},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU name.
    ${SkuName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU size.
    ${SkuSize},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU tier.
    ${SkuTier},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901Preview.IResourceTags]))]
    [System.Collections.Hashtable]
    # Resource tags
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzManagedApplicationDefinition_Create';
            Create1 = 'Az.Resources.private\New-AzManagedApplicationDefinition_Create1';
            CreateExpanded = 'Az.Resources.private\New-AzManagedApplicationDefinition_CreateExpanded';
            CreateExpanded1 = 'Az.Resources.private\New-AzManagedApplicationDefinition_CreateExpanded1';
            CreateViaIdentity = 'Az.Resources.private\New-AzManagedApplicationDefinition_CreateViaIdentity';
            CreateViaIdentity1 = 'Az.Resources.private\New-AzManagedApplicationDefinition_CreateViaIdentity1';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzManagedApplicationDefinition_CreateViaIdentityExpanded';
            CreateViaIdentityExpanded1 = 'Az.Resources.private\New-AzManagedApplicationDefinition_CreateViaIdentityExpanded1';
        }
        if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates a new managed application.
.Description
Creates a new managed application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azmanagedapplication
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IApplication>: Information about managed application.
  SkuName <String>: The SKU name.
  Kind <String>: The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog.
  ManagedResourceGroupId <String>: The managed resource group Id.
  PlanName <String>: The plan name.
  PlanProduct <String>: The product code.
  PlanPublisher <String>: The publisher ID.
  PlanVersion <String>: The plan's version.
  [IdentityType <ResourceIdentityType?>]: The identity type.
  [ManagedBy <String>]: ID of the resource that manages this resource.
  [SkuCapacity <Int32?>]: The SKU capacity.
  [SkuFamily <String>]: The SKU family.
  [SkuModel <String>]: The SKU model.
  [SkuSize <String>]: The SKU size.
  [SkuTier <String>]: The SKU tier.
  [Location <String>]: Resource location
  [Tag <IResourceTags>]: Resource tags
    [(Any) <String>]: This indicates any property can be added to this object.
  [DefinitionId <String>]: The fully qualified path of managed application definition Id.
  [Parameter <IApplicationPropertiesParameters>]: Name and value pairs that define the managed application parameters. It can be a JObject or a well formed JSON string.
  [PlanPromotionCode <String>]: The promotion code.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azmanagedapplication
#>

function New-AzManagedApplication {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication])]
[CmdletBinding(DefaultParameterSetName='CreateRGExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateRGExpanded', Mandatory)]
    [Alias('ApplicationName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the managed application.
    ${Name},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateRGExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Create')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Create1', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateRGExpanded1', Mandatory)]
    [Alias('ApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the managed application, including the managed application name and the managed application resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
    ${Id},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication]
    # Information about managed application.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateRGExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateRGExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The kind of the managed application.
    # Allowed values are MarketPlace and ServiceCatalog.
    ${Kind},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The managed resource group Id.
    ${ManagedResourceGroupId},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Alias('ManagedApplicationDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The fully qualified path of managed application definition Id.
    ${ApplicationDefinitionId},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationPropertiesParameters]
    # Name and value pairs that define the managed application parameters.
    # It can be a JObject or a well formed JSON string.
    ${ApplicationPropertiesParameter},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType]
    # The identity type.
    ${IdentityType},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Resource location
    ${Location},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # ID of the resource that manages this resource.
    ${ManagedBy},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan name.
    ${PlanName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The product code.
    ${PlanProduct},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The promotion code.
    ${PlanPromotionCode},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The publisher ID.
    ${PlanPublisher},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan's version.
    ${PlanVersion},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Int32]
    # The SKU capacity.
    ${SkuCapacity},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU family.
    ${SkuFamily},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU model.
    ${SkuModel},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU name.
    ${SkuName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU size.
    ${SkuSize},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU tier.
    ${SkuTier},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded1')]
    [Parameter(ParameterSetName='CreateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901Preview.IResourceTags]))]
    [System.Collections.Hashtable]
    # Resource tags
    ${Tag},

    [Parameter(ParameterSetName='CreateRGExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateRGExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The managed resource group name.
    ${ManagedResourceGroupName},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzManagedApplication_Create';
            Create1 = 'Az.Resources.private\New-AzManagedApplication_Create1';
            CreateExpanded = 'Az.Resources.private\New-AzManagedApplication_CreateExpanded';
            CreateExpanded1 = 'Az.Resources.private\New-AzManagedApplication_CreateExpanded1';
            CreateViaIdentity = 'Az.Resources.private\New-AzManagedApplication_CreateViaIdentity';
            CreateViaIdentity1 = 'Az.Resources.private\New-AzManagedApplication_CreateViaIdentity1';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzManagedApplication_CreateViaIdentityExpanded';
            CreateViaIdentityExpanded1 = 'Az.Resources.private\New-AzManagedApplication_CreateViaIdentityExpanded1';
            CreateRGExpanded1 = 'Az.Resources.custom\New-AzManagedApplication';
            CreateRGExpanded = 'Az.Resources.custom\New-AzManagedApplication';
        }
        if (('Create', 'CreateExpanded', 'CreateRGExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Associates existing subscription with the management group.
.Description
Associates existing subscription with the management group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azmanagementgroupsubscription
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azmanagementgroupsubscription
#>

function New-AzManagementGroupSubscription {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Alias('GroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Management Group ID.
    ${GroupId},

    [Parameter(ParameterSetName='Create')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # Subscription ID.
    ${SubscriptionId},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Header')]
    [System.String]
    # Indicates that the request shouldn't utilize any caches.
    ${CacheControl},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzManagementGroupSubscription_Create';
            CreateViaIdentity = 'Az.Resources.private\New-AzManagementGroupSubscription_CreateViaIdentity';
        }
        if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Create or update a management group.
If a management group is already created and a subsequent create request is issued with different properties, the management group properties will be updated.
.Description
Create or update a management group.
If a management group is already created and a subsequent create request is issued with different properties, the management group properties will be updated.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azmanagementgroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.ICreateManagementGroupRequest
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IManagementGroup
.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.
 
CREATEMANAGEMENTGROUPREQUEST <ICreateManagementGroupRequest>: Management group creation parameters.
  [DisplayName <String>]: The friendly name of the management group. If no value is passed then this field will be set to the groupId.
  [Name <String>]: The name of the management group. For example, 00000000-0000-0000-0000-000000000000
  [ParentId <String>]: The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
 
INPUTOBJECT <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azmanagementgroup
#>

function New-AzManagementGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IManagementGroup])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Alias('GroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Management Group ID.
    ${GroupId},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Header')]
    [System.String]
    # Indicates that the request shouldn't utilize any caches.
    ${CacheControl},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.ICreateManagementGroupRequest]
    # Management group creation parameters.
    # To construct, see NOTES section for CREATEMANAGEMENTGROUPREQUEST properties and create a hash table.
    ${CreateManagementGroupRequest},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The friendly name of the management group.
    # If no value is passed then this field will be set to the groupId.
    ${DisplayName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The name of the management group.
    # For example, 00000000-0000-0000-0000-000000000000
    ${Name},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The fully qualified ID for the parent management group.
    # For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
    ${ParentId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzManagementGroup_Create';
            CreateExpanded = 'Az.Resources.private\New-AzManagementGroup_CreateExpanded';
            CreateViaIdentity = 'Az.Resources.private\New-AzManagementGroup_CreateViaIdentity';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzManagementGroup_CreateViaIdentityExpanded';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation creates or updates a policy assignment with the given scope and name.
Policy assignments apply to all resources contained within their scope.
For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.
.Description
This operation creates or updates a policy assignment with the given scope and name.
Policy assignments apply to all resources contained within their scope.
For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azpolicyassignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyAssignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyAssignment
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IPolicyAssignment>: The policy assignment.
  SkuName <String>: The name of the policy sku. Possible values are A0 and A1.
  [Description <String>]: This message will be part of response in case of policy violation.
  [DisplayName <String>]: The display name of the policy assignment.
  [IdentityType <ResourceIdentityType?>]: The identity type.
  [Location <String>]: The location of the policy assignment. Only required when utilizing managed identity.
  [Metadata <IPolicyAssignmentPropertiesMetadata>]: The policy assignment metadata.
  [NotScope <String[]>]: The policy's excluded scopes.
  [Parameter <IPolicyAssignmentPropertiesParameters>]: Required if a parameter is used in policy rule.
  [PolicyDefinitionId <String>]: The ID of the policy definition or policy set definition being assigned.
  [Scope <String>]: The scope for the policy assignment.
  [SkuTier <String>]: The policy sku tier. Possible values are Free and Standard.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azpolicyassignment
#>

function New-AzPolicyAssignment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyAssignment])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy assignment.
    ${Name},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the policy assignment.
    # Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
    ${Scope},

    [Parameter(ParameterSetName='Create1', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Alias('PolicyAssignmentId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the policy assignment to create.
    # Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
    ${Id},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyAssignment]
    # The policy assignment.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyAssignmentPropertiesParameters]
    # Required if a parameter is used in policy rule.
    ${AssignmentParameter},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # This message will be part of response in case of policy violation.
    ${Description},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the policy assignment.
    ${DisplayName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType]
    # The identity type.
    ${IdentityType},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The location of the policy assignment.
    # Only required when utilizing managed identity.
    ${Location},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyAssignmentPropertiesMetadata]
    # The policy assignment metadata.
    ${Metadata},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # The policy's excluded scopes.
    ${NotScope},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The ID of the policy definition or policy set definition being assigned.
    ${PolicyDefinitionId},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The scope for the policy assignment.
    ${PropertiesScope},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The name of the policy sku.
    # Possible values are A0 and A1.
    ${SkuName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The policy sku tier.
    # Possible values are Free and Standard.
    ${SkuTier},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzPolicyAssignment_Create';
            Create1 = 'Az.Resources.private\New-AzPolicyAssignment_Create1';
            CreateExpanded = 'Az.Resources.private\New-AzPolicyAssignment_CreateExpanded';
            CreateExpanded1 = 'Az.Resources.private\New-AzPolicyAssignment_CreateExpanded1';
            CreateViaIdentity = 'Az.Resources.private\New-AzPolicyAssignment_CreateViaIdentity';
            CreateViaIdentity1 = 'Az.Resources.private\New-AzPolicyAssignment_CreateViaIdentity1';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzPolicyAssignment_CreateViaIdentityExpanded';
            CreateViaIdentityExpanded1 = 'Az.Resources.private\New-AzPolicyAssignment_CreateViaIdentityExpanded1';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation creates or updates a policy set definition in the given subscription with the given name.
.Description
This operation creates or updates a policy set definition in the given subscription with the given name.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azpolicysetdefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinition
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IPolicySetDefinition>: The policy set definition.
  PolicyDefinition <IPolicyDefinitionReference[]>: An array of policy definition references.
    [Parameter <IPolicyDefinitionReferenceParameters>]: Required if a parameter is used in policy rule.
    [PolicyDefinitionId <String>]: The ID of the policy definition or policy set definition.
  [Description <String>]: The policy set definition description.
  [DisplayName <String>]: The display name of the policy set definition.
  [Metadata <IPolicySetDefinitionPropertiesMetadata>]: The policy set definition metadata.
  [Parameter <IPolicySetDefinitionPropertiesParameters>]: The policy set definition parameters that can be used in policy definition references.
  [PolicyType <PolicyType?>]: The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom.
 
POLICYDEFINITION <IPolicyDefinitionReference[]>: An array of policy definition references.
  [Parameter <IPolicyDefinitionReferenceParameters>]: Required if a parameter is used in policy rule.
  [PolicyDefinitionId <String>]: The ID of the policy definition or policy set definition.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azpolicysetdefinition
#>

function New-AzPolicySetDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinition])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='Create1', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Alias('PolicySetDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy set definition to create.
    ${Name},

    [Parameter(ParameterSetName='Create')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Create1', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the management group.
    ${ManagementGroupName},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinition]
    # The policy set definition.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The policy set definition description.
    ${Description},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the policy set definition.
    ${DisplayName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinitionPropertiesMetadata]
    # The policy set definition metadata.
    ${Metadata},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyDefinitionReference[]]
    # An array of policy definition references.
    # To construct, see NOTES section for POLICYDEFINITION properties and create a hash table.
    ${PolicyDefinition},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyType]
    # The type of policy definition.
    # Possible values are NotSpecified, BuiltIn, and Custom.
    ${PolicyType},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinitionPropertiesParameters]
    # The policy set definition parameters that can be used in policy definition references.
    ${SetDefinitionParameter},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzPolicySetDefinition_Create';
            Create1 = 'Az.Resources.private\New-AzPolicySetDefinition_Create1';
            CreateExpanded = 'Az.Resources.private\New-AzPolicySetDefinition_CreateExpanded';
            CreateExpanded1 = 'Az.Resources.private\New-AzPolicySetDefinition_CreateExpanded1';
            CreateViaIdentity = 'Az.Resources.private\New-AzPolicySetDefinition_CreateViaIdentity';
            CreateViaIdentity1 = 'Az.Resources.private\New-AzPolicySetDefinition_CreateViaIdentity1';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzPolicySetDefinition_CreateViaIdentityExpanded';
            CreateViaIdentityExpanded1 = 'Az.Resources.private\New-AzPolicySetDefinition_CreateViaIdentityExpanded1';
        }
        if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates or updates a resource group.
.Description
Creates or updates a resource group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IResourceGroup>: Resource group information.
  Location <String>: The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
  [ManagedBy <String>]: The ID of the resource that manages this resource group.
  [Tag <IResourceGroupTags>]: The tags attached to the resource group.
    [(Any) <String>]: This indicates any property can be added to this object.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azresourcegroup
#>

function New-AzResourceGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Alias('ResourceGroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to create or update.
    # Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.
    ${Name},

    [Parameter(ParameterSetName='Create')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup]
    # Resource group information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The location of the resource group.
    # It cannot be changed after the resource group has been created.
    # It must be one of the supported Azure locations.
    ${Location},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The ID of the resource that manages this resource group.
    ${ManagedBy},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupTags]))]
    [System.Collections.Hashtable]
    # The tags attached to the resource group.
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzResourceGroup_Create';
            CreateExpanded = 'Az.Resources.private\New-AzResourceGroup_CreateExpanded';
            CreateViaIdentity = 'Az.Resources.private\New-AzResourceGroup_CreateViaIdentity';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzResourceGroup_CreateViaIdentityExpanded';
        }
        if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
When you apply a lock at a parent scope, all child resources inherit the same lock.
To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions.
Of the built-in roles, only Owner and User Access Administrator are granted those actions.
.Description
When you apply a lock at a parent scope, all child resources inherit the same lock.
To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions.
Of the built-in roles, only Owner and User Access Administrator are granted those actions.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azresourcelock
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
OWNER <IManagementLockOwner[]>: The owners of the lock.
  [ApplicationId <String>]: The application ID of the lock owner.
 
PARAMETER <IManagementLockObject>: The lock information.
  Level <LockLevel>: The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
  [Note <String>]: Notes about the lock. Maximum of 512 characters.
  [Owner <IManagementLockOwner[]>]: The owners of the lock.
    [ApplicationId <String>]: The application ID of the lock owner.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azresourcelock
#>

function New-AzResourceLock {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='Create1', Mandatory)]
    [Parameter(ParameterSetName='Create2', Mandatory)]
    [Parameter(ParameterSetName='Create3', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded3', Mandatory)]
    [Parameter(ParameterSetName='CreateTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of lock.
    # The lock name can be a maximum of 260 characters.
    # It cannot contain <, > %, &, :, \, ?, /, or any control characters.
    ${LockName},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource identity.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='Create2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group containing the resource to lock.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource to lock.
    ${ResourceName},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateTopLevelResource', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource provider namespace of the resource to lock.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type of the resource to lock.
    ${ResourceType},

    [Parameter(ParameterSetName='Create')]
    [Parameter(ParameterSetName='Create1')]
    [Parameter(ParameterSetName='Create2')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Create3', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope for the lock.
    # When providing a scope for the assignment, use '/subscriptions/{subscriptionId}' for subscriptions, '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}' for resources.
    ${Scope},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity3', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create3', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject]
    # The lock information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded3', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3', Mandatory)]
    [Parameter(ParameterSetName='CreateTopLevelResource', Mandatory)]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.LockLevel])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.LockLevel]
    # The level of the lock.
    # Possible values are: NotSpecified, CanNotDelete, ReadOnly.
    # CanNotDelete means authorized users are able to read and modify the resources, but not delete.
    # ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
    ${Level},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateExpanded3')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Notes about the lock.
    # Maximum of 512 characters.
    ${Note},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateExpanded3')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockOwner[]]
    # The owners of the lock.
    # To construct, see NOTES section for OWNER properties and create a hash table.
    ${Owner},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzResourceLock_Create';
            Create1 = 'Az.Resources.private\New-AzResourceLock_Create1';
            Create2 = 'Az.Resources.private\New-AzResourceLock_Create2';
            Create3 = 'Az.Resources.private\New-AzResourceLock_Create3';
            CreateExpanded = 'Az.Resources.private\New-AzResourceLock_CreateExpanded';
            CreateExpanded1 = 'Az.Resources.private\New-AzResourceLock_CreateExpanded1';
            CreateExpanded2 = 'Az.Resources.private\New-AzResourceLock_CreateExpanded2';
            CreateExpanded3 = 'Az.Resources.private\New-AzResourceLock_CreateExpanded3';
            CreateViaIdentity = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentity';
            CreateViaIdentity1 = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentity1';
            CreateViaIdentity2 = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentity2';
            CreateViaIdentity3 = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentity3';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentityExpanded';
            CreateViaIdentityExpanded1 = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentityExpanded1';
            CreateViaIdentityExpanded2 = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentityExpanded2';
            CreateViaIdentityExpanded3 = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentityExpanded3';
            CreateTopLevelResource = 'Az.Resources.custom\New-AzResourceLock_CreateTopLevelResource';
        }
        if (('Create', 'Create1', 'Create2', 'CreateExpanded', 'CreateExpanded1', 'CreateExpanded2', 'CreateTopLevelResource') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates a resource.
.Description
Creates a resource.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azresource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IGenericResource>: Resource information.
  PlanName <String>: The plan name.
  PlanProduct <String>: The product code.
  PlanPublisher <String>: The publisher ID.
  PlanVersion <String>: The plan's version.
  SkuName <String>: The SKU name.
  [Location <String>]: Resource location
  [Tag <IResourceTags>]: Resource tags
    [(Any) <String>]: This indicates any property can be added to this object.
  [IdentityType <ResourceIdentityType?>]: The identity type.
  [IdentityUserAssignedIdentity <IIdentityUserAssignedIdentities>]: The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    [(Any) <IComponentsSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties>]: This indicates any property can be added to this object.
  [Kind <String>]: The kind of the resource.
  [ManagedBy <String>]: ID of the resource that manages this resource.
  [PlanPromotionCode <String>]: The promotion code.
  [Property <IGenericResourceProperties>]: The resource properties.
  [SkuCapacity <Int32?>]: The SKU capacity.
  [SkuFamily <String>]: The SKU family.
  [SkuModel <String>]: The SKU model.
  [SkuSize <String>]: The SKU size.
  [SkuTier <String>]: The SKU tier.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azresource
#>

function New-AzResource {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource])]
[CmdletBinding(DefaultParameterSetName='CreateTopLevelResource', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateTopLevelResource', Mandatory)]
    [Alias('ResourceName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource to create.
    ${Name},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource identity.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateTopLevelResource', Mandatory)]
    [Alias('ResourceProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ProviderNamespace},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group for the resource.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type of the resource to create.
    ${ResourceType},

    [Parameter(ParameterSetName='Create')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Create1', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the resource, including the resource name and resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
    ${ResourceId},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The API version to use for the operation.
    ${ApiVersion},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource]
    # Resource information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType]
    # The identity type.
    ${IdentityType},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IIdentityUserAssignedIdentities]))]
    [System.Collections.Hashtable]
    # The list of user identities associated with the resource.
    # The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    ${IdentityUserAssignedIdentity},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The kind of the resource.
    ${Kind},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Resource location
    ${Location},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # ID of the resource that manages this resource.
    ${ManagedBy},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan name.
    ${PlanName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The product code.
    ${PlanProduct},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The promotion code.
    ${PlanPromotionCode},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The publisher ID.
    ${PlanPublisher},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan's version.
    ${PlanVersion},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResourceProperties]
    # The resource properties.
    ${Property},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Int32]
    # The SKU capacity.
    ${SkuCapacity},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU family.
    ${SkuFamily},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU model.
    ${SkuModel},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU name.
    ${SkuName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU size.
    ${SkuSize},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU tier.
    ${SkuTier},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901Preview.IResourceTags]))]
    [System.Collections.Hashtable]
    # Resource tags
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzResource_Create';
            Create1 = 'Az.Resources.private\New-AzResource_Create1';
            CreateExpanded = 'Az.Resources.private\New-AzResource_CreateExpanded';
            CreateExpanded1 = 'Az.Resources.private\New-AzResource_CreateExpanded1';
            CreateViaIdentity = 'Az.Resources.private\New-AzResource_CreateViaIdentity';
            CreateViaIdentity1 = 'Az.Resources.private\New-AzResource_CreateViaIdentity1';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzResource_CreateViaIdentityExpanded';
            CreateViaIdentityExpanded1 = 'Az.Resources.private\New-AzResource_CreateViaIdentityExpanded1';
            CreateTopLevelResource = 'Az.Resources.custom\New-AzResource_CreateTopLevelResource';
        }
        if (('Create', 'CreateExpanded', 'CreateTopLevelResource') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates a role assignment.
.Description
Creates a role assignment.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azroleassignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180901Preview.IRoleAssignmentCreateParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180901Preview.IRoleAssignment
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IRoleAssignmentCreateParameters>: Role assignment create parameters.
  PrincipalId <String>: The principal ID assigned to the role. This maps to the ID inside the Active Directory. It can point to a user, service principal, or security group.
  RoleDefinitionId <String>: The role definition ID used in the role assignment.
  [CanDelegate <Boolean?>]: The delegation flag used for creating a role assignment
  [PrincipalType <PrincipalType?>]: The principal type of the assigned principal ID.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azroleassignment
#>

function New-AzRoleAssignment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180901Preview.IRoleAssignment])]
[CmdletBinding(DefaultParameterSetName='CreateByScopeAndObjectId', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Alias('RoleAssignmentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the role assignment to create.
    # It can be any valid GUID.
    ${Name},

    [Parameter(ParameterSetName='Create2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateByScopeAndObjectId', Mandatory)]
    [Parameter(ParameterSetName='CreateByScopeAndSPN', Mandatory)]
    [Parameter(ParameterSetName='CreateByScopeAndSignInName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the role assignment to create.
    # The scope can be any REST resource instance.
    # For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
    ${Scope},

    [Parameter(ParameterSetName='Create3', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded3', Mandatory)]
    [Parameter(ParameterSetName='CreateById', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the role assignment to create.
    ${RoleId},

    [Parameter(ParameterSetName='CreateViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity3', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create3', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180901Preview.IRoleAssignmentCreateParameters]
    # Role assignment create parameters.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded3', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The principal ID assigned to the role.
    # This maps to the ID inside the Active Directory.
    # It can point to a user, service principal, or security group.
    ${PrincipalId},

    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded3', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role definition ID used in the role assignment.
    ${RoleDefinitionId},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateExpanded3')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3')]
    [Parameter(ParameterSetName='CreateByScopeAndObjectId')]
    [Parameter(ParameterSetName='CreateByScopeAndSPN')]
    [Parameter(ParameterSetName='CreateByScopeAndSignInName')]
    [Parameter(ParameterSetName='CreateById')]
    [Alias('AllowDelegation')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # The delegation flag used for creating a role assignment
    ${CanDelegate},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateExpanded3')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3')]
    [Parameter(ParameterSetName='CreateByScopeAndObjectId')]
    [Parameter(ParameterSetName='CreateByScopeAndSPN')]
    [Parameter(ParameterSetName='CreateByScopeAndSignInName')]
    [Parameter(ParameterSetName='CreateById')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PrincipalType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PrincipalType]
    # The principal type of the assigned principal ID.
    ${PrincipalType},

    [Parameter(ParameterSetName='CreateByScopeAndObjectId', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The object id assigned to the role.
    ${ObjectId},

    [Parameter(ParameterSetName='CreateByScopeAndObjectId', Mandatory)]
    [Parameter(ParameterSetName='CreateByScopeAndSPN', Mandatory)]
    [Parameter(ParameterSetName='CreateByScopeAndSignInName', Mandatory)]
    [Parameter(ParameterSetName='CreateById', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The name of the role definition used in the role assignment.
    ${RoleDefinitionName},

    [Parameter(ParameterSetName='CreateByScopeAndSPN', Mandatory)]
    [Alias('SPN')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The name of the service principal assigned to the role.
    ${ServicePrincipalName},

    [Parameter(ParameterSetName='CreateByScopeAndSignInName', Mandatory)]
    [Alias('Email', 'UserPrincipalName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The user principal name assigned to the role.
    ${SignInName},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create2 = 'Az.Resources.private\New-AzRoleAssignment_Create2';
            Create3 = 'Az.Resources.private\New-AzRoleAssignment_Create3';
            CreateExpanded2 = 'Az.Resources.private\New-AzRoleAssignment_CreateExpanded2';
            CreateExpanded3 = 'Az.Resources.private\New-AzRoleAssignment_CreateExpanded3';
            CreateViaIdentity2 = 'Az.Resources.private\New-AzRoleAssignment_CreateViaIdentity2';
            CreateViaIdentity3 = 'Az.Resources.private\New-AzRoleAssignment_CreateViaIdentity3';
            CreateViaIdentityExpanded2 = 'Az.Resources.private\New-AzRoleAssignment_CreateViaIdentityExpanded2';
            CreateViaIdentityExpanded3 = 'Az.Resources.private\New-AzRoleAssignment_CreateViaIdentityExpanded3';
            CreateByScopeAndObjectId = 'Az.Resources.custom\New-AzRoleAssignment';
            CreateByScopeAndSPN = 'Az.Resources.custom\New-AzRoleAssignment';
            CreateByScopeAndSignInName = 'Az.Resources.custom\New-AzRoleAssignment';
            CreateById = 'Az.Resources.custom\New-AzRoleAssignment';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates or updates a role definition.
.Description
Creates or updates a role definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azroledefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IRoleDefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IRoleDefinition
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PERMISSION <IPermission[]>: Role definition permissions.
  [Action <String[]>]: Allowed actions.
  [NotAction <String[]>]: Denied actions.
  [DataAction <String[]>]: Allowed Data actions.
  [NotDataAction <String[]>]: Denied Data actions.
 
ROLEDEFINITION <IRoleDefinition>: Role definition.
  [AssignableScope <String[]>]: Role definition assignable scopes.
  [Description <String>]: The role definition description.
  [Permission <IPermission[]>]: Role definition permissions.
    [Action <String[]>]: Allowed actions.
    [NotAction <String[]>]: Denied actions.
    [DataAction <String[]>]: Allowed Data actions.
    [NotDataAction <String[]>]: Denied Data actions.
  [RoleName <String>]: The role name.
  [RoleType <String>]: The role type.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azroledefinition
#>

function New-AzRoleDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IRoleDefinition])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the role definition.
    ${Scope},

    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create', ValueFromPipeline)]
    [Alias('Role')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IRoleDefinition]
    # Role definition.
    # To construct, see NOTES section for ROLEDEFINITION properties and create a hash table.
    ${RoleDefinition},

    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # Role definition assignable scopes.
    ${AssignableScope},

    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role definition description.
    ${Description},

    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IPermission[]]
    # Role definition permissions.
    # To construct, see NOTES section for PERMISSION properties and create a hash table.
    ${Permission},

    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role name.
    ${RoleName},

    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role type.
    ${RoleType},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            CreateViaIdentity1 = 'Az.Resources.private\New-AzRoleDefinition_CreateViaIdentity1';
            CreateViaIdentityExpanded1 = 'Az.Resources.private\New-AzRoleDefinition_CreateViaIdentityExpanded1';
            CreateExpanded = 'Az.Resources.custom\New-AzRoleDefinition';
            Create = 'Az.Resources.custom\New-AzRoleDefinition';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
The tag name can have a maximum of 512 characters and is case insensitive.
Tag names created by Azure have prefixes of microsoft, azure, or windows.
You cannot create tags with one of these prefixes.
.Description
The tag name can have a maximum of 512 characters and is case insensitive.
Tag names created by Azure have prefixes of microsoft, azure, or windows.
You cannot create tags with one of these prefixes.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-aztag
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.ITagDetails
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-aztag
#>

function New-AzTag {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.ITagDetails])]
[CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateWithValue', Mandatory)]
    [Alias('TagName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the tag to create.
    ${Name},

    [Parameter(ParameterSetName='Create')]
    [Parameter(ParameterSetName='CreateWithValue')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='CreateWithValue', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The value of the tag to create.
    ${Value},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Create = 'Az.Resources.private\New-AzTag_Create';
            CreateViaIdentity = 'Az.Resources.private\New-AzTag_CreateViaIdentity';
            CreateWithValue = 'Az.Resources.custom\New-AzTag_CreateWithValue';
        }
        if (('Create', 'CreateWithValue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Registers the preview feature for the subscription.
.Description
Registers the preview feature for the subscription.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/register-azproviderfeature
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20151201.IFeatureResult
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/register-azproviderfeature
#>

function Register-AzProviderFeature {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20151201.IFeatureResult])]
[CmdletBinding(DefaultParameterSetName='Register', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Register', Mandatory)]
    [Alias('FeatureName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the feature to register.
    ${Name},

    [Parameter(ParameterSetName='Register', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Register')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='RegisterViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Register = 'Az.Resources.private\Register-AzProviderFeature_Register';
            RegisterViaIdentity = 'Az.Resources.private\Register-AzProviderFeature_RegisterViaIdentity';
        }
        if (('Register') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Registers a subscription with a resource provider.
.Description
Registers a subscription with a resource provider.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/register-azresourceprovider
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IProvider
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/register-azresourceprovider
#>

function Register-AzResourceProvider {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IProvider])]
[CmdletBinding(DefaultParameterSetName='Register', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Register', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider to register.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Register')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='RegisterViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Register = 'Az.Resources.private\Register-AzResourceProvider_Register';
            RegisterViaIdentity = 'Az.Resources.private\Register-AzResourceProvider_RegisterViaIdentity';
        }
        if (('Register') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Remove a member from owners.
.Description
Remove a member from owners.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadapplicationowner
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadapplicationowner
#>

function Remove-AzADApplicationOwner {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Remove', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Remove', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the application from which to remove the owner.
    ${ObjectId},

    [Parameter(ParameterSetName='Remove', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Owner object id
    ${OwnerObjectId},

    [Parameter(ParameterSetName='Remove', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Remove = 'Az.Resources.private\Remove-AzADApplicationOwner_Remove';
            RemoveViaIdentity = 'Az.Resources.private\Remove-AzADApplicationOwner_RemoveViaIdentity';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Delete an application.
.Description
Delete an application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadapplication
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadapplication
#>

function Remove-AzADApplication {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete2', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete2', Mandatory)]
    [Parameter(ParameterSetName='DeleteByApplicationId', Mandatory)]
    [Parameter(ParameterSetName='DeleteByDisplayName', Mandatory)]
    [Parameter(ParameterSetName='HardDelete', Mandatory)]
    [Alias('ApplicationObjectId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Application object ID.
    ${ObjectId},

    [Parameter(ParameterSetName='Delete2', Mandatory)]
    [Parameter(ParameterSetName='DeleteByApplicationId', Mandatory)]
    [Parameter(ParameterSetName='DeleteByDisplayName', Mandatory)]
    [Parameter(ParameterSetName='HardDelete', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='DeleteViaIdentity2', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='DeleteByApplicationId', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The application id of the application to delete.
    ${ApplicationId},

    [Parameter(ParameterSetName='DeleteByDisplayName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The display name of the application to delete.
    ${DisplayName},

    [Parameter(ParameterSetName='HardDelete', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.Management.Automation.SwitchParameter]
    # Signals that the application should be hard-deleted.
    ${HardDelete},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Delete2 = 'Az.Resources.private\Remove-AzADApplication_Delete2';
            DeleteViaIdentity2 = 'Az.Resources.private\Remove-AzADApplication_DeleteViaIdentity2';
            DeleteByApplicationId = 'Az.Resources.custom\Remove-AzADApplication_DeleteByApplicationId';
            DeleteByDisplayName = 'Az.Resources.custom\Remove-AzADApplication_DeleteByDisplayName';
            HardDelete = 'Az.Resources.custom\Remove-AzADApplication_HardDelete';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Remove a member from a group.
.Description
Remove a member from a group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadgroupmember
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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.
 
GROUPOBJECT <IAdGroup>: The object representation of the group that the member should be removed from.
  [(Any) <Object>]: This indicates any property can be added to this object.
  [DisplayName <String>]: The display name of the group.
  [Mail <String>]: The primary email address of the group.
  [MailEnabled <Boolean?>]: Whether the group is mail-enabled. Must be false. This is because only pure security groups can be created using the Graph API.
  [MailNickname <String>]: The mail alias for the group.
  [SecurityEnabled <Boolean?>]: Whether the group is security-enable.
 
INPUTOBJECT <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadgroupmember
#>

function Remove-AzADGroupMember {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Remove', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Remove', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberIdAndGroupId', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberUpnAndGroupId', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the group from which to remove the member.
    ${GroupObjectId},

    [Parameter(ParameterSetName='Remove', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberIdAndGroupDisplayName', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberIdAndGroupId', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberIdAndGroupObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Member object id
    ${MemberObjectId},

    [Parameter(ParameterSetName='Remove', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberIdAndGroupDisplayName', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberUpnAndGroupDisplayName', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberIdAndGroupId', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberUpnAndGroupId', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberIdAndGroupObject', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberUpnAndGroupObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='DeleteByMemberIdAndGroupDisplayName', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberUpnAndGroupDisplayName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The display name of the group that the member should be removed from.
    ${GroupDisplayName},

    [Parameter(ParameterSetName='DeleteByMemberUpnAndGroupDisplayName', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberUpnAndGroupId', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberUpnAndGroupObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The UPN of the member to remove.
    ${MemberUserPrincipalName},

    [Parameter(ParameterSetName='DeleteByMemberIdAndGroupObject', Mandatory)]
    [Parameter(ParameterSetName='DeleteByMemberUpnAndGroupObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAdGroup]
    # The object representation of the group that the member should be removed from.
    # To construct, see NOTES section for GROUPOBJECT properties and create a hash table.
    ${GroupObject},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Remove = 'Az.Resources.private\Remove-AzADGroupMember_Remove';
            RemoveViaIdentity = 'Az.Resources.private\Remove-AzADGroupMember_RemoveViaIdentity';
            DeleteByMemberIdAndGroupDisplayName = 'Az.Resources.custom\Remove-AzADGroupMember';
            DeleteByMemberUpnAndGroupDisplayName = 'Az.Resources.custom\Remove-AzADGroupMember';
            DeleteByMemberIdAndGroupId = 'Az.Resources.custom\Remove-AzADGroupMember';
            DeleteByMemberUpnAndGroupId = 'Az.Resources.custom\Remove-AzADGroupMember';
            DeleteByMemberIdAndGroupObject = 'Az.Resources.custom\Remove-AzADGroupMember';
            DeleteByMemberUpnAndGroupObject = 'Az.Resources.custom\Remove-AzADGroupMember';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Remove a member from owners.
.Description
Remove a member from owners.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadgroupowner
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadgroupowner
#>

function Remove-AzADGroupOwner {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Remove', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Remove', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the group from which to remove the owner.
    ${ObjectId},

    [Parameter(ParameterSetName='Remove', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Owner object id
    ${OwnerObjectId},

    [Parameter(ParameterSetName='Remove', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Remove = 'Az.Resources.private\Remove-AzADGroupOwner_Remove';
            RemoveViaIdentity = 'Az.Resources.private\Remove-AzADGroupOwner_RemoveViaIdentity';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Delete a group from the directory.
.Description
Delete a group from the directory.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadgroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadgroup
#>

function Remove-AzADGroup {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the group to delete.
    ${ObjectId},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='DeleteByDisplayName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='DeleteByDisplayName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The display name of the group.
    ${DisplayName},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzADGroup_Delete';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzADGroup_DeleteViaIdentity';
            DeleteByDisplayName = 'Az.Resources.custom\Remove-AzADGroup_DeleteByDisplayName';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Deletes a service principal from the directory.
.Description
Deletes a service principal from the directory.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadserviceprincipal
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadserviceprincipal
#>

function Remove-AzADServicePrincipal {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the service principal to delete.
    ${ObjectId},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='DeleteByApplicationId', Mandatory)]
    [Parameter(ParameterSetName='DeleteByApplicationObject', Mandatory)]
    [Parameter(ParameterSetName='DeleteByDisplayName', Mandatory)]
    [Parameter(ParameterSetName='DeleteBySPN', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(ParameterSetName='DeleteByApplicationId', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The application id of the service principal.
    ${ApplicationId},

    [Parameter(ParameterSetName='DeleteByApplicationObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The object representation of the application of the service principal.
    ${ApplicationObject},

    [Parameter(ParameterSetName='DeleteByDisplayName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the service principal.
    ${DisplayName},

    [Parameter(ParameterSetName='DeleteBySPN', Mandatory)]
    [Alias('SPN')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The application id of the service principal.
    ${ServicePrincipalName},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzADServicePrincipal_Delete';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzADServicePrincipal_DeleteViaIdentity';
            DeleteByApplicationId = 'Az.Resources.custom\Remove-AzADServicePrincipal_DeleteByApplicationId';
            DeleteByApplicationObject = 'Az.Resources.custom\Remove-AzADServicePrincipal_DeleteByApplicationObject';
            DeleteByDisplayName = 'Az.Resources.custom\Remove-AzADServicePrincipal_DeleteByDisplayName';
            DeleteBySPN = 'Az.Resources.custom\Remove-AzADServicePrincipal_DeleteBySPN';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Delete a user.
.Description
Delete a user.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azaduser
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azaduser
#>

function Remove-AzADUser {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='DeleteByDisplayName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Alias('UserPrincipalName', 'Upn', 'ObjectId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID or principal name of the user to delete.
    ${UpnOrObjectId},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='DeleteByDisplayName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The display name of the user.
    ${DisplayName},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzADUser_Delete';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzADUser_DeleteViaIdentity';
            DeleteByDisplayName = 'Az.Resources.custom\Remove-AzADUser_DeleteByDisplayName';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
A template deployment that is currently running cannot be deleted.
Deleting a template deployment removes the associated deployment operations.
This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted.
The Location response header contains the URI that is used to obtain the status of the process.
While the process is running, a call to the URI in the Location header returns a status of 202.
When the process finishes, the URI in the Location header returns a status of 204 on success.
If the asynchronous request failed, the URI in the Location header returns an error-level status code.
.Description
A template deployment that is currently running cannot be deleted.
Deleting a template deployment removes the associated deployment operations.
This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted.
The Location response header contains the URI that is used to obtain the status of the process.
While the process is running, a call to the URI in the Location header returns a status of 202.
When the process finishes, the URI in the Location header returns a status of 204 on success.
If the asynchronous request failed, the URI in the Location header returns an error-level status code.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azdeployment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azdeployment
#>

function Remove-AzDeployment {
[Alias('Remove-AzResourceGroupDeployment')]
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Alias('DeploymentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the deployment to delete.
    ${Name},

    [Parameter(ParameterSetName='Delete')]
    [Parameter(ParameterSetName='Delete1')]
    [Parameter(ParameterSetName='DeleteById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group with the deployment to delete.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='DeleteById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the resource group.
    ${Id},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(ParameterSetName='Delete')]
    [Parameter(ParameterSetName='Delete1')]
    [Parameter(ParameterSetName='DeleteViaIdentity')]
    [Parameter(ParameterSetName='DeleteViaIdentity1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzDeployment_Delete';
            Delete1 = 'Az.Resources.private\Remove-AzDeployment_Delete1';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzDeployment_DeleteViaIdentity';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzDeployment_DeleteViaIdentity1';
            DeleteById = 'Az.Resources.custom\Remove-AzDeployment_DeleteById';
        }
        if (('Delete', 'Delete1', 'DeleteById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Deletes the managed application definition.
.Description
Deletes the managed application definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azmanagedapplicationdefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azmanagedapplicationdefinition
#>

function Remove-AzManagedApplicationDefinition {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Alias('ApplicationDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the managed application definition to delete.
    ${Name},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Delete')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Alias('ApplicationDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
    ${Id},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzManagedApplicationDefinition_Delete';
            Delete1 = 'Az.Resources.private\Remove-AzManagedApplicationDefinition_Delete1';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzManagedApplicationDefinition_DeleteViaIdentity';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzManagedApplicationDefinition_DeleteViaIdentity1';
        }
        if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Deletes the managed application.
.Description
Deletes the managed application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azmanagedapplication
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azmanagedapplication
#>

function Remove-AzManagedApplication {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Alias('ApplicationName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the managed application.
    ${Name},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Delete')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Alias('ApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the managed application, including the managed application name and the managed application resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
    ${Id},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzManagedApplication_Delete';
            Delete1 = 'Az.Resources.private\Remove-AzManagedApplication_Delete1';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzManagedApplication_DeleteViaIdentity';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzManagedApplication_DeleteViaIdentity1';
        }
        if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
De-associates subscription from the management group.
.Description
De-associates subscription from the management group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azmanagementgroupsubscription
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azmanagementgroupsubscription
#>

function Remove-AzManagementGroupSubscription {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Alias('GroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Management Group ID.
    ${GroupId},

    [Parameter(ParameterSetName='Delete')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # Subscription ID.
    ${SubscriptionId},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Header')]
    [System.String]
    # Indicates that the request shouldn't utilize any caches.
    ${CacheControl},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzManagementGroupSubscription_Delete';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzManagementGroupSubscription_DeleteViaIdentity';
        }
        if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Delete management group.
If a management group contains child resources, the request will fail.
.Description
Delete management group.
If a management group contains child resources, the request will fail.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azmanagementgroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azmanagementgroup
#>

function Remove-AzManagementGroup {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Alias('GroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Management Group ID.
    ${GroupId},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Header')]
    [System.String]
    # Indicates that the request shouldn't utilize any caches.
    ${CacheControl},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzManagementGroup_Delete';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzManagementGroup_DeleteViaIdentity';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation deletes a policy assignment, given its name and the scope it was created in.
The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
.Description
This operation deletes a policy assignment, given its name and the scope it was created in.
The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azpolicyassignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyAssignment
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azpolicyassignment
#>

function Remove-AzPolicyAssignment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyAssignment])]
[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Alias('PolicyAssignmentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy assignment to delete.
    ${Name},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the policy assignment.
    # Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
    ${Scope},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Alias('PolicyAssignmentId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the policy assignment to delete.
    # Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
    ${Id},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzPolicyAssignment_Delete';
            Delete1 = 'Az.Resources.private\Remove-AzPolicyAssignment_Delete1';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzPolicyAssignment_DeleteViaIdentity';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzPolicyAssignment_DeleteViaIdentity1';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation deletes the policy definition in the given subscription with the given name.
.Description
This operation deletes the policy definition in the given subscription with the given name.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azpolicydefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azpolicydefinition
#>

function Remove-AzPolicyDefinition {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Alias('PolicyDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy definition to delete.
    ${Name},

    [Parameter(ParameterSetName='Delete')]
    [Parameter(ParameterSetName='DeleteById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the management group.
    ${ManagementGroupName},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='DeleteById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the policy definition.
    ${Id},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzPolicyDefinition_Delete';
            Delete1 = 'Az.Resources.private\Remove-AzPolicyDefinition_Delete1';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzPolicyDefinition_DeleteViaIdentity';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzPolicyDefinition_DeleteViaIdentity1';
            DeleteById = 'Az.Resources.custom\Remove-AzPolicyDefinition_DeleteById';
        }
        if (('Delete', 'DeleteById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation deletes the policy set definition in the given subscription with the given name.
.Description
This operation deletes the policy set definition in the given subscription with the given name.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azpolicysetdefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azpolicysetdefinition
#>

function Remove-AzPolicySetDefinition {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Alias('PolicySetDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy set definition to delete.
    ${Name},

    [Parameter(ParameterSetName='Delete')]
    [Parameter(ParameterSetName='DeleteById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the management group.
    ${ManagementGroupName},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='DeleteById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the policy set definition.
    ${Id},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzPolicySetDefinition_Delete';
            Delete1 = 'Az.Resources.private\Remove-AzPolicySetDefinition_Delete1';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzPolicySetDefinition_DeleteViaIdentity';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzPolicySetDefinition_DeleteViaIdentity1';
            DeleteById = 'Az.Resources.custom\Remove-AzPolicySetDefinition_DeleteById';
        }
        if (('Delete', 'DeleteById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
When you delete a resource group, all of its resources are also deleted.
Deleting a resource group deletes all of its template deployments and currently stored operations.
.Description
When you delete a resource group, all of its resources are also deleted.
Deleting a resource group deletes all of its template deployments and currently stored operations.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azresourcegroup
#>

function Remove-AzResourceGroup {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Alias('ResourceGroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to delete.
    # The name is case insensitive.
    ${Name},

    [Parameter(ParameterSetName='Delete')]
    [Parameter(ParameterSetName='DeleteById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='DeleteById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the resource group.
    ${Id},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Use the default credentials for the proxy
    ${ProxyUseDefaultCredentials},

    [Parameter(ParameterSetName='Delete')]
    [Parameter(ParameterSetName='DeleteViaIdentity')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(ParameterSetName='Delete')]
    [Parameter(ParameterSetName='DeleteViaIdentity')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(ParameterSetName='Delete')]
    [Parameter(ParameterSetName='DeleteViaIdentity')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru}
)

begin {
    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
            $PSBoundParameters['OutBuffer'] = 1
        }
        $parameterSet = $PSCmdlet.ParameterSetName
        $mapping = @{
            Delete = 'Az.Resources.private\Remove-AzResourceGroup_Delete';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzResourceGroup_DeleteViaIdentity';
            DeleteById = 'Az.Resources.custom\Remove-AzResourceGroup_DeleteById';
        }
        if (('Delete', 'DeleteById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Delete a management lock by scope.
.Description
Delete a management lock by scope.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azresourcelock
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azresourcelock
#>

function Remove-AzResourceLock {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete2', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Parameter(ParameterSetName='Delete2', Mandatory)]
    [Parameter(ParameterSetName='Delete3', Mandatory)]
    [Parameter(ParameterSetName='DeleteTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of lock.
    ${LockName},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope for the lock.
    ${Scope},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource identity.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Parameter(ParameterSetName='Delete3', Mandatory)]
    [Parameter(ParameterSetName='DeleteTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group containing the resource with the lock to delete.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Parameter(ParameterSetName='DeleteTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource with the lock to delete.
    ${ResourceName},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Parameter(ParameterSetName='DeleteTopLevelResource', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource provider namespace of the resource with the lock to delete.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Parameter(ParameterSetName='DeleteTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type of the resource with the lock to delete.
    ${ResourceType},

    [Parameter(ParameterSetName='Delete1')]
    [Parameter(ParameterSetName='Delete2')]
    [Parameter(ParameterSetName='Delete3')]
    [Parameter(ParameterSetName='DeleteTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzResourceLock_Delete';
            Delete1 = 'Az.Resources.private\Remove-AzResourceLock_Delete1';
            Delete2 = 'Az.Resources.private\Remove-AzResourceLock_Delete2';
            Delete3 = 'Az.Resources.private\Remove-AzResourceLock_Delete3';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzResourceLock_DeleteViaIdentity';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzResourceLock_DeleteViaIdentity1';
            DeleteViaIdentity2 = 'Az.Resources.private\Remove-AzResourceLock_DeleteViaIdentity2';
            DeleteViaIdentity3 = 'Az.Resources.private\Remove-AzResourceLock_DeleteViaIdentity3';
            DeleteTopLevelResource = 'Az.Resources.custom\Remove-AzResourceLock_DeleteTopLevelResource';
        }
        if (('Delete1', 'Delete2', 'Delete3', 'DeleteTopLevelResource') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Deletes a resource.
.Description
Deletes a resource.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azresource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azresource
#>

function Remove-AzResource {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='DeleteTopLevelResource', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='DeleteTopLevelResource', Mandatory)]
    [Alias('ResourceName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource to delete.
    ${Name},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource identity.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='DeleteTopLevelResource', Mandatory)]
    [Alias('ResourceProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ProviderNamespace},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='DeleteTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group that contains the resource to delete.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='DeleteTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type.
    ${ResourceType},

    [Parameter(ParameterSetName='Delete')]
    [Parameter(ParameterSetName='DeleteTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the resource, including the resource name and resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
    ${ResourceId},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The API version to use for the operation.
    ${ApiVersion},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzResource_Delete';
            Delete1 = 'Az.Resources.private\Remove-AzResource_Delete1';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzResource_DeleteViaIdentity';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzResource_DeleteViaIdentity1';
            DeleteTopLevelResource = 'Az.Resources.custom\Remove-AzResource_DeleteTopLevelResource';
        }
        if (('Delete', 'DeleteTopLevelResource') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Deletes a role assignment.
.Description
Deletes a role assignment.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azroleassignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20171001Preview.IRoleAssignment
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180901Preview.IRoleAssignment
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azroleassignment
#>

function Remove-AzRoleAssignment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20171001Preview.IRoleAssignment], [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180901Preview.IRoleAssignment])]
[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Alias('RoleAssignmentId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the role assignment to delete.
    ${Id},

    [Parameter(ParameterSetName='Delete2', Mandatory)]
    [Alias('RoleAssignmentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the role assignment to delete.
    ${Name},

    [Parameter(ParameterSetName='Delete2', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the role assignment to delete.
    ${Scope},

    [Parameter(ParameterSetName='Delete3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the role assignment to delete.
    ${RoleId},

    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Delete1 = 'Az.Resources.private\Remove-AzRoleAssignment_Delete1';
            Delete2 = 'Az.Resources.private\Remove-AzRoleAssignment_Delete2';
            Delete3 = 'Az.Resources.private\Remove-AzRoleAssignment_Delete3';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzRoleAssignment_DeleteViaIdentity1';
            DeleteViaIdentity2 = 'Az.Resources.private\Remove-AzRoleAssignment_DeleteViaIdentity2';
            DeleteViaIdentity3 = 'Az.Resources.private\Remove-AzRoleAssignment_DeleteViaIdentity3';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Deletes a role definition.
.Description
Deletes a role definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azroledefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IRoleDefinition
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azroledefinition
#>

function Remove-AzRoleDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IRoleDefinition])]
[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Alias('RoleDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the role definition to delete.
    ${Id},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Parameter(ParameterSetName='DeleteByName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the role definition.
    ${Scope},

    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='DeleteByName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the role definition.
    ${Name},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Delete1 = 'Az.Resources.private\Remove-AzRoleDefinition_Delete1';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzRoleDefinition_DeleteViaIdentity1';
            DeleteByName = 'Az.Resources.custom\Remove-AzRoleDefinition_DeleteByName';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
You must remove all values from a resource tag before you can delete it.
.Description
You must remove all values from a resource tag before you can delete it.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-aztag
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-aztag
#>

function Remove-AzTag {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='DeleteValue', Mandatory)]
    [Alias('TagName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the tag.
    ${Name},

    [Parameter(ParameterSetName='Delete')]
    [Parameter(ParameterSetName='DeleteValue')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='DeleteValue', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The value of the tag to delete.
    ${Value},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Remove-AzTag_Delete';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzTag_DeleteViaIdentity';
            DeleteValue = 'Az.Resources.custom\Remove-AzTag_DeleteValue';
        }
        if (('Delete', 'DeleteValue') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Restores the deleted application in the directory.
.Description
Restores the deleted application in the directory.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/restore-azaddeletedapplication
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IApplication
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/restore-azaddeletedapplication
#>

function Restore-AzADDeletedApplication {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IApplication])]
[CmdletBinding(DefaultParameterSetName='Restore', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Restore', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Application object ID.
    ${ObjectId},

    [Parameter(ParameterSetName='Restore', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Restore-AzADDeletedApplication_Restore';
            RestoreViaIdentity = 'Az.Resources.private\Restore-AzADDeletedApplication_RestoreViaIdentity';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates a new managed application definition.
.Description
Creates a new managed application definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azmanagedapplicationdefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinition
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinition
.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.
 
ARTIFACT <IApplicationArtifact[]>: The collection of managed application artifacts. The portal will use the files specified as artifacts to construct the user experience of creating a managed application from a managed application definition.
  [Name <String>]: The managed application artifact name.
  [Type <ApplicationArtifactType?>]: The managed application artifact type.
  [Uri <String>]: The managed application artifact blob uri.
 
AUTHORIZATION <IApplicationProviderAuthorization[]>: The managed application provider authorizations.
  PrincipalId <String>: The provider's principal identifier. This is the identity that the provider will use to call ARM to manage the managed application resources.
  RoleDefinitionId <String>: The provider's role definition identifier. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group.
 
PARAMETER <IApplicationDefinition>: Information about managed application definition.
  SkuName <String>: The SKU name.
  Authorization <IApplicationProviderAuthorization[]>: The managed application provider authorizations.
    PrincipalId <String>: The provider's principal identifier. This is the identity that the provider will use to call ARM to manage the managed application resources.
    RoleDefinitionId <String>: The provider's role definition identifier. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group.
  LockLevel <ApplicationLockLevel>: The managed application lock level.
  [IdentityType <ResourceIdentityType?>]: The identity type.
  [ManagedBy <String>]: ID of the resource that manages this resource.
  [SkuCapacity <Int32?>]: The SKU capacity.
  [SkuFamily <String>]: The SKU family.
  [SkuModel <String>]: The SKU model.
  [SkuSize <String>]: The SKU size.
  [SkuTier <String>]: The SKU tier.
  [Location <String>]: Resource location
  [Tag <IResourceTags>]: Resource tags
    [(Any) <String>]: This indicates any property can be added to this object.
  [Artifact <IApplicationArtifact[]>]: The collection of managed application artifacts. The portal will use the files specified as artifacts to construct the user experience of creating a managed application from a managed application definition.
    [Name <String>]: The managed application artifact name.
    [Type <ApplicationArtifactType?>]: The managed application artifact type.
    [Uri <String>]: The managed application artifact blob uri.
  [CreateUiDefinition <IApplicationDefinitionPropertiesCreateUiDefinition>]: The createUiDefinition json for the backing template with Microsoft.Solutions/applications resource. It can be a JObject or well-formed JSON string.
  [Description <String>]: The managed application definition description.
  [DisplayName <String>]: The managed application definition display name.
  [IsEnabled <String>]: A value indicating whether the package is enabled or not.
  [MainTemplate <IApplicationDefinitionPropertiesMainTemplate>]: The inline main template json which has resources to be provisioned. It can be a JObject or well-formed JSON string.
  [PackageFileUri <String>]: The managed application definition package file Uri. Use this element
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azmanagedapplicationdefinition
#>

function Set-AzManagedApplicationDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinition])]
[CmdletBinding(DefaultParameterSetName='Update1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Alias('ApplicationDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the managed application definition.
    ${Name},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Update')]
    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Update1', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Alias('ApplicationDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
    ${Id},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinition]
    # Information about managed application definition.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationProviderAuthorization[]]
    # The managed application provider authorizations.
    # To construct, see NOTES section for AUTHORIZATION properties and create a hash table.
    ${Authorization},

    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ApplicationLockLevel])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ApplicationLockLevel]
    # The managed application lock level.
    ${LockLevel},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationArtifact[]]
    # The collection of managed application artifacts.
    # The portal will use the files specified as artifacts to construct the user experience of creating a managed application from a managed application definition.
    # To construct, see NOTES section for ARTIFACT properties and create a hash table.
    ${Artifact},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinitionPropertiesCreateUiDefinition]
    # The createUiDefinition json for the backing template with Microsoft.Solutions/applications resource.
    # It can be a JObject or well-formed JSON string.
    ${CreateUiDefinition},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The managed application definition description.
    ${Description},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The managed application definition display name.
    ${DisplayName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType]
    # The identity type.
    ${IdentityType},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # A value indicating whether the package is enabled or not.
    ${IsEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Resource location
    ${Location},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationDefinitionPropertiesMainTemplate]
    # The inline main template json which has resources to be provisioned.
    # It can be a JObject or well-formed JSON string.
    ${MainTemplate},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # ID of the resource that manages this resource.
    ${ManagedBy},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The managed application definition package file Uri.
    # Use this element
    ${PackageFileUri},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Int32]
    # The SKU capacity.
    ${SkuCapacity},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU family.
    ${SkuFamily},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU model.
    ${SkuModel},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU name.
    ${SkuName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU size.
    ${SkuSize},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU tier.
    ${SkuTier},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901Preview.IResourceTags]))]
    [System.Collections.Hashtable]
    # Resource tags
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Update = 'Az.Resources.private\Set-AzManagedApplicationDefinition_Update';
            Update1 = 'Az.Resources.private\Set-AzManagedApplicationDefinition_Update1';
            UpdateExpanded = 'Az.Resources.private\Set-AzManagedApplicationDefinition_UpdateExpanded';
            UpdateExpanded1 = 'Az.Resources.private\Set-AzManagedApplicationDefinition_UpdateExpanded1';
        }
        if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates a new managed application.
.Description
Creates a new managed application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azmanagedapplication
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication
.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.
 
PARAMETER <IApplication>: Information about managed application.
  SkuName <String>: The SKU name.
  Kind <String>: The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog.
  ManagedResourceGroupId <String>: The managed resource group Id.
  PlanName <String>: The plan name.
  PlanProduct <String>: The product code.
  PlanPublisher <String>: The publisher ID.
  PlanVersion <String>: The plan's version.
  [IdentityType <ResourceIdentityType?>]: The identity type.
  [ManagedBy <String>]: ID of the resource that manages this resource.
  [SkuCapacity <Int32?>]: The SKU capacity.
  [SkuFamily <String>]: The SKU family.
  [SkuModel <String>]: The SKU model.
  [SkuSize <String>]: The SKU size.
  [SkuTier <String>]: The SKU tier.
  [Location <String>]: Resource location
  [Tag <IResourceTags>]: Resource tags
    [(Any) <String>]: This indicates any property can be added to this object.
  [DefinitionId <String>]: The fully qualified path of managed application definition Id.
  [Parameter <IApplicationPropertiesParameters>]: Name and value pairs that define the managed application parameters. It can be a JObject or a well formed JSON string.
  [PlanPromotionCode <String>]: The promotion code.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azmanagedapplication
#>

function Set-AzManagedApplication {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication])]
[CmdletBinding(DefaultParameterSetName='UpdateRGExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateRGExpanded', Mandatory)]
    [Alias('ApplicationName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the managed application.
    ${Name},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateRGExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Update')]
    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Update1', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='UpdateRGExpanded1', Mandatory)]
    [Alias('ApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the managed application, including the managed application name and the managed application resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
    ${Id},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication]
    # Information about managed application.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='UpdateRGExpanded1', Mandatory)]
    [Parameter(ParameterSetName='UpdateRGExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The kind of the managed application.
    # Allowed values are MarketPlace and ServiceCatalog.
    ${Kind},

    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='UpdateRGExpanded1', Mandatory)]
    [Parameter(ParameterSetName='UpdateRGExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The managed resource group Id.
    ${ManagedResourceGroupId},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Alias('ManagedApplicationDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The fully qualified path of managed application definition Id.
    ${ApplicationDefinitionId},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationPropertiesParameters]
    # Name and value pairs that define the managed application parameters.
    # It can be a JObject or a well formed JSON string.
    ${ApplicationPropertiesParameter},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType]
    # The identity type.
    ${IdentityType},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Resource location
    ${Location},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # ID of the resource that manages this resource.
    ${ManagedBy},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan name.
    ${PlanName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The product code.
    ${PlanProduct},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The promotion code.
    ${PlanPromotionCode},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The publisher ID.
    ${PlanPublisher},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan's version.
    ${PlanVersion},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Int32]
    # The SKU capacity.
    ${SkuCapacity},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU family.
    ${SkuFamily},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU model.
    ${SkuModel},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU name.
    ${SkuName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU size.
    ${SkuSize},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU tier.
    ${SkuTier},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded1')]
    [Parameter(ParameterSetName='UpdateRGExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901Preview.IResourceTags]))]
    [System.Collections.Hashtable]
    # Resource tags
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Update = 'Az.Resources.private\Set-AzManagedApplication_Update';
            Update1 = 'Az.Resources.private\Set-AzManagedApplication_Update1';
            UpdateExpanded = 'Az.Resources.private\Set-AzManagedApplication_UpdateExpanded';
            UpdateExpanded1 = 'Az.Resources.private\Set-AzManagedApplication_UpdateExpanded1';
            UpdateRGExpanded1 = 'Az.Resources.custom\Set-AzManagedApplication';
            UpdateRGExpanded = 'Az.Resources.custom\Set-AzManagedApplication';
        }
        if (('Update', 'UpdateExpanded', 'UpdateRGExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Create or update a management group.
If a management group is already created and a subsequent create request is issued with different properties, the management group properties will be updated.
.Description
Create or update a management group.
If a management group is already created and a subsequent create request is issued with different properties, the management group properties will be updated.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azmanagementgroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.ICreateManagementGroupRequest
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IManagementGroup
.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.
 
CREATEMANAGEMENTGROUPREQUEST <ICreateManagementGroupRequest>: Management group creation parameters.
  [DisplayName <String>]: The friendly name of the management group. If no value is passed then this field will be set to the groupId.
  [Name <String>]: The name of the management group. For example, 00000000-0000-0000-0000-000000000000
  [ParentId <String>]: The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azmanagementgroup
#>

function Set-AzManagementGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IManagementGroup])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Alias('GroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Management Group ID.
    ${GroupId},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Header')]
    [System.String]
    # Indicates that the request shouldn't utilize any caches.
    ${CacheControl},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.ICreateManagementGroupRequest]
    # Management group creation parameters.
    # To construct, see NOTES section for CREATEMANAGEMENTGROUPREQUEST properties and create a hash table.
    ${CreateManagementGroupRequest},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The friendly name of the management group.
    # If no value is passed then this field will be set to the groupId.
    ${DisplayName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The name of the management group.
    # For example, 00000000-0000-0000-0000-000000000000
    ${Name},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The fully qualified ID for the parent management group.
    # For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
    ${ParentId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Update = 'Az.Resources.private\Set-AzManagementGroup_Update';
            UpdateExpanded = 'Az.Resources.private\Set-AzManagementGroup_UpdateExpanded';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation creates or updates a policy definition in the given subscription with the given name.
.Description
This operation creates or updates a policy definition in the given subscription with the given name.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azpolicydefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyDefinition
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyDefinition
.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.
 
PARAMETER <IPolicyDefinition>: HELP MESSAGE MISSING
  [Description <String>]: The policy definition description.
  [DisplayName <String>]: The display name of the policy definition.
  [Metadata <IPolicyDefinitionPropertiesMetadata>]: The policy definition metadata.
  [Mode <PolicyMode?>]: The policy definition mode. Possible values are NotSpecified, Indexed, and All.
  [Parameter <IPolicyDefinitionPropertiesParameters>]: Required if a parameter is used in policy rule.
  [PolicyRule <IPolicyDefinitionPropertiesPolicyRule>]: The policy rule.
    [(Any) <Object>]: This indicates any property can be added to this object.
  [PolicyType <PolicyType?>]: The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azpolicydefinition
#>

function Set-AzPolicyDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyDefinition])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='Update1', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Alias('PolicyDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy definition to create.
    ${Name},

    [Parameter(ParameterSetName='Update')]
    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Update1', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the management group.
    ${ManagementGroupName},

    [Parameter(ParameterSetName='UpdateById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the policy definition.
    ${Id},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyDefinition]
    # HELP MESSAGE MISSING
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinitionPropertiesParameters]
    # Required if a parameter is used in policy rule.
    ${DefinitionPropertiesParameter},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The policy definition description.
    ${Description},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the policy definition.
    ${DisplayName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinitionPropertiesMetadata]
    # The policy definition metadata.
    ${Metadata},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateById')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyMode])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyMode]
    # The policy definition mode.
    # Possible values are NotSpecified, Indexed, and All.
    ${Mode},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinitionPropertiesPolicyRule]))]
    [System.Collections.Hashtable]
    # The policy rule.
    ${PolicyRule},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateById')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyType]
    # The type of policy definition.
    # Possible values are NotSpecified, BuiltIn, and Custom.
    ${PolicyType},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Update = 'Az.Resources.private\Set-AzPolicyDefinition_Update';
            Update1 = 'Az.Resources.private\Set-AzPolicyDefinition_Update1';
            UpdateExpanded = 'Az.Resources.private\Set-AzPolicyDefinition_UpdateExpanded';
            UpdateExpanded1 = 'Az.Resources.private\Set-AzPolicyDefinition_UpdateExpanded1';
            UpdateById = 'Az.Resources.custom\Set-AzPolicyDefinition_UpdateById';
        }
        if (('Update', 'UpdateExpanded', 'UpdateById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation creates or updates a policy set definition in the given subscription with the given name.
.Description
This operation creates or updates a policy set definition in the given subscription with the given name.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azpolicysetdefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinition
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinition
.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.
 
PARAMETER <IPolicySetDefinition>: The policy set definition.
  PolicyDefinition <IPolicyDefinitionReference[]>: An array of policy definition references.
    [Parameter <IPolicyDefinitionReferenceParameters>]: Required if a parameter is used in policy rule.
    [PolicyDefinitionId <String>]: The ID of the policy definition or policy set definition.
  [Description <String>]: The policy set definition description.
  [DisplayName <String>]: The display name of the policy set definition.
  [Metadata <IPolicySetDefinitionPropertiesMetadata>]: The policy set definition metadata.
  [Parameter <IPolicySetDefinitionPropertiesParameters>]: The policy set definition parameters that can be used in policy definition references.
  [PolicyType <PolicyType?>]: The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom.
 
POLICYDEFINITION <IPolicyDefinitionReference[]>: An array of policy definition references.
  [Parameter <IPolicyDefinitionReferenceParameters>]: Required if a parameter is used in policy rule.
  [PolicyDefinitionId <String>]: The ID of the policy definition or policy set definition.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azpolicysetdefinition
#>

function Set-AzPolicySetDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinition])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='Update1', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Alias('PolicySetDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy set definition to create.
    ${Name},

    [Parameter(ParameterSetName='Update')]
    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Update1', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the management group.
    ${ManagementGroupName},

    [Parameter(ParameterSetName='UpdateById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the policy set definition.
    ${Id},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinition]
    # The policy set definition.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The policy set definition description.
    ${Description},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the policy set definition.
    ${DisplayName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinitionPropertiesMetadata]
    # The policy set definition metadata.
    ${Metadata},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateById', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyDefinitionReference[]]
    # An array of policy definition references.
    # To construct, see NOTES section for POLICYDEFINITION properties and create a hash table.
    ${PolicyDefinition},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateById')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyType]
    # The type of policy definition.
    # Possible values are NotSpecified, BuiltIn, and Custom.
    ${PolicyType},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicySetDefinitionPropertiesParameters]
    # The policy set definition parameters that can be used in policy definition references.
    ${SetDefinitionParameter},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Update = 'Az.Resources.private\Set-AzPolicySetDefinition_Update';
            Update1 = 'Az.Resources.private\Set-AzPolicySetDefinition_Update1';
            UpdateExpanded = 'Az.Resources.private\Set-AzPolicySetDefinition_UpdateExpanded';
            UpdateExpanded1 = 'Az.Resources.private\Set-AzPolicySetDefinition_UpdateExpanded1';
            UpdateById = 'Az.Resources.custom\Set-AzPolicySetDefinition_UpdateById';
        }
        if (('Update', 'UpdateExpanded', 'UpdateById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates or updates a resource group.
.Description
Creates or updates a resource group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup
.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.
 
PARAMETER <IResourceGroup>: Resource group information.
  Location <String>: The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
  [ManagedBy <String>]: The ID of the resource that manages this resource group.
  [Tag <IResourceGroupTags>]: The tags attached to the resource group.
    [(Any) <String>]: This indicates any property can be added to this object.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azresourcegroup
#>

function Set-AzResourceGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Alias('ResourceGroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to create or update.
    # Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.
    ${Name},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='UpdateById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the resource group.
    ${Id},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup]
    # Resource group information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Use the default credentials for the proxy
    ${ProxyUseDefaultCredentials},

    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateById', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The location of the resource group.
    # It cannot be changed after the resource group has been created.
    # It must be one of the supported Azure locations.
    ${Location},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The ID of the resource that manages this resource group.
    ${ManagedBy},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupTags]))]
    [System.Collections.Hashtable]
    # The tags attached to the resource group.
    ${Tag}
)

begin {
    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
            $PSBoundParameters['OutBuffer'] = 1
        }
        $parameterSet = $PSCmdlet.ParameterSetName
        $mapping = @{
            Update = 'Az.Resources.private\Set-AzResourceGroup_Update';
            UpdateExpanded = 'Az.Resources.private\Set-AzResourceGroup_UpdateExpanded';
            UpdateById = 'Az.Resources.custom\Set-AzResourceGroup_UpdateById';
        }
        if (('Update', 'UpdateExpanded', 'UpdateById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
When you apply a lock at a parent scope, all child resources inherit the same lock.
To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions.
Of the built-in roles, only Owner and User Access Administrator are granted those actions.
.Description
When you apply a lock at a parent scope, all child resources inherit the same lock.
To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions.
Of the built-in roles, only Owner and User Access Administrator are granted those actions.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azresourcelock
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject
.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.
 
OWNER <IManagementLockOwner[]>: The owners of the lock.
  [ApplicationId <String>]: The application ID of the lock owner.
 
PARAMETER <IManagementLockObject>: The lock information.
  Level <LockLevel>: The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
  [Note <String>]: Notes about the lock. Maximum of 512 characters.
  [Owner <IManagementLockOwner[]>]: The owners of the lock.
    [ApplicationId <String>]: The application ID of the lock owner.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azresourcelock
#>

function Set-AzResourceLock {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of lock.
    # The lock name can be a maximum of 260 characters.
    # It cannot contain <, > %, &, :, \, ?, /, or any control characters.
    ${LockName},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource identity.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='Update2', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='UpdateTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group containing the resource to lock.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource to lock.
    ${ResourceName},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateTopLevelResource', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource provider namespace of the resource to lock.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type of the resource to lock.
    ${ResourceType},

    [Parameter(ParameterSetName='Update')]
    [Parameter(ParameterSetName='Update1')]
    [Parameter(ParameterSetName='Update2')]
    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Update3', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope for the lock.
    # When providing a scope for the assignment, use '/subscriptions/{subscriptionId}' for subscriptions, '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}' for resources.
    ${Scope},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject]
    # The lock information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded3', Mandatory)]
    [Parameter(ParameterSetName='UpdateTopLevelResource', Mandatory)]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.LockLevel])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.LockLevel]
    # The level of the lock.
    # Possible values are: NotSpecified, CanNotDelete, ReadOnly.
    # CanNotDelete means authorized users are able to read and modify the resources, but not delete.
    # ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
    ${Level},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateExpanded3')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Notes about the lock.
    # Maximum of 512 characters.
    ${Note},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateExpanded3')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockOwner[]]
    # The owners of the lock.
    # To construct, see NOTES section for OWNER properties and create a hash table.
    ${Owner},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Update = 'Az.Resources.private\Set-AzResourceLock_Update';
            Update1 = 'Az.Resources.private\Set-AzResourceLock_Update1';
            Update2 = 'Az.Resources.private\Set-AzResourceLock_Update2';
            Update3 = 'Az.Resources.private\Set-AzResourceLock_Update3';
            UpdateExpanded = 'Az.Resources.private\Set-AzResourceLock_UpdateExpanded';
            UpdateExpanded1 = 'Az.Resources.private\Set-AzResourceLock_UpdateExpanded1';
            UpdateExpanded2 = 'Az.Resources.private\Set-AzResourceLock_UpdateExpanded2';
            UpdateExpanded3 = 'Az.Resources.private\Set-AzResourceLock_UpdateExpanded3';
            UpdateTopLevelResource = 'Az.Resources.custom\Set-AzResourceLock_UpdateTopLevelResource';
        }
        if (('Update', 'Update1', 'Update2', 'UpdateExpanded', 'UpdateExpanded1', 'UpdateExpanded2', 'UpdateTopLevelResource') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates or updates a role definition.
.Description
Creates or updates a role definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azroledefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IRoleDefinition
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IRoleDefinition
.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.
 
PERMISSION <IPermission[]>: Role definition permissions.
  [Action <String[]>]: Allowed actions.
  [NotAction <String[]>]: Denied actions.
  [DataAction <String[]>]: Allowed Data actions.
  [NotDataAction <String[]>]: Denied Data actions.
 
ROLEDEFINITION <IRoleDefinition>: Role definition.
  [AssignableScope <String[]>]: Role definition assignable scopes.
  [Description <String>]: The role definition description.
  [Permission <IPermission[]>]: Role definition permissions.
    [Action <String[]>]: Allowed actions.
    [NotAction <String[]>]: Denied actions.
    [DataAction <String[]>]: Allowed Data actions.
    [NotDataAction <String[]>]: Denied Data actions.
  [RoleName <String>]: The role name.
  [RoleType <String>]: The role type.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azroledefinition
#>

function Set-AzRoleDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IRoleDefinition])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Alias('RoleDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the role definition.
    ${Id},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the role definition.
    ${Scope},

    [Parameter(ParameterSetName='Update1', Mandatory, ValueFromPipeline)]
    [Alias('Role')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IRoleDefinition]
    # Role definition.
    # To construct, see NOTES section for ROLEDEFINITION properties and create a hash table.
    ${RoleDefinition},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # Role definition assignable scopes.
    ${AssignableScope},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role definition description.
    ${Description},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IPermission[]]
    # Role definition permissions.
    # To construct, see NOTES section for PERMISSION properties and create a hash table.
    ${Permission},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role name.
    ${RoleName},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role type.
    ${RoleType},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Update1 = 'Az.Resources.private\Set-AzRoleDefinition_Update1';
            UpdateExpanded1 = 'Az.Resources.private\Set-AzRoleDefinition_UpdateExpanded1';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
You can cancel a deployment only if the provisioningState is Accepted or Running.
After the deployment is canceled, the provisioningState is set to Canceled.
Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
.Description
You can cancel a deployment only if the provisioningState is Accepted or Running.
After the deployment is canceled, the provisioningState is set to Canceled.
Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/stop-azdeployment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/stop-azdeployment
#>

function Stop-AzDeployment {
[Alias('Stop-AzResourceGroupDeployment')]
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Cancel', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Cancel', Mandatory)]
    [Parameter(ParameterSetName='Cancel1', Mandatory)]
    [Alias('DeploymentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the deployment to cancel.
    ${Name},

    [Parameter(ParameterSetName='Cancel')]
    [Parameter(ParameterSetName='Cancel1')]
    [Parameter(ParameterSetName='CancelById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Cancel1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='CancelViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CancelViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='CancelById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the resource group.
    ${Id},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.private\Stop-AzDeployment_Cancel';
            Cancel1 = 'Az.Resources.private\Stop-AzDeployment_Cancel1';
            CancelViaIdentity = 'Az.Resources.private\Stop-AzDeployment_CancelViaIdentity';
            CancelViaIdentity1 = 'Az.Resources.private\Stop-AzDeployment_CancelViaIdentity1';
            CancelById = 'Az.Resources.custom\Stop-AzDeployment_CancelById';
        }
        if (('Cancel', 'Cancel1', 'CancelById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Checks whether the specified user, group, contact, or service principal is a direct or transitive member of the specified group.
.Description
Checks whether the specified user, group, contact, or service principal is a direct or transitive member of the specified group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/test-azadgroupmember
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.ICheckGroupMembershipParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <ICheckGroupMembershipParameters>: Request parameters for IsMemberOf API call.
  [(Any) <Object>]: This indicates any property can be added to this object.
  GroupId <String>: The object ID of the group to check.
  MemberId <String>: The object ID of the contact, group, user, or service principal to check for membership in the specified group.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/test-azadgroupmember
#>

function Test-AzADGroupMember {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='IsExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Is', Mandatory)]
    [Parameter(ParameterSetName='IsExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='IsViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='IsViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Is', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='IsViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.ICheckGroupMembershipParameters]
    # Request parameters for IsMemberOf API call.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='IsExpanded', Mandatory)]
    [Parameter(ParameterSetName='IsViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The object ID of the group to check.
    ${GroupId},

    [Parameter(ParameterSetName='IsExpanded', Mandatory)]
    [Parameter(ParameterSetName='IsViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The object ID of the contact, group, user, or service principal to check for membership in the specified group.
    ${MemberId},

    [Parameter(ParameterSetName='IsExpanded')]
    [Parameter(ParameterSetName='IsViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Collections.Hashtable]
    # Additional Parameters
    ${AdditionalProperties},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Is = 'Az.Resources.private\Test-AzADGroupMember_Is';
            IsExpanded = 'Az.Resources.private\Test-AzADGroupMember_IsExpanded';
            IsViaIdentity = 'Az.Resources.private\Test-AzADGroupMember_IsViaIdentity';
            IsViaIdentityExpanded = 'Az.Resources.private\Test-AzADGroupMember_IsViaIdentityExpanded';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Checks if the specified management group name is valid and unique
.Description
Checks if the specified management group name is valid and unique
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/test-aznameavailability
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.ICheckNameAvailabilityRequest
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.ICheckNameAvailabilityResult
.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.
 
CHECKNAMEAVAILABILITYREQUEST <ICheckNameAvailabilityRequest>: Management group name availability check parameters.
  [Name <String>]: the name to check for availability
  [Type <Type?>]: fully qualified resource type which includes provider namespace
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/test-aznameavailability
#>

function Test-AzNameAvailability {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.ICheckNameAvailabilityResult])]
[CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Check', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.ICheckNameAvailabilityRequest]
    # Management group name availability check parameters.
    # To construct, see NOTES section for CHECKNAMEAVAILABILITYREQUEST properties and create a hash table.
    ${CheckNameAvailabilityRequest},

    [Parameter(ParameterSetName='CheckExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # the name to check for availability
    ${Name},

    [Parameter(ParameterSetName='CheckExpanded')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.Type])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.Type]
    # fully qualified resource type which includes provider namespace
    ${Type},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Check = 'Az.Resources.private\Test-AzNameAvailability_Check';
            CheckExpanded = 'Az.Resources.private\Test-AzNameAvailability_CheckExpanded';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Checks whether a resource group exists.
.Description
Checks whether a resource group exists.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/test-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/test-azresourcegroup
#>

function Test-AzResourceGroup {
[Alias('Test-AzResourceGroupExistence')]
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Check', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Check', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to check.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Check')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Check = 'Az.Resources.private\Test-AzResourceGroup_Check';
            CheckViaIdentity = 'Az.Resources.private\Test-AzResourceGroup_CheckViaIdentity';
        }
        if (('Check') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation checks whether the specified resources can be moved to the target.
The resources to move must be in the same source resource group.
The target resource group may be in a different subscription.
If validation succeeds, it returns HTTP response code 204 (no content).
If validation fails, it returns HTTP response code 409 (Conflict) with an error message.
Retrieve the URL in the Location header value to check the result of the long-running operation.
.Description
This operation checks whether the specified resources can be moved to the target.
The resources to move must be in the same source resource group.
The target resource group may be in a different subscription.
If validation succeeds, it returns HTTP response code 204 (no content).
If validation fails, it returns HTTP response code 409 (Conflict) with an error message.
Retrieve the URL in the Location header value to check the result of the long-running operation.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/test-azresourcemove
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourcesMoveInfo
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IResourcesMoveInfo>: Parameters of move resources.
  [Resource <String[]>]: The IDs of the resources.
  [TargetResourceGroup <String>]: The target resource group.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/test-azresourcemove
#>

function Test-AzResourceMove {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='ValidateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Validate', Mandatory)]
    [Parameter(ParameterSetName='ValidateExpanded', Mandatory)]
    [Parameter(ParameterSetName='ValidateByComponents', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group containing the resources to validate for move.
    ${SourceResourceGroupName},

    [Parameter(ParameterSetName='Validate')]
    [Parameter(ParameterSetName='ValidateExpanded')]
    [Parameter(ParameterSetName='ValidateByComponents')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='ValidateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='ValidateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Validate', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='ValidateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourcesMoveInfo]
    # Parameters of move resources.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(ParameterSetName='ValidateExpanded')]
    [Parameter(ParameterSetName='ValidateViaIdentityExpanded')]
    [Parameter(ParameterSetName='ValidateByComponents')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # The IDs of the resources.
    ${Resource},

    [Parameter(ParameterSetName='ValidateExpanded')]
    [Parameter(ParameterSetName='ValidateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The target resource group.
    ${TargetResourceGroup},

    [Parameter(ParameterSetName='ValidateByComponents', Mandatory)]
    [Alias('DestinationResourceGroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The target resource group name.
    ${TargetResourceGroupName},

    [Parameter(ParameterSetName='ValidateByComponents')]
    [Alias('DestinationSubscriptionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The target subscription id.
    # If not value is provided, the subscription id of the current context will be used.
    ${TargetSubscriptionId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(ParameterSetName='Validate')]
    [Parameter(ParameterSetName='ValidateExpanded')]
    [Parameter(ParameterSetName='ValidateViaIdentity')]
    [Parameter(ParameterSetName='ValidateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Validate = 'Az.Resources.private\Test-AzResourceMove_Validate';
            ValidateExpanded = 'Az.Resources.private\Test-AzResourceMove_ValidateExpanded';
            ValidateViaIdentity = 'Az.Resources.private\Test-AzResourceMove_ValidateViaIdentity';
            ValidateViaIdentityExpanded = 'Az.Resources.private\Test-AzResourceMove_ValidateViaIdentityExpanded';
            ValidateByComponents = 'Az.Resources.custom\Test-AzResourceMove_ValidateByComponents';
        }
        if (('Validate', 'ValidateExpanded', 'ValidateByComponents') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Unregisters a subscription from a resource provider.
.Description
Unregisters a subscription from a resource provider.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/unregister-azresourceprovider
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IProvider
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/unregister-azresourceprovider
#>

function Unregister-AzResourceProvider {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IProvider])]
[CmdletBinding(DefaultParameterSetName='Unregister', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Unregister', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider to unregister.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Unregister')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='UnregisterViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Unregister = 'Az.Resources.private\Unregister-AzResourceProvider_Unregister';
            UnregisterViaIdentity = 'Az.Resources.private\Unregister-AzResourceProvider_UnregisterViaIdentity';
        }
        if (('Unregister') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Update an existing application.
.Description
Update an existing application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azadapplication
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IApplicationUpdateParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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.
 
APPROLE <IAppRole[]>: The collection of application roles that an application may declare. These roles can be assigned to users, groups or service principals.
  [AllowedMemberType <String[]>]: Specifies whether this app role definition can be assigned to users and groups by setting to 'User', or to other applications (that are accessing this application in daemon service scenarios) by setting to 'Application', or to both.
  [Description <String>]: Permission help text that appears in the admin app assignment and consent experiences.
  [DisplayName <String>]: Display name for the permission that appears in the admin consent and app assignment experiences.
  [Id <String>]: Unique role identifier inside the appRoles collection.
  [IsEnabled <Boolean?>]: When creating or updating a role definition, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed.
  [Value <String>]: Specifies the value of the roles claim that the application should expect in the authentication and access tokens.
 
INPUTOBJECT <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
KEYCREDENTIALS <IKeyCredential[]>: A collection of KeyCredential objects.
  [CustomKeyIdentifier <String>]: Custom Key Identifier
  [EndDate <DateTime?>]: End date.
  [KeyId <String>]: Key ID.
  [StartDate <DateTime?>]: Start date.
  [Type <String>]: Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'.
  [Usage <String>]: Usage. Acceptable values are 'Verify' and 'Sign'.
  [Value <String>]: Key value.
 
OAUTH2PERMISSION <IOAuth2Permission[]>: The collection of OAuth 2.0 permission scopes that the web API (resource) application exposes to client applications. These permission scopes may be granted to client applications during consent.
  [AdminConsentDescription <String>]: Permission help text that appears in the admin consent and app assignment experiences.
  [AdminConsentDisplayName <String>]: Display name for the permission that appears in the admin consent and app assignment experiences.
  [Id <String>]: Unique scope permission identifier inside the oauth2Permissions collection.
  [IsEnabled <Boolean?>]: When creating or updating a permission, this property must be set to true (which is the default). To delete a permission, this property must first be set to false. At that point, in a subsequent call, the permission may be removed.
  [Type <String>]: Specifies whether this scope permission can be consented to by an end user, or whether it is a tenant-wide permission that must be consented to by a Company Administrator. Possible values are "User" or "Admin".
  [UserConsentDescription <String>]: Permission help text that appears in the end user consent experience.
  [UserConsentDisplayName <String>]: Display name for the permission that appears in the end user consent experience.
  [Value <String>]: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.
 
OPTIONALCLAIMACCESSTOKEN <IOptionalClaim[]>: Optional claims requested to be included in the access token.
  [AdditionalProperty <IOptionalClaimAdditionalProperties>]:
  [Essential <Boolean?>]: Is this a required claim.
  [Name <String>]: Claim name.
  [Source <String>]: Claim source.
 
OPTIONALCLAIMIDTOKEN <IOptionalClaim[]>: Optional claims requested to be included in the id token.
  [AdditionalProperty <IOptionalClaimAdditionalProperties>]:
  [Essential <Boolean?>]: Is this a required claim.
  [Name <String>]: Claim name.
  [Source <String>]: Claim source.
 
OPTIONALCLAIMSAMLTOKEN <IOptionalClaim[]>: Optional claims requested to be included in the saml token.
  [AdditionalProperty <IOptionalClaimAdditionalProperties>]:
  [Essential <Boolean?>]: Is this a required claim.
  [Name <String>]: Claim name.
  [Source <String>]: Claim source.
 
PARAMETER <IApplicationUpdateParameters>: Request parameters for updating a new application.
  [AllowGuestsSignIn <Boolean?>]: A property on the application to indicate if the application accepts other IDPs or not or partially accepts.
  [AllowPassthroughUser <Boolean?>]: Indicates that the application supports pass through users who have no presence in the resource tenant.
  [AppLogoUrl <String>]: The url for the application logo image stored in a CDN.
  [AppPermission <String[]>]: The application permissions.
  [AppRole <IAppRole[]>]: The collection of application roles that an application may declare. These roles can be assigned to users, groups or service principals.
    [AllowedMemberType <String[]>]: Specifies whether this app role definition can be assigned to users and groups by setting to 'User', or to other applications (that are accessing this application in daemon service scenarios) by setting to 'Application', or to both.
    [Description <String>]: Permission help text that appears in the admin app assignment and consent experiences.
    [DisplayName <String>]: Display name for the permission that appears in the admin consent and app assignment experiences.
    [Id <String>]: Unique role identifier inside the appRoles collection.
    [IsEnabled <Boolean?>]: When creating or updating a role definition, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed.
    [Value <String>]: Specifies the value of the roles claim that the application should expect in the authentication and access tokens.
  [AvailableToOtherTenant <Boolean?>]: Whether the application is available to other tenants.
  [ErrorUrl <String>]: A URL provided by the author of the application to report errors when using the application.
  [GroupMembershipClaim <GroupMembershipClaimTypes?>]: Configures the groups claim issued in a user or OAuth 2.0 access token that the app expects.
  [Homepage <String>]: The home page of the application.
  [InformationalUrlMarketing <String>]: The marketing URI
  [InformationalUrlPrivacy <String>]: The privacy policy URI
  [InformationalUrlSupport <String>]: The support URI
  [InformationalUrlTermsOfService <String>]: The terms of service URI
  [IsDeviceOnlyAuthSupported <Boolean?>]: Specifies whether this application supports device authentication without a user. The default is false.
  [KeyCredentials <IKeyCredential[]>]: A collection of KeyCredential objects.
    [CustomKeyIdentifier <String>]: Custom Key Identifier
    [EndDate <DateTime?>]: End date.
    [KeyId <String>]: Key ID.
    [StartDate <DateTime?>]: Start date.
    [Type <String>]: Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'.
    [Usage <String>]: Usage. Acceptable values are 'Verify' and 'Sign'.
    [Value <String>]: Key value.
  [KnownClientApplication <String[]>]: Client applications that are tied to this resource application. Consent to any of the known client applications will result in implicit consent to the resource application through a combined consent dialog (showing the OAuth permission scopes required by the client and the resource).
  [LogoutUrl <String>]: the url of the logout page
  [Oauth2AllowImplicitFlow <Boolean?>]: Whether to allow implicit grant flow for OAuth2
  [Oauth2AllowUrlPathMatching <Boolean?>]: Specifies whether during a token Request Azure AD will allow path matching of the redirect URI against the applications collection of replyURLs. The default is false.
  [Oauth2Permission <IOAuth2Permission[]>]: The collection of OAuth 2.0 permission scopes that the web API (resource) application exposes to client applications. These permission scopes may be granted to client applications during consent.
    [AdminConsentDescription <String>]: Permission help text that appears in the admin consent and app assignment experiences.
    [AdminConsentDisplayName <String>]: Display name for the permission that appears in the admin consent and app assignment experiences.
    [Id <String>]: Unique scope permission identifier inside the oauth2Permissions collection.
    [IsEnabled <Boolean?>]: When creating or updating a permission, this property must be set to true (which is the default). To delete a permission, this property must first be set to false. At that point, in a subsequent call, the permission may be removed.
    [Type <String>]: Specifies whether this scope permission can be consented to by an end user, or whether it is a tenant-wide permission that must be consented to by a Company Administrator. Possible values are "User" or "Admin".
    [UserConsentDescription <String>]: Permission help text that appears in the end user consent experience.
    [UserConsentDisplayName <String>]: Display name for the permission that appears in the end user consent experience.
    [Value <String>]: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.
  [Oauth2RequirePostResponse <Boolean?>]: Specifies whether, as part of OAuth 2.0 token requests, Azure AD will allow POST requests, as opposed to GET requests. The default is false, which specifies that only GET requests will be allowed.
  [OptionalClaimAccessToken <IOptionalClaim[]>]: Optional claims requested to be included in the access token.
    [AdditionalProperty <IOptionalClaimAdditionalProperties>]:
    [Essential <Boolean?>]: Is this a required claim.
    [Name <String>]: Claim name.
    [Source <String>]: Claim source.
  [OptionalClaimIdToken <IOptionalClaim[]>]: Optional claims requested to be included in the id token.
  [OptionalClaimSamlToken <IOptionalClaim[]>]: Optional claims requested to be included in the saml token.
  [OrgRestriction <String[]>]: A list of tenants allowed to access application.
  [PasswordCredentials <IPasswordCredential[]>]: A collection of PasswordCredential objects
    [CustomKeyIdentifier <Byte[]>]: Custom Key Identifier
    [EndDate <DateTime?>]: End date.
    [KeyId <String>]: Key ID.
    [StartDate <DateTime?>]: Start date.
    [Value <String>]: Key value.
  [PreAuthorizedApplication <IPreAuthorizedApplication[]>]: list of pre-authorized applications.
    [AppId <String>]: Represents the application id.
    [Extension <IPreAuthorizedApplicationExtension[]>]: Collection of extensions from the resource application.
      [Condition <String[]>]: The extension's conditions.
    [Permission <IPreAuthorizedApplicationPermission[]>]: Collection of required app permissions/entitlements from the resource application.
      [AccessGrant <String[]>]: The list of permissions.
      [DirectAccessGrant <Boolean?>]: Indicates whether the permission set is DirectAccess or impersonation.
  [PublicClient <Boolean?>]: Specifies whether this application is a public client (such as an installed application running on a mobile device). Default is false.
  [PublisherDomain <String>]: Reliable domain which can be used to identify an application.
  [ReplyUrl <String[]>]: A collection of reply URLs for the application.
  [RequiredResourceAccess <IRequiredResourceAccess[]>]: Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. This pre-configuration of required resource access drives the consent experience.
    ResourceAccess <IResourceAccess[]>: The list of OAuth2.0 permission scopes and app roles that the application requires from the specified resource.
      Id <String>: The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
      [Type <String>]: Specifies whether the id property references an OAuth2Permission or an AppRole. Possible values are "scope" or "role".
    [ResourceAppId <String>]: The unique identifier for the resource that the application requires access to. This should be equal to the appId declared on the target resource application.
  [SamlMetadataUrl <String>]: The URL to the SAML metadata for the application.
  [SignInAudience <String>]: Audience for signing in to the application (AzureADMyOrganization, AzureADAllOrganizations, AzureADAndMicrosoftAccounts).
  [WwwHomepage <String>]: The primary Web page.
  [DisplayName <String>]: The display name of the application.
  [IdentifierUri <String[]>]: A collection of URIs for the application.
 
PASSWORDCREDENTIALS <IPasswordCredential[]>: A collection of PasswordCredential objects
  [CustomKeyIdentifier <Byte[]>]: Custom Key Identifier
  [EndDate <DateTime?>]: End date.
  [KeyId <String>]: Key ID.
  [StartDate <DateTime?>]: Start date.
  [Value <String>]: Key value.
 
PREAUTHORIZEDAPPLICATION <IPreAuthorizedApplication[]>: list of pre-authorized applications.
  [AppId <String>]: Represents the application id.
  [Extension <IPreAuthorizedApplicationExtension[]>]: Collection of extensions from the resource application.
    [Condition <String[]>]: The extension's conditions.
  [Permission <IPreAuthorizedApplicationPermission[]>]: Collection of required app permissions/entitlements from the resource application.
    [AccessGrant <String[]>]: The list of permissions.
    [DirectAccessGrant <Boolean?>]: Indicates whether the permission set is DirectAccess or impersonation.
 
REQUIREDRESOURCEACCESS <IRequiredResourceAccess[]>: Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. This pre-configuration of required resource access drives the consent experience.
  ResourceAccess <IResourceAccess[]>: The list of OAuth2.0 permission scopes and app roles that the application requires from the specified resource.
    Id <String>: The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
    [Type <String>]: Specifies whether the id property references an OAuth2Permission or an AppRole. Possible values are "scope" or "role".
  [ResourceAppId <String>]: The unique identifier for the resource that the application requires access to. This should be equal to the appId declared on the target resource application.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azadapplication
#>

function Update-AzADApplication {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='PatchExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Patch', Mandatory)]
    [Parameter(ParameterSetName='PatchExpanded', Mandatory)]
    [Alias('ApplicationObjectId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Application object ID.
    ${ObjectId},

    [Parameter(ParameterSetName='Patch', Mandatory)]
    [Parameter(ParameterSetName='PatchExpanded', Mandatory)]
    [Parameter(ParameterSetName='PatchByApplicationId', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='PatchViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='PatchByApplicationId', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Application ID.
    ${ApplicationId},

    [Parameter(ParameterSetName='Patch', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='PatchViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IApplicationUpdateParameters]
    # Request parameters for updating a new application.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # A property on the application to indicate if the application accepts other IDPs or not or partially accepts.
    ${AllowGuestsSignIn},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Indicates that the application supports pass through users who have no presence in the resource tenant.
    ${AllowPassthroughUser},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The url for the application logo image stored in a CDN.
    ${AppLogoUrl},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # The application permissions.
    ${AppPermission},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IAppRole[]]
    # The collection of application roles that an application may declare.
    # These roles can be assigned to users, groups or service principals.
    # To construct, see NOTES section for APPROLE properties and create a hash table.
    ${AppRole},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Whether the application is available to other tenants.
    ${AvailableToOtherTenants},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the application.
    ${DisplayName},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # A URL provided by the author of the application to report errors when using the application.
    ${ErrorUrl},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.GroupMembershipClaimTypes])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.GroupMembershipClaimTypes]
    # Configures the groups claim issued in a user or OAuth 2.0 access token that the app expects.
    ${GroupMembershipClaim},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The home page of the application.
    ${Homepage},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # A collection of URIs for the application.
    ${IdentifierUri},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The marketing URI
    ${InformationalUrlMarketing},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The privacy policy URI
    ${InformationalUrlPrivacy},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The support URI
    ${InformationalUrlSupport},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The terms of service URI
    ${InformationalUrlTermsOfService},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Specifies whether this application supports device authentication without a user.
    # The default is false.
    ${IsDeviceOnlyAuthSupported},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IKeyCredential[]]
    # A collection of KeyCredential objects.
    # To construct, see NOTES section for KEYCREDENTIALS properties and create a hash table.
    ${KeyCredentials},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # Client applications that are tied to this resource application.
    # Consent to any of the known client applications will result in implicit consent to the resource application through a combined consent dialog (showing the OAuth permission scopes required by the client and the resource).
    ${KnownClientApplication},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # the url of the logout page
    ${LogoutUrl},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Whether to allow implicit grant flow for OAuth2
    ${Oauth2AllowImplicitFlow},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Specifies whether during a token Request Azure AD will allow path matching of the redirect URI against the applications collection of replyURLs.
    # The default is false.
    ${Oauth2AllowUrlPathMatching},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IOAuth2Permission[]]
    # The collection of OAuth 2.0 permission scopes that the web API (resource) application exposes to client applications.
    # These permission scopes may be granted to client applications during consent.
    # To construct, see NOTES section for OAUTH2PERMISSION properties and create a hash table.
    ${Oauth2Permission},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Specifies whether, as part of OAuth 2.0 token requests, Azure AD will allow POST requests, as opposed to GET requests.
    # The default is false, which specifies that only GET requests will be allowed.
    ${Oauth2RequirePostResponse},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IOptionalClaim[]]
    # Optional claims requested to be included in the access token.
    # To construct, see NOTES section for OPTIONALCLAIMACCESSTOKEN properties and create a hash table.
    ${OptionalClaimAccessToken},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IOptionalClaim[]]
    # Optional claims requested to be included in the id token.
    # To construct, see NOTES section for OPTIONALCLAIMIDTOKEN properties and create a hash table.
    ${OptionalClaimIdToken},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IOptionalClaim[]]
    # Optional claims requested to be included in the saml token.
    # To construct, see NOTES section for OPTIONALCLAIMSAMLTOKEN properties and create a hash table.
    ${OptionalClaimSamlToken},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # A list of tenants allowed to access application.
    ${OrgRestriction},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IPasswordCredential[]]
    # A collection of PasswordCredential objects
    # To construct, see NOTES section for PASSWORDCREDENTIALS properties and create a hash table.
    ${PasswordCredentials},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IPreAuthorizedApplication[]]
    # list of pre-authorized applications.
    # To construct, see NOTES section for PREAUTHORIZEDAPPLICATION properties and create a hash table.
    ${PreAuthorizedApplication},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Specifies whether this application is a public client (such as an installed application running on a mobile device).
    # Default is false.
    ${PublicClient},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Reliable domain which can be used to identify an application.
    ${PublisherDomain},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # A collection of reply URLs for the application.
    ${ReplyUrl},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IRequiredResourceAccess[]]
    # Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources.
    # This pre-configuration of required resource access drives the consent experience.
    # To construct, see NOTES section for REQUIREDRESOURCEACCESS properties and create a hash table.
    ${RequiredResourceAccess},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The URL to the SAML metadata for the application.
    ${SamlMetadataUrl},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Audience for signing in to the application (AzureADMyOrganization, AzureADAllOrganizations, AzureADAndMicrosoftAccounts).
    ${SignInAudience},

    [Parameter(ParameterSetName='PatchExpanded')]
    [Parameter(ParameterSetName='PatchViaIdentityExpanded')]
    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The primary Web page.
    ${WwwHomepage},

    [Parameter(ParameterSetName='PatchByApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Whether the application is available to other tenants.
    ${AvailableToOtherTenant},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Patch = 'Az.Resources.private\Update-AzADApplication_Patch';
            PatchExpanded = 'Az.Resources.private\Update-AzADApplication_PatchExpanded';
            PatchViaIdentity = 'Az.Resources.private\Update-AzADApplication_PatchViaIdentity';
            PatchViaIdentityExpanded = 'Az.Resources.private\Update-AzADApplication_PatchViaIdentityExpanded';
            PatchByApplicationId = 'Az.Resources.custom\Update-AzADApplication_PatchByApplicationId';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Updates a service principal in the directory.
.Description
Updates a service principal in the directory.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azadserviceprincipal
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IServicePrincipalUpdateParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
KEYCREDENTIALS <IKeyCredential[]>: The collection of key credentials associated with the service principal.
  [CustomKeyIdentifier <String>]: Custom Key Identifier
  [EndDate <DateTime?>]: End date.
  [KeyId <String>]: Key ID.
  [StartDate <DateTime?>]: Start date.
  [Type <String>]: Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'.
  [Usage <String>]: Usage. Acceptable values are 'Verify' and 'Sign'.
  [Value <String>]: Key value.
 
PARAMETER <IServicePrincipalUpdateParameters>: Request parameters for update an existing service principal.
  [AccountEnabled <Boolean?>]: whether or not the service principal account is enabled
  [AppRoleAssignmentRequired <Boolean?>]: Specifies whether an AppRoleAssignment to a user or group is required before Azure AD will issue a user or access token to the application.
  [KeyCredentials <IKeyCredential[]>]: The collection of key credentials associated with the service principal.
    [CustomKeyIdentifier <String>]: Custom Key Identifier
    [EndDate <DateTime?>]: End date.
    [KeyId <String>]: Key ID.
    [StartDate <DateTime?>]: Start date.
    [Type <String>]: Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'.
    [Usage <String>]: Usage. Acceptable values are 'Verify' and 'Sign'.
    [Value <String>]: Key value.
  [PasswordCredentials <IPasswordCredential[]>]: The collection of password credentials associated with the service principal.
    [CustomKeyIdentifier <Byte[]>]: Custom Key Identifier
    [EndDate <DateTime?>]: End date.
    [KeyId <String>]: Key ID.
    [StartDate <DateTime?>]: Start date.
    [Value <String>]: Key value.
  [ServicePrincipalType <String>]: the type of the service principal
  [Tag <String[]>]: Optional list of tags that you can apply to your service principals. Not nullable.
 
PASSWORDCREDENTIALS <IPasswordCredential[]>: The collection of password credentials associated with the service principal.
  [CustomKeyIdentifier <Byte[]>]: Custom Key Identifier
  [EndDate <DateTime?>]: End date.
  [KeyId <String>]: Key ID.
  [StartDate <DateTime?>]: Start date.
  [Value <String>]: Key value.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azadserviceprincipal
#>

function Update-AzADServicePrincipal {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID of the service principal to delete.
    ${ObjectId},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IServicePrincipalUpdateParameters]
    # Request parameters for update an existing service principal.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # whether or not the service principal account is enabled
    ${AccountEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Specifies whether an AppRoleAssignment to a user or group is required before Azure AD will issue a user or access token to the application.
    ${AppRoleAssignmentRequired},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IKeyCredential[]]
    # The collection of key credentials associated with the service principal.
    # To construct, see NOTES section for KEYCREDENTIALS properties and create a hash table.
    ${KeyCredentials},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IPasswordCredential[]]
    # The collection of password credentials associated with the service principal.
    # To construct, see NOTES section for PASSWORDCREDENTIALS properties and create a hash table.
    ${PasswordCredentials},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # the type of the service principal
    ${ServicePrincipalType},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # Optional list of tags that you can apply to your service principals.
    # Not nullable.
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Update = 'Az.Resources.private\Update-AzADServicePrincipal_Update';
            UpdateExpanded = 'Az.Resources.private\Update-AzADServicePrincipal_UpdateExpanded';
            UpdateViaIdentity = 'Az.Resources.private\Update-AzADServicePrincipal_UpdateViaIdentity';
            UpdateViaIdentityExpanded = 'Az.Resources.private\Update-AzADServicePrincipal_UpdateViaIdentityExpanded';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Updates a user.
.Description
Updates a user.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azaduser
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IUserUpdateParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IUserUpdateParameters>: Request parameters for updating an existing work or school account user.
  [(Any) <Object>]: This indicates any property can be added to this object.
  [GivenName <String>]: The given name for the user.
  [ImmutableId <String>]: This must be specified if you are using a federated domain for the user's userPrincipalName (UPN) property when creating a new user account. It is used to associate an on-premises Active Directory user account with their Azure AD user object.
  [Surname <String>]: The user's surname (family name or last name).
  [UsageLocation <String>]: A two letter country code (ISO standard 3166). Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. Examples include: "US", "JP", and "GB".
  [UserType <UserType?>]: A string value that can be used to classify user types in your directory, such as 'Member' and 'Guest'.
  [AccountEnabled <Boolean?>]: Whether the account is enabled.
  [DisplayName <String>]: The display name of the user.
  [MailNickname <String>]: The mail alias for the user.
  [PasswordProfile <IPasswordProfile>]: The password profile of the user.
    [(Any) <Object>]: This indicates any property can be added to this object.
    Password <String>: Password
    [ForceChangePasswordNextLogin <Boolean?>]: Whether to force a password change on next login.
  [UserPrincipalName <String>]: The user principal name (someuser@contoso.com). It must contain one of the verified domains for the tenant.
 
PASSWORDPROFILE <IPasswordProfile>: The password profile of the user.
  [(Any) <Object>]: This indicates any property can be added to this object.
  Password <String>: Password
  [ForceChangePasswordNextLogin <Boolean?>]: Whether to force a password change on next login.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azaduser
#>

function Update-AzADUser {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Alias('Upn', 'ObjectId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The object ID or principal name of the user to update.
    ${UpnOrObjectId},

    [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IUserUpdateParameters]
    # Request parameters for updating an existing work or school account user.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the user.
    ${DisplayName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Whether the account is enabled.
    ${EnableAccount},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The given name for the user.
    ${GivenName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # This must be specified if you are using a federated domain for the user's userPrincipalName (UPN) property when creating a new user account.
    # It is used to associate an on-premises Active Directory user account with their Azure AD user object.
    ${ImmutableId},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The mail alias for the user.
    ${MailNickname},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api16.IPasswordProfile]
    # The password profile of the user.
    # To construct, see NOTES section for PASSWORDPROFILE properties and create a hash table.
    ${PasswordProfile},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The user's surname (family name or last name).
    ${Surname},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # A two letter country code (ISO standard 3166).
    # Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries.
    # Examples include: "US", "JP", and "GB".
    ${UsageLocation},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The user principal name (someuser@contoso.com).
    # It must contain one of the verified domains for the tenant.
    ${UserPrincipalName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.UserType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.UserType]
    # A string value that can be used to classify user types in your directory, such as 'Member' and 'Guest'.
    ${UserType},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Update = 'Az.Resources.private\Update-AzADUser_Update';
            UpdateExpanded = 'Az.Resources.private\Update-AzADUser_UpdateExpanded';
            UpdateViaIdentity = 'Az.Resources.private\Update-AzADUser_UpdateViaIdentity';
            UpdateViaIdentityExpanded = 'Az.Resources.private\Update-AzADUser_UpdateViaIdentityExpanded';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Updates an existing managed application.
The only value that can be updated via PATCH currently is the tags.
.Description
Updates an existing managed application.
The only value that can be updated via PATCH currently is the tags.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azmanagedapplication
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IApplication>: Information about managed application.
  SkuName <String>: The SKU name.
  Kind <String>: The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog.
  ManagedResourceGroupId <String>: The managed resource group Id.
  PlanName <String>: The plan name.
  PlanProduct <String>: The product code.
  PlanPublisher <String>: The publisher ID.
  PlanVersion <String>: The plan's version.
  [IdentityType <ResourceIdentityType?>]: The identity type.
  [ManagedBy <String>]: ID of the resource that manages this resource.
  [SkuCapacity <Int32?>]: The SKU capacity.
  [SkuFamily <String>]: The SKU family.
  [SkuModel <String>]: The SKU model.
  [SkuSize <String>]: The SKU size.
  [SkuTier <String>]: The SKU tier.
  [Location <String>]: Resource location
  [Tag <IResourceTags>]: Resource tags
    [(Any) <String>]: This indicates any property can be added to this object.
  [DefinitionId <String>]: The fully qualified path of managed application definition Id.
  [Parameter <IApplicationPropertiesParameters>]: Name and value pairs that define the managed application parameters. It can be a JObject or a well formed JSON string.
  [PlanPromotionCode <String>]: The promotion code.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azmanagedapplication
#>

function Update-AzManagedApplication {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Alias('ApplicationName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the managed application.
    ${Name},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Update')]
    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Update1', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Alias('ApplicationId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the managed application, including the managed application name and the managed application resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
    ${Id},

    [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180601.IApplication]
    # Information about managed application.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The kind of the managed application.
    # Allowed values are MarketPlace and ServiceCatalog.
    ${Kind},

    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The managed resource group Id.
    ${ManagedResourceGroupId},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Alias('ManagedApplicationDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The fully qualified path of managed application definition Id.
    ${ApplicationDefinitionId},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20170901.IApplicationPropertiesParameters]
    # Name and value pairs that define the managed application parameters.
    # It can be a JObject or a well formed JSON string.
    ${ApplicationParameter},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType]
    # The identity type.
    ${IdentityType},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Resource location
    ${Location},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # ID of the resource that manages this resource.
    ${ManagedBy},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan name.
    ${PlanName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The product code.
    ${PlanProduct},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The promotion code.
    ${PlanPromotionCode},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The publisher ID.
    ${PlanPublisher},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan's version.
    ${PlanVersion},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Int32]
    # The SKU capacity.
    ${SkuCapacity},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU family.
    ${SkuFamily},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU model.
    ${SkuModel},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU name.
    ${SkuName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU size.
    ${SkuSize},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU tier.
    ${SkuTier},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901Preview.IResourceTags]))]
    [System.Collections.Hashtable]
    # Resource tags
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Update = 'Az.Resources.private\Update-AzManagedApplication_Update';
            Update1 = 'Az.Resources.private\Update-AzManagedApplication_Update1';
            UpdateExpanded = 'Az.Resources.private\Update-AzManagedApplication_UpdateExpanded';
            UpdateExpanded1 = 'Az.Resources.private\Update-AzManagedApplication_UpdateExpanded1';
            UpdateViaIdentity = 'Az.Resources.private\Update-AzManagedApplication_UpdateViaIdentity';
            UpdateViaIdentity1 = 'Az.Resources.private\Update-AzManagedApplication_UpdateViaIdentity1';
            UpdateViaIdentityExpanded = 'Az.Resources.private\Update-AzManagedApplication_UpdateViaIdentityExpanded';
            UpdateViaIdentityExpanded1 = 'Az.Resources.private\Update-AzManagedApplication_UpdateViaIdentityExpanded1';
        }
        if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Update a management group.
.Description
Update a management group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azmanagementgroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IPatchManagementGroupRequest
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IManagementGroup
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PATCHGROUPREQUEST <IPatchManagementGroupRequest>: Management group patch parameters.
  [DisplayName <String>]: The friendly name of the management group.
  [ParentId <String>]: (Optional) The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azmanagementgroup
#>

function Update-AzManagementGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IManagementGroup])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Alias('GroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Management Group ID.
    ${GroupId},

    [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Header')]
    [System.String]
    # Indicates that the request shouldn't utilize any caches.
    ${CacheControl},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180301Preview.IPatchManagementGroupRequest]
    # Management group patch parameters.
    # To construct, see NOTES section for PATCHGROUPREQUEST properties and create a hash table.
    ${PatchGroupRequest},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The friendly name of the management group.
    ${DisplayName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # (Optional) The fully qualified ID for the parent management group.
    # For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
    ${ParentId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Update = 'Az.Resources.private\Update-AzManagementGroup_Update';
            UpdateExpanded = 'Az.Resources.private\Update-AzManagementGroup_UpdateExpanded';
            UpdateViaIdentity = 'Az.Resources.private\Update-AzManagementGroup_UpdateViaIdentity';
            UpdateViaIdentityExpanded = 'Az.Resources.private\Update-AzManagementGroup_UpdateViaIdentityExpanded';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Resource groups can be updated through a simple PATCH operation to a group address.
The format of the request is the same as that for creating a resource group.
If a field is unspecified, the current value is retained.
.Description
Resource groups can be updated through a simple PATCH operation to a group address.
The format of the request is the same as that for creating a resource group.
If a field is unspecified, the current value is retained.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupPatchable
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IResourceGroupPatchable>: Resource group information.
  [ManagedBy <String>]: The ID of the resource that manages this resource group.
  [Name <String>]: The name of the resource group.
  [Tag <IResourceGroupPatchableTags>]: The tags attached to the resource group.
    [(Any) <String>]: This indicates any property can be added to this object.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azresourcegroup
#>

function Update-AzResourceGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to update.
    # The name is case insensitive.
    ${Name},

    [Parameter(ParameterSetName='Update')]
    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to update.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='UpdateById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the resource group.
    ${Id},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupPatchable]
    # Resource group information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Use the default credentials for the proxy
    ${ProxyUseDefaultCredentials},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The ID of the resource that manages this resource group.
    ${ManagedBy},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupPatchableTags]))]
    [System.Collections.Hashtable]
    # The tags attached to the resource group.
    ${Tag}
)

begin {
    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
            $PSBoundParameters['OutBuffer'] = 1
        }
        $parameterSet = $PSCmdlet.ParameterSetName
        $mapping = @{
            Update = 'Az.Resources.private\Update-AzResourceGroup_Update';
            UpdateExpanded = 'Az.Resources.private\Update-AzResourceGroup_UpdateExpanded';
            UpdateViaIdentity = 'Az.Resources.private\Update-AzResourceGroup_UpdateViaIdentity';
            UpdateViaIdentityExpanded = 'Az.Resources.private\Update-AzResourceGroup_UpdateViaIdentityExpanded';
            UpdateById = 'Az.Resources.custom\Update-AzResourceGroup_UpdateById';
        }
        if (('Update', 'UpdateExpanded', 'UpdateById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Updates a resource.
.Description
Updates a resource.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azresource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IGenericResource>: Resource information.
  PlanName <String>: The plan name.
  PlanProduct <String>: The product code.
  PlanPublisher <String>: The publisher ID.
  PlanVersion <String>: The plan's version.
  SkuName <String>: The SKU name.
  [Location <String>]: Resource location
  [Tag <IResourceTags>]: Resource tags
    [(Any) <String>]: This indicates any property can be added to this object.
  [IdentityType <ResourceIdentityType?>]: The identity type.
  [IdentityUserAssignedIdentity <IIdentityUserAssignedIdentities>]: The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    [(Any) <IComponentsSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties>]: This indicates any property can be added to this object.
  [Kind <String>]: The kind of the resource.
  [ManagedBy <String>]: ID of the resource that manages this resource.
  [PlanPromotionCode <String>]: The promotion code.
  [Property <IGenericResourceProperties>]: The resource properties.
  [SkuCapacity <Int32?>]: The SKU capacity.
  [SkuFamily <String>]: The SKU family.
  [SkuModel <String>]: The SKU model.
  [SkuSize <String>]: The SKU size.
  [SkuTier <String>]: The SKU tier.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azresource
#>

function Update-AzResource {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateTopLevelResource', Mandatory)]
    [Alias('ResourceName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource to update.
    ${Name},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource identity.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateTopLevelResource', Mandatory)]
    [Alias('ResourceProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ProviderNamespace},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group for the resource.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateTopLevelResource', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type of the resource to update.
    ${ResourceType},

    [Parameter(ParameterSetName='Update')]
    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Update1', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the resource, including the resource name and resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
    ${ResourceId},

    [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The API version to use for the operation.
    ${ApiVersion},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource]
    # Resource information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType]
    # The identity type.
    ${IdentityType},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IIdentityUserAssignedIdentities]))]
    [System.Collections.Hashtable]
    # The list of user identities associated with the resource.
    # The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    ${IdentityUserAssignedIdentity},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The kind of the resource.
    ${Kind},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Resource location
    ${Location},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # ID of the resource that manages this resource.
    ${ManagedBy},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan name.
    ${PlanName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The product code.
    ${PlanProduct},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The promotion code.
    ${PlanPromotionCode},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The publisher ID.
    ${PlanPublisher},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan's version.
    ${PlanVersion},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResourceProperties]
    # The resource properties.
    ${Property},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Int32]
    # The SKU capacity.
    ${SkuCapacity},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU family.
    ${SkuFamily},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU model.
    ${SkuModel},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU name.
    ${SkuName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU size.
    ${SkuSize},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU tier.
    ${SkuTier},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='UpdateTopLevelResource')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901Preview.IResourceTags]))]
    [System.Collections.Hashtable]
    # Resource tags
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            Update = 'Az.Resources.private\Update-AzResource_Update';
            Update1 = 'Az.Resources.private\Update-AzResource_Update1';
            UpdateExpanded = 'Az.Resources.private\Update-AzResource_UpdateExpanded';
            UpdateExpanded1 = 'Az.Resources.private\Update-AzResource_UpdateExpanded1';
            UpdateViaIdentity = 'Az.Resources.private\Update-AzResource_UpdateViaIdentity';
            UpdateViaIdentity1 = 'Az.Resources.private\Update-AzResource_UpdateViaIdentity1';
            UpdateViaIdentityExpanded = 'Az.Resources.private\Update-AzResource_UpdateViaIdentityExpanded';
            UpdateViaIdentityExpanded1 = 'Az.Resources.private\Update-AzResource_UpdateViaIdentityExpanded1';
            UpdateTopLevelResource = 'Az.Resources.custom\Update-AzResource_UpdateTopLevelResource';
        }
        if (('Update', 'UpdateExpanded', 'UpdateTopLevelResource') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets the preview feature with the specified name.
.Description
Gets the preview feature with the specified name.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azproviderfeature
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20151201.IFeatureResult
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azproviderfeature
#>

function Get-AzProviderFeature {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20151201.IFeatureResult])]
[CmdletBinding(DefaultParameterSetName='ListRegistered', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='GetByFeature', Mandatory)]
    [Alias('FeatureName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the feature to get.
    ${Name},

    [Parameter(ParameterSetName='GetByFeature', Mandatory)]
    [Parameter(ParameterSetName='ListByNamespace', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource provider namespace for the feature.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='ListAvailable', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # If set, signals that all available features should be returned.
    ${ListAvailable},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            ListRegistered = 'Az.Resources.custom\Get-AzProviderFeature';
            GetByFeature = 'Az.Resources.custom\Get-AzProviderFeature';
            ListByNamespace = 'Az.Resources.custom\Get-AzProviderFeature';
            ListAvailable = 'Az.Resources.custom\Get-AzProviderFeature';
            GetViaIdentity = 'Az.Resources.custom\Get-AzProviderFeature';
        }
        if (('ListRegistered', 'GetByFeature', 'ListByNamespace', 'ListAvailable', 'GetViaIdentity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets the specified resource provider.
.Description
Gets the specified resource provider.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresourceprovider
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IProvider
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresourceprovider
#>

function Get-AzResourceProvider {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IProvider])]
[CmdletBinding(DefaultParameterSetName='ListRegistered', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='GetByNamespace', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='ListAvailable', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # If set, signals that all available providers should be returned.
    ${ListAvailable},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            ListRegistered = 'Az.Resources.custom\Get-AzResourceProvider';
            GetByNamespace = 'Az.Resources.custom\Get-AzResourceProvider';
            ListAvailable = 'Az.Resources.custom\Get-AzResourceProvider';
        }
        if (('ListRegistered', 'GetByNamespace', 'ListAvailable') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a role assignment by ID.
.Description
Gets a role assignment by ID.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azroleassignment
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180901Preview.IRoleAssignment
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azroleassignment
#>

function Get-AzRoleAssignment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180901Preview.IRoleAssignment])]
[CmdletBinding(DefaultParameterSetName='GetRoleAssignment1', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='GetRoleAssignment2', Mandatory)]
    [Alias('RoleAssignmentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the role assignment to get.
    ${Name},

    [Parameter(ParameterSetName='GetRoleAssignment2', Mandatory)]
    [Parameter(ParameterSetName='ListRoleAssignment7', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the role assignment.
    ${Scope},

    [Parameter(ParameterSetName='GetRoleAssignment3', Mandatory)]
    [Alias('Id')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the role assignment to get.
    ${RoleId},

    [Parameter(ParameterSetName='ListRoleAssignment4', Mandatory)]
    [Alias('ParentResourcePath')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource identity.
    ${ParentResourceId},

    [Parameter(ParameterSetName='ListRoleAssignment4', Mandatory)]
    [Parameter(ParameterSetName='ListRoleAssignment5', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='ListRoleAssignment4', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource to get role assignments for.
    ${ResourceName},

    [Parameter(ParameterSetName='ListRoleAssignment4', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='ListRoleAssignment4', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type of the resource.
    ${ResourceType},

    [Parameter(ParameterSetName='ListRoleAssignment4')]
    [Parameter(ParameterSetName='ListRoleAssignment5')]
    [Parameter(ParameterSetName='ListRoleAssignment6')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='ListRoleAssignment7')]
    [Parameter(ParameterSetName='ListRoleAssignment4')]
    [Parameter(ParameterSetName='ListRoleAssignment5')]
    [Parameter(ParameterSetName='ListRoleAssignment6')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    # Use $filter=atScope() to return all role assignments at or above the scope.
    # Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal.
    ${Filter},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            GetRoleAssignment1 = 'Az.Resources.custom\Get-AzRoleAssignment';
            GetRoleAssignment2 = 'Az.Resources.custom\Get-AzRoleAssignment';
            ListRoleAssignment7 = 'Az.Resources.custom\Get-AzRoleAssignment';
            GetRoleAssignment3 = 'Az.Resources.custom\Get-AzRoleAssignment';
            ListRoleAssignment4 = 'Az.Resources.custom\Get-AzRoleAssignment';
            ListRoleAssignment5 = 'Az.Resources.custom\Get-AzRoleAssignment';
            ListRoleAssignment6 = 'Az.Resources.custom\Get-AzRoleAssignment';
        }
        if (('ListRoleAssignment4', 'ListRoleAssignment5', 'ListRoleAssignment6') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a role definition by ID.
.Description
Gets a role definition by ID.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azroledefinition
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IRoleDefinition
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azroledefinition
#>

function Get-AzRoleDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api201801Preview.IRoleDefinition])]
[CmdletBinding(DefaultParameterSetName='ListRoleDefinition', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(ParameterSetName='GetRoleDefinition2', Mandatory)]
    [Alias('RoleDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the role definition.
    ${Id},

    [Parameter(ParameterSetName='GetRoleDefinition2', Mandatory)]
    [Parameter(ParameterSetName='GetRoleDefinitionByName', Mandatory)]
    [Parameter(ParameterSetName='GetRoleDefinitionByCustom', Mandatory)]
    [Parameter(ParameterSetName='ListRoleDefinition1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the role definition.
    ${Scope},

    [Parameter(ParameterSetName='GetRoleDefinitionByName', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The name of the role definition.
    ${Name},

    [Parameter(ParameterSetName='GetRoleDefinitionByCustom', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Management.Automation.SwitchParameter]
    # If set, signals that only custom created roles in the directory should be returned.
    ${Custom},

    [Parameter(ParameterSetName='ListRoleDefinition1')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    # Use atScopeAndBelow filter to search below the given scope as well.
    ${Filter},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            ListRoleDefinition = 'Az.Resources.custom\Get-AzRoleDefinition';
            GetRoleDefinition2 = 'Az.Resources.custom\Get-AzRoleDefinition';
            GetRoleDefinitionByName = 'Az.Resources.custom\Get-AzRoleDefinition';
            GetRoleDefinitionByCustom = 'Az.Resources.custom\Get-AzRoleDefinition';
            ListRoleDefinition1 = 'Az.Resources.custom\Get-AzRoleDefinition';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Adds a new key credential to a application.
.Description
Adds a new key credential to a application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadapplicationkeycredential
.Outputs
System.Boolean
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadapplicationkeycredential
#>

function New-AzADApplicationKeyCredential {
[OutputType([System.Boolean])]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Application object ID.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The base-64 encoded value for the AsymmetricX509Cert associated with the application.
    ${CertValue},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.DateTime]
    # The start date after which the key would be valid.
    # If no value is provided, the current time is used.
    ${StartDate},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.DateTime]
    # The end date until which the key is valid.
    # If no value is provided, one year after the start date is used.
    ${EndDate},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            __AllParameterSets = 'Az.Resources.custom\New-AzADApplicationKeyCredential';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Adds a new password credential to an application.
.Description
Adds a new password credential to an application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadapplicationpasswordcredential
.Outputs
System.Boolean
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadapplicationpasswordcredential
#>

function New-AzADApplicationPasswordCredential {
[OutputType([System.Boolean])]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Application object ID.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Security.SecureString]
    # The value for the password credential to be associated with the given application.
    ${Password},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.DateTime]
    # The start date after which the password would be valid.
    # If no value is provided, the current time is used.
    ${StartDate},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.DateTime]
    # The end date until which the password is valid.
    # If no value is provided, one year after the start date is used.
    ${EndDate},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            __AllParameterSets = 'Az.Resources.custom\New-AzADApplicationPasswordCredential';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Adds a new key credential to a service principal.
.Description
Adds a new key credential to a service principal.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadserviceprincipalkeycredential
.Outputs
System.Boolean
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadserviceprincipalkeycredential
#>

function New-AzADServicePrincipalKeyCredential {
[OutputType([System.Boolean])]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Service principal object ID.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The base-64 encoded value for the AsymmetricX509Cert associated with the service principal.
    ${CertValue},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.DateTime]
    # The start date after which the key would be valid.
    # If no value is provided, the current time is used.
    ${StartDate},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.DateTime]
    # The end date until which the key is valid.
    # If no value is provided, one year after the start date is used.
    ${EndDate},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            __AllParameterSets = 'Az.Resources.custom\New-AzADServicePrincipalKeyCredential';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Adds a new password credential to a service principal.
.Description
Adds a new password credential to a service principal.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadserviceprincipalpasswordcredential
.Outputs
System.Boolean
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadserviceprincipalpasswordcredential
#>

function New-AzADServicePrincipalPasswordCredential {
[OutputType([System.Boolean])]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Service principal object ID.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Security.SecureString]
    # The value for the password credential to be associated with the given service principal.
    ${Password},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.DateTime]
    # The start date after which the password would be valid.
    # If no value is provided, the current time is used.
    ${StartDate},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.DateTime]
    # The end date until which the password is valid.
    # If no value is provided, one year after the start date is used.
    ${EndDate},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            __AllParameterSets = 'Az.Resources.custom\New-AzADServicePrincipalPasswordCredential';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
You can provide the template and parameters directly in the request or link to JSON files.
.Description
You can provide the template and parameters directly in the request or link to JSON files.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azdeployment
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentExtended
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azdeployment
#>

function New-AzDeployment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentExtended])]
[CmdletBinding(DefaultParameterSetName='CreateWithTemplateFileParameterFile', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter()]
    [Alias('DeploymentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the deployment.
    # If not provided, the name of the template file will be used.
    # If a template file is not used, a random GUID will be used for the name.
    ${Name},

    [Parameter(ParameterSetName='CreateRGWithTemplateObjectParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateObjectParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateObjectParameterFile', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateJsonParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateJsonParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateJsonParameterFile', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateFileParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateFileParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateFileParameterFile', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to deploy the resources to.
    # The name is case insensitive.
    # The resource group must already exist.
    ${ResourceGroupName},

    [Parameter(Mandatory)]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.DeploymentMode])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.DeploymentMode]
    # The mode that is used to deploy resources.
    # This value can be either Incremental or Complete.
    # In Incremental mode, resources are deployed without deleting existing resources that are not included in the template.
    # In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted.
    # Be careful when using Complete mode as you may unintentionally delete resources.
    ${Mode},

    [Parameter(ParameterSetName='CreateWithTemplateFileParameterFile', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateFileParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateFileParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateFileParameterFile', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateFileParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateFileParameterJson', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Local path to the JSON template file.
    ${TemplateFile},

    [Parameter(ParameterSetName='CreateWithTemplateFileParameterFile', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateObjectParameterFile', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateJsonParameterFile', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateFileParameterFile', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateJsonParameterFile', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateObjectParameterFile', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Local path to the parameter JSON template file.
    ${TemplateParameterFile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Specifies the type of information to log for debugging.
    # The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma.
    # The default is none.
    # When setting this value, carefully consider the type of information you are passing in during deployment.
    # By logging information about the request or response, you could potentially expose sensitive data that is retrieved through the deployment operations.
    ${DeploymentDebugLogLevel},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The location to store the deployment data.
    ${Location},

    [Parameter(ParameterSetName='CreateRGWithTemplateObjectParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateObjectParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateObjectParameterFile', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateObjectParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateObjectParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateObjectParameterFile', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Collections.Hashtable]
    # The hashtable representation of the JSON template.
    ${TemplateObject},

    [Parameter(ParameterSetName='CreateRGWithTemplateObjectParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateJsonParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateFileParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateFileParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateJsonParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateObjectParameterObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Collections.Hashtable]
    # The hashtable representation of the parameter JSON template.
    ${TemplateParameterObject},

    [Parameter(ParameterSetName='CreateRGWithTemplateObjectParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateJsonParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateFileParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateFileParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateJsonParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateObjectParameterJson', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The string representation of the parameter JSON template.
    ${TemplateParameterJson},

    [Parameter(ParameterSetName='CreateRGWithTemplateJsonParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateJsonParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateRGWithTemplateJsonParameterFile', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateJsonParameterObject', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateJsonParameterJson', Mandatory)]
    [Parameter(ParameterSetName='CreateWithTemplateJsonParameterFile', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The string representation of the JSON template.
    ${TemplateJson},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            CreateWithTemplateFileParameterFile = 'Az.Resources.custom\New-AzDeployment';
            CreateRGWithTemplateObjectParameterObject = 'Az.Resources.custom\New-AzDeployment';
            CreateRGWithTemplateObjectParameterJson = 'Az.Resources.custom\New-AzDeployment';
            CreateRGWithTemplateObjectParameterFile = 'Az.Resources.custom\New-AzDeployment';
            CreateRGWithTemplateJsonParameterObject = 'Az.Resources.custom\New-AzDeployment';
            CreateRGWithTemplateJsonParameterJson = 'Az.Resources.custom\New-AzDeployment';
            CreateRGWithTemplateJsonParameterFile = 'Az.Resources.custom\New-AzDeployment';
            CreateRGWithTemplateFileParameterObject = 'Az.Resources.custom\New-AzDeployment';
            CreateRGWithTemplateFileParameterJson = 'Az.Resources.custom\New-AzDeployment';
            CreateRGWithTemplateFileParameterFile = 'Az.Resources.custom\New-AzDeployment';
            CreateWithTemplateFileParameterObject = 'Az.Resources.custom\New-AzDeployment';
            CreateWithTemplateFileParameterJson = 'Az.Resources.custom\New-AzDeployment';
            CreateWithTemplateJsonParameterObject = 'Az.Resources.custom\New-AzDeployment';
            CreateWithTemplateJsonParameterJson = 'Az.Resources.custom\New-AzDeployment';
            CreateWithTemplateJsonParameterFile = 'Az.Resources.custom\New-AzDeployment';
            CreateWithTemplateObjectParameterObject = 'Az.Resources.custom\New-AzDeployment';
            CreateWithTemplateObjectParameterJson = 'Az.Resources.custom\New-AzDeployment';
            CreateWithTemplateObjectParameterFile = 'Az.Resources.custom\New-AzDeployment';
        }
        if (('CreateWithTemplateFileParameterFile', 'CreateRGWithTemplateObjectParameterObject', 'CreateRGWithTemplateObjectParameterJson', 'CreateRGWithTemplateObjectParameterFile', 'CreateRGWithTemplateJsonParameterObject', 'CreateRGWithTemplateJsonParameterJson', 'CreateRGWithTemplateJsonParameterFile', 'CreateRGWithTemplateFileParameterObject', 'CreateRGWithTemplateFileParameterJson', 'CreateRGWithTemplateFileParameterFile', 'CreateWithTemplateFileParameterObject', 'CreateWithTemplateFileParameterJson', 'CreateWithTemplateJsonParameterObject', 'CreateWithTemplateJsonParameterJson', 'CreateWithTemplateJsonParameterFile', 'CreateWithTemplateObjectParameterObject', 'CreateWithTemplateObjectParameterJson', 'CreateWithTemplateObjectParameterFile') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation creates or updates a policy definition in the given subscription with the given name.
.Description
This operation creates or updates a policy definition in the given subscription with the given name.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azpolicydefinition
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyDefinition
.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.
 
POLICYRULE <IPolicyDefinitionPropertiesPolicyRule>: The policy rule.
  [(Any) <Object>]: This indicates any property can be added to this object.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azpolicydefinition
#>

function New-AzPolicyDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyDefinition])]
[CmdletBinding(DefaultParameterSetName='CreateExpandedPolicyRuleString', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Alias('PolicyDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy definition to create.
    ${Name},

    [Parameter(ParameterSetName='CreateExpandedPolicyRuleString')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='CreateExpandedPolicyRuleString1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the management group.
    ${ManagementGroupName},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinitionPropertiesPolicyRule]
    # The policy rule.
    # To construct, see NOTES section for POLICYRULE properties and create a hash table.
    ${PolicyRule},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinitionPropertiesParameters]
    # Required if a parameter is used in policy rule.
    ${DefinitionPropertiesParameter},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The policy definition description.
    ${Description},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the policy definition.
    ${DisplayName},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinitionPropertiesMetadata]
    # The policy definition metadata.
    ${Metadata},

    [Parameter()]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyMode])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyMode]
    # The policy definition mode.
    # Possible values are NotSpecified, Indexed, and All.
    ${Mode},

    [Parameter()]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyType]
    # The type of policy definition.
    # Possible values are NotSpecified, BuiltIn, and Custom.
    ${PolicyType},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            CreateExpandedPolicyRuleString = 'Az.Resources.custom\New-AzPolicyDefinition';
            CreateExpandedPolicyRuleString1 = 'Az.Resources.custom\New-AzPolicyDefinition';
        }
        if (('CreateExpandedPolicyRuleString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Removes a key credential associated with an application.
.Description
Removes a key credential associated with an application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadapplicationkeycredential
.Outputs
System.Boolean
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadapplicationkeycredential
#>

function Remove-AzADApplicationKeyCredential {
[OutputType([System.Boolean])]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Application object ID.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The key ID of the key credential.
    ${KeyId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            __AllParameterSets = 'Az.Resources.custom\Remove-AzADApplicationKeyCredential';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Removes a password credential associated with an application.
.Description
Removes a password credential associated with an application.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadapplicationpasswordcredential
.Outputs
System.Boolean
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadapplicationpasswordcredential
#>

function Remove-AzADApplicationPasswordCredential {
[OutputType([System.Boolean])]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Application object ID.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The key ID of the password credential.
    ${KeyId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            __AllParameterSets = 'Az.Resources.custom\Remove-AzADApplicationPasswordCredential';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Removes a key credential associated with an service principal.
.Description
Removes a key credential associated with an service principal.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadserviceprincipalkeycredential
.Outputs
System.Boolean
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadserviceprincipalkeycredential
#>

function Remove-AzADServicePrincipalKeyCredential {
[OutputType([System.Boolean])]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Service principal object ID.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The key ID of the key credential.
    ${KeyId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            __AllParameterSets = 'Az.Resources.custom\Remove-AzADServicePrincipalKeyCredential';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Removes a password credential associated with an service principal.
.Description
Removes a password credential associated with an service principal.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadserviceprincipalpasswordcredential
.Outputs
System.Boolean
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azadserviceprincipalpasswordcredential
#>

function Remove-AzADServicePrincipalPasswordCredential {
[OutputType([System.Boolean])]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # Service principal object ID.
    ${ObjectId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The tenant ID.
    ${TenantId},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The key ID of the password credential.
    ${KeyId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            __AllParameterSets = 'Az.Resources.custom\Remove-AzADServicePrincipalPasswordCredential';
        }
        $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates a resource.
.Description
Creates a resource.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azresource
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azresource
#>

function Set-AzResource {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource])]
[CmdletBinding(DefaultParameterSetName='UpdateTopLevelResource', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Alias('ResourceName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource to create.
    ${Name},

    [Parameter(Mandatory)]
    [Alias('ResourceProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ProviderNamespace},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group for the resource.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type of the resource to create.
    ${ResourceType},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The API version to use for the operation.
    ${ApiVersion},

    [Parameter()]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType]
    # The identity type.
    ${IdentityType},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IIdentityUserAssignedIdentities]))]
    [System.Collections.Hashtable]
    # The list of user identities associated with the resource.
    # The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    ${IdentityUserAssignedIdentity},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The kind of the resource.
    ${Kind},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Resource location
    ${Location},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # ID of the resource that manages this resource.
    ${ManagedBy},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan name.
    ${PlanName},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The product code.
    ${PlanProduct},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The promotion code.
    ${PlanPromotionCode},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The publisher ID.
    ${PlanPublisher},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan's version.
    ${PlanVersion},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResourceProperties]
    # The resource properties.
    ${Property},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Int32]
    # The SKU capacity.
    ${SkuCapacity},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU family.
    ${SkuFamily},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU model.
    ${SkuModel},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU name.
    ${SkuName},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU size.
    ${SkuSize},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU tier.
    ${SkuTier},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901Preview.IResourceTags]))]
    [System.Collections.Hashtable]
    # Resource tags
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            UpdateTopLevelResource = 'Az.Resources.custom\Set-AzResource_UpdateTopLevelResource';
        }
        if (('UpdateTopLevelResource') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
.Description
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/test-azdeployment
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentValidateResult
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/test-azdeployment
#>

function Test-AzDeployment {
[Alias('Test-AzResourceGroupDeployment')]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentValidateResult])]
[CmdletBinding(DefaultParameterSetName='ValidateWithTemplateFileParameterFile', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('latest-2019-04-30')]
param(
    [Parameter(Mandatory)]
    [Alias('DeploymentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the deployment.
    ${Name},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='ValidateRGWithTemplateObjectParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateObjectParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateObjectParameterFile', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateJsonParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateJsonParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateJsonParameterFile', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateFileParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateFileParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateFileParameterFile', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group the template will be deployed to.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(Mandatory)]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.DeploymentMode])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.DeploymentMode]
    # The mode that is used to deploy resources.
    # This value can be either Incremental or Complete.
    # In Incremental mode, resources are deployed without deleting existing resources that are not included in the template.
    # In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted.
    # Be careful when using Complete mode as you may unintentionally delete resources.
    ${Mode},

    [Parameter(ParameterSetName='ValidateWithTemplateFileParameterFile', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateFileParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateFileParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateFileParameterFile', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateFileParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateFileParameterJson', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Local path to the JSON template file.
    ${TemplateFile},

    [Parameter(ParameterSetName='ValidateWithTemplateFileParameterFile', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateObjectParameterFile', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateJsonParameterFile', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateFileParameterFile', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateJsonParameterFile', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateObjectParameterFile', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Local path to the parameter JSON template file.
    ${TemplateParameterFile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Specifies the type of information to log for debugging.
    # The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma.
    # The default is none.
    # When setting this value, carefully consider the type of information you are passing in during deployment.
    # By logging information about the request or response, you could potentially expose sensitive data that is retrieved through the deployment operations.
    ${DebugSettingDetailLevel},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentPropertiesParameters]))]
    [System.Collections.Hashtable]
    # Name and value pairs that define the deployment parameters for the template.
    # You use this element when you want to provide the parameter values directly in the request rather than link to an existing parameter file.
    # Use either the parametersLink property or the parameters property, but not both.
    # It can be a JObject or a well formed JSON string.
    ${DeploymentPropertyParameter},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The location to store the deployment data.
    ${Location},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The deployment to be used on error case.
    ${OnErrorDeploymentName},

    [Parameter()]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.OnErrorDeploymentType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.OnErrorDeploymentType]
    # The deployment on error behavior type.
    # Possible values are LastSuccessful and SpecificDeployment.
    ${OnErrorDeploymentType},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # If included, must match the ContentVersion in the template.
    ${ParameterLinkContentVersion},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The URI of the parameters file.
    ${ParameterLinkUri},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentPropertiesTemplate]))]
    [System.Collections.Hashtable]
    # The template content.
    # You use this element when you want to pass the template syntax directly in the request rather than link to an existing template.
    # It can be a JObject or well-formed JSON string.
    # Use either the templateLink property or the template property, but not both.
    ${Template},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # If included, must match the ContentVersion in the template.
    ${TemplateLinkContentVersion},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The URI of the template to deploy.
    ${TemplateLinkUri},

    [Parameter(ParameterSetName='ValidateRGWithTemplateObjectParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateObjectParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateObjectParameterFile', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateObjectParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateObjectParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateObjectParameterFile', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Collections.Hashtable]
    # The hashtable representation of the JSON template.
    ${TemplateObject},

    [Parameter(ParameterSetName='ValidateRGWithTemplateObjectParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateJsonParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateFileParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateFileParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateJsonParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateObjectParameterObject', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Collections.Hashtable]
    # The hashtable representation of the parameter JSON template.
    ${TemplateParameterObject},

    [Parameter(ParameterSetName='ValidateRGWithTemplateObjectParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateJsonParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateFileParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateFileParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateJsonParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateObjectParameterJson', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The string representation of the parameter JSON template.
    ${TemplateParameterJson},

    [Parameter(ParameterSetName='ValidateRGWithTemplateJsonParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateJsonParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateRGWithTemplateJsonParameterFile', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateJsonParameterObject', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateJsonParameterJson', Mandatory)]
    [Parameter(ParameterSetName='ValidateWithTemplateJsonParameterFile', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The string representation of the JSON template.
    ${TemplateJson},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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 = @{
            ValidateWithTemplateFileParameterFile = 'Az.Resources.custom\Test-AzDeployment';
            ValidateRGWithTemplateObjectParameterObject = 'Az.Resources.custom\Test-AzDeployment';
            ValidateRGWithTemplateObjectParameterJson = 'Az.Resources.custom\Test-AzDeployment';
            ValidateRGWithTemplateObjectParameterFile = 'Az.Resources.custom\Test-AzDeployment';
            ValidateRGWithTemplateJsonParameterObject = 'Az.Resources.custom\Test-AzDeployment';
            ValidateRGWithTemplateJsonParameterJson = 'Az.Resources.custom\Test-AzDeployment';
            ValidateRGWithTemplateJsonParameterFile = 'Az.Resources.custom\Test-AzDeployment';
            ValidateRGWithTemplateFileParameterObject = 'Az.Resources.custom\Test-AzDeployment';
            ValidateRGWithTemplateFileParameterJson = 'Az.Resources.custom\Test-AzDeployment';
            ValidateRGWithTemplateFileParameterFile = 'Az.Resources.custom\Test-AzDeployment';
            ValidateWithTemplateFileParameterObject = 'Az.Resources.custom\Test-AzDeployment';
            ValidateWithTemplateFileParameterJson = 'Az.Resources.custom\Test-AzDeployment';
            ValidateWithTemplateJsonParameterObject = 'Az.Resources.custom\Test-AzDeployment';
            ValidateWithTemplateJsonParameterJson = 'Az.Resources.custom\Test-AzDeployment';
            ValidateWithTemplateJsonParameterFile = 'Az.Resources.custom\Test-AzDeployment';
            ValidateWithTemplateObjectParameterObject = 'Az.Resources.custom\Test-AzDeployment';
            ValidateWithTemplateObjectParameterJson = 'Az.Resources.custom\Test-AzDeployment';
            ValidateWithTemplateObjectParameterFile = 'Az.Resources.custom\Test-AzDeployment';
        }
        if (('ValidateWithTemplateFileParameterFile', 'ValidateRGWithTemplateObjectParameterObject', 'ValidateRGWithTemplateObjectParameterJson', 'ValidateRGWithTemplateObjectParameterFile', 'ValidateRGWithTemplateJsonParameterObject', 'ValidateRGWithTemplateJsonParameterJson', 'ValidateRGWithTemplateJsonParameterFile', 'ValidateRGWithTemplateFileParameterObject', 'ValidateRGWithTemplateFileParameterJson', 'ValidateRGWithTemplateFileParameterFile', 'ValidateWithTemplateFileParameterObject', 'ValidateWithTemplateFileParameterJson', 'ValidateWithTemplateJsonParameterObject', 'ValidateWithTemplateJsonParameterJson', 'ValidateWithTemplateJsonParameterFile', 'ValidateWithTemplateObjectParameterObject', 'ValidateWithTemplateObjectParameterJson', 'ValidateWithTemplateObjectParameterFile') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $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
    }
}
}

# SIG # Begin signature block
# MIIjhgYJKoZIhvcNAQcCoIIjdzCCI3MCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBXMCpnRpeFaY6S
# aeS9KrOjEchMG8B1213KtBdwUKqt9qCCDYEwggX/MIID56ADAgECAhMzAAABUZ6N
# j0Bxow5BAAAAAAFRMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENBIDIwMTEwHhcNMTkwNTAyMjEzNzQ2WhcNMjAwNTAyMjEzNzQ2WjB0MQsw
# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u
# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
# AQCVWsaGaUcdNB7xVcNmdfZiVBhYFGcn8KMqxgNIvOZWNH9JYQLuhHhmJ5RWISy1
# oey3zTuxqLbkHAdmbeU8NFMo49Pv71MgIS9IG/EtqwOH7upan+lIq6NOcw5fO6Os
# +12R0Q28MzGn+3y7F2mKDnopVu0sEufy453gxz16M8bAw4+QXuv7+fR9WzRJ2CpU
# 62wQKYiFQMfew6Vh5fuPoXloN3k6+Qlz7zgcT4YRmxzx7jMVpP/uvK6sZcBxQ3Wg
# B/WkyXHgxaY19IAzLq2QiPiX2YryiR5EsYBq35BP7U15DlZtpSs2wIYTkkDBxhPJ
# IDJgowZu5GyhHdqrst3OjkSRAgMBAAGjggF+MIIBejAfBgNVHSUEGDAWBgorBgEE
# AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUV4Iarkq57esagu6FUBb270Zijc8w
# UAYDVR0RBEkwR6RFMEMxKTAnBgNVBAsTIE1pY3Jvc29mdCBPcGVyYXRpb25zIFB1
# ZXJ0byBSaWNvMRYwFAYDVQQFEw0yMzAwMTIrNDU0MTM1MB8GA1UdIwQYMBaAFEhu
# ZOVQBdOCqhc3NyK1bajKdQKVMFQGA1UdHwRNMEswSaBHoEWGQ2h0dHA6Ly93d3cu
# bWljcm9zb2Z0LmNvbS9wa2lvcHMvY3JsL01pY0NvZFNpZ1BDQTIwMTFfMjAxMS0w
# Ny0wOC5jcmwwYQYIKwYBBQUHAQEEVTBTMFEGCCsGAQUFBzAChkVodHRwOi8vd3d3
# Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NlcnRzL01pY0NvZFNpZ1BDQTIwMTFfMjAx
# MS0wNy0wOC5jcnQwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQsFAAOCAgEAWg+A
# rS4Anq7KrogslIQnoMHSXUPr/RqOIhJX+32ObuY3MFvdlRElbSsSJxrRy/OCCZdS
# se+f2AqQ+F/2aYwBDmUQbeMB8n0pYLZnOPifqe78RBH2fVZsvXxyfizbHubWWoUf
# NW/FJlZlLXwJmF3BoL8E2p09K3hagwz/otcKtQ1+Q4+DaOYXWleqJrJUsnHs9UiL
# crVF0leL/Q1V5bshob2OTlZq0qzSdrMDLWdhyrUOxnZ+ojZ7UdTY4VnCuogbZ9Zs
# 9syJbg7ZUS9SVgYkowRsWv5jV4lbqTD+tG4FzhOwcRQwdb6A8zp2Nnd+s7VdCuYF
# sGgI41ucD8oxVfcAMjF9YX5N2s4mltkqnUe3/htVrnxKKDAwSYliaux2L7gKw+bD
# 1kEZ/5ozLRnJ3jjDkomTrPctokY/KaZ1qub0NUnmOKH+3xUK/plWJK8BOQYuU7gK
# YH7Yy9WSKNlP7pKj6i417+3Na/frInjnBkKRCJ/eYTvBH+s5guezpfQWtU4bNo/j
# 8Qw2vpTQ9w7flhH78Rmwd319+YTmhv7TcxDbWlyteaj4RK2wk3pY1oSz2JPE5PNu
# Nmd9Gmf6oePZgy7Ii9JLLq8SnULV7b+IP0UXRY9q+GdRjM2AEX6msZvvPCIoG0aY
# HQu9wZsKEK2jqvWi8/xdeeeSI9FN6K1w4oVQM4Mwggd6MIIFYqADAgECAgphDpDS
# AAAAAAADMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMK
# V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0
# IENvcnBvcmF0aW9uMTIwMAYDVQQDEylNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0
# ZSBBdXRob3JpdHkgMjAxMTAeFw0xMTA3MDgyMDU5MDlaFw0yNjA3MDgyMTA5MDla
# MH4xCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdS
# ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMT
# H01pY3Jvc29mdCBDb2RlIFNpZ25pbmcgUENBIDIwMTEwggIiMA0GCSqGSIb3DQEB
# AQUAA4ICDwAwggIKAoICAQCr8PpyEBwurdhuqoIQTTS68rZYIZ9CGypr6VpQqrgG
# OBoESbp/wwwe3TdrxhLYC/A4wpkGsMg51QEUMULTiQ15ZId+lGAkbK+eSZzpaF7S
# 35tTsgosw6/ZqSuuegmv15ZZymAaBelmdugyUiYSL+erCFDPs0S3XdjELgN1q2jz
# y23zOlyhFvRGuuA4ZKxuZDV4pqBjDy3TQJP4494HDdVceaVJKecNvqATd76UPe/7
# 4ytaEB9NViiienLgEjq3SV7Y7e1DkYPZe7J7hhvZPrGMXeiJT4Qa8qEvWeSQOy2u
# M1jFtz7+MtOzAz2xsq+SOH7SnYAs9U5WkSE1JcM5bmR/U7qcD60ZI4TL9LoDho33
# X/DQUr+MlIe8wCF0JV8YKLbMJyg4JZg5SjbPfLGSrhwjp6lm7GEfauEoSZ1fiOIl
# XdMhSz5SxLVXPyQD8NF6Wy/VI+NwXQ9RRnez+ADhvKwCgl/bwBWzvRvUVUvnOaEP
# 6SNJvBi4RHxF5MHDcnrgcuck379GmcXvwhxX24ON7E1JMKerjt/sW5+v/N2wZuLB
# l4F77dbtS+dJKacTKKanfWeA5opieF+yL4TXV5xcv3coKPHtbcMojyyPQDdPweGF
# RInECUzF1KVDL3SV9274eCBYLBNdYJWaPk8zhNqwiBfenk70lrC8RqBsmNLg1oiM
# CwIDAQABo4IB7TCCAekwEAYJKwYBBAGCNxUBBAMCAQAwHQYDVR0OBBYEFEhuZOVQ
# BdOCqhc3NyK1bajKdQKVMBkGCSsGAQQBgjcUAgQMHgoAUwB1AGIAQwBBMAsGA1Ud
# DwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFHItOgIxkEO5FAVO
# 4eqnxzHRI4k0MFoGA1UdHwRTMFEwT6BNoEuGSWh0dHA6Ly9jcmwubWljcm9zb2Z0
# LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY1Jvb0NlckF1dDIwMTFfMjAxMV8wM18y
# Mi5jcmwwXgYIKwYBBQUHAQEEUjBQME4GCCsGAQUFBzAChkJodHRwOi8vd3d3Lm1p
# Y3Jvc29mdC5jb20vcGtpL2NlcnRzL01pY1Jvb0NlckF1dDIwMTFfMjAxMV8wM18y
# Mi5jcnQwgZ8GA1UdIASBlzCBlDCBkQYJKwYBBAGCNy4DMIGDMD8GCCsGAQUFBwIB
# FjNodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2RvY3MvcHJpbWFyeWNw
# cy5odG0wQAYIKwYBBQUHAgIwNB4yIB0ATABlAGcAYQBsAF8AcABvAGwAaQBjAHkA
# XwBzAHQAYQB0AGUAbQBlAG4AdAAuIB0wDQYJKoZIhvcNAQELBQADggIBAGfyhqWY
# 4FR5Gi7T2HRnIpsLlhHhY5KZQpZ90nkMkMFlXy4sPvjDctFtg/6+P+gKyju/R6mj
# 82nbY78iNaWXXWWEkH2LRlBV2AySfNIaSxzzPEKLUtCw/WvjPgcuKZvmPRul1LUd
# d5Q54ulkyUQ9eHoj8xN9ppB0g430yyYCRirCihC7pKkFDJvtaPpoLpWgKj8qa1hJ
# Yx8JaW5amJbkg/TAj/NGK978O9C9Ne9uJa7lryft0N3zDq+ZKJeYTQ49C/IIidYf
# wzIY4vDFLc5bnrRJOQrGCsLGra7lstnbFYhRRVg4MnEnGn+x9Cf43iw6IGmYslmJ
# aG5vp7d0w0AFBqYBKig+gj8TTWYLwLNN9eGPfxxvFX1Fp3blQCplo8NdUmKGwx1j
# NpeG39rz+PIWoZon4c2ll9DuXWNB41sHnIc+BncG0QaxdR8UvmFhtfDcxhsEvt9B
# xw4o7t5lL+yX9qFcltgA1qFGvVnzl6UJS0gQmYAf0AApxbGbpT9Fdx41xtKiop96
# eiL6SJUfq/tHI4D1nvi/a7dLl+LrdXga7Oo3mXkYS//WsyNodeav+vyL6wuA6mk7
# r/ww7QRMjt/fdW1jkT3RnVZOT7+AVyKheBEyIXrvQQqxP/uozKRdwaGIm1dxVk5I
# RcBCyZt2WwqASGv9eZ/BvW1taslScxMNelDNMYIVWzCCFVcCAQEwgZUwfjELMAkG
# A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx
# HjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEoMCYGA1UEAxMfTWljcm9z
# b2Z0IENvZGUgU2lnbmluZyBQQ0EgMjAxMQITMwAAAVGejY9AcaMOQQAAAAABUTAN
# BglghkgBZQMEAgEFAKCBrjAZBgkqhkiG9w0BCQMxDAYKKwYBBAGCNwIBBDAcBgor
# BgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIBFTAvBgkqhkiG9w0BCQQxIgQgnTRk3ou6
# B2bJqac5fJDBYqwlM0liQRJgRVxxP2jLSh8wQgYKKwYBBAGCNwIBDDE0MDKgFIAS
# AE0AaQBjAHIAbwBzAG8AZgB0oRqAGGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbTAN
# BgkqhkiG9w0BAQEFAASCAQB2RASjeGqON9YxhbHXDkAglN8gV22t1J/z6Hl903OO
# HFTQ7OlKLsMRfbsUCC3GEFFWRLy3jKSNCfE4qt7yiLQ/CqimL1Nh/WDHx4wkRKNF
# yH9vlBFG8hxj06aAU9QjoR22ubZFDr0gfvVbR8NAIdV76z46c9H7WJJqf0TMU2G6
# CsTNX7t1GdmMkTcJsG1MSrmXlgbbthuyXFxOSVUh9a5bqsfC6bsvKHE/SrExCbvT
# ybJDammiH/bZ7607mR163HeIivOPvAzgypouMKUVKQKv2G6wHa2UDJVl0zyp0j0R
# yqtOfMbFDfTrOiJlHK7cbPZFikswkZv/kRmAeRl+mFZBoYIS5TCCEuEGCisGAQQB
# gjcDAwExghLRMIISzQYJKoZIhvcNAQcCoIISvjCCEroCAQMxDzANBglghkgBZQME
# AgEFADCCAVEGCyqGSIb3DQEJEAEEoIIBQASCATwwggE4AgEBBgorBgEEAYRZCgMB
# MDEwDQYJYIZIAWUDBAIBBQAEIBrKmcL2Pcjd56Mhwa3ob5AsVgbGe6gS13pG/naI
# cW6BAgZd+9+Xs0kYEzIwMTkxMjIwMDk0NDEwLjA1M1owBIACAfSggdCkgc0wgcox
# CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRt
# b25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJTAjBgNVBAsTHE1p
# Y3Jvc29mdCBBbWVyaWNhIE9wZXJhdGlvbnMxJjAkBgNVBAsTHVRoYWxlcyBUU1Mg
# RVNOOjIyNjQtRTMzRS03ODBDMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFt
# cCBTZXJ2aWNloIIOPDCCBPEwggPZoAMCAQICEzMAAAEY/jr32RvUsTMAAAAAARgw
# DQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0
# b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3Jh
# dGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwHhcN
# MTkxMTEzMjE0MDM1WhcNMjEwMjExMjE0MDM1WjCByjELMAkGA1UEBhMCVVMxEzAR
# BgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1p
# Y3Jvc29mdCBDb3Jwb3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJpY2Eg
# T3BlcmF0aW9uczEmMCQGA1UECxMdVGhhbGVzIFRTUyBFU046MjI2NC1FMzNFLTc4
# MEMxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2UwggEiMA0G
# CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDC+ANcEX8/NRj1t5YkXYB1ZHPxQSwr
# hOOfXX1c5aes0t2gTI6OeH4ntcwpyTvSk7+9BBVoqTvHwfbDZmb15nQ94q+UPfBq
# a/8m1tes/6Fbt1AeVHy4By1AVFi6Yi1vWd3bVRyY2SAeVonIzEFGGtQveRv2Yj6j
# bCHE2+xP3Q+AcgxweE8l6/nAN5S/mTDKV2flHNQg+d5X9SSN7MdLC5OAJgSy374I
# i/AnYEKyIgnOFJVkIxkLDxOyrnV/gORloaxyVGlDemnLBNahwsxnmkrpChcwvDie
# Ax4g/Z1fJ0+C+wdA+EtA7rrgnRkjhKHfWkZj40bmx4GpQdJmF1zAZ0FxAgMBAAGj
# ggEbMIIBFzAdBgNVHQ4EFgQU8VvlsC4PYAnYOU/05iPr+LTHKD4wHwYDVR0jBBgw
# FoAU1WM6XIoxkPNDe3xGG8UzaFqFbVUwVgYDVR0fBE8wTTBLoEmgR4ZFaHR0cDov
# L2NybC5taWNyb3NvZnQuY29tL3BraS9jcmwvcHJvZHVjdHMvTWljVGltU3RhUENB
# XzIwMTAtMDctMDEuY3JsMFoGCCsGAQUFBwEBBE4wTDBKBggrBgEFBQcwAoY+aHR0
# cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNUaW1TdGFQQ0FfMjAx
# MC0wNy0wMS5jcnQwDAYDVR0TAQH/BAIwADATBgNVHSUEDDAKBggrBgEFBQcDCDAN
# BgkqhkiG9w0BAQsFAAOCAQEAcyWdvg6cgs//AmxoQZm+WASpJzUXEPhMp30bWc5H
# yCwQB+Ma6YPncSoFdct/5V1K4p/rMcMLBn5LzELVH+uztg6ERK48YtbJb9A7Jp+f
# JZj7loXaP9mVP7tJs2tGuubcXpGbgo5HGCjn7gzMBHY45Q8LScfa1JFQEAiS2gCK
# KRlrKMsGaIbi+UuBtsbQ8JknvmiEwCCwSmRTX0viAZusm4mJVqKBe3Bmj+yBDJVW
# cv0MyrEYQ74oa0VSW3JBc+xSrqT2Jgm2Cc6IlSbm8AsiVE/Vc4yahfmLeeFHfTcr
# K0flu6VGzjf1GNA1SDXR4bUinrBli3lfhwtKhx6x5eRsSjCCBnEwggRZoAMCAQIC
# CmEJgSoAAAAAAAIwDQYJKoZIhvcNAQELBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29mdCBSb290IENlcnRp
# ZmljYXRlIEF1dGhvcml0eSAyMDEwMB4XDTEwMDcwMTIxMzY1NVoXDTI1MDcwMTIx
# NDY1NVowfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNV
# BAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQG
# A1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQCpHQ28dxGKOiDs/BOX9fp/aZRrdFQQ1aUKAIKF
# ++18aEssX8XD5WHCdrc+Zitb8BVTJwQxH0EbGpUdzgkTjnxhMFmxMEQP8WCIhFRD
# DNdNuDgIs0Ldk6zWczBXJoKjRQ3Q6vVHgc2/JGAyWGBG8lhHhjKEHnRhZ5FfgVSx
# z5NMksHEpl3RYRNuKMYa+YaAu99h/EbBJx0kZxJyGiGKr0tkiVBisV39dx898Fd1
# rL2KQk1AUdEPnAY+Z3/1ZsADlkR+79BL/W7lmsqxqPJ6Kgox8NpOBpG2iAg16Hgc
# sOmZzTznL0S6p/TcZL2kAcEgCZN4zfy8wMlEXV4WnAEFTyJNAgMBAAGjggHmMIIB
# 4jAQBgkrBgEEAYI3FQEEAwIBADAdBgNVHQ4EFgQU1WM6XIoxkPNDe3xGG8UzaFqF
# bVUwGQYJKwYBBAGCNxQCBAweCgBTAHUAYgBDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
# EwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAU1fZWy4/oolxiaNE9lJBb186aGMQwVgYD
# VR0fBE8wTTBLoEmgR4ZFaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraS9jcmwv
# cHJvZHVjdHMvTWljUm9vQ2VyQXV0XzIwMTAtMDYtMjMuY3JsMFoGCCsGAQUFBwEB
# BE4wTDBKBggrBgEFBQcwAoY+aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9j
# ZXJ0cy9NaWNSb29DZXJBdXRfMjAxMC0wNi0yMy5jcnQwgaAGA1UdIAEB/wSBlTCB
# kjCBjwYJKwYBBAGCNy4DMIGBMD0GCCsGAQUFBwIBFjFodHRwOi8vd3d3Lm1pY3Jv
# c29mdC5jb20vUEtJL2RvY3MvQ1BTL2RlZmF1bHQuaHRtMEAGCCsGAQUFBwICMDQe
# MiAdAEwAZQBnAGEAbABfAFAAbwBsAGkAYwB5AF8AUwB0AGEAdABlAG0AZQBuAHQA
# LiAdMA0GCSqGSIb3DQEBCwUAA4ICAQAH5ohRDeLG4Jg/gXEDPZ2joSFvs+umzPUx
# vs8F4qn++ldtGTCzwsVmyWrf9efweL3HqJ4l4/m87WtUVwgrUYJEEvu5U4zM9GAS
# inbMQEBBm9xcF/9c+V4XNZgkVkt070IQyK+/f8Z/8jd9Wj8c8pl5SpFSAK84Dxf1
# L3mBZdmptWvkx872ynoAb0swRCQiPM/tA6WWj1kpvLb9BOFwnzJKJ/1Vry/+tuWO
# M7tiX5rbV0Dp8c6ZZpCM/2pif93FSguRJuI57BlKcWOdeyFtw5yjojz6f32WapB4
# pm3S4Zz5Hfw42JT0xqUKloakvZ4argRCg7i1gJsiOCC1JeVk7Pf0v35jWSUPei45
# V3aicaoGig+JFrphpxHLmtgOR5qAxdDNp9DvfYPw4TtxCd9ddJgiCGHasFAeb73x
# 4QDf5zEHpJM692VHeOj4qEir995yfmFrb3epgcunCaw5u+zGy9iCtHLNHfS4hQEe
# gPsbiSpUObJb2sgNVZl6h3M7COaYLeqN4DMuEin1wC9UJyH3yKxO2ii4sanblrKn
# QqLJzxlBTeCG+SqaoxFmMNO7dDJL32N79ZmKLxvHIa9Zta7cRDyXUHHXodLFVeNp
# 3lfB0d4wwP3M5k37Db9dT+mdHhk4L7zPWAUu7w2gUDXa7wknHNWzfjUeCLraNtvT
# X4/edIhJEqGCAs4wggI3AgEBMIH4oYHQpIHNMIHKMQswCQYDVQQGEwJVUzETMBEG
# A1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWlj
# cm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1lcmljYSBP
# cGVyYXRpb25zMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjoyMjY0LUUzM0UtNzgw
# QzElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2VydmljZaIjCgEBMAcG
# BSsOAwIaAxUAzdeb1yAva2kJJ2mFfDdeSfFJMdyggYMwgYCkfjB8MQswCQYDVQQG
# EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG
# A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQg
# VGltZS1TdGFtcCBQQ0EgMjAxMDANBgkqhkiG9w0BAQUFAAIFAOGnBtgwIhgPMjAx
# OTEyMjAxNjM3NDRaGA8yMDE5MTIyMTE2Mzc0NFowdzA9BgorBgEEAYRZCgQBMS8w
# LTAKAgUA4acG2AIBADAKAgEAAgIDjgIB/zAHAgEAAgIRjzAKAgUA4ahYWAIBADA2
# BgorBgEEAYRZCgQCMSgwJjAMBgorBgEEAYRZCgMCoAowCAIBAAIDB6EgoQowCAIB
# AAIDAYagMA0GCSqGSIb3DQEBBQUAA4GBAHRBipC8kL/qJbw2YN+ktctP4IsBK16L
# KzwNFXIIhaFU6T4JnGEl5xmNy+ZCe9Qw+ONuEsiJmxNxj97mFPdOMj4Xo17XkNHc
# 2VnkK5S6LWg6WzabX2GzfYSldxdJ4TYqj+Nt3fPV/ATZd4OuG/haZtBnfyonzk96
# HFHBsmNCxxIkMYIDDTCCAwkCAQEwgZMwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgT
# Cldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29m
# dCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENB
# IDIwMTACEzMAAAEY/jr32RvUsTMAAAAAARgwDQYJYIZIAWUDBAIBBQCgggFKMBoG
# CSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAvBgkqhkiG9w0BCQQxIgQgux7LdiID
# 6SF8ptCP3OQ5LUkB31G74r56Zh7MJ5QG060wgfoGCyqGSIb3DQEJEAIvMYHqMIHn
# MIHkMIG9BCCgzwcUm6pSA48AVS+9m5Z+k6cHH7WyNjvPil0oMg0H9zCBmDCBgKR+
# MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdS
# ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMT
# HU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAABGP4699kb1LEzAAAA
# AAEYMCIEIDtp22F5zb76pGLcxVoiE8/QOFmkLihdAeLdUHEA2Br7MA0GCSqGSIb3
# DQEBCwUABIIBAJ7IlhgiIvi4ee0ySBmI99Id5mu3MvBX8WRo7JxY1GwE4iJJL2Df
# 0yoMTyrqeG/Hqs6ucs0jwVcq0Vb54qeo3KMz+CfmuTqrhavuJggW3b8hr1qA29kz
# gaPlF2N1kUqdrFOBZvTANdUlM5gj+rOrM+5b82UpGr1+W5sH7309nSIqH6dj8mGv
# lskHIATrGoy2EIzc6yV2/XeMGfSBZTVBCgsv3EwnKQ/Mz/GKcZLhe6L4QM31wB8L
# sAfUgWIMqnGPn8MTI2ew8nbJVzjUjKAIeZs+SkL7u6+7Wsx6HnVO53g1LwNweTBS
# N25YeFhbQN6kY/JAFHfzEtyfozWdQb3GJfI=
# SIG # End signature block