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

[AutoPR containerservices/resource-manager] Rename to "Operation" from "ComputeOperation" #2941

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 @@ -520,7 +520,7 @@ export interface ContainerService extends Resource {

/**
* @class
* Initializes a new instance of the ComputeOperationValue class.
* Initializes a new instance of the OperationValue class.
* @constructor
* Describes the properties of a Compute Operation value.
*
Expand All @@ -532,7 +532,7 @@ export interface ContainerService extends Resource {
* @member {string} [description] The description of the operation.
* @member {string} [provider] The resource provider for the operation.
*/
export interface ComputeOperationValue {
export interface OperationValue {
readonly origin?: string;
readonly name?: string;
readonly operation?: string;
Expand Down Expand Up @@ -915,12 +915,12 @@ export interface ContainerServiceListResult extends Array<ContainerService> {

/**
* @class
* Initializes a new instance of the ComputeOperationListResult class.
* Initializes a new instance of the OperationListResult class.
* @constructor
* The List Compute Operation operation response.
*
*/
export interface ComputeOperationListResult extends Array<ComputeOperationValue> {
export interface OperationListResult extends Array<OperationValue> {
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/services/containerservicesManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exports.ContainerServiceLinuxProfile = require('./containerServiceLinuxProfile')
exports.ContainerServiceVMDiagnostics = require('./containerServiceVMDiagnostics');
exports.ContainerServiceDiagnosticsProfile = require('./containerServiceDiagnosticsProfile');
exports.ContainerService = require('./containerService');
exports.ComputeOperationValue = require('./computeOperationValue');
exports.OperationValue = require('./operationValue');
exports.ManagedClusterAgentPoolProfile = require('./managedClusterAgentPoolProfile');
exports.ContainerServiceNetworkProfile = require('./containerServiceNetworkProfile');
exports.ManagedClusterAddonProfile = require('./managedClusterAddonProfile');
Expand All @@ -45,5 +45,5 @@ exports.ManagedClusterUpgradeProfile = require('./managedClusterUpgradeProfile')
exports.OrchestratorVersionProfile = require('./orchestratorVersionProfile');
exports.OrchestratorVersionProfileListResult = require('./orchestratorVersionProfileListResult');
exports.ContainerServiceListResult = require('./containerServiceListResult');
exports.ComputeOperationListResult = require('./computeOperationListResult');
exports.OperationListResult = require('./operationListResult');
exports.ManagedClusterListResult = require('./managedClusterListResult');
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* The List Compute Operation operation response.
*/
class OperationListResult extends Array {
/**
* Create a OperationListResult.
*/
constructor() {
super();
}

/**
* Defines the metadata of OperationListResult
*
* @returns {object} metadata of OperationListResult
*
*/
mapper() {
return {
required: false,
serializedName: 'OperationListResult',
type: {
name: 'Composite',
className: 'OperationListResult',
modelProperties: {
value: {
required: false,
readOnly: true,
serializedName: '',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'OperationValueElementType',
type: {
name: 'Composite',
className: 'OperationValue'
}
}
}
}
}
}
};
}
}

module.exports = OperationListResult;
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* Describes the properties of a Compute Operation value.
*
*/
class OperationValue {
/**
* Create a OperationValue.
* @member {string} [origin] The origin of the compute operation.
* @member {string} [name] The name of the compute operation.
* @member {string} [operation] The display name of the compute operation.
* @member {string} [resource] The display name of the resource the operation
* applies to.
* @member {string} [description] The description of the operation.
* @member {string} [provider] The resource provider for the operation.
*/
constructor() {
}

/**
* Defines the metadata of OperationValue
*
* @returns {object} metadata of OperationValue
*
*/
mapper() {
return {
required: false,
serializedName: 'OperationValue',
type: {
name: 'Composite',
className: 'OperationValue',
modelProperties: {
origin: {
required: false,
readOnly: true,
serializedName: 'origin',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
operation: {
required: false,
readOnly: true,
serializedName: 'display.operation',
type: {
name: 'String'
}
},
resource: {
required: false,
readOnly: true,
serializedName: 'display.resource',
type: {
name: 'String'
}
},
description: {
required: false,
readOnly: true,
serializedName: 'display.description',
type: {
name: 'String'
}
},
provider: {
required: false,
readOnly: true,
serializedName: 'display.provider',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = OperationValue;
Original file line number Diff line number Diff line change
Expand Up @@ -1361,11 +1361,11 @@ export interface Operations {
*
* @returns {Promise} A promise is returned
*
* @resolve {HttpOperationResponse<ComputeOperationListResult>} - The deserialized result object.
* @resolve {HttpOperationResponse<OperationListResult>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ComputeOperationListResult>>;
listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.OperationListResult>>;

/**
* Gets a list of compute operations.
Expand All @@ -1382,25 +1382,24 @@ export interface Operations {
*
* {Promise} A promise is returned.
*
* @resolve {ComputeOperationListResult} - The deserialized result object.
* @resolve {OperationListResult} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*
* {ServiceCallback} optionalCallback(err, result, request, response)
*
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
*
* {ComputeOperationListResult} [result] - The deserialized result object if an error did not occur.
* See {@link ComputeOperationListResult} for more
* information.
* {OperationListResult} [result] - The deserialized result object if an error did not occur.
* See {@link OperationListResult} for more information.
*
* {WebResource} [request] - The HTTP Request object if an error did not occur.
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.ComputeOperationListResult>;
list(callback: ServiceCallback<models.ComputeOperationListResult>): void;
list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ComputeOperationListResult>): void;
list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.OperationListResult>;
list(callback: ServiceCallback<models.OperationListResult>): void;
list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.OperationListResult>): void;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ const WebResource = msRest.WebResource;
* {Error} err - The Error object if an error occurred, null otherwise.
*
* {object} [result] - The deserialized result object if an error did not occur.
* See {@link ComputeOperationListResult} for more
* information.
* See {@link OperationListResult} for more information.
*
* {object} [request] - The HTTP Request object if an error did not occur.
*
Expand Down Expand Up @@ -127,7 +126,7 @@ function _list(options, callback) {
parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) {
let resultMapper = new client.models['ComputeOperationListResult']().mapper();
let resultMapper = new client.models['OperationListResult']().mapper();
result = client.deserialize(resultMapper, parsedResponse, 'result');
}
} catch (error) {
Expand Down Expand Up @@ -163,7 +162,7 @@ class Operations {
*
* @returns {Promise} A promise is returned
*
* @resolve {HttpOperationResponse<ComputeOperationListResult>} - The deserialized result object.
* @resolve {HttpOperationResponse<OperationListResult>} - The deserialized result object.
*
* @reject {Error} - The error object.
*/
Expand Down Expand Up @@ -196,7 +195,7 @@ class Operations {
*
* {Promise} A promise is returned
*
* @resolve {ComputeOperationListResult} - The deserialized result object.
* @resolve {OperationListResult} - The deserialized result object.
*
* @reject {Error} - The error object.
*
Expand All @@ -205,8 +204,7 @@ class Operations {
* {Error} err - The Error object if an error occurred, null otherwise.
*
* {object} [result] - The deserialized result object if an error did not occur.
* See {@link ComputeOperationListResult} for more
* information.
* See {@link OperationListResult} for more information.
*
* {object} [request] - The HTTP Request object if an error did not occur.
*
Expand Down