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

[AutoPR mysql/resource-manager] typo: mysql/resource-manager/Microsoft.DBforMySQL #4282

Merged
merged 1 commit into from
Dec 4, 2018
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
23 changes: 22 additions & 1 deletion lib/services/mysqlManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,18 @@ export interface ServerPropertiesForGeoRestore extends ServerPropertiesForCreate
sourceServerId: string;
}

/**
* @class
* Initializes a new instance of the ServerPropertiesForReplica class.
* @constructor
* The properties to create a new replica.
*
* @member {string} sourceServerId The master server id to create replica from.
*/
export interface ServerPropertiesForReplica extends ServerPropertiesForCreate {
sourceServerId: string;
}

/**
* @class
* Initializes a new instance of the Sku class.
Expand Down Expand Up @@ -195,6 +207,10 @@ export interface Sku {
* not for server backup. Possible values include: 'Enabled', 'Disabled'
* @member {number} [storageProfile.storageMB] Max storage allowed for a
* server.
* @member {string} [replicationRole] The replication role of the server.
* @member {string} [masterServerId] The master server id of a replica server.
* @member {number} [replicaCapacity] The maximum number of replicas that a
* master server can have.
*/
export interface Server extends TrackedResource {
sku?: Sku;
Expand All @@ -205,6 +221,9 @@ export interface Server extends TrackedResource {
fullyQualifiedDomainName?: string;
earliestRestoreDate?: Date;
storageProfile?: StorageProfile;
replicationRole?: string;
masterServerId?: string;
replicaCapacity?: number;
}

/**
Expand Down Expand Up @@ -252,7 +271,7 @@ export interface ServerForCreate {
* @class
* Initializes a new instance of the ServerUpdateParameters class.
* @constructor
* Parameters allowd to update for a server.
* Parameters allowed to update for a server.
*
* @member {object} [sku] The SKU (pricing tier) of the server.
* @member {string} [sku.name] The name of the sku, typically, tier + family +
Expand All @@ -277,6 +296,7 @@ export interface ServerForCreate {
* '5.6', '5.7'
* @member {string} [sslEnforcement] Enable ssl enforcement or not when connect
* to server. Possible values include: 'Enabled', 'Disabled'
* @member {string} [replicationRole] The replication role of the server.
* @member {object} [tags] Application-specific metadata in the form of
* key-value pairs.
*/
Expand All @@ -286,6 +306,7 @@ export interface ServerUpdateParameters {
administratorLoginPassword?: string;
version?: string;
sslEnforcement?: string;
replicationRole?: string;
tags?: { [propertyName: string]: string };
}

Expand Down
4 changes: 3 additions & 1 deletion lib/services/mysqlManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ exports.ServerPropertiesForCreate = require('./serverPropertiesForCreate');
exports.ServerPropertiesForDefaultCreate = require('./serverPropertiesForDefaultCreate');
exports.ServerPropertiesForRestore = require('./serverPropertiesForRestore');
exports.ServerPropertiesForGeoRestore = require('./serverPropertiesForGeoRestore');
exports.ServerPropertiesForReplica = require('./serverPropertiesForReplica');
exports.Sku = require('./sku');
exports.Server = require('./server');
exports.ServerForCreate = require('./serverForCreate');
Expand Down Expand Up @@ -53,5 +54,6 @@ exports.discriminators = {
'ServerPropertiesForCreate' : exports.ServerPropertiesForCreate,
'ServerPropertiesForCreate.Default' : exports.ServerPropertiesForDefaultCreate,
'ServerPropertiesForCreate.PointInTimeRestore' : exports.ServerPropertiesForRestore,
'ServerPropertiesForCreate.GeoRestore' : exports.ServerPropertiesForGeoRestore
'ServerPropertiesForCreate.GeoRestore' : exports.ServerPropertiesForGeoRestore,
'ServerPropertiesForCreate.Replica' : exports.ServerPropertiesForReplica
};
29 changes: 29 additions & 0 deletions lib/services/mysqlManagement/lib/models/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ class Server extends models['TrackedResource'] {
* or not for server backup. Possible values include: 'Enabled', 'Disabled'
* @member {number} [storageProfile.storageMB] Max storage allowed for a
* server.
* @member {string} [replicationRole] The replication role of the server.
* @member {string} [masterServerId] The master server id of a replica
* server.
* @member {number} [replicaCapacity] The maximum number of replicas that a
* master server can have.
*/
constructor() {
super();
Expand Down Expand Up @@ -172,6 +177,30 @@ class Server extends models['TrackedResource'] {
name: 'Composite',
className: 'StorageProfile'
}
},
replicationRole: {
required: false,
serializedName: 'properties.replicationRole',
type: {
name: 'String'
}
},
masterServerId: {
required: false,
serializedName: 'properties.masterServerId',
type: {
name: 'String'
}
},
replicaCapacity: {
required: false,
serializedName: 'properties.replicaCapacity',
constraints: {
InclusiveMinimum: 0
},
type: {
name: 'Number'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* 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');

/**
* The properties to create a new replica.
*
* @extends models['ServerPropertiesForCreate']
*/
class ServerPropertiesForReplica extends models['ServerPropertiesForCreate'] {
/**
* Create a ServerPropertiesForReplica.
* @member {string} sourceServerId The master server id to create replica
* from.
*/
constructor() {
super();
}

/**
* Defines the metadata of ServerPropertiesForReplica
*
* @returns {object} metadata of ServerPropertiesForReplica
*
*/
mapper() {
return {
required: false,
serializedName: 'Replica',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'createMode',
clientName: 'createMode'
},
uberParent: 'ServerPropertiesForCreate',
className: 'ServerPropertiesForReplica',
modelProperties: {
version: {
required: false,
serializedName: 'version',
type: {
name: 'String'
}
},
sslEnforcement: {
required: false,
serializedName: 'sslEnforcement',
type: {
name: 'Enum',
allowedValues: [ 'Enabled', 'Disabled' ]
}
},
storageProfile: {
required: false,
serializedName: 'storageProfile',
type: {
name: 'Composite',
className: 'StorageProfile'
}
},
createMode: {
required: true,
serializedName: 'createMode',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
},
sourceServerId: {
required: true,
serializedName: 'sourceServerId',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = ServerPropertiesForReplica;
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'use strict';

/**
* Parameters allowd to update for a server.
* Parameters allowed to update for a server.
*
*/
class ServerUpdateParameters {
Expand Down Expand Up @@ -40,6 +40,7 @@ class ServerUpdateParameters {
* include: '5.6', '5.7'
* @member {string} [sslEnforcement] Enable ssl enforcement or not when
* connect to server. Possible values include: 'Enabled', 'Disabled'
* @member {string} [replicationRole] The replication role of the server.
* @member {object} [tags] Application-specific metadata in the form of
* key-value pairs.
*/
Expand Down Expand Up @@ -98,6 +99,13 @@ class ServerUpdateParameters {
allowedValues: [ 'Enabled', 'Disabled' ]
}
},
replicationRole: {
required: false,
serializedName: 'properties.replicationRole',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default class MySQLManagementClient extends AzureServiceClient {

// Operation groups
servers: operations.Servers;
replicas: operations.Replicas;
firewallRules: operations.FirewallRules;
virtualNetworkRules: operations.VirtualNetworkRules;
databases: operations.Databases;
Expand Down
1 change: 1 addition & 0 deletions lib/services/mysqlManagement/lib/mySQLManagementClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class MySQLManagementClient extends ServiceClient {
this.generateClientRequestId = options.generateClientRequestId;
}
this.servers = new operations.Servers(this);
this.replicas = new operations.Replicas(this);
this.firewallRules = new operations.FirewallRules(this);
this.virtualNetworkRules = new operations.VirtualNetworkRules(this);
this.databases = new operations.Databases(this);
Expand Down
84 changes: 84 additions & 0 deletions lib/services/mysqlManagement/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ export interface Servers {
* @param {string} [parameters.sslEnforcement] Enable ssl enforcement or not
* when connect to server. Possible values include: 'Enabled', 'Disabled'
*
* @param {string} [parameters.replicationRole] The replication role of the
* server.
*
* @param {object} [parameters.tags] Application-specific metadata in the form
* of key-value pairs.
*
Expand Down Expand Up @@ -296,6 +299,9 @@ export interface Servers {
* @param {string} [parameters.sslEnforcement] Enable ssl enforcement or not
* when connect to server. Possible values include: 'Enabled', 'Disabled'
*
* @param {string} [parameters.replicationRole] The replication role of the
* server.
*
* @param {object} [parameters.tags] Application-specific metadata in the form
* of key-value pairs.
*
Expand Down Expand Up @@ -776,6 +782,9 @@ export interface Servers {
* @param {string} [parameters.sslEnforcement] Enable ssl enforcement or not
* when connect to server. Possible values include: 'Enabled', 'Disabled'
*
* @param {string} [parameters.replicationRole] The replication role of the
* server.
*
* @param {object} [parameters.tags] Application-specific metadata in the form
* of key-value pairs.
*
Expand Down Expand Up @@ -841,6 +850,9 @@ export interface Servers {
* @param {string} [parameters.sslEnforcement] Enable ssl enforcement or not
* when connect to server. Possible values include: 'Enabled', 'Disabled'
*
* @param {string} [parameters.replicationRole] The replication role of the
* server.
*
* @param {object} [parameters.tags] Application-specific metadata in the form
* of key-value pairs.
*
Expand Down Expand Up @@ -938,6 +950,78 @@ export interface Servers {
beginDeleteMethod(resourceGroupName: string, serverName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
}

/**
* @class
* Replicas
* __NOTE__: An instance of this class is automatically created for an
* instance of the MySQLManagementClient.
*/
export interface Replicas {


/**
* List all the replicas for a given server.
*
* @param {string} resourceGroupName The name of the resource group that
* contains the resource. You can obtain this value from the Azure Resource
* Manager API or the portal.
*
* @param {string} serverName The name of the server.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @returns {Promise} A promise is returned
*
* @resolve {HttpOperationResponse<ServerListResult>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
listByServerWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ServerListResult>>;

/**
* List all the replicas for a given server.
*
* @param {string} resourceGroupName The name of the resource group that
* contains the resource. You can obtain this value from the Azure Resource
* Manager API or the portal.
*
* @param {string} serverName The name of the server.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {ServiceCallback} [optionalCallback] - The optional callback.
*
* @returns {ServiceCallback|Promise} If a callback was passed as the last
* parameter then it returns the callback else returns a Promise.
*
* {Promise} A promise is returned.
*
* @resolve {ServerListResult} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*
* {ServiceCallback} optionalCallback(err, result, request, response)
*
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
*
* {ServerListResult} [result] - The deserialized result object if an error did not occur.
* See {@link ServerListResult} for more information.
*
* {WebResource} [request] - The HTTP Request object if an error did not occur.
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
listByServer(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.ServerListResult>;
listByServer(resourceGroupName: string, serverName: string, callback: ServiceCallback<models.ServerListResult>): void;
listByServer(resourceGroupName: string, serverName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ServerListResult>): void;
}

/**
* @class
* FirewallRules
Expand Down
1 change: 1 addition & 0 deletions lib/services/mysqlManagement/lib/operations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

exports.Servers = require('./servers');
exports.Replicas = require('./replicas');
exports.FirewallRules = require('./firewallRules');
exports.VirtualNetworkRules = require('./virtualNetworkRules');
exports.Databases = require('./databases');
Expand Down
Loading