diff --git a/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClient.ts b/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClient.ts index 29c571d53465..6dbff46a42c3 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClient.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClient.ts @@ -18,8 +18,8 @@ import { HanaManagementClientContext } from "./hanaManagementClientContext"; class HanaManagementClient extends HanaManagementClientContext { // Operation groups operations: operations.Operations; - hanaInstances: operations.HanaInstances; sapMonitors: operations.SapMonitors; + providerInstances: operations.ProviderInstances; /** * Initializes a new instance of the HanaManagementClient class. @@ -31,8 +31,8 @@ class HanaManagementClient extends HanaManagementClientContext { constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.HanaManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); - this.hanaInstances = new operations.HanaInstances(this); this.sapMonitors = new operations.SapMonitors(this); + this.providerInstances = new operations.ProviderInstances(this); } } diff --git a/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClientContext.ts b/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClientContext.ts index cc31e25717de..5a7961d1ec1e 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClientContext.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/hanaManagementClientContext.ts @@ -45,7 +45,7 @@ export class HanaManagementClientContext extends msRestAzure.AzureServiceClient super(credentials, options); - this.apiVersion = '2017-11-03-preview'; + this.apiVersion = '2020-02-07-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts index 131d2259292f..7c0ed8df85d3 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/index.ts @@ -11,193 +11,6 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; -/** - * The resource model definition. - */ -export interface Resource extends BaseResource { - /** - * Resource ID - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource location - */ - location?: string; - /** - * Resource tags - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; -} - -/** - * Specifies the hardware settings for the HANA instance. - */ -export interface HardwareProfile { - /** - * Name of the hardware type (vendor and/or their product name). Possible values include: - * 'Cisco_UCS', 'HPE' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly hardwareType?: HanaHardwareTypeNamesEnum; - /** - * Specifies the HANA instance SKU. Possible values include: 'S72m', 'S144m', 'S72', 'S144', - * 'S192', 'S192m', 'S192xm', 'S96', 'S112', 'S224', 'S224m', 'S224om', 'S224oo', 'S224oom', - * 'S224ooo', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', - * 'S960m' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly hanaInstanceSize?: HanaInstanceSizeNamesEnum; -} - -/** - * Specifies the disk information fo the HANA instance - */ -export interface Disk { - /** - * The disk name. - */ - name?: string; - /** - * Specifies the size of an empty data disk in gigabytes. - */ - diskSizeGB?: number; - /** - * Specifies the logical unit number of the data disk. This value is used to identify data disks - * within the VM and therefore must be unique for each data disk attached to a VM. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lun?: number; -} - -/** - * Specifies the storage settings for the HANA instance disks. - */ -export interface StorageProfile { - /** - * IP Address to connect to storage. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nfsIpAddress?: string; - /** - * Specifies information about the operating system disk used by the hana instance. - */ - osDisks?: Disk[]; -} - -/** - * Specifies the operating system settings for the HANA instance. - */ -export interface OSProfile { - /** - * Specifies the host OS name of the HANA instance. - */ - computerName?: string; - /** - * This property allows you to specify the type of the OS. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly osType?: string; - /** - * Specifies version of operating system. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly version?: string; - /** - * Specifies the SSH public key used to access the operating system. - */ - sshPublicKey?: string; -} - -/** - * Specifies the IP address of the network interface. - */ -export interface IpAddress { - /** - * Specifies the IP address of the network interface. - */ - ipAddress?: string; -} - -/** - * Specifies the network settings for the HANA instance disks. - */ -export interface NetworkProfile { - /** - * Specifies the network interfaces for the HANA instance. - */ - networkInterfaces?: IpAddress[]; - /** - * Specifies the circuit id for connecting to express route. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly circuitId?: string; -} - -/** - * HANA instance info on Azure (ARM properties and HANA properties) - */ -export interface HanaInstance extends Resource { - /** - * Specifies the hardware settings for the HANA instance. - */ - hardwareProfile?: HardwareProfile; - /** - * Specifies the storage settings for the HANA instance disks. - */ - storageProfile?: StorageProfile; - /** - * Specifies the operating system settings for the HANA instance. - */ - osProfile?: OSProfile; - /** - * Specifies the network settings for the HANA instance. - */ - networkProfile?: NetworkProfile; - /** - * Specifies the HANA instance unique ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly hanaInstanceId?: string; - /** - * Resource power state. Possible values include: 'starting', 'started', 'stopping', 'stopped', - * 'restarting', 'unknown' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly powerState?: HanaInstancePowerStateEnum; - /** - * Resource proximity placement group - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly proximityPlacementGroup?: string; - /** - * Hardware revision of a HANA instance - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly hwRevision?: string; - /** - * ARM ID of another HanaInstance that will share a network with this HanaInstance - */ - partnerNodeId?: string; - /** - * State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', - * 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: HanaProvisioningStatesEnum; -} - /** * Detailed HANA operation information */ @@ -268,86 +81,56 @@ export interface ErrorResponse { } /** - * Tags field of the HANA instance. + * Tags field of the resource. */ export interface Tags { /** - * Tags field of the HANA instance. + * Tags field of the resource. */ tags?: { [propertyName: string]: string }; } /** - * Details needed to monitor a Hana Instance + * An interface representing Resource. */ -export interface MonitoringDetails { - /** - * ARM ID of an Azure Subnet with access to the HANA instance. - */ - hanaSubnet?: string; +export interface Resource extends BaseResource { /** - * Hostname of the HANA Instance blade. + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - hanaHostname?: string; + readonly id?: string; /** - * Name of the database itself. + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - hanaDbName?: string; + readonly name?: string; /** - * The port number of the tenant DB. Used to connect to the DB. + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - hanaDbSqlPort?: number; + readonly type?: string; +} + +/** + * The resource model definition for a ARM tracked top level resource + */ +export interface TrackedResource extends Resource { /** - * Username for the HANA database to login to for monitoring + * Resource tags. */ - hanaDbUsername?: string; + tags?: { [propertyName: string]: string }; /** - * Password for the HANA database to login for monitoring + * The geo-location where the resource lives */ - hanaDbPassword?: string; + location: string; } /** * SAP monitor info on Azure (ARM properties and SAP monitor properties) */ -export interface SapMonitor extends Resource { - /** - * Specifies the SAP monitor unique ID. - */ - hanaSubnet?: string; - /** - * Hostname of the HANA instance. - */ - hanaHostname?: string; - /** - * Database name of the HANA instance. - */ - hanaDbName?: string; - /** - * Database port of the HANA instance. - */ - hanaDbSqlPort?: number; - /** - * Database username of the HANA instance. - */ - hanaDbUsername?: string; - /** - * Database password of the HANA instance. - */ - hanaDbPassword?: string; - /** - * KeyVault URL link to the password for the HANA database. - */ - hanaDbPasswordKeyVaultUrl?: string; - /** - * MSI ID passed by customer which has access to customer's KeyVault and to be assigned to the - * Collector VM. - */ - hanaDbCredentialsMsiId?: string; - /** - * Key Vault ID containing customer's HANA credentials. - */ - keyVaultId?: string; +export interface SapMonitor extends TrackedResource { /** * State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', * 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -375,6 +158,57 @@ export interface SapMonitor extends Resource { * The shared key of the log analytics workspace that is used for monitoring */ logAnalyticsWorkspaceSharedKey?: string; + /** + * The version of the payload running in the Collector VM + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sapMonitorCollectorVersion?: string; + /** + * The subnet which the SAP monitor will be deployed in + */ + monitorSubnet?: string; +} + +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { +} + +/** + * A provider instance associated with a SAP monitor. + */ +export interface ProviderInstance extends ProxyResource { + /** + * The type of provider instance. + */ + providerInstanceType?: string; + /** + * A JSON string containing the properties of the provider instance. + */ + properties?: string; + /** + * A JSON string containing metadata of the provider instance. + */ + metadata?: string; + /** + * State of provisioning of the provider instance. Possible values include: 'Accepted', + * 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: HanaProvisioningStatesEnum; +} + +/** + * The resource model definition for a Azure Resource Manager resource with an etag. + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; } /** @@ -394,54 +228,28 @@ export interface OperationList extends Array { /** * @interface - * The response from the List HANA Instances operation. - * @extends Array + * The response from the List SAP monitors operation. + * @extends Array */ -export interface HanaInstancesListResult extends Array { +export interface SapMonitorListResult extends Array { /** - * The URL to get the next set of HANA instances. + * The URL to get the next set of SAP monitors. */ nextLink?: string; } /** * @interface - * The response from the List SAP monitors operation. - * @extends Array + * The response from the List provider instances operation. + * @extends Array */ -export interface SapMonitorListResult extends Array { +export interface ProviderInstanceListResult extends Array { /** - * The URL to get the next set of SAP monitors. + * The URL to get the next set of provider instances. */ nextLink?: string; } -/** - * Defines values for HanaHardwareTypeNamesEnum. - * Possible values include: 'Cisco_UCS', 'HPE' - * @readonly - * @enum {string} - */ -export type HanaHardwareTypeNamesEnum = 'Cisco_UCS' | 'HPE'; - -/** - * Defines values for HanaInstanceSizeNamesEnum. - * Possible values include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m', 'S192xm', 'S96', - * 'S112', 'S224', 'S224m', 'S224om', 'S224oo', 'S224oom', 'S224ooo', 'S384', 'S384m', 'S384xm', - * 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m' - * @readonly - * @enum {string} - */ -export type HanaInstanceSizeNamesEnum = 'S72m' | 'S144m' | 'S72' | 'S144' | 'S192' | 'S192m' | 'S192xm' | 'S96' | 'S112' | 'S224' | 'S224m' | 'S224om' | 'S224oo' | 'S224oom' | 'S224ooo' | 'S384' | 'S384m' | 'S384xm' | 'S384xxm' | 'S576m' | 'S576xm' | 'S768' | 'S768m' | 'S768xm' | 'S960m'; - -/** - * Defines values for HanaInstancePowerStateEnum. - * Possible values include: 'starting', 'started', 'stopping', 'stopped', 'restarting', 'unknown' - * @readonly - * @enum {string} - */ -export type HanaInstancePowerStateEnum = 'starting' | 'started' | 'stopping' | 'stopped' | 'restarting' | 'unknown'; - /** * Defines values for HanaProvisioningStatesEnum. * Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', @@ -474,27 +282,7 @@ export type OperationsListResponse = OperationList & { /** * Contains response data for the list operation. */ -export type HanaInstancesListResponse = HanaInstancesListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: HanaInstancesListResult; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type HanaInstancesListByResourceGroupResponse = HanaInstancesListResult & { +export type SapMonitorsListResponse = SapMonitorListResult & { /** * The underlying HTTP response. */ @@ -507,14 +295,14 @@ export type HanaInstancesListByResourceGroupResponse = HanaInstancesListResult & /** * The response body as parsed JSON or XML */ - parsedBody: HanaInstancesListResult; + parsedBody: SapMonitorListResult; }; }; /** * Contains response data for the get operation. */ -export type HanaInstancesGetResponse = HanaInstance & { +export type SapMonitorsGetResponse = SapMonitor & { /** * The underlying HTTP response. */ @@ -527,14 +315,14 @@ export type HanaInstancesGetResponse = HanaInstance & { /** * The response body as parsed JSON or XML */ - parsedBody: HanaInstance; + parsedBody: SapMonitor; }; }; /** * Contains response data for the create operation. */ -export type HanaInstancesCreateResponse = HanaInstance & { +export type SapMonitorsCreateResponse = SapMonitor & { /** * The underlying HTTP response. */ @@ -547,14 +335,14 @@ export type HanaInstancesCreateResponse = HanaInstance & { /** * The response body as parsed JSON or XML */ - parsedBody: HanaInstance; + parsedBody: SapMonitor; }; }; /** * Contains response data for the update operation. */ -export type HanaInstancesUpdateResponse = HanaInstance & { +export type SapMonitorsUpdateResponse = SapMonitor & { /** * The underlying HTTP response. */ @@ -567,14 +355,14 @@ export type HanaInstancesUpdateResponse = HanaInstance & { /** * The response body as parsed JSON or XML */ - parsedBody: HanaInstance; + parsedBody: SapMonitor; }; }; /** * Contains response data for the beginCreate operation. */ -export type HanaInstancesBeginCreateResponse = HanaInstance & { +export type SapMonitorsBeginCreateResponse = SapMonitor & { /** * The underlying HTTP response. */ @@ -587,34 +375,14 @@ export type HanaInstancesBeginCreateResponse = HanaInstance & { /** * The response body as parsed JSON or XML */ - parsedBody: HanaInstance; + parsedBody: SapMonitor; }; }; /** * Contains response data for the listNext operation. */ -export type HanaInstancesListNextResponse = HanaInstancesListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: HanaInstancesListResult; - }; -}; - -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type HanaInstancesListByResourceGroupNextResponse = HanaInstancesListResult & { +export type SapMonitorsListNextResponse = SapMonitorListResult & { /** * The underlying HTTP response. */ @@ -627,14 +395,14 @@ export type HanaInstancesListByResourceGroupNextResponse = HanaInstancesListResu /** * The response body as parsed JSON or XML */ - parsedBody: HanaInstancesListResult; + parsedBody: SapMonitorListResult; }; }; /** * Contains response data for the list operation. */ -export type SapMonitorsListResponse = SapMonitorListResult & { +export type ProviderInstancesListResponse = ProviderInstanceListResult & { /** * The underlying HTTP response. */ @@ -647,14 +415,14 @@ export type SapMonitorsListResponse = SapMonitorListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: SapMonitorListResult; + parsedBody: ProviderInstanceListResult; }; }; /** * Contains response data for the get operation. */ -export type SapMonitorsGetResponse = SapMonitor & { +export type ProviderInstancesGetResponse = ProviderInstance & { /** * The underlying HTTP response. */ @@ -667,34 +435,14 @@ export type SapMonitorsGetResponse = SapMonitor & { /** * The response body as parsed JSON or XML */ - parsedBody: SapMonitor; + parsedBody: ProviderInstance; }; }; /** * Contains response data for the create operation. */ -export type SapMonitorsCreateResponse = SapMonitor & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: SapMonitor; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type SapMonitorsUpdateResponse = SapMonitor & { +export type ProviderInstancesCreateResponse = ProviderInstance & { /** * The underlying HTTP response. */ @@ -707,14 +455,14 @@ export type SapMonitorsUpdateResponse = SapMonitor & { /** * The response body as parsed JSON or XML */ - parsedBody: SapMonitor; + parsedBody: ProviderInstance; }; }; /** * Contains response data for the beginCreate operation. */ -export type SapMonitorsBeginCreateResponse = SapMonitor & { +export type ProviderInstancesBeginCreateResponse = ProviderInstance & { /** * The underlying HTTP response. */ @@ -727,14 +475,14 @@ export type SapMonitorsBeginCreateResponse = SapMonitor & { /** * The response body as parsed JSON or XML */ - parsedBody: SapMonitor; + parsedBody: ProviderInstance; }; }; /** * Contains response data for the listNext operation. */ -export type SapMonitorsListNextResponse = SapMonitorListResult & { +export type ProviderInstancesListNextResponse = ProviderInstanceListResult & { /** * The underlying HTTP response. */ @@ -747,6 +495,6 @@ export type SapMonitorsListNextResponse = SapMonitorListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: SapMonitorListResult; + parsedBody: ProviderInstanceListResult; }; }; diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts index bfbd9139fc79..9575f884195e 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/mappers.ts @@ -12,298 +12,6 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - tags: { - readOnly: true, - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const HardwareProfile: msRest.CompositeMapper = { - serializedName: "HardwareProfile", - type: { - name: "Composite", - className: "HardwareProfile", - modelProperties: { - hardwareType: { - readOnly: true, - serializedName: "hardwareType", - type: { - name: "String" - } - }, - hanaInstanceSize: { - readOnly: true, - serializedName: "hanaInstanceSize", - type: { - name: "String" - } - } - } - } -}; - -export const Disk: msRest.CompositeMapper = { - serializedName: "Disk", - type: { - name: "Composite", - className: "Disk", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - diskSizeGB: { - serializedName: "diskSizeGB", - type: { - name: "Number" - } - }, - lun: { - readOnly: true, - serializedName: "lun", - type: { - name: "Number" - } - } - } - } -}; - -export const StorageProfile: msRest.CompositeMapper = { - serializedName: "StorageProfile", - type: { - name: "Composite", - className: "StorageProfile", - modelProperties: { - nfsIpAddress: { - readOnly: true, - serializedName: "nfsIpAddress", - type: { - name: "String" - } - }, - osDisks: { - serializedName: "osDisks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Disk" - } - } - } - } - } - } -}; - -export const OSProfile: msRest.CompositeMapper = { - serializedName: "OSProfile", - type: { - name: "Composite", - className: "OSProfile", - modelProperties: { - computerName: { - serializedName: "computerName", - type: { - name: "String" - } - }, - osType: { - readOnly: true, - serializedName: "osType", - type: { - name: "String" - } - }, - version: { - readOnly: true, - serializedName: "version", - type: { - name: "String" - } - }, - sshPublicKey: { - serializedName: "sshPublicKey", - type: { - name: "String" - } - } - } - } -}; - -export const IpAddress: msRest.CompositeMapper = { - serializedName: "IpAddress", - type: { - name: "Composite", - className: "IpAddress", - modelProperties: { - ipAddress: { - serializedName: "ipAddress", - type: { - name: "String" - } - } - } - } -}; - -export const NetworkProfile: msRest.CompositeMapper = { - serializedName: "NetworkProfile", - type: { - name: "Composite", - className: "NetworkProfile", - modelProperties: { - networkInterfaces: { - serializedName: "networkInterfaces", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpAddress" - } - } - } - }, - circuitId: { - readOnly: true, - serializedName: "circuitId", - type: { - name: "String" - } - } - } - } -}; - -export const HanaInstance: msRest.CompositeMapper = { - serializedName: "HanaInstance", - type: { - name: "Composite", - className: "HanaInstance", - modelProperties: { - ...Resource.type.modelProperties, - hardwareProfile: { - serializedName: "properties.hardwareProfile", - type: { - name: "Composite", - className: "HardwareProfile" - } - }, - storageProfile: { - serializedName: "properties.storageProfile", - type: { - name: "Composite", - className: "StorageProfile" - } - }, - osProfile: { - serializedName: "properties.osProfile", - type: { - name: "Composite", - className: "OSProfile" - } - }, - networkProfile: { - serializedName: "properties.networkProfile", - type: { - name: "Composite", - className: "NetworkProfile" - } - }, - hanaInstanceId: { - readOnly: true, - serializedName: "properties.hanaInstanceId", - type: { - name: "String" - } - }, - powerState: { - readOnly: true, - serializedName: "properties.powerState", - type: { - name: "String" - } - }, - proximityPlacementGroup: { - readOnly: true, - serializedName: "properties.proximityPlacementGroup", - type: { - name: "String" - } - }, - hwRevision: { - readOnly: true, - serializedName: "properties.hwRevision", - type: { - name: "String" - } - }, - partnerNodeId: { - serializedName: "properties.partnerNodeId", - type: { - name: "String" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - } - } - } -}; - export const Display: msRest.CompositeMapper = { serializedName: "Display", type: { @@ -416,44 +124,58 @@ export const Tags: msRest.CompositeMapper = { } }; -export const MonitoringDetails: msRest.CompositeMapper = { - serializedName: "MonitoringDetails", +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", type: { name: "Composite", - className: "MonitoringDetails", + className: "Resource", modelProperties: { - hanaSubnet: { - serializedName: "hanaSubnet", + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } }, - hanaHostname: { - serializedName: "hanaHostname", + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } }, - hanaDbName: { - serializedName: "hanaDbName", + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } - }, - hanaDbSqlPort: { - serializedName: "hanaDbSqlPort", - type: { - name: "Number" - } - }, - hanaDbUsername: { - serializedName: "hanaDbUsername", + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } }, - hanaDbPassword: { - serializedName: "hanaDbPassword", + location: { + required: true, + serializedName: "location", type: { name: "String" } @@ -468,95 +190,119 @@ export const SapMonitor: msRest.CompositeMapper = { name: "Composite", className: "SapMonitor", modelProperties: { - ...Resource.type.modelProperties, - hanaSubnet: { - serializedName: "properties.hanaSubnet", + ...TrackedResource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", type: { name: "String" } }, - hanaHostname: { - serializedName: "properties.hanaHostname", + managedResourceGroupName: { + readOnly: true, + serializedName: "properties.managedResourceGroupName", type: { name: "String" } }, - hanaDbName: { - serializedName: "properties.hanaDbName", + logAnalyticsWorkspaceArmId: { + serializedName: "properties.logAnalyticsWorkspaceArmId", type: { name: "String" } }, - hanaDbSqlPort: { - serializedName: "properties.hanaDbSqlPort", - type: { - name: "Number" - } - }, - hanaDbUsername: { - serializedName: "properties.hanaDbUsername", + enableCustomerAnalytics: { + serializedName: "properties.enableCustomerAnalytics", type: { - name: "String" + name: "Boolean" } }, - hanaDbPassword: { - serializedName: "properties.hanaDbPassword", + logAnalyticsWorkspaceId: { + serializedName: "properties.logAnalyticsWorkspaceId", type: { name: "String" } }, - hanaDbPasswordKeyVaultUrl: { - serializedName: "properties.hanaDbPasswordKeyVaultUrl", + logAnalyticsWorkspaceSharedKey: { + serializedName: "properties.logAnalyticsWorkspaceSharedKey", type: { name: "String" } }, - hanaDbCredentialsMsiId: { - serializedName: "properties.hanaDbCredentialsMsiId", + sapMonitorCollectorVersion: { + readOnly: true, + serializedName: "properties.sapMonitorCollectorVersion", type: { name: "String" } }, - keyVaultId: { - serializedName: "properties.keyVaultId", + monitorSubnet: { + serializedName: "properties.monitorSubnet", type: { name: "String" } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const ProviderInstance: msRest.CompositeMapper = { + serializedName: "ProviderInstance", + type: { + name: "Composite", + className: "ProviderInstance", + modelProperties: { + ...ProxyResource.type.modelProperties, + providerInstanceType: { + serializedName: "properties.type", type: { name: "String" } }, - managedResourceGroupName: { - readOnly: true, - serializedName: "properties.managedResourceGroupName", + properties: { + serializedName: "properties.properties", type: { name: "String" } }, - logAnalyticsWorkspaceArmId: { - serializedName: "properties.logAnalyticsWorkspaceArmId", + metadata: { + serializedName: "properties.metadata", type: { name: "String" } }, - enableCustomerAnalytics: { - serializedName: "properties.enableCustomerAnalytics", - type: { - name: "Boolean" - } - }, - logAnalyticsWorkspaceId: { - serializedName: "properties.logAnalyticsWorkspaceId", + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", type: { name: "String" } - }, - logAnalyticsWorkspaceSharedKey: { - serializedName: "properties.logAnalyticsWorkspaceSharedKey", + } + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", type: { name: "String" } @@ -587,11 +333,11 @@ export const OperationList: msRest.CompositeMapper = { } }; -export const HanaInstancesListResult: msRest.CompositeMapper = { - serializedName: "HanaInstancesListResult", +export const SapMonitorListResult: msRest.CompositeMapper = { + serializedName: "SapMonitorListResult", type: { name: "Composite", - className: "HanaInstancesListResult", + className: "SapMonitorListResult", modelProperties: { value: { serializedName: "", @@ -600,7 +346,7 @@ export const HanaInstancesListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "HanaInstance" + className: "SapMonitor" } } } @@ -615,11 +361,11 @@ export const HanaInstancesListResult: msRest.CompositeMapper = { } }; -export const SapMonitorListResult: msRest.CompositeMapper = { - serializedName: "SapMonitorListResult", +export const ProviderInstanceListResult: msRest.CompositeMapper = { + serializedName: "ProviderInstanceListResult", type: { name: "Composite", - className: "SapMonitorListResult", + className: "ProviderInstanceListResult", modelProperties: { value: { serializedName: "", @@ -628,7 +374,7 @@ export const SapMonitorListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "SapMonitor" + className: "ProviderInstance" } } } diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/parameters.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/parameters.ts index 3f362383f381..293f6c1bd83d 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/parameters.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/parameters.ts @@ -30,26 +30,26 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; -export const hanaInstanceName: msRest.OperationURLParameter = { - parameterPath: "hanaInstanceName", +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", mapper: { required: true, - serializedName: "hanaInstanceName", + serializedName: "nextLink", type: { name: "String" } - } + }, + skipEncoding: true }; -export const nextPageLink: msRest.OperationURLParameter = { - parameterPath: "nextPageLink", +export const providerInstanceName: msRest.OperationURLParameter = { + parameterPath: "providerInstanceName", mapper: { required: true, - serializedName: "nextLink", + serializedName: "providerInstanceName", type: { name: "String" } - }, - skipEncoding: true + } }; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/hanaInstancesMappers.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/providerInstancesMappers.ts similarity index 74% rename from sdk/hanaonazure/arm-hanaonazure/src/models/hanaInstancesMappers.ts rename to sdk/hanaonazure/arm-hanaonazure/src/models/providerInstancesMappers.ts index 665b0c62e27a..281263a1a326 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/hanaInstancesMappers.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/providerInstancesMappers.ts @@ -7,17 +7,13 @@ */ export { + AzureEntityResource, BaseResource, - Disk, ErrorResponse, - HanaInstance, - HanaInstancesListResult, - HardwareProfile, - IpAddress, - NetworkProfile, - OSProfile, + ProviderInstance, + ProviderInstanceListResult, + ProxyResource, Resource, SapMonitor, - StorageProfile, - Tags + TrackedResource } from "../models/mappers"; diff --git a/sdk/hanaonazure/arm-hanaonazure/src/models/sapMonitorsMappers.ts b/sdk/hanaonazure/arm-hanaonazure/src/models/sapMonitorsMappers.ts index 9da8ccf84683..2ff732538126 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/models/sapMonitorsMappers.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/models/sapMonitorsMappers.ts @@ -7,17 +7,14 @@ */ export { + AzureEntityResource, BaseResource, - Disk, ErrorResponse, - HanaInstance, - HardwareProfile, - IpAddress, - NetworkProfile, - OSProfile, + ProviderInstance, + ProxyResource, Resource, SapMonitor, SapMonitorListResult, - StorageProfile, - Tags + Tags, + TrackedResource } from "../models/mappers"; diff --git a/sdk/hanaonazure/arm-hanaonazure/src/operations/hanaInstances.ts b/sdk/hanaonazure/arm-hanaonazure/src/operations/hanaInstances.ts deleted file mode 100644 index cfe2e48701a2..000000000000 --- a/sdk/hanaonazure/arm-hanaonazure/src/operations/hanaInstances.ts +++ /dev/null @@ -1,654 +0,0 @@ -/* - * 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 * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/hanaInstancesMappers"; -import * as Parameters from "../models/parameters"; -import { HanaManagementClientContext } from "../hanaManagementClientContext"; - -/** Class representing a HanaInstances. */ -export class HanaInstances { - private readonly client: HanaManagementClientContext; - - /** - * Create a HanaInstances. - * @param {HanaManagementClientContext} client Reference to the service client. - */ - constructor(client: HanaManagementClientContext) { - this.client = client; - } - - /** - * Gets a list of SAP HANA instances in the specified subscription. The operations returns various - * properties of each SAP HANA on Azure instance. - * @summary Gets a list of SAP HANA instances in the specified subscription. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of SAP HANA instances in the specified subscription and the resource group. The - * operations returns various properties of each SAP HANA on Azure instance. - * @summary Gets a list of SAP HANA instances in the specified subscription and the resource group. - * @param resourceGroupName Name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Name of the resource group. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * Gets properties of a SAP HANA instance for the specified subscription, resource group, and - * instance name. - * @summary Gets properties of a SAP HANA instance. - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param callback The callback - */ - get(resourceGroupName: string, hanaInstanceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, hanaInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - hanaInstanceName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Creates a SAP HANA instance for the specified subscription, resource group, and instance name. - * @summary Creates a SAP HANA instance. - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param hanaInstanceParameter Request body representing a HanaInstance - * @param [options] The optional parameters - * @returns Promise - */ - create(resourceGroupName: string, hanaInstanceName: string, hanaInstanceParameter: Models.HanaInstance, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreate(resourceGroupName,hanaInstanceName,hanaInstanceParameter,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name. - * @summary Deletes a SAP HANA instance. - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,hanaInstanceName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, - * and instance name. - * @summary Patches the Tags field of a SAP HANA instance. - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param tagsParameter Request body that only contains the new Tags field - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, hanaInstanceName: string, tagsParameter: Models.Tags, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param tagsParameter Request body that only contains the new Tags field - * @param callback The callback - */ - update(resourceGroupName: string, hanaInstanceName: string, tagsParameter: Models.Tags, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param tagsParameter Request body that only contains the new Tags field - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, hanaInstanceName: string, tagsParameter: Models.Tags, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, hanaInstanceName: string, tagsParameter: Models.Tags, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - hanaInstanceName, - tagsParameter, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * The operation to restart a SAP HANA instance. - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param [options] The optional parameters - * @returns Promise - */ - restart(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginRestart(resourceGroupName,hanaInstanceName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * The operation to start a SAP HANA instance. - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param [options] The optional parameters - * @returns Promise - */ - start(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginStart(resourceGroupName,hanaInstanceName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * The operation to shutdown a SAP HANA instance. - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param [options] The optional parameters - * @returns Promise - */ - shutdown(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginShutdown(resourceGroupName,hanaInstanceName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Creates a SAP HANA instance for the specified subscription, resource group, and instance name. - * @summary Creates a SAP HANA instance. - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param hanaInstanceParameter Request body representing a HanaInstance - * @param [options] The optional parameters - * @returns Promise - */ - beginCreate(resourceGroupName: string, hanaInstanceName: string, hanaInstanceParameter: Models.HanaInstance, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - hanaInstanceName, - hanaInstanceParameter, - options - }, - beginCreateOperationSpec, - options); - } - - /** - * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name. - * @summary Deletes a SAP HANA instance. - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - hanaInstanceName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * The operation to restart a SAP HANA instance. - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param [options] The optional parameters - * @returns Promise - */ - beginRestart(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - hanaInstanceName, - options - }, - beginRestartOperationSpec, - options); - } - - /** - * The operation to start a SAP HANA instance. - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param [options] The optional parameters - * @returns Promise - */ - beginStart(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - hanaInstanceName, - options - }, - beginStartOperationSpec, - options); - } - - /** - * The operation to shutdown a SAP HANA instance. - * @param resourceGroupName Name of the resource group. - * @param hanaInstanceName Name of the SAP HANA on Azure instance. - * @param [options] The optional parameters - * @returns Promise - */ - beginShutdown(resourceGroupName: string, hanaInstanceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - hanaInstanceName, - options - }, - beginShutdownOperationSpec, - options); - } - - /** - * Gets a list of SAP HANA instances in the specified subscription. The operations returns various - * properties of each SAP HANA on Azure instance. - * @summary Gets a list of SAP HANA instances in the specified subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of SAP HANA instances in the specified subscription and the resource group. The - * operations returns various properties of each SAP HANA on Azure instance. - * @summary Gets a list of SAP HANA instances in the specified subscription and the resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.HanaOnAzure/hanaInstances", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.HanaInstancesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.HanaInstancesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.hanaInstanceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.HanaInstance - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.hanaInstanceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "tagsParameter", - mapper: { - ...Mappers.Tags, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.HanaInstance - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.hanaInstanceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "hanaInstanceParameter", - mapper: { - ...Mappers.HanaInstance, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.HanaInstance - }, - 201: { - bodyMapper: Mappers.HanaInstance - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.hanaInstanceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginRestartOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/restart", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.hanaInstanceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginStartOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/start", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.hanaInstanceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginShutdownOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/shutdown", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.hanaInstanceName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.HanaInstancesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.HanaInstancesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/hanaonazure/arm-hanaonazure/src/operations/index.ts b/sdk/hanaonazure/arm-hanaonazure/src/operations/index.ts index 3d0d939c0761..1c29b704abfb 100644 --- a/sdk/hanaonazure/arm-hanaonazure/src/operations/index.ts +++ b/sdk/hanaonazure/arm-hanaonazure/src/operations/index.ts @@ -9,5 +9,5 @@ */ export * from "./operations"; -export * from "./hanaInstances"; export * from "./sapMonitors"; +export * from "./providerInstances"; diff --git a/sdk/hanaonazure/arm-hanaonazure/src/operations/providerInstances.ts b/sdk/hanaonazure/arm-hanaonazure/src/operations/providerInstances.ts new file mode 100644 index 000000000000..3061112d35ec --- /dev/null +++ b/sdk/hanaonazure/arm-hanaonazure/src/operations/providerInstances.ts @@ -0,0 +1,344 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/providerInstancesMappers"; +import * as Parameters from "../models/parameters"; +import { HanaManagementClientContext } from "../hanaManagementClientContext"; + +/** Class representing a ProviderInstances. */ +export class ProviderInstances { + private readonly client: HanaManagementClientContext; + + /** + * Create a ProviderInstances. + * @param {HanaManagementClientContext} client Reference to the service client. + */ + constructor(client: HanaManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of provider instances in the specified SAP monitor. The operations returns various + * properties of each provider instances. + * @summary Gets a list of provider instances in the specified SAP monitor. + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, sapMonitorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param callback The callback + */ + list(resourceGroupName: string, sapMonitorName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, sapMonitorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, sapMonitorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + sapMonitorName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets properties of a provider instance for the specified subscription, resource group, + * SapMonitor name, and resource name. + * @summary Gets properties of a provider instance. + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param callback The callback + */ + get(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + sapMonitorName, + providerInstanceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and + * resource name. + * @summary Creates a provider instance. + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param providerInstanceParameter Request body representing a provider instance + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, providerInstanceParameter: Models.ProviderInstance, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,sapMonitorName,providerInstanceName,providerInstanceParameter,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and + * resource name. + * @summary Deletes a provider instance. + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,sapMonitorName,providerInstanceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and + * resource name. + * @summary Creates a provider instance. + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param providerInstanceParameter Request body representing a provider instance + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, providerInstanceParameter: Models.ProviderInstance, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + sapMonitorName, + providerInstanceName, + providerInstanceParameter, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and + * resource name. + * @summary Deletes a provider instance. + * @param resourceGroupName Name of the resource group. + * @param sapMonitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, sapMonitorName: string, providerInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + sapMonitorName, + providerInstanceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets a list of provider instances in the specified SAP monitor. The operations returns various + * properties of each provider instances. + * @summary Gets a list of provider instances in the specified SAP monitor. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapMonitorName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProviderInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapMonitorName, + Parameters.providerInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProviderInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapMonitorName, + Parameters.providerInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "providerInstanceParameter", + mapper: { + ...Mappers.ProviderInstance, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ProviderInstance + }, + 201: { + bodyMapper: Mappers.ProviderInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapMonitorName, + Parameters.providerInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProviderInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +};