Skip to content

Commit

Permalink
Generate @azure/arm-netapp package (#2681)
Browse files Browse the repository at this point in the history
* Generate @azure/arm-netapp package

* Bump the version
  • Loading branch information
kpajdzik authored May 2, 2019
1 parent 3fa24c6 commit be196aa
Show file tree
Hide file tree
Showing 18 changed files with 417 additions and 106 deletions.
6 changes: 3 additions & 3 deletions sdk/netapp/arm-netapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "@azure/arm-netapp",
"author": "Microsoft Corporation",
"description": "AzureNetAppFilesManagementClient Library with typescript type definitions for node.js and browser.",
"version": "2.0.0",
"version": "3.0.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^1.3.2",
"@azure/ms-rest-js": "^1.6.0",
"@azure/ms-rest-js": "^1.8.1",
"tslib": "^1.9.3"
},
"keywords": [
Expand All @@ -26,7 +26,7 @@
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.4.9"
},
"homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/netapp/arm-netapp",
"homepage": "https://github.com/azure/azure-sdk-for-js",
"repository": {
"type": "git",
"url": "https://github.com/azure/azure-sdk-for-js.git"
Expand Down
107 changes: 107 additions & 0 deletions sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import * as msRest from "@azure/ms-rest-js";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as Parameters from "./models/parameters";
import * as operations from "./operations";
import { AzureNetAppFilesManagementClientContext } from "./azureNetAppFilesManagementClientContext";

Expand Down Expand Up @@ -40,9 +41,115 @@ class AzureNetAppFilesManagementClient extends AzureNetAppFilesManagementClientC
this.mountTargets = new operations.MountTargets(this);
this.snapshots = new operations.Snapshots(this);
}

/**
* Check if a resource name is available.
* @summary Check resource name availability
* @param location The location
* @param [options] The optional parameters
* @returns Promise<Models.CheckNameAvailabilityResponse>
*/
checkNameAvailability(location: string, options?: msRest.RequestOptionsBase): Promise<Models.CheckNameAvailabilityResponse>;
/**
* @param location The location
* @param callback The callback
*/
checkNameAvailability(location: string, callback: msRest.ServiceCallback<Models.ResourceNameAvailability>): void;
/**
* @param location The location
* @param options The optional parameters
* @param callback The callback
*/
checkNameAvailability(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ResourceNameAvailability>): void;
checkNameAvailability(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ResourceNameAvailability>, callback?: msRest.ServiceCallback<Models.ResourceNameAvailability>): Promise<Models.CheckNameAvailabilityResponse> {
return this.sendOperationRequest(
{
location,
options
},
checkNameAvailabilityOperationSpec,
callback) as Promise<Models.CheckNameAvailabilityResponse>;
}

/**
* Check if a file path is available.
* @summary Check file path availability
* @param location The location
* @param [options] The optional parameters
* @returns Promise<Models.CheckFilePathAvailabilityResponse>
*/
checkFilePathAvailability(location: string, options?: msRest.RequestOptionsBase): Promise<Models.CheckFilePathAvailabilityResponse>;
/**
* @param location The location
* @param callback The callback
*/
checkFilePathAvailability(location: string, callback: msRest.ServiceCallback<Models.ResourceNameAvailability>): void;
/**
* @param location The location
* @param options The optional parameters
* @param callback The callback
*/
checkFilePathAvailability(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ResourceNameAvailability>): void;
checkFilePathAvailability(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ResourceNameAvailability>, callback?: msRest.ServiceCallback<Models.ResourceNameAvailability>): Promise<Models.CheckFilePathAvailabilityResponse> {
return this.sendOperationRequest(
{
location,
options
},
checkFilePathAvailabilityOperationSpec,
callback) as Promise<Models.CheckFilePathAvailabilityResponse>;
}
}

// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const checkNameAvailabilityOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability",
urlParameters: [
Parameters.subscriptionId,
Parameters.location
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.ResourceNameAvailability
},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};

const checkFilePathAvailabilityOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability",
urlParameters: [
Parameters.subscriptionId,
Parameters.location
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.ResourceNameAvailability
},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};

export {
AzureNetAppFilesManagementClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";

const packageName = "@azure/arm-netapp";
const packageVersion = "2.0.0";
const packageVersion = "3.0.0";

export class AzureNetAppFilesManagementClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
Expand Down Expand Up @@ -45,7 +45,7 @@ export class AzureNetAppFilesManagementClientContext extends msRestAzure.AzureSe

super(credentials, options);

this.apiVersion = '2017-08-15';
this.apiVersion = '2019-05-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down
2 changes: 1 addition & 1 deletion sdk/netapp/arm-netapp/src/models/accountsMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export {
BaseResource,
CapacityPool,
CapacityPoolPatch,
ErrorModel,
CloudError,
ExportPolicyRule,
NetAppAccount,
NetAppAccountList,
Expand Down
Loading

0 comments on commit be196aa

Please sign in to comment.