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

[AutoPR security/resource-manager] Security: 2017-08-01-preview - Introduce IoT security solution resource #4711

Closed
Closed
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
70 changes: 70 additions & 0 deletions lib/services/securityManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ export interface Resource extends BaseResource {
readonly type?: string;
}

/**
* A container holding only the Tags for a resource, allowing the user to update the tags.
*/
export interface TagsResource {
/**
* Resource tags
*/
tags?: { [propertyName: string]: string };
}

/**
* Describes an Azure resource with kind
*/
Expand Down Expand Up @@ -92,6 +102,56 @@ export interface WorkspaceSetting extends Resource {
scope: string;
}

/**
* Security Solution
*/
export interface IoTSecuritySolutionModel {
/**
* Resource Id
*/
readonly id?: string;
/**
* Resource name
*/
readonly name?: string;
/**
* Resource type
*/
readonly type?: string;
/**
* Resource tags
*/
tags?: { [propertyName: string]: string };
/**
* The resource location.
*/
location?: string;
/**
* The full Azure ID of the workspace to save the data in
*/
workspaceResourceId?: string;
/**
* the customer id associate with the workspace
*/
workspaceCustomerId?: string;
/**
* The display name.
*/
displayName: string;
/**
* Is the solution Enabled for the customer.
*/
enabled?: boolean;
/**
* list of additional data to export by the system
*/
exportProperty?: string[];
/**
* Related iot hub resources ID
*/
iotHubs: string[];
}

/**
* Auto provisioning setting
*/
Expand Down Expand Up @@ -958,6 +1018,16 @@ export interface AutoProvisioningSettingList extends Array<AutoProvisioningSetti
readonly nextLink?: string;
}

/**
* List of iot solutions
*/
export interface IoTSecuritySolutionsList extends Array<IoTSecuritySolutionModel> {
/**
* The URI to fetch the next page.
*/
readonly nextLink?: string;
}

/**
* List of Compliance objects response
*/
Expand Down
3 changes: 3 additions & 0 deletions lib/services/securityManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ var msRestAzure = require('ms-rest-azure');
exports.BaseResource = msRestAzure.BaseResource;
exports.CloudError = msRestAzure.CloudError;
exports.Resource = require('./resource');
exports.TagsResource = require('./tagsResource');
exports.Kind = require('./kind');
exports.SecurityContact = require('./securityContact');
exports.Pricing = require('./pricing');
exports.WorkspaceSetting = require('./workspaceSetting');
exports.IoTSecuritySolutionModel = require('./ioTSecuritySolutionModel');
exports.AutoProvisioningSetting = require('./autoProvisioningSetting');
exports.ComplianceSegment = require('./complianceSegment');
exports.Compliance = require('./compliance');
Expand Down Expand Up @@ -75,6 +77,7 @@ exports.PricingList = require('./pricingList');
exports.SecurityContactList = require('./securityContactList');
exports.WorkspaceSettingList = require('./workspaceSettingList');
exports.AutoProvisioningSettingList = require('./autoProvisioningSettingList');
exports.IoTSecuritySolutionsList = require('./ioTSecuritySolutionsList');
exports.ComplianceList = require('./complianceList');
exports.SettingsList = require('./settingsList');
exports.InformationProtectionPolicyList = require('./informationProtectionPolicyList');
Expand Down
161 changes: 161 additions & 0 deletions lib/services/securityManagement/lib/models/ioTSecuritySolutionModel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
/*
* 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';

/**
* Security Solution
*
*/
class IoTSecuritySolutionModel {
/**
* Create a IoTSecuritySolutionModel.
* @property {string} [id] Resource Id
* @property {string} [name] Resource name
* @property {string} [type] Resource type
* @property {object} [tags] Resource tags
* @property {string} [location] The resource location.
* @property {string} [workspaceResourceId] The full Azure ID of the
* workspace to save the data in
* @property {string} [workspaceCustomerId] the customer id associate with
* the workspace
* @property {string} displayName The display name.
* @property {boolean} [enabled] Is the solution Enabled for the customer.
* Default value: true .
* @property {array} [exportProperty] list of additional data to export by
* the system
* @property {array} iotHubs Related iot hub resources ID
*/
constructor() {
}

/**
* Defines the metadata of IoTSecuritySolutionModel
*
* @returns {object} metadata of IoTSecuritySolutionModel
*
*/
mapper() {
return {
required: false,
serializedName: 'IoTSecuritySolutionModel',
type: {
name: 'Composite',
className: 'IoTSecuritySolutionModel',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
location: {
required: false,
serializedName: 'location',
type: {
name: 'String'
}
},
workspaceResourceId: {
required: false,
serializedName: 'properties.workspaceResourceId',
type: {
name: 'String'
}
},
workspaceCustomerId: {
required: false,
serializedName: 'properties.workspaceCustomerId',
type: {
name: 'String'
}
},
displayName: {
required: true,
serializedName: 'properties.displayName',
type: {
name: 'String'
}
},
enabled: {
required: false,
serializedName: 'properties.enabled',
defaultValue: true,
type: {
name: 'Boolean'
}
},
exportProperty: {
required: false,
serializedName: 'properties.export',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'ExtraDataElementType',
type: {
name: 'String'
}
}
}
},
iotHubs: {
required: true,
serializedName: 'properties.iotHubs',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
}
}
}
};
}
}

module.exports = IoTSecuritySolutionModel;
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* 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';

/**
* List of iot solutions
*/
class IoTSecuritySolutionsList extends Array {
/**
* Create a IoTSecuritySolutionsList.
* @property {string} [nextLink] The URI to fetch the next page.
*/
constructor() {
super();
}

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

module.exports = IoTSecuritySolutionsList;
Loading