Skip to content

Commit f94931b

Browse files
author
SDK Automation
committed
Update from master
1 parent 25e44ad commit f94931b

File tree

7 files changed

+257
-0
lines changed

7 files changed

+257
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
export {
10+
discriminators,
11+
AscOperation,
12+
CloudError,
13+
ErrorResponse
14+
} from "../models/mappers";

sdk/storagecache/arm-storagecache/src/models/index.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,50 @@ export interface CloudErrorBody {
6767
target?: string;
6868
}
6969

70+
/**
71+
* Describes the format of Error response.
72+
*/
73+
export interface ErrorResponse {
74+
/**
75+
* Error code
76+
*/
77+
code?: string;
78+
/**
79+
* Error message indicating why the operation failed.
80+
*/
81+
message?: string;
82+
}
83+
84+
/**
85+
* The status of operation.
86+
*/
87+
export interface AscOperation {
88+
/**
89+
* The operation Id.
90+
*/
91+
id?: string;
92+
/**
93+
* The operation name.
94+
*/
95+
name?: string;
96+
/**
97+
* The start time of the operation.
98+
*/
99+
startTime?: string;
100+
/**
101+
* The end time of the operation.
102+
*/
103+
endTime?: string;
104+
/**
105+
* The status of the operation.
106+
*/
107+
status?: string;
108+
/**
109+
* The error detail of the operation if any.
110+
*/
111+
error?: ErrorResponse;
112+
}
113+
70114
/**
71115
* Cache identity properties.
72116
*/
@@ -953,6 +997,26 @@ export type UsageModelsListNextResponse = UsageModelsResult & {
953997
};
954998
};
955999

1000+
/**
1001+
* Contains response data for the get operation.
1002+
*/
1003+
export type AscOperationsGetResponse = AscOperation & {
1004+
/**
1005+
* The underlying HTTP response.
1006+
*/
1007+
_response: msRest.HttpResponse & {
1008+
/**
1009+
* The response body as text (string format)
1010+
*/
1011+
bodyAsText: string;
1012+
1013+
/**
1014+
* The response body as parsed JSON or XML
1015+
*/
1016+
parsedBody: AscOperation;
1017+
};
1018+
};
1019+
9561020
/**
9571021
* Contains response data for the list operation.
9581022
*/

sdk/storagecache/arm-storagecache/src/models/mappers.ts

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,75 @@ export const CloudErrorBody: msRest.CompositeMapper = {
103103
}
104104
};
105105

106+
export const ErrorResponse: msRest.CompositeMapper = {
107+
serializedName: "ErrorResponse",
108+
type: {
109+
name: "Composite",
110+
className: "ErrorResponse",
111+
modelProperties: {
112+
code: {
113+
serializedName: "code",
114+
type: {
115+
name: "String"
116+
}
117+
},
118+
message: {
119+
serializedName: "message",
120+
type: {
121+
name: "String"
122+
}
123+
}
124+
}
125+
}
126+
};
127+
128+
export const AscOperation: msRest.CompositeMapper = {
129+
serializedName: "AscOperation",
130+
type: {
131+
name: "Composite",
132+
className: "AscOperation",
133+
modelProperties: {
134+
id: {
135+
serializedName: "id",
136+
type: {
137+
name: "String"
138+
}
139+
},
140+
name: {
141+
serializedName: "name",
142+
type: {
143+
name: "String"
144+
}
145+
},
146+
startTime: {
147+
serializedName: "startTime",
148+
type: {
149+
name: "String"
150+
}
151+
},
152+
endTime: {
153+
serializedName: "endTime",
154+
type: {
155+
name: "String"
156+
}
157+
},
158+
status: {
159+
serializedName: "status",
160+
type: {
161+
name: "String"
162+
}
163+
},
164+
error: {
165+
serializedName: "error",
166+
type: {
167+
name: "Composite",
168+
className: "ErrorResponse"
169+
}
170+
}
171+
}
172+
}
173+
};
174+
106175
export const CacheIdentity: msRest.CompositeMapper = {
107176
serializedName: "CacheIdentity",
108177
type: {

sdk/storagecache/arm-storagecache/src/models/parameters.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ export const cacheName: msRest.OperationURLParameter = {
4343
}
4444
}
4545
};
46+
export const location: msRest.OperationURLParameter = {
47+
parameterPath: "location",
48+
mapper: {
49+
required: true,
50+
serializedName: "location",
51+
type: {
52+
name: "String"
53+
}
54+
}
55+
};
4656
export const nextPageLink: msRest.OperationURLParameter = {
4757
parameterPath: "nextPageLink",
4858
mapper: {
@@ -54,6 +64,16 @@ export const nextPageLink: msRest.OperationURLParameter = {
5464
},
5565
skipEncoding: true
5666
};
67+
export const operationId: msRest.OperationURLParameter = {
68+
parameterPath: "operationId",
69+
mapper: {
70+
required: true,
71+
serializedName: "operationId",
72+
type: {
73+
name: "String"
74+
}
75+
}
76+
};
5777
export const resourceGroupName: msRest.OperationURLParameter = {
5878
parameterPath: "resourceGroupName",
5979
mapper: {
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
* Changes may cause incorrect behavior and will be lost if the code is
8+
* regenerated.
9+
*/
10+
11+
import * as msRest from "@azure/ms-rest-js";
12+
import * as Models from "../models";
13+
import * as Mappers from "../models/ascOperationsMappers";
14+
import * as Parameters from "../models/parameters";
15+
import { StorageCacheManagementClientContext } from "../storageCacheManagementClientContext";
16+
17+
/** Class representing a AscOperations. */
18+
export class AscOperations {
19+
private readonly client: StorageCacheManagementClientContext;
20+
21+
/**
22+
* Create a AscOperations.
23+
* @param {StorageCacheManagementClientContext} client Reference to the service client.
24+
*/
25+
constructor(client: StorageCacheManagementClientContext) {
26+
this.client = client;
27+
}
28+
29+
/**
30+
* Gets the status of an asynchronous operation for the Azure HPC cache
31+
* @param location The region name which the operation will lookup into.
32+
* @param operationId The operation id which uniquely identifies the asynchronous operation.
33+
* @param [options] The optional parameters
34+
* @returns Promise<Models.AscOperationsGetResponse>
35+
*/
36+
get(location: string, operationId: string, options?: msRest.RequestOptionsBase): Promise<Models.AscOperationsGetResponse>;
37+
/**
38+
* @param location The region name which the operation will lookup into.
39+
* @param operationId The operation id which uniquely identifies the asynchronous operation.
40+
* @param callback The callback
41+
*/
42+
get(location: string, operationId: string, callback: msRest.ServiceCallback<Models.AscOperation>): void;
43+
/**
44+
* @param location The region name which the operation will lookup into.
45+
* @param operationId The operation id which uniquely identifies the asynchronous operation.
46+
* @param options The optional parameters
47+
* @param callback The callback
48+
*/
49+
get(location: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.AscOperation>): void;
50+
get(location: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AscOperation>, callback?: msRest.ServiceCallback<Models.AscOperation>): Promise<Models.AscOperationsGetResponse> {
51+
return this.client.sendOperationRequest(
52+
{
53+
location,
54+
operationId,
55+
options
56+
},
57+
getOperationSpec,
58+
callback) as Promise<Models.AscOperationsGetResponse>;
59+
}
60+
}
61+
62+
// Operation Specifications
63+
const serializer = new msRest.Serializer(Mappers);
64+
const getOperationSpec: msRest.OperationSpec = {
65+
httpMethod: "GET",
66+
path: "subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/ascOperations/{operationId}",
67+
urlParameters: [
68+
Parameters.subscriptionId,
69+
Parameters.location,
70+
Parameters.operationId
71+
],
72+
queryParameters: [
73+
Parameters.apiVersion
74+
],
75+
headerParameters: [
76+
Parameters.acceptLanguage
77+
],
78+
responses: {
79+
200: {
80+
bodyMapper: Mappers.AscOperation
81+
},
82+
default: {
83+
bodyMapper: Mappers.CloudError
84+
}
85+
},
86+
serializer
87+
};

sdk/storagecache/arm-storagecache/src/operations/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
export * from "./operations";
1212
export * from "./skus";
1313
export * from "./usageModels";
14+
export * from "./ascOperations";
1415
export * from "./caches";
1516
export * from "./storageTargets";

sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class StorageCacheManagementClient extends StorageCacheManagementClientContext {
2020
operations: operations.Operations;
2121
skus: operations.Skus;
2222
usageModels: operations.UsageModels;
23+
ascOperations: operations.AscOperations;
2324
caches: operations.Caches;
2425
storageTargets: operations.StorageTargets;
2526

@@ -35,6 +36,7 @@ class StorageCacheManagementClient extends StorageCacheManagementClientContext {
3536
this.operations = new operations.Operations(this);
3637
this.skus = new operations.Skus(this);
3738
this.usageModels = new operations.UsageModels(this);
39+
this.ascOperations = new operations.AscOperations(this);
3840
this.caches = new operations.Caches(this);
3941
this.storageTargets = new operations.StorageTargets(this);
4042
}

0 commit comments

Comments
 (0)