Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
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
10 changes: 10 additions & 0 deletions codegen_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -688,5 +688,15 @@
"dir": "deviceprovisioningservicesManagement/lib",
"source": "deviceprovisioningservices/resource-manager/readme.md"
}
},
"iotspaces": {
"resource-manager": {
"packageName": "azure-arm-iotspaces",
"packageVersion": "1.0.0-preview",
"generatePackageJson": true,
"generateReadmeMd": true,
"dir": "iotspacesManagement/lib",
"source": "iotspaces/resource-manager/readme.md"
}
}
}
37 changes: 37 additions & 0 deletions lib/services/iotspacesManagement/lib/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Microsoft Azure SDK for Node.js - IoTSpacesClient
This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version 6.x.x or higher**

## Features


## How to Install

```bash
npm install azure-arm-iotspaces
```

## How to use

### Authentication, client creation and get ioTSpaces as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const IoTSpacesClient = require("azure-arm-iotspaces");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new IoTSpacesClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const resourceName = "testresourceName";
return client.ioTSpaces.get(resourceGroupName, resourceName).then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.log('An error ocurred:');
console.dir(err, {depth: null, colors: true});
});

## Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
63 changes: 63 additions & 0 deletions lib/services/iotspacesManagement/lib/ioTSpacesClient.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* 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.
*/

import { ServiceClientCredentials } from 'ms-rest';
import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure';
import * as models from "./models";
import * as operations from "./operations";

export default class IoTSpacesClient extends AzureServiceClient {
/**
* Initializes a new instance of the IoTSpacesClient class.
* @constructor
*
* @class
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
*
* @param {uuid} subscriptionId - The subscription identifier.
*
* @param {string} [baseUri] - The base URI of the service.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions);

credentials: ServiceClientCredentials;

subscriptionId: string;

apiVersion: string;

acceptLanguage: string;

longRunningOperationRetryTimeout: number;

generateClientRequestId: boolean;

// Operation groups
ioTSpaces: operations.IoTSpaces;
operations: operations.Operations;
}

export { IoTSpacesClient, models as IoTSpacesModels };
86 changes: 86 additions & 0 deletions lib/services/iotspacesManagement/lib/ioTSpacesClient.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* 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.
*/

/* jshint latedef:false */
/* jshint forin:false */
/* jshint noempty:false */

'use strict';

const msRest = require('ms-rest');
const msRestAzure = require('ms-rest-azure');
const ServiceClient = msRestAzure.AzureServiceClient;

const models = require('./models');
const operations = require('./operations');


/** Class representing a IoTSpacesClient. */
class IoTSpacesClient extends ServiceClient {
/**
* Create a IoTSpacesClient.
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
* @param {uuid} subscriptionId - The subscription identifier.
* @param {string} [baseUri] - The base URI of the service.
* @param {object} [options] - The parameter options
* @param {Array} [options.filters] - Filters to be added to the request pipeline
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*/
constructor(credentials, subscriptionId, baseUri, options) {
if (credentials === null || credentials === undefined) {
throw new Error('\'credentials\' cannot be null.');
}
if (subscriptionId === null || subscriptionId === undefined) {
throw new Error('\'subscriptionId\' cannot be null.');
}

if (!options) options = {};

super(credentials, options);

this.apiVersion = '2017-10-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
this.baseUri = baseUri;
if (!this.baseUri) {
this.baseUri = 'https://management.azure.com';
}
this.credentials = credentials;
this.subscriptionId = subscriptionId;

let packageInfo = this.getPackageJsonInfo(__dirname);
this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
this.generateClientRequestId = options.generateClientRequestId;
}
this.ioTSpaces = new operations.IoTSpaces(this);
this.operations = new operations.Operations(this);
this.models = models;
msRest.addSerializationMixin(this);
}

}

module.exports = IoTSpacesClient;
module.exports['default'] = IoTSpacesClient;
module.exports.IoTSpacesClient = IoTSpacesClient;
module.exports.IoTSpacesModels = models;
71 changes: 71 additions & 0 deletions lib/services/iotspacesManagement/lib/models/errorDetails.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* 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';

/**
* Error details.
*
*/
class ErrorDetails {
/**
* Create a ErrorDetails.
* @member {string} [code] The error code.
* @member {string} [message] The error message.
* @member {string} [target] The target of the particular error.
*/
constructor() {
}

/**
* Defines the metadata of ErrorDetails
*
* @returns {object} metadata of ErrorDetails
*
*/
mapper() {
return {
required: false,
serializedName: 'ErrorDetails',
type: {
name: 'Composite',
className: 'ErrorDetails',
modelProperties: {
code: {
required: false,
readOnly: true,
serializedName: 'code',
type: {
name: 'String'
}
},
message: {
required: false,
readOnly: true,
serializedName: 'message',
type: {
name: 'String'
}
},
target: {
required: false,
readOnly: true,
serializedName: 'target',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = ErrorDetails;
Loading