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

[AutoPR sql/resource-manager] Add Swagger for Short Term Retention Policies #2767

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
13 changes: 13 additions & 0 deletions lib/services/sqlManagement2/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3169,6 +3169,19 @@ export interface InstanceFailoverGroup extends ProxyResource {
managedInstancePairs: ManagedInstancePairInfo[];
}

/**
* @class
* Initializes a new instance of the ShortTermRetentionPolicy class.
* @constructor
* A short term retention policy resource.
*
* @member {number} [retentionDays] The backup retention period in days. This
* is how many days Point-in-Time Restore will be supported.
*/
export interface ShortTermRetentionPolicy extends ProxyResource {
retentionDays?: number;
}


/**
* @class
Expand Down
1 change: 1 addition & 0 deletions lib/services/sqlManagement2/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ exports.InstanceFailoverGroupReadOnlyEndpoint = require('./instanceFailoverGroup
exports.PartnerRegionInfo = require('./partnerRegionInfo');
exports.ManagedInstancePairInfo = require('./managedInstancePairInfo');
exports.InstanceFailoverGroup = require('./instanceFailoverGroup');
exports.ShortTermRetentionPolicy = require('./shortTermRetentionPolicy');
exports.RecoverableDatabaseListResult = require('./recoverableDatabaseListResult');
exports.RestorableDroppedDatabaseListResult = require('./restorableDroppedDatabaseListResult');
exports.ServerListResult = require('./serverListResult');
Expand Down
81 changes: 81 additions & 0 deletions lib/services/sqlManagement2/lib/models/shortTermRetentionPolicy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* 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';

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

/**
* A short term retention policy resource.
*
* @extends models['ProxyResource']
*/
class ShortTermRetentionPolicy extends models['ProxyResource'] {
/**
* Create a ShortTermRetentionPolicy.
* @member {number} [retentionDays] The backup retention period in days. This
* is how many days Point-in-Time Restore will be supported.
*/
constructor() {
super();
}

/**
* Defines the metadata of ShortTermRetentionPolicy
*
* @returns {object} metadata of ShortTermRetentionPolicy
*
*/
mapper() {
return {
required: false,
serializedName: 'ShortTermRetentionPolicy',
type: {
name: 'Composite',
className: 'ShortTermRetentionPolicy',
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'
}
},
retentionDays: {
required: false,
serializedName: 'properties.retentionDays',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = ShortTermRetentionPolicy;
Loading