* try-fix-command-split

* fix command split

* fix test

* test

* add support for non _ operationId

* Revert "add support for non _ operationId"

This reverts commit 4e43655b85.
This commit is contained in:
Qiaoqiao Zhang 2021-03-04 17:59:13 +08:00 коммит произвёл GitHub
Родитель c834d30705
Коммит 00d5836179
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 315 добавлений и 225 удалений

Просмотреть файл

@ -13,6 +13,6 @@ module.exports = {
tsconfig: 'tsconfig.json', tsconfig: 'tsconfig.json',
}, },
}, },
testMatch: ["**/test/**/*.ts", "!**/test/**/*.d.ts", "!**/test/**/test-helper.ts"], testMatch: ["**/test/**/*.ts", "!**/test/**/*.d.ts", "!**/test/**/test-helper.ts", "!**/.history/**"],
verbose: true, verbose: true,
}; };

Просмотреть файл

@ -4,5 +4,5 @@ const mainConfig = require("./jest.config")
module.exports = { module.exports = {
...mainConfig, ...mainConfig,
testMatch: ["**/test/unittest/**/*.ts"] testMatch: ["**/test/unittest/**/*.ts", "!**/.history/**"]
} }

Просмотреть файл

@ -2,7 +2,7 @@ import { CodeModel, codeModelSchema, Language } from '@azure-tools/codemodel';
import { Session, startSession, Host, Channel } from '@autorest/extension-base'; import { Session, startSession, Host, Channel } from '@autorest/extension-base';
import { serialize } from '@azure-tools/codegen'; import { serialize } from '@azure-tools/codegen';
import { values } from '@azure-tools/linq'; import { values } from '@azure-tools/linq';
import { changeCamelToDash, isNullOrUndefined } from './utils/helper'; import { Capitalize, changeCamelToDash, isNullOrUndefined } from './utils/helper';
import { CodeGenConstants, EXCLUDED_PARAMS, AzConfiguration } from './utils/models'; import { CodeGenConstants, EXCLUDED_PARAMS, AzConfiguration } from './utils/models';
export class AzNamer { export class AzNamer {
@ -15,6 +15,7 @@ export class AzNamer {
public methodMap(operationNameOri: string, httpProtocol: string) { public methodMap(operationNameOri: string, httpProtocol: string) {
let operationName = operationNameOri.toLowerCase(); let operationName = operationNameOri.toLowerCase();
httpProtocol = httpProtocol.toLowerCase(); httpProtocol = httpProtocol.toLowerCase();
let subOperationGroupName = ''; let subOperationGroupName = '';
let ons: Array<string> = []; let ons: Array<string> = [];
if (operationNameOri.indexOf('#') > -1) { if (operationNameOri.indexOf('#') > -1) {
@ -24,52 +25,49 @@ export class AzNamer {
operationName = ons[0].toLowerCase(); operationName = ons[0].toLowerCase();
} }
} }
if (operationName.startsWith('create') && httpProtocol === 'put') { function commandNameMap(type: string): string {
return subOperationGroupName === '' ? 'create' : subOperationGroupName + ' ' + 'create';
} else if (
operationName === 'update' &&
(httpProtocol === 'put' || httpProtocol === 'patch')
) {
return subOperationGroupName === '' ? 'update' : subOperationGroupName + ' ' + 'update';
} else if (operationName.startsWith('get') && httpProtocol === 'get') {
// return subOperationGroupName === "" ? "show" : subOperationGroupName + " " + "show";
// for show scenarios like kusto, if there's list, listbyresourcegroup, listsku, listskubyresource
// we should divide it into two groups
// group list contains list and listbyresourcegroup
// group listsku contains listsku and listskubyresource
// a temporary way is to treat the part after 'by' as parameter distinguish part and the part before by as command.
// the split is valid only the By is not first word and the letter before By is capital and the letter after By is lowercase \
const regex = /^(?<show>Get[a-zA-Z0-9]*)(?<by>By[A-Z].*)$/;
const groups = operationNameOri.match(regex);
let cmd = 'show';
if (groups && groups.length > 2) {
cmd = changeCamelToDash(groups[1]);
} else {
cmd = changeCamelToDash(operationNameOri);
}
cmd = cmd.replace(/^get/i, 'show');
return subOperationGroupName === '' ? cmd : subOperationGroupName + ' ' + cmd;
} else if (operationName.startsWith('list') && httpProtocol === 'get') {
// for list scenarios like kusto, if there's list, listbyresourcegroup, listsku, listskubyresource // for list scenarios like kusto, if there's list, listbyresourcegroup, listsku, listskubyresource
// we should divide it into two groups // we should divide it into two groups
// group list contains list and listbyresourcegroup // group list contains list and listbyresourcegroup
// group listsku contains listsku and listskubyresource // group listsku contains listsku and listskubyresource
// a temporary way is to treat the part after 'by' as parameter distinguish part and the part before by as command. // a temporary way is to treat the part after 'by' as parameter distinguish part and the part before by as command.
// the split is valid only the By is not first word and the letter before By is capital and the letter after By is lowercase // the split is valid only the By is not first word and the letter before By is capital and the letter after By is lowercase
const regex = /^(?<list>List[a-zA-Z0-9]*)(?<by>By[A-Z].*)$/; // const regex = /^(?<$(type)>$(type)[a-zA-Z0-9]*)(?<by>By[A-Z].*)$/;
const regexStr =
'^(?<' + type + '>' + Capitalize(type) + '[a-zA-Z0-9]*)(?<by>By[A-Z].*)$';
const regex = new RegExp(regexStr);
const groups = operationNameOri.match(regex); const groups = operationNameOri.match(regex);
let list = 'list'; let mtype = type;
if (groups && groups.length > 2) { if (groups && groups.length > 2) {
list = changeCamelToDash(groups[1]); mtype = changeCamelToDash(groups[1]);
} else { } else {
list = changeCamelToDash(operationNameOri); mtype = changeCamelToDash(operationNameOri);
} }
return subOperationGroupName === '' ? list : subOperationGroupName + ' ' + list; return subOperationGroupName === '' ? mtype : subOperationGroupName + ' ' + mtype;
}
let commandName = '';
if (operationName.startsWith('create') && httpProtocol === 'put') {
commandName = commandNameMap('create');
if (commandName === 'create-or-update') {
commandName = 'create';
}
} else if (
operationName === 'update' &&
(httpProtocol === 'put' || httpProtocol === 'patch')
) {
commandName = commandNameMap('update');
} else if (operationName.startsWith('get') && httpProtocol === 'get') {
commandName = commandNameMap('get').replace(/^get/i, 'show');
} else if (operationName.startsWith('list') && httpProtocol === 'get') {
commandName = commandNameMap('list');
} else if (operationName.startsWith('delete') && httpProtocol === 'delete') { } else if (operationName.startsWith('delete') && httpProtocol === 'delete') {
return subOperationGroupName === '' ? 'delete' : subOperationGroupName + ' ' + 'delete'; commandName = commandNameMap('delete');
} }
if (subOperationGroupName !== '') { if (subOperationGroupName !== '') {
return subOperationGroupName + ' ' + changeCamelToDash(ons[0]); commandName = subOperationGroupName + ' ' + changeCamelToDash(ons[0]);
}
if (commandName !== '') {
return commandName;
} }
return changeCamelToDash(operationNameOri); return changeCamelToDash(operationNameOri);
} }
@ -201,12 +199,13 @@ export class AzNamer {
} }
this.codeModel.operationGroups.forEach((operationGroup) => { this.codeModel.operationGroups.forEach((operationGroup) => {
let operationGroupName = ''; let operationGroupName = '';
let groupName;
if (!isNullOrUndefined(operationGroup.language['cli'])) { if (!isNullOrUndefined(operationGroup.language['cli'])) {
operationGroup.language['az'] = new Language(); operationGroup.language['az'] = new Language();
operationGroup.language['az'].name = operationGroup.language['cli'].name; operationGroup.language['az'].name = operationGroup.language['cli'].name;
operationGroup.language['az'].description = operationGroup.language['az'].description =
operationGroup.language['cli'].description; operationGroup.language['cli'].description;
const groupName = changeCamelToDash(operationGroup.language['az'].name); groupName = changeCamelToDash(operationGroup.language['az'].name);
if (extensionName.endsWith(groupName)) { if (extensionName.endsWith(groupName)) {
operationGroupName = extensionName; operationGroupName = extensionName;
} else { } else {
@ -236,6 +235,13 @@ export class AzNamer {
} }
operation.language['az'].description = operation.language['az'].description =
operation.language['cli'].description; operation.language['cli'].description;
if (operation.language['az'].name.indexOf(groupName) > -1) {
const regex = `-{0, 1}` + groupName + `-{0, 1}`;
operation.language['az'].name = operation.language['az'].name.replace(
regex,
'',
);
}
operationName = operationName =
operationGroupName + operationGroupName +
' ' + ' ' +

Просмотреть файл

@ -15,6 +15,7 @@ import { CodeGenConstants } from '../../../utils/models';
import { CodeModelAz } from '../../CodeModelAz'; import { CodeModelAz } from '../../CodeModelAz';
import { HeaderGenerator } from '../Header'; import { HeaderGenerator } from '../Header';
let allParams = [];
export function GenerateAzureCliCustom(model: CodeModelAz): string[] { export function GenerateAzureCliCustom(model: CodeModelAz): string[] {
const header: HeaderGenerator = new HeaderGenerator(); const header: HeaderGenerator = new HeaderGenerator();
header.disableTooManyLines = true; header.disableTooManyLines = true;
@ -148,17 +149,19 @@ function ConstructMethodBodyParameter(model: CodeModelAz, needGeneric = false, r
originalParameterStack.pop(); originalParameterStack.pop();
originalParameterNameStack.pop(); originalParameterNameStack.pop();
} }
// if (!addGenericSchema && needGeneric && !isNullOrUndefined(model.CommandGroup.language['az']['genericTargetSchema']) && model.Method.extensions?.['cli-split-operation-original-operation']?.['genericSetterParam'] !== model.MethodParameter) { if (
// originalParameterStack.push( originalParameterStack.length === 0 &&
// new Parameter(model.CommandGroup.language['az']['genericTargetSchema'].language['python']['name'], allParams.indexOf(model.MethodParameter.schema) === -1
// model.CommandGroup.language['az']['genericTargetSchema'].language['python']['description'], ) {
// model.CommandGroup.language['az']['genericTargetSchema'] allParams.push(model.MethodParameter.schema);
// ));
// originalParameterNameStack.push(model.CommandGroup.language['az']['genericTargetSchema'].language['python']['name']);
// addGenericSchema = true;
// }
originalParameterStack.push(model.MethodParameter); originalParameterStack.push(model.MethodParameter);
originalParameterNameStack.push(model.MethodParameter_Name); originalParameterNameStack.push(model.MethodParameter_Name);
} else if (originalParameterStack.length > 0) {
originalParameterStack.push(model.MethodParameter);
originalParameterNameStack.push(model.MethodParameter_Name);
} else {
continue;
}
if (!needGeneric) { if (!needGeneric) {
outputBody = outputBody.concat( outputBody = outputBody.concat(
ConstructValuation( ConstructValuation(
@ -516,6 +519,7 @@ function GetSingleCommandBody(model: CodeModelAz, required: any) {
let output: string[] = []; let output: string[] = [];
let outputBody: string[] = []; let outputBody: string[] = [];
let outputMethodCall: string[] = []; let outputMethodCall: string[] = [];
allParams = [];
if (model.SelectFirstMethod()) { if (model.SelectFirstMethod()) {
// create body transformation for methods that support it // create body transformation for methods that support it

Просмотреть файл

@ -25,21 +25,25 @@ directive:
set: set:
group: user group: user
- where: - where:
command: create-user command: users user create-user
set: set:
command: create command: users user create
- where: - where:
command: get-user command: users user update-user
set: set:
command: get command: users user update
- where: - where:
command: list-user command: users user show-user
set: set:
command: list command: users user show
- where: - where:
command: update-user command: users user list-user
set: set:
command: update command: users user list
- where:
command: users user delete-user
set:
command: users user delete
modelerfour: modelerfour:
lenient-model-deduplication: true lenient-model-deduplication: true

Просмотреть файл

@ -22,6 +22,11 @@ helps['users user list'] = """
short-summary: "Get entities from users." short-summary: "Get entities from users."
""" """
helps['users user show'] = """
type: command
short-summary: "Get entity from users by key."
"""
helps['users user create'] = """ helps['users user create'] = """
type: command type: command
short-summary: "Add new entity to users." short-summary: "Add new entity to users."
@ -709,24 +714,11 @@ helps['users user delete'] = """
short-summary: "Delete entity from users." short-summary: "Delete entity from users."
""" """
helps['users user show-user'] = """
type: command
short-summary: "Get entity from users by key."
"""
helps['users user'] = """ helps['users user'] = """
type: group type: group
short-summary: Manage user with users_v1_0 short-summary: Manage user with users_v1_0
""" """
helps['users user delete'] = """
type: command
short-summary: "Delete navigation property extensions for users And Delete navigation property licenseDetails for \
users And Delete navigation property photos for users And Delete ref of navigation property manager for users And \
Delete navigation property outlook for users And Delete navigation property photo for users And Delete navigation \
property settings for users."
"""
helps['users user create-extension'] = """ helps['users user create-extension'] = """
type: command type: command
short-summary: "Create new navigation property to extensions for users." short-summary: "Create new navigation property to extensions for users."
@ -799,6 +791,36 @@ helps['users user create-ref-transitive-member-of'] = """
short-summary: "Create new navigation property ref to transitiveMemberOf for users." short-summary: "Create new navigation property ref to transitiveMemberOf for users."
""" """
helps['users user delete-extension'] = """
type: command
short-summary: "Delete navigation property extensions for users."
"""
helps['users user delete-license-detail'] = """
type: command
short-summary: "Delete navigation property licenseDetails for users."
"""
helps['users user delete-outlook'] = """
type: command
short-summary: "Delete navigation property outlook for users."
"""
helps['users user delete-photo'] = """
type: command
short-summary: "Delete navigation property photos for users And Delete navigation property photo for users."
"""
helps['users user delete-ref-manager'] = """
type: command
short-summary: "Delete ref of navigation property manager for users."
"""
helps['users user delete-setting'] = """
type: command
short-summary: "Delete navigation property settings for users."
"""
helps['users user list-created-object'] = """ helps['users user list-created-object'] = """
type: command type: command
short-summary: "Get createdObjects from users." short-summary: "Get createdObjects from users."
@ -1021,16 +1043,16 @@ helps['users user-outlook'] = """
short-summary: Manage user outlook with users_v1_0 short-summary: Manage user outlook with users_v1_0
""" """
helps['users user-outlook delete'] = """
type: command
short-summary: "Delete navigation property masterCategories for users."
"""
helps['users user-outlook create-master-category'] = """ helps['users user-outlook create-master-category'] = """
type: command type: command
short-summary: "Create new navigation property to masterCategories for users." short-summary: "Create new navigation property to masterCategories for users."
""" """
helps['users user-outlook delete-master-category'] = """
type: command
short-summary: "Delete navigation property masterCategories for users."
"""
helps['users user-outlook list-master-category'] = """ helps['users user-outlook list-master-category'] = """
type: command type: command
short-summary: "Get masterCategories from users." short-summary: "Get masterCategories from users."
@ -1051,7 +1073,7 @@ helps['users user-setting'] = """
short-summary: Manage user setting with users_v1_0 short-summary: Manage user setting with users_v1_0
""" """
helps['users user-setting delete'] = """ helps['users user-setting delete-shift-preference'] = """
type: command type: command
short-summary: "Delete navigation property shiftPreferences for users." short-summary: "Delete navigation property shiftPreferences for users."
""" """

Просмотреть файл

@ -55,6 +55,11 @@ def load_arguments(self, _):
c.argument('select', nargs='+', help='Select properties to be returned') c.argument('select', nargs='+', help='Select properties to be returned')
c.argument('expand', nargs='+', help='Expand related entities') c.argument('expand', nargs='+', help='Expand related entities')
with self.argument_context('users user show') as c:
c.argument('user_id', type=str, help='key: id of user')
c.argument('select', nargs='+', help='Select properties to be returned')
c.argument('expand', nargs='+', help='Expand related entities')
with self.argument_context('users user create') as c: with self.argument_context('users user create') as c:
c.argument('id_', options_list=['--id'], type=str, help='Read-only.') c.argument('id_', options_list=['--id'], type=str, help='Read-only.')
c.argument('deleted_date_time', help='') c.argument('deleted_date_time', help='')
@ -672,18 +677,6 @@ def load_arguments(self, _):
c.argument('user_id', type=str, help='key: id of user') c.argument('user_id', type=str, help='key: id of user')
c.argument('if_match', type=str, help='ETag') c.argument('if_match', type=str, help='ETag')
with self.argument_context('users user show-user') as c:
c.argument('user_id', type=str, help='key: id of user')
c.argument('select', nargs='+', help='Select properties to be returned')
c.argument('expand', nargs='+', help='Expand related entities')
with self.argument_context('users user delete') as c:
c.argument('user_id', type=str, help='key: id of user')
c.argument('extension_id', type=str, help='key: id of extension')
c.argument('if_match', type=str, help='ETag')
c.argument('license_details_id', type=str, help='key: id of licenseDetails')
c.argument('profile_photo_id', type=str, help='key: id of profilePhoto')
with self.argument_context('users user create-extension') as c: with self.argument_context('users user create-extension') as c:
c.argument('user_id', type=str, help='key: id of user') c.argument('user_id', type=str, help='key: id of user')
c.argument('id_', options_list=['--id'], type=str, help='Read-only.') c.argument('id_', options_list=['--id'], type=str, help='Read-only.')
@ -744,6 +737,33 @@ def load_arguments(self, _):
c.argument('body', type=validate_file_or_dict, help='New navigation property ref value Expected value: ' c.argument('body', type=validate_file_or_dict, help='New navigation property ref value Expected value: '
'json-string/@json-file.') 'json-string/@json-file.')
with self.argument_context('users user delete-extension') as c:
c.argument('user_id', type=str, help='key: id of user')
c.argument('extension_id', type=str, help='key: id of extension')
c.argument('if_match', type=str, help='ETag')
with self.argument_context('users user delete-license-detail') as c:
c.argument('user_id', type=str, help='key: id of user')
c.argument('license_details_id', type=str, help='key: id of licenseDetails')
c.argument('if_match', type=str, help='ETag')
with self.argument_context('users user delete-outlook') as c:
c.argument('user_id', type=str, help='key: id of user')
c.argument('if_match', type=str, help='ETag')
with self.argument_context('users user delete-photo') as c:
c.argument('user_id', type=str, help='key: id of user')
c.argument('profile_photo_id', type=str, help='key: id of profilePhoto')
c.argument('if_match', type=str, help='ETag')
with self.argument_context('users user delete-ref-manager') as c:
c.argument('user_id', type=str, help='key: id of user')
c.argument('if_match', type=str, help='ETag')
with self.argument_context('users user delete-setting') as c:
c.argument('user_id', type=str, help='key: id of user')
c.argument('if_match', type=str, help='ETag')
with self.argument_context('users user list-created-object') as c: with self.argument_context('users user list-created-object') as c:
c.argument('user_id', type=str, help='key: id of user') c.argument('user_id', type=str, help='key: id of user')
c.argument('orderby', nargs='+', help='Order items by property values') c.argument('orderby', nargs='+', help='Order items by property values')
@ -935,11 +955,6 @@ def load_arguments(self, _):
'and its recurrence pattern. Expected value: json-string/@json-file.', 'and its recurrence pattern. Expected value: json-string/@json-file.',
arg_group='Shift Preferences') arg_group='Shift Preferences')
with self.argument_context('users user-outlook delete') as c:
c.argument('user_id', type=str, help='key: id of user')
c.argument('outlook_category_id', type=str, help='key: id of outlookCategory')
c.argument('if_match', type=str, help='ETag')
with self.argument_context('users user-outlook create-master-category') as c: with self.argument_context('users user-outlook create-master-category') as c:
c.argument('user_id', type=str, help='key: id of user') c.argument('user_id', type=str, help='key: id of user')
c.argument('id_', options_list=['--id'], type=str, help='Read-only.') c.argument('id_', options_list=['--id'], type=str, help='Read-only.')
@ -952,6 +967,11 @@ def load_arguments(self, _):
c.argument('display_name', type=str, help='A unique name that identifies a category in the user\'s mailbox. ' c.argument('display_name', type=str, help='A unique name that identifies a category in the user\'s mailbox. '
'After a category is created, the name cannot be changed. Read-only.') 'After a category is created, the name cannot be changed. Read-only.')
with self.argument_context('users user-outlook delete-master-category') as c:
c.argument('user_id', type=str, help='key: id of user')
c.argument('outlook_category_id', type=str, help='key: id of outlookCategory')
c.argument('if_match', type=str, help='ETag')
with self.argument_context('users user-outlook list-master-category') as c: with self.argument_context('users user-outlook list-master-category') as c:
c.argument('user_id', type=str, help='key: id of user') c.argument('user_id', type=str, help='key: id of user')
c.argument('orderby', nargs='+', help='Order items by property values') c.argument('orderby', nargs='+', help='Order items by property values')
@ -977,7 +997,7 @@ def load_arguments(self, _):
c.argument('display_name', type=str, help='A unique name that identifies a category in the user\'s mailbox. ' c.argument('display_name', type=str, help='A unique name that identifies a category in the user\'s mailbox. '
'After a category is created, the name cannot be changed. Read-only.') 'After a category is created, the name cannot be changed. Read-only.')
with self.argument_context('users user-setting delete') as c: with self.argument_context('users user-setting delete-shift-preference') as c:
c.argument('user_id', type=str, help='key: id of user') c.argument('user_id', type=str, help='key: id of user')
c.argument('if_match', type=str, help='ETag') c.argument('if_match', type=str, help='ETag')

Просмотреть файл

@ -24,10 +24,10 @@ def load_command_table(self, _):
) )
with self.command_group('users user', users_v1_0_user_user, client_factory=cf_user_user) as g: with self.command_group('users user', users_v1_0_user_user, client_factory=cf_user_user) as g:
g.custom_command('list', 'users_user_list') g.custom_command('list', 'users_user_list')
g.custom_show_command('show', 'users_user_show')
g.custom_command('create', 'users_user_create') g.custom_command('create', 'users_user_create')
g.custom_command('update', 'users_user_update') g.custom_command('update', 'users_user_update')
g.custom_command('delete', 'users_user_delete', confirmation=True) g.custom_command('delete', 'users_user_delete', confirmation=True)
g.custom_command('show-user', 'users_user_show_user')
from azext_users_v1_0.generated._client_factory import cf_user from azext_users_v1_0.generated._client_factory import cf_user
@ -36,7 +36,6 @@ def load_command_table(self, _):
client_factory=cf_user, client_factory=cf_user,
) )
with self.command_group('users user', users_v1_0_user, client_factory=cf_user) as g: with self.command_group('users user', users_v1_0_user, client_factory=cf_user) as g:
g.custom_command('delete', 'users_user_delete', confirmation=True)
g.custom_command('create-extension', 'users_user_create_extension') g.custom_command('create-extension', 'users_user_create_extension')
g.custom_command('create-license-detail', 'users_user_create_license_detail') g.custom_command('create-license-detail', 'users_user_create_license_detail')
g.custom_command('create-photo', 'users_user_create_photo') g.custom_command('create-photo', 'users_user_create_photo')
@ -48,6 +47,12 @@ def load_command_table(self, _):
g.custom_command('create-ref-owned-object', 'users_user_create_ref_owned_object') g.custom_command('create-ref-owned-object', 'users_user_create_ref_owned_object')
g.custom_command('create-ref-registered-device', 'users_user_create_ref_registered_device') g.custom_command('create-ref-registered-device', 'users_user_create_ref_registered_device')
g.custom_command('create-ref-transitive-member-of', 'users_user_create_ref_transitive_member_of') g.custom_command('create-ref-transitive-member-of', 'users_user_create_ref_transitive_member_of')
g.custom_command('delete-extension', 'users_user_delete_extension')
g.custom_command('delete-license-detail', 'users_user_delete_license_detail')
g.custom_command('delete-outlook', 'users_user_delete_outlook')
g.custom_command('delete-photo', 'users_user_delete_photo')
g.custom_command('delete-ref-manager', 'users_user_delete_ref_manager')
g.custom_command('delete-setting', 'users_user_delete_setting')
g.custom_command('list-created-object', 'users_user_list_created_object') g.custom_command('list-created-object', 'users_user_list_created_object')
g.custom_command('list-direct-report', 'users_user_list_direct_report') g.custom_command('list-direct-report', 'users_user_list_direct_report')
g.custom_command('list-extension', 'users_user_list_extension') g.custom_command('list-extension', 'users_user_list_extension')
@ -90,8 +95,8 @@ def load_command_table(self, _):
client_factory=cf_user_outlook, client_factory=cf_user_outlook,
) )
with self.command_group('users user-outlook', users_v1_0_user_outlook, client_factory=cf_user_outlook) as g: with self.command_group('users user-outlook', users_v1_0_user_outlook, client_factory=cf_user_outlook) as g:
g.custom_command('delete', 'users_user_outlook_delete', confirmation=True)
g.custom_command('create-master-category', 'users_user_outlook_create_master_category') g.custom_command('create-master-category', 'users_user_outlook_create_master_category')
g.custom_command('delete-master-category', 'users_user_outlook_delete_master_category')
g.custom_command('list-master-category', 'users_user_outlook_list_master_category') g.custom_command('list-master-category', 'users_user_outlook_list_master_category')
g.custom_command('show-master-category', 'users_user_outlook_show_master_category') g.custom_command('show-master-category', 'users_user_outlook_show_master_category')
g.custom_command('update-master-category', 'users_user_outlook_update_master_category') g.custom_command('update-master-category', 'users_user_outlook_update_master_category')
@ -105,7 +110,7 @@ def load_command_table(self, _):
client_factory=cf_user_setting, client_factory=cf_user_setting,
) )
with self.command_group('users user-setting', users_v1_0_user_setting, client_factory=cf_user_setting) as g: with self.command_group('users user-setting', users_v1_0_user_setting, client_factory=cf_user_setting) as g:
g.custom_command('delete', 'users_user_setting_delete', confirmation=True) g.custom_command('delete-shift-preference', 'users_user_setting_delete_shift_preference')
g.custom_command('show-shift-preference', 'users_user_setting_show_shift_preference') g.custom_command('show-shift-preference', 'users_user_setting_show_shift_preference')
g.custom_command('update-shift-preference', 'users_user_setting_update_shift_preference') g.custom_command('update-shift-preference', 'users_user_setting_update_shift_preference')

Просмотреть файл

@ -20,6 +20,15 @@ def users_user_list(client,
expand=expand) expand=expand)
def users_user_show(client,
user_id,
select=None,
expand=None):
return client.get_user(user_id=user_id,
select=select,
expand=expand)
def users_user_create(client, def users_user_create(client,
id_=None, id_=None,
deleted_date_time=None, deleted_date_time=None,
@ -605,46 +614,6 @@ def users_user_delete(client,
if_match=if_match) if_match=if_match)
def users_user_show_user(client,
user_id,
select=None,
expand=None):
return client.get_user(user_id=user_id,
select=select,
expand=expand)
def users_user_delete(client,
user_id,
extension_id=None,
if_match=None,
license_details_id=None,
profile_photo_id=None):
if user_id is not None and extension_id is not None:
return client.delete_extensions(user_id=user_id,
extension_id=extension_id,
if_match=if_match)
elif user_id is not None and license_details_id is not None:
return client.delete_license_details(user_id=user_id,
license_details_id=license_details_id,
if_match=if_match)
elif user_id is not None and profile_photo_id is not None:
return client.delete_photos(user_id=user_id,
profile_photo_id=profile_photo_id,
if_match=if_match)
elif user_id is not None:
return client.delete_ref_manager(user_id=user_id,
if_match=if_match)
elif user_id is not None:
return client.delete_outlook(user_id=user_id,
if_match=if_match)
elif user_id is not None:
return client.delete_photo(user_id=user_id,
if_match=if_match)
return client.delete_settings(user_id=user_id,
if_match=if_match)
def users_user_create_extension(client, def users_user_create_extension(client,
user_id, user_id,
id_=None): id_=None):
@ -738,6 +707,57 @@ def users_user_create_ref_transitive_member_of(client,
body=body) body=body)
def users_user_delete_extension(client,
user_id,
extension_id,
if_match=None):
return client.delete_extensions(user_id=user_id,
extension_id=extension_id,
if_match=if_match)
def users_user_delete_license_detail(client,
user_id,
license_details_id,
if_match=None):
return client.delete_license_details(user_id=user_id,
license_details_id=license_details_id,
if_match=if_match)
def users_user_delete_outlook(client,
user_id,
if_match=None):
return client.delete_outlook(user_id=user_id,
if_match=if_match)
def users_user_delete_photo(client,
user_id,
profile_photo_id=None,
if_match=None):
if user_id is not None and profile_photo_id is not None:
return client.delete_photos(user_id=user_id,
profile_photo_id=profile_photo_id,
if_match=if_match)
return client.delete_photo(user_id=user_id,
if_match=if_match)
def users_user_delete_ref_manager(client,
user_id,
if_match=None):
return client.delete_ref_manager(user_id=user_id,
if_match=if_match)
def users_user_delete_setting(client,
user_id,
if_match=None):
return client.delete_settings(user_id=user_id,
if_match=if_match)
def users_user_list_created_object(client, def users_user_list_created_object(client,
user_id, user_id,
orderby=None, orderby=None,
@ -1040,10 +1060,6 @@ def users_user_update_photo(client,
body['id'] = id_ body['id'] = id_
body['height'] = height body['height'] = height
body['width'] = width body['width'] = width
body = {}
body['id'] = id_
body['height'] = height
body['width'] = width
if user_id is not None and profile_photo_id is not None: if user_id is not None and profile_photo_id is not None:
return client.update_photos(user_id=user_id, return client.update_photos(user_id=user_id,
profile_photo_id=profile_photo_id, profile_photo_id=profile_photo_id,
@ -1081,15 +1097,6 @@ def users_user_update_setting(client,
body=body) body=body)
def users_user_outlook_delete(client,
user_id,
outlook_category_id,
if_match=None):
return client.delete_master_categories(user_id=user_id,
outlook_category_id=outlook_category_id,
if_match=if_match)
def users_user_outlook_create_master_category(client, def users_user_outlook_create_master_category(client,
user_id, user_id,
id_=None, id_=None,
@ -1103,6 +1110,15 @@ def users_user_outlook_create_master_category(client,
body=body) body=body)
def users_user_outlook_delete_master_category(client,
user_id,
outlook_category_id,
if_match=None):
return client.delete_master_categories(user_id=user_id,
outlook_category_id=outlook_category_id,
if_match=if_match)
def users_user_outlook_list_master_category(client, def users_user_outlook_list_master_category(client,
user_id, user_id,
orderby=None, orderby=None,
@ -1140,7 +1156,7 @@ def users_user_outlook_update_master_category(client,
body=body) body=body)
def users_user_setting_delete(client, def users_user_setting_delete_shift_preference(client,
user_id, user_id,
if_match=None): if_match=None):
return client.delete_shift_preferences(user_id=user_id, return client.delete_shift_preferences(user_id=user_id,

Просмотреть файл

@ -19,21 +19,14 @@
|CLI Command|Operation Swagger name|Parameters|Examples| |CLI Command|Operation Swagger name|Parameters|Examples|
|---------|------------|--------|-----------| |---------|------------|--------|-----------|
|[az users user list](#users.userListUser)|ListUser|[Parameters](#Parametersusers.userListUser)|Not Found| |[az users user list](#users.userListUser)|ListUser|[Parameters](#Parametersusers.userListUser)|Not Found|
|[az users user show](#users.userGetUser)|GetUser|[Parameters](#Parametersusers.userGetUser)|Not Found|
|[az users user create](#users.userCreateUser)|CreateUser|[Parameters](#Parametersusers.userCreateUser)|Not Found| |[az users user create](#users.userCreateUser)|CreateUser|[Parameters](#Parametersusers.userCreateUser)|Not Found|
|[az users user update](#users.userUpdateUser)|UpdateUser|[Parameters](#Parametersusers.userUpdateUser)|Not Found| |[az users user update](#users.userUpdateUser)|UpdateUser|[Parameters](#Parametersusers.userUpdateUser)|Not Found|
|[az users user delete](#users.userDeleteUser)|DeleteUser|[Parameters](#Parametersusers.userDeleteUser)|Not Found| |[az users user delete](#users.userDeleteUser)|DeleteUser|[Parameters](#Parametersusers.userDeleteUser)|Not Found|
|[az users user show-user](#users.userGetUser)|GetUser|[Parameters](#Parametersusers.userGetUser)|Not Found|
### <a name="CommandsInusers">Commands in `az users user` group</a> ### <a name="CommandsInusers">Commands in `az users user` group</a>
|CLI Command|Operation Swagger name|Parameters|Examples| |CLI Command|Operation Swagger name|Parameters|Examples|
|---------|------------|--------|-----------| |---------|------------|--------|-----------|
|[az users user delete](#usersDeleteExtensions)|DeleteExtensions|[Parameters](#ParametersusersDeleteExtensions)|Not Found|
|[az users user delete](#usersDeleteLicenseDetails)|DeleteLicenseDetails|[Parameters](#ParametersusersDeleteLicenseDetails)|Not Found|
|[az users user delete](#usersDeletePhotos)|DeletePhotos|[Parameters](#ParametersusersDeletePhotos)|Not Found|
|[az users user delete](#usersDeleteRefManager)|DeleteRefManager|[Parameters](#ParametersusersDeleteRefManager)|Not Found|
|[az users user delete](#usersDeleteOutlook)|DeleteOutlook|[Parameters](#ParametersusersDeleteOutlook)|Not Found|
|[az users user delete](#usersDeletePhoto)|DeletePhoto|[Parameters](#ParametersusersDeletePhoto)|Not Found|
|[az users user delete](#usersDeleteSettings)|DeleteSettings|[Parameters](#ParametersusersDeleteSettings)|Not Found|
|[az users user create-extension](#usersCreateExtensions)|CreateExtensions|[Parameters](#ParametersusersCreateExtensions)|Not Found| |[az users user create-extension](#usersCreateExtensions)|CreateExtensions|[Parameters](#ParametersusersCreateExtensions)|Not Found|
|[az users user create-license-detail](#usersCreateLicenseDetails)|CreateLicenseDetails|[Parameters](#ParametersusersCreateLicenseDetails)|Not Found| |[az users user create-license-detail](#usersCreateLicenseDetails)|CreateLicenseDetails|[Parameters](#ParametersusersCreateLicenseDetails)|Not Found|
|[az users user create-photo](#usersCreatePhotos)|CreatePhotos|[Parameters](#ParametersusersCreatePhotos)|Not Found| |[az users user create-photo](#usersCreatePhotos)|CreatePhotos|[Parameters](#ParametersusersCreatePhotos)|Not Found|
@ -45,6 +38,13 @@
|[az users user create-ref-owned-object](#usersCreateRefOwnedObjects)|CreateRefOwnedObjects|[Parameters](#ParametersusersCreateRefOwnedObjects)|Not Found| |[az users user create-ref-owned-object](#usersCreateRefOwnedObjects)|CreateRefOwnedObjects|[Parameters](#ParametersusersCreateRefOwnedObjects)|Not Found|
|[az users user create-ref-registered-device](#usersCreateRefRegisteredDevices)|CreateRefRegisteredDevices|[Parameters](#ParametersusersCreateRefRegisteredDevices)|Not Found| |[az users user create-ref-registered-device](#usersCreateRefRegisteredDevices)|CreateRefRegisteredDevices|[Parameters](#ParametersusersCreateRefRegisteredDevices)|Not Found|
|[az users user create-ref-transitive-member-of](#usersCreateRefTransitiveMemberOf)|CreateRefTransitiveMemberOf|[Parameters](#ParametersusersCreateRefTransitiveMemberOf)|Not Found| |[az users user create-ref-transitive-member-of](#usersCreateRefTransitiveMemberOf)|CreateRefTransitiveMemberOf|[Parameters](#ParametersusersCreateRefTransitiveMemberOf)|Not Found|
|[az users user delete-extension](#usersDeleteExtensions)|DeleteExtensions|[Parameters](#ParametersusersDeleteExtensions)|Not Found|
|[az users user delete-license-detail](#usersDeleteLicenseDetails)|DeleteLicenseDetails|[Parameters](#ParametersusersDeleteLicenseDetails)|Not Found|
|[az users user delete-outlook](#usersDeleteOutlook)|DeleteOutlook|[Parameters](#ParametersusersDeleteOutlook)|Not Found|
|[az users user delete-photo](#usersDeletePhotos)|DeletePhotos|[Parameters](#ParametersusersDeletePhotos)|Not Found|
|[az users user delete-photo](#usersDeletePhoto)|DeletePhoto|[Parameters](#ParametersusersDeletePhoto)|Not Found|
|[az users user delete-ref-manager](#usersDeleteRefManager)|DeleteRefManager|[Parameters](#ParametersusersDeleteRefManager)|Not Found|
|[az users user delete-setting](#usersDeleteSettings)|DeleteSettings|[Parameters](#ParametersusersDeleteSettings)|Not Found|
|[az users user list-created-object](#usersListCreatedObjects)|ListCreatedObjects|[Parameters](#ParametersusersListCreatedObjects)|Not Found| |[az users user list-created-object](#usersListCreatedObjects)|ListCreatedObjects|[Parameters](#ParametersusersListCreatedObjects)|Not Found|
|[az users user list-direct-report](#usersListDirectReports)|ListDirectReports|[Parameters](#ParametersusersListDirectReports)|Not Found| |[az users user list-direct-report](#usersListDirectReports)|ListDirectReports|[Parameters](#ParametersusersListDirectReports)|Not Found|
|[az users user list-extension](#usersListExtensions)|ListExtensions|[Parameters](#ParametersusersListExtensions)|Not Found| |[az users user list-extension](#usersListExtensions)|ListExtensions|[Parameters](#ParametersusersListExtensions)|Not Found|
@ -83,8 +83,8 @@
### <a name="CommandsInusers.outlook">Commands in `az users user-outlook` group</a> ### <a name="CommandsInusers.outlook">Commands in `az users user-outlook` group</a>
|CLI Command|Operation Swagger name|Parameters|Examples| |CLI Command|Operation Swagger name|Parameters|Examples|
|---------|------------|--------|-----------| |---------|------------|--------|-----------|
|[az users user-outlook delete](#users.outlookDeleteMasterCategories)|DeleteMasterCategories|[Parameters](#Parametersusers.outlookDeleteMasterCategories)|Not Found|
|[az users user-outlook create-master-category](#users.outlookCreateMasterCategories)|CreateMasterCategories|[Parameters](#Parametersusers.outlookCreateMasterCategories)|Not Found| |[az users user-outlook create-master-category](#users.outlookCreateMasterCategories)|CreateMasterCategories|[Parameters](#Parametersusers.outlookCreateMasterCategories)|Not Found|
|[az users user-outlook delete-master-category](#users.outlookDeleteMasterCategories)|DeleteMasterCategories|[Parameters](#Parametersusers.outlookDeleteMasterCategories)|Not Found|
|[az users user-outlook list-master-category](#users.outlookListMasterCategories)|ListMasterCategories|[Parameters](#Parametersusers.outlookListMasterCategories)|Not Found| |[az users user-outlook list-master-category](#users.outlookListMasterCategories)|ListMasterCategories|[Parameters](#Parametersusers.outlookListMasterCategories)|Not Found|
|[az users user-outlook show-master-category](#users.outlookGetMasterCategories)|GetMasterCategories|[Parameters](#Parametersusers.outlookGetMasterCategories)|Not Found| |[az users user-outlook show-master-category](#users.outlookGetMasterCategories)|GetMasterCategories|[Parameters](#Parametersusers.outlookGetMasterCategories)|Not Found|
|[az users user-outlook update-master-category](#users.outlookUpdateMasterCategories)|UpdateMasterCategories|[Parameters](#Parametersusers.outlookUpdateMasterCategories)|Not Found| |[az users user-outlook update-master-category](#users.outlookUpdateMasterCategories)|UpdateMasterCategories|[Parameters](#Parametersusers.outlookUpdateMasterCategories)|Not Found|
@ -92,7 +92,7 @@
### <a name="CommandsInusers.settings">Commands in `az users user-setting` group</a> ### <a name="CommandsInusers.settings">Commands in `az users user-setting` group</a>
|CLI Command|Operation Swagger name|Parameters|Examples| |CLI Command|Operation Swagger name|Parameters|Examples|
|---------|------------|--------|-----------| |---------|------------|--------|-----------|
|[az users user-setting delete](#users.settingsDeleteShiftPreferences)|DeleteShiftPreferences|[Parameters](#Parametersusers.settingsDeleteShiftPreferences)|Not Found| |[az users user-setting delete-shift-preference](#users.settingsDeleteShiftPreferences)|DeleteShiftPreferences|[Parameters](#Parametersusers.settingsDeleteShiftPreferences)|Not Found|
|[az users user-setting show-shift-preference](#users.settingsGetShiftPreferences)|GetShiftPreferences|[Parameters](#Parametersusers.settingsGetShiftPreferences)|Not Found| |[az users user-setting show-shift-preference](#users.settingsGetShiftPreferences)|GetShiftPreferences|[Parameters](#Parametersusers.settingsGetShiftPreferences)|Not Found|
|[az users user-setting update-shift-preference](#users.settingsUpdateShiftPreferences)|UpdateShiftPreferences|[Parameters](#Parametersusers.settingsUpdateShiftPreferences)|Not Found| |[az users user-setting update-shift-preference](#users.settingsUpdateShiftPreferences)|UpdateShiftPreferences|[Parameters](#Parametersusers.settingsUpdateShiftPreferences)|Not Found|
@ -109,6 +109,15 @@
|**--select**|array|Select properties to be returned|select|$select| |**--select**|array|Select properties to be returned|select|$select|
|**--expand**|array|Expand related entities|expand|$expand| |**--expand**|array|Expand related entities|expand|$expand|
#### <a name="users.userGetUser">Command `az users user show`</a>
##### <a name="Parametersusers.userGetUser">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--user-id**|string|key: id of user|user_id|user-id|
|**--select**|array|Select properties to be returned|select|$select|
|**--expand**|array|Expand related entities|expand|$expand|
#### <a name="users.userCreateUser">Command `az users user create`</a> #### <a name="users.userCreateUser">Command `az users user create`</a>
##### <a name="Parametersusers.userCreateUser">Parameters</a> ##### <a name="Parametersusers.userCreateUser">Parameters</a>
@ -404,59 +413,7 @@
|**--user-id**|string|key: id of user|user_id|user-id| |**--user-id**|string|key: id of user|user_id|user-id|
|**--if-match**|string|ETag|if_match|If-Match| |**--if-match**|string|ETag|if_match|If-Match|
#### <a name="users.userGetUser">Command `az users user show-user`</a>
##### <a name="Parametersusers.userGetUser">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--user-id**|string|key: id of user|user_id|user-id|
|**--select**|array|Select properties to be returned|select|$select|
|**--expand**|array|Expand related entities|expand|$expand|
### group `az users user` ### group `az users user`
#### <a name="usersDeleteExtensions">Command `az users user delete`</a>
##### <a name="ParametersusersDeleteExtensions">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--user-id**|string|key: id of user|user_id|user-id|
|**--extension-id**|string|key: id of extension|extension_id|extension-id|
|**--if-match**|string|ETag|if_match|If-Match|
#### <a name="usersDeleteLicenseDetails">Command `az users user delete`</a>
##### <a name="ParametersusersDeleteLicenseDetails">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--license-details-id**|string|key: id of licenseDetails|license_details_id|licenseDetails-id|
#### <a name="usersDeletePhotos">Command `az users user delete`</a>
##### <a name="ParametersusersDeletePhotos">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--profile-photo-id**|string|key: id of profilePhoto|profile_photo_id|profilePhoto-id|
#### <a name="usersDeleteRefManager">Command `az users user delete`</a>
##### <a name="ParametersusersDeleteRefManager">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
#### <a name="usersDeleteOutlook">Command `az users user delete`</a>
##### <a name="ParametersusersDeleteOutlook">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
#### <a name="usersDeletePhoto">Command `az users user delete`</a>
##### <a name="ParametersusersDeletePhoto">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
#### <a name="usersDeleteSettings">Command `az users user delete`</a>
##### <a name="ParametersusersDeleteSettings">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
#### <a name="usersCreateExtensions">Command `az users user create-extension`</a> #### <a name="usersCreateExtensions">Command `az users user create-extension`</a>
##### <a name="ParametersusersCreateExtensions">Parameters</a> ##### <a name="ParametersusersCreateExtensions">Parameters</a>
@ -550,6 +507,62 @@
|**--user-id**|string|key: id of user|user_id|user-id| |**--user-id**|string|key: id of user|user_id|user-id|
|**--body**|dictionary|New navigation property ref value|body|body| |**--body**|dictionary|New navigation property ref value|body|body|
#### <a name="usersDeleteExtensions">Command `az users user delete-extension`</a>
##### <a name="ParametersusersDeleteExtensions">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--user-id**|string|key: id of user|user_id|user-id|
|**--extension-id**|string|key: id of extension|extension_id|extension-id|
|**--if-match**|string|ETag|if_match|If-Match|
#### <a name="usersDeleteLicenseDetails">Command `az users user delete-license-detail`</a>
##### <a name="ParametersusersDeleteLicenseDetails">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--user-id**|string|key: id of user|user_id|user-id|
|**--license-details-id**|string|key: id of licenseDetails|license_details_id|licenseDetails-id|
|**--if-match**|string|ETag|if_match|If-Match|
#### <a name="usersDeleteOutlook">Command `az users user delete-outlook`</a>
##### <a name="ParametersusersDeleteOutlook">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--user-id**|string|key: id of user|user_id|user-id|
|**--if-match**|string|ETag|if_match|If-Match|
#### <a name="usersDeletePhotos">Command `az users user delete-photo`</a>
##### <a name="ParametersusersDeletePhotos">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--user-id**|string|key: id of user|user_id|user-id|
|**--profile-photo-id**|string|key: id of profilePhoto|profile_photo_id|profilePhoto-id|
|**--if-match**|string|ETag|if_match|If-Match|
#### <a name="usersDeletePhoto">Command `az users user delete-photo`</a>
##### <a name="ParametersusersDeletePhoto">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
#### <a name="usersDeleteRefManager">Command `az users user delete-ref-manager`</a>
##### <a name="ParametersusersDeleteRefManager">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--user-id**|string|key: id of user|user_id|user-id|
|**--if-match**|string|ETag|if_match|If-Match|
#### <a name="usersDeleteSettings">Command `az users user delete-setting`</a>
##### <a name="ParametersusersDeleteSettings">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--user-id**|string|key: id of user|user_id|user-id|
|**--if-match**|string|ETag|if_match|If-Match|
#### <a name="usersListCreatedObjects">Command `az users user list-created-object`</a> #### <a name="usersListCreatedObjects">Command `az users user list-created-object`</a>
##### <a name="ParametersusersListCreatedObjects">Parameters</a> ##### <a name="ParametersusersListCreatedObjects">Parameters</a>
@ -865,15 +878,6 @@
|**--availability**|array|Availability of the user to be scheduled for work and its recurrence pattern.|availability|availability| |**--availability**|array|Availability of the user to be scheduled for work and its recurrence pattern.|availability|availability|
### group `az users user-outlook` ### group `az users user-outlook`
#### <a name="users.outlookDeleteMasterCategories">Command `az users user-outlook delete`</a>
##### <a name="Parametersusers.outlookDeleteMasterCategories">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--user-id**|string|key: id of user|user_id|user-id|
|**--outlook-category-id**|string|key: id of outlookCategory|outlook_category_id|outlookCategory-id|
|**--if-match**|string|ETag|if_match|If-Match|
#### <a name="users.outlookCreateMasterCategories">Command `az users user-outlook create-master-category`</a> #### <a name="users.outlookCreateMasterCategories">Command `az users user-outlook create-master-category`</a>
##### <a name="Parametersusers.outlookCreateMasterCategories">Parameters</a> ##### <a name="Parametersusers.outlookCreateMasterCategories">Parameters</a>
@ -884,6 +888,15 @@
|**--color**|choice|categoryColor|color|color| |**--color**|choice|categoryColor|color|color|
|**--display-name**|string|A unique name that identifies a category in the user's mailbox. After a category is created, the name cannot be changed. Read-only.|display_name|displayName| |**--display-name**|string|A unique name that identifies a category in the user's mailbox. After a category is created, the name cannot be changed. Read-only.|display_name|displayName|
#### <a name="users.outlookDeleteMasterCategories">Command `az users user-outlook delete-master-category`</a>
##### <a name="Parametersusers.outlookDeleteMasterCategories">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name|
|------|----|-----------|----------|------------|
|**--user-id**|string|key: id of user|user_id|user-id|
|**--outlook-category-id**|string|key: id of outlookCategory|outlook_category_id|outlookCategory-id|
|**--if-match**|string|ETag|if_match|If-Match|
#### <a name="users.outlookListMasterCategories">Command `az users user-outlook list-master-category`</a> #### <a name="users.outlookListMasterCategories">Command `az users user-outlook list-master-category`</a>
##### <a name="Parametersusers.outlookListMasterCategories">Parameters</a> ##### <a name="Parametersusers.outlookListMasterCategories">Parameters</a>
@ -916,7 +929,7 @@
|**--display-name**|string|A unique name that identifies a category in the user's mailbox. After a category is created, the name cannot be changed. Read-only.|display_name|displayName| |**--display-name**|string|A unique name that identifies a category in the user's mailbox. After a category is created, the name cannot be changed. Read-only.|display_name|displayName|
### group `az users user-setting` ### group `az users user-setting`
#### <a name="users.settingsDeleteShiftPreferences">Command `az users user-setting delete`</a> #### <a name="users.settingsDeleteShiftPreferences">Command `az users user-setting delete-shift-preference`</a>
##### <a name="Parametersusers.settingsDeleteShiftPreferences">Parameters</a> ##### <a name="Parametersusers.settingsDeleteShiftPreferences">Parameters</a>
|Option|Type|Description|Path (SDK)|Swagger name| |Option|Type|Description|Path (SDK)|Swagger name|