Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR automation/resource-manager] Added x-mx-odata properties for some resources #2815

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class HybridRunbookWorker {
* @member {string} [ip] Gets or sets the assigned machine IP address.
* @member {date} [registrationTime] Gets or sets the registration time of
* the worker machine.
* @member {date} [lastSeenDateTime] Last Heartbeat from the Worker
*/
constructor() {
}
Expand Down Expand Up @@ -59,6 +60,13 @@ class HybridRunbookWorker {
type: {
name: 'DateTime'
}
},
lastSeenDateTime: {
required: false,
serializedName: 'lastSeenDateTime',
type: {
name: 'DateTime'
}
}
}
}
Expand Down
22 changes: 8 additions & 14 deletions lib/services/automationManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ export interface ProxyResource extends Resource {
* the webhook job will run on.
* @member {date} [creationTime] Gets or sets the creation time.
* @member {date} [lastModifiedTime] Gets or sets the last modified time.
* @member {string} [lastModifiedBy] Details of the user who last modified the
* Webhook
* @member {string} [description] Gets or sets the description.
*/
export interface Webhook extends ProxyResource {
Expand All @@ -180,6 +182,7 @@ export interface Webhook extends ProxyResource {
runOn?: string;
creationTime?: Date;
lastModifiedTime?: Date;
lastModifiedBy?: string;
description?: string;
}

Expand Down Expand Up @@ -1574,11 +1577,13 @@ export interface DscNodeReport {
* @member {string} [ip] Gets or sets the assigned machine IP address.
* @member {date} [registrationTime] Gets or sets the registration time of the
* worker machine.
* @member {date} [lastSeenDateTime] Last Heartbeat from the Worker
*/
export interface HybridRunbookWorker {
name?: string;
ip?: string;
registrationTime?: Date;
lastSeenDateTime?: Date;
}

/**
Expand Down Expand Up @@ -2366,6 +2371,8 @@ export interface WebhookUpdateParameters {
* @member {date} [endTime] The end time of the job.
* @member {date} [lastModifiedTime] The last modified time of the job.
* @member {string} [provisioningState] The provisioning state of a resource.
* @member {string} [runOn] Specifies the runOn group name where the job was
* executed.
*/
export interface JobCollectionItem extends ProxyResource {
readonly runbook?: RunbookAssociationProperty;
Expand All @@ -2376,6 +2383,7 @@ export interface JobCollectionItem extends ProxyResource {
readonly endTime?: Date;
readonly lastModifiedTime?: Date;
readonly provisioningState?: string;
runOn?: string;
}

/**
Expand All @@ -2391,13 +2399,10 @@ export interface JobCollectionItem extends ProxyResource {
* 'Tools', 'Updates'
* @member {array} [excludedKbNumbers] KB numbers excluded from the software
* update configuration.
* @member {array} [includedKbNumbers] KB numbers included from the software
* update configuration.
*/
export interface WindowsProperties {
includedUpdateClassifications?: string;
excludedKbNumbers?: string[];
includedKbNumbers?: string[];
}

/**
Expand All @@ -2411,13 +2416,10 @@ export interface WindowsProperties {
* 'Unclassified', 'Critical', 'Security', 'Other'
* @member {array} [excludedPackageNameMasks] packages excluded from the
* software update configuration.
* @member {array} [includedPackageNameMasks] packages included from the
* software update configuration.
*/
export interface LinuxProperties {
includedPackageClassifications?: string;
excludedPackageNameMasks?: string[];
includedPackageNameMasks?: string[];
}

/**
Expand All @@ -2436,16 +2438,12 @@ export interface LinuxProperties {
* 'ServicePack', 'Definition', 'Tools', 'Updates'
* @member {array} [windows.excludedKbNumbers] KB numbers excluded from the
* software update configuration.
* @member {array} [windows.includedKbNumbers] KB numbers included from the
* software update configuration.
* @member {object} [linux] Linux specific update configuration.
* @member {string} [linux.includedPackageClassifications] Update
* classifications included in the software update configuration. Possible
* values include: 'Unclassified', 'Critical', 'Security', 'Other'
* @member {array} [linux.excludedPackageNameMasks] packages excluded from the
* software update configuration.
* @member {array} [linux.includedPackageNameMasks] packages included from the
* software update configuration.
* @member {moment.duration} [duration] Maximum time allowed for the software
* update configuration run. Duration needs to be specified using the format
* PT[n]H[n]M[n]S as per ISO8601
Expand Down Expand Up @@ -2485,17 +2483,13 @@ export interface UpdateConfiguration {
* 'ServicePack', 'Definition', 'Tools', 'Updates'
* @member {array} [updateConfiguration.windows.excludedKbNumbers] KB numbers
* excluded from the software update configuration.
* @member {array} [updateConfiguration.windows.includedKbNumbers] KB numbers
* included from the software update configuration.
* @member {object} [updateConfiguration.linux] Linux specific update
* configuration.
* @member {string} [updateConfiguration.linux.includedPackageClassifications]
* Update classifications included in the software update configuration.
* Possible values include: 'Unclassified', 'Critical', 'Security', 'Other'
* @member {array} [updateConfiguration.linux.excludedPackageNameMasks]
* packages excluded from the software update configuration.
* @member {array} [updateConfiguration.linux.includedPackageNameMasks]
* packages included from the software update configuration.
* @member {moment.duration} [updateConfiguration.duration] Maximum time
* allowed for the software update configuration run. Duration needs to be
* specified using the format PT[n]H[n]M[n]S as per ISO8601
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class JobCollectionItem extends models['ProxyResource'] {
* @member {date} [endTime] The end time of the job.
* @member {date} [lastModifiedTime] The last modified time of the job.
* @member {string} [provisioningState] The provisioning state of a resource.
* @member {string} [runOn] Specifies the runOn group name where the job was
* executed.
*/
constructor() {
super();
Expand Down Expand Up @@ -139,6 +141,13 @@ class JobCollectionItem extends models['ProxyResource'] {
type: {
name: 'String'
}
},
runOn: {
required: false,
serializedName: 'properties.runOn',
type: {
name: 'String'
}
}
}
}
Expand Down
16 changes: 0 additions & 16 deletions lib/services/automationManagement/lib/models/linuxProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class LinuxProperties {
* 'Unclassified', 'Critical', 'Security', 'Other'
* @member {array} [excludedPackageNameMasks] packages excluded from the
* software update configuration.
* @member {array} [includedPackageNameMasks] packages included from the
* software update configuration.
*/
constructor() {
}
Expand Down Expand Up @@ -62,20 +60,6 @@ class LinuxProperties {
}
}
}
},
includedPackageNameMasks: {
required: false,
serializedName: 'includedPackageNameMasks',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ class SoftwareUpdateConfiguration extends models['BaseResource'] {
* 'ServicePack', 'Definition', 'Tools', 'Updates'
* @member {array} [updateConfiguration.windows.excludedKbNumbers] KB numbers
* excluded from the software update configuration.
* @member {array} [updateConfiguration.windows.includedKbNumbers] KB numbers
* included from the software update configuration.
* @member {object} [updateConfiguration.linux] Linux specific update
* configuration.
* @member {string}
Expand All @@ -47,8 +45,6 @@ class SoftwareUpdateConfiguration extends models['BaseResource'] {
* values include: 'Unclassified', 'Critical', 'Security', 'Other'
* @member {array} [updateConfiguration.linux.excludedPackageNameMasks]
* packages excluded from the software update configuration.
* @member {array} [updateConfiguration.linux.includedPackageNameMasks]
* packages included from the software update configuration.
* @member {moment.duration} [updateConfiguration.duration] Maximum time
* allowed for the software update configuration run. Duration needs to be
* specified using the format PT[n]H[n]M[n]S as per ISO8601
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,12 @@ class UpdateConfiguration {
* 'ServicePack', 'Definition', 'Tools', 'Updates'
* @member {array} [windows.excludedKbNumbers] KB numbers excluded from the
* software update configuration.
* @member {array} [windows.includedKbNumbers] KB numbers included from the
* software update configuration.
* @member {object} [linux] Linux specific update configuration.
* @member {string} [linux.includedPackageClassifications] Update
* classifications included in the software update configuration. Possible
* values include: 'Unclassified', 'Critical', 'Security', 'Other'
* @member {array} [linux.excludedPackageNameMasks] packages excluded from
* the software update configuration.
* @member {array} [linux.includedPackageNameMasks] packages included from
* the software update configuration.
* @member {moment.duration} [duration] Maximum time allowed for the software
* update configuration run. Duration needs to be specified using the format
* PT[n]H[n]M[n]S as per ISO8601
Expand Down
9 changes: 9 additions & 0 deletions lib/services/automationManagement/lib/models/webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class Webhook extends models['ProxyResource'] {
* the webhook job will run on.
* @member {date} [creationTime] Gets or sets the creation time.
* @member {date} [lastModifiedTime] Gets or sets the last modified time.
* @member {string} [lastModifiedBy] Details of the user who last modified
* the Webhook
* @member {string} [description] Gets or sets the description.
*/
constructor() {
Expand Down Expand Up @@ -150,6 +152,13 @@ class Webhook extends models['ProxyResource'] {
name: 'DateTime'
}
},
lastModifiedBy: {
required: false,
serializedName: 'properties.lastModifiedBy',
type: {
name: 'String'
}
},
description: {
required: false,
serializedName: 'properties.description',
Expand Down
16 changes: 0 additions & 16 deletions lib/services/automationManagement/lib/models/windowsProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class WindowsProperties {
* 'Tools', 'Updates'
* @member {array} [excludedKbNumbers] KB numbers excluded from the software
* update configuration.
* @member {array} [includedKbNumbers] KB numbers included from the software
* update configuration.
*/
constructor() {
}
Expand Down Expand Up @@ -64,20 +62,6 @@ class WindowsProperties {
}
}
}
},
includedKbNumbers: {
required: false,
serializedName: 'includedKbNumbers',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ function _update(resourceGroupName, automationAccountName, hybridRunbookWorkerGr
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.filter] The filter to apply on the operation.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand Down Expand Up @@ -554,6 +556,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti
if (!callback) {
throw new Error('callback cannot be null.');
}
let filter = (options && options.filter !== undefined) ? options.filter : undefined;
let apiVersion = '2015-10-31';
// Validate
try {
Expand All @@ -577,6 +580,9 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti
if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') {
throw new Error('automationAccountName cannot be null or undefined and it must be of type string.');
}
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
throw new Error('filter must be of type string.');
}
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
}
Expand All @@ -594,6 +600,9 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti
requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
let queryParameters = [];
if (filter !== null && filter !== undefined) {
queryParameters.push('$filter=' + encodeURIComponent(filter));
}
queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&');
Expand Down Expand Up @@ -1123,6 +1132,8 @@ class HybridRunbookWorkerGroupOperations {
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.filter] The filter to apply on the operation.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand Down Expand Up @@ -1155,6 +1166,8 @@ class HybridRunbookWorkerGroupOperations {
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.filter] The filter to apply on the operation.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand Down
Loading