diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/LICENSE.txt b/sdk/timeseriesinsights/arm-timeseriesinsights/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/LICENSE.txt +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/README.md b/sdk/timeseriesinsights/arm-timeseriesinsights/README.md index 06b870353566..43e0c2658283 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/README.md +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-timeseriesinsights ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +#### nodejs - client creation and list operations as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { TimeSeriesInsightsClient, TimeSeriesInsightsModels, TimeSeriesInsightsMappers } from "@azure/arm-timeseriesinsights"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { TimeSeriesInsightsClient } = require("@azure/arm-timeseriesinsights"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/rollup.config.js b/sdk/timeseriesinsights/arm-timeseriesinsights/rollup.config.js index 04a56329ade2..5066e1cd6530 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/rollup.config.js +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/accessPoliciesMappers.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/accessPoliciesMappers.ts index b095b795dd22..5be4ecd69807 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/accessPoliciesMappers.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/accessPoliciesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -19,12 +19,17 @@ export { EnvironmentStatus, EventHubEventSourceResource, EventSourceResource, + Gen1EnvironmentResource, + Gen2EnvironmentResource, + Gen2StorageConfigurationOutput, IngressEnvironmentStatus, IoTHubEventSourceResource, - PartitionKeyProperty, ReferenceDataSetKeyProperty, ReferenceDataSetResource, Resource, Sku, - TrackedResource + TimeSeriesIdProperty, + TrackedResource, + WarmStorageEnvironmentStatus, + WarmStoreConfigurationProperties } from "../models/mappers"; diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/environmentsMappers.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/environmentsMappers.ts index 9c64265aaa1d..c3d4ac5aadf7 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/environmentsMappers.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/environmentsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -22,14 +22,27 @@ export { EventHubEventSourceResource, EventSourceCreateOrUpdateParameters, EventSourceResource, + Gen1EnvironmentCreateOrUpdateParameters, + Gen1EnvironmentResource, + Gen1EnvironmentUpdateParameters, + Gen2EnvironmentCreateOrUpdateParameters, + Gen2EnvironmentResource, + Gen2EnvironmentUpdateParameters, + Gen2StorageConfigurationInput, + Gen2StorageConfigurationMutableProperties, + Gen2StorageConfigurationOutput, IngressEnvironmentStatus, IoTHubEventSourceCreateOrUpdateParameters, IoTHubEventSourceResource, - PartitionKeyProperty, + LocalTimestamp, + LocalTimestampTimeZoneOffset, ReferenceDataSetCreateOrUpdateParameters, ReferenceDataSetKeyProperty, ReferenceDataSetResource, Resource, Sku, - TrackedResource + TimeSeriesIdProperty, + TrackedResource, + WarmStorageEnvironmentStatus, + WarmStoreConfigurationProperties } from "../models/mappers"; diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/eventSourcesMappers.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/eventSourcesMappers.ts index 6131d4200cdc..f5a3d3fc034b 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/eventSourcesMappers.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/eventSourcesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -23,17 +23,25 @@ export { EventSourceListResponse, EventSourceResource, EventSourceUpdateParameters, + Gen1EnvironmentCreateOrUpdateParameters, + Gen1EnvironmentResource, + Gen2EnvironmentCreateOrUpdateParameters, + Gen2EnvironmentResource, + Gen2StorageConfigurationInput, + Gen2StorageConfigurationOutput, IngressEnvironmentStatus, IoTHubEventSourceCreateOrUpdateParameters, IoTHubEventSourceResource, IoTHubEventSourceUpdateParameters, LocalTimestamp, LocalTimestampTimeZoneOffset, - PartitionKeyProperty, ReferenceDataSetCreateOrUpdateParameters, ReferenceDataSetKeyProperty, ReferenceDataSetResource, Resource, Sku, - TrackedResource + TimeSeriesIdProperty, + TrackedResource, + WarmStorageEnvironmentStatus, + WarmStoreConfigurationProperties } from "../models/mappers"; diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/index.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/index.ts index 9793e4c43827..85fc837f2ef8 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/index.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -105,21 +105,73 @@ export interface ResourceProperties { } /** - * The sku determines the capacity of the environment, the SLA (in queries-per-minute and total - * capacity), and the billing rate. + * The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 + * environments the sku determines the capacity of the environment, the ingress rate, and the + * billing rate. */ export interface Sku { /** - * The name of this SKU. Possible values include: 'S1', 'S2' + * The name of this SKU. Possible values include: 'S1', 'S2', 'P1', 'L1' */ name: SkuName; /** - * The capacity of the sku. This value can be changed to support scale out of environments after - * they have been created. + * The capacity of the sku. For Gen1 environments, this value can be changed to support scale out + * of environments after they have been created. */ capacity: number; } +/** + * The warm store configuration provides the details to create a warm store cache that will retain + * a copy of the environment's data available for faster query. + */ +export interface WarmStoreConfigurationProperties { + /** + * ISO8601 timespan specifying the number of days the environment's events will be available for + * query from the warm store. + */ + dataRetention: string; +} + +/** + * The storage configuration provides the connection details that allows the Time Series Insights + * service to connect to the customer storage account that is used to store the environment's data. + */ +export interface Gen2StorageConfigurationInput { + /** + * The name of the storage account that will hold the environment's Gen2 data. + */ + accountName: string; + /** + * The value of the management key that grants the Time Series Insights service write access to + * the storage account. This property is not shown in environment responses. + */ + managementKey: string; +} + +/** + * The storage configuration provides the non-secret connection details about the customer storage + * account that is used to store the environment's data. + */ +export interface Gen2StorageConfigurationOutput { + /** + * The name of the storage account that will hold the environment's Gen2 data. + */ + accountName: string; +} + +/** + * The storage configuration provides the connection details that allows the Time Series Insights + * service to connect to the customer storage account that is used to store the environment's data. + */ +export interface Gen2StorageConfigurationMutableProperties { + /** + * The value of the management key that grants the Time Series Insights service write access to + * the storage account. This property is not shown in environment responses. + */ + managementKey: string; +} + /** * Properties required to create any resource tracked by Azure Resource Manager. */ @@ -135,10 +187,39 @@ export interface CreateOrUpdateTrackedResourceProperties { } /** - * The structure of the property that a partition key can have. An environment can have multiple + * Contains the possible cases for EnvironmentCreateOrUpdateParameters. + */ +export type EnvironmentCreateOrUpdateParametersUnion = EnvironmentCreateOrUpdateParameters | Gen1EnvironmentCreateOrUpdateParameters | Gen2EnvironmentCreateOrUpdateParameters; + +/** + * Parameters supplied to the CreateOrUpdate Environment operation. + */ +export interface EnvironmentCreateOrUpdateParameters { + /** + * Polymorphic Discriminator + */ + kind: "EnvironmentCreateOrUpdateParameters"; + /** + * The location of the resource. + */ + location: string; + /** + * Key-value pairs of additional properties for the resource. + */ + tags?: { [propertyName: string]: string }; + /** + * The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 + * environments the sku determines the capacity of the environment, the ingress rate, and the + * billing rate. + */ + sku: Sku; +} + +/** + * The structure of the property that a time series id can have. An environment can have multiple * such properties. */ -export interface PartitionKeyProperty { +export interface TimeSeriesIdProperty { /** * The name of the property. */ @@ -150,12 +231,25 @@ export interface PartitionKeyProperty { } /** - * Parameters supplied to the CreateOrUpdate Environment operation. + * Parameters supplied to the Create or Update Environment operation for a Gen1 environment. */ -export interface EnvironmentCreateOrUpdateParameters extends CreateOrUpdateTrackedResourceProperties { +export interface Gen1EnvironmentCreateOrUpdateParameters { + /** + * Polymorphic Discriminator + */ + kind: "Gen1"; /** - * The sku determines the capacity of the environment, the SLA (in queries-per-minute and total - * capacity), and the billing rate. + * The location of the resource. + */ + location: string; + /** + * Key-value pairs of additional properties for the resource. + */ + tags?: { [propertyName: string]: string }; + /** + * The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 + * environments the sku determines the capacity of the environment, the ingress rate, and the + * billing rate. */ sku: Sku; /** @@ -172,23 +266,69 @@ export interface EnvironmentCreateOrUpdateParameters extends CreateOrUpdateTrack */ storageLimitExceededBehavior?: StorageLimitExceededBehavior; /** - * The list of partition keys according to which the data in the environment will be ordered. + * The list of event properties which will be used to partition data in the environment. + * Currently, only a single partition key property is supported. */ - partitionKeyProperties?: PartitionKeyProperty[]; + partitionKeyProperties?: TimeSeriesIdProperty[]; } /** - * Parameters supplied to the Update Environment operation. + * Parameters supplied to the Create or Update Environment operation for a Gen2 environment. */ -export interface EnvironmentUpdateParameters { +export interface Gen2EnvironmentCreateOrUpdateParameters { /** - * The sku of the environment. + * Polymorphic Discriminator */ - sku?: Sku; + kind: "Gen2"; + /** + * The location of the resource. + */ + location: string; + /** + * Key-value pairs of additional properties for the resource. + */ + tags?: { [propertyName: string]: string }; + /** + * The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 + * environments the sku determines the capacity of the environment, the ingress rate, and the + * billing rate. + */ + sku: Sku; + /** + * The list of event properties which will be used to define the environment's time series id. + */ + timeSeriesIdProperties: TimeSeriesIdProperty[]; + /** + * The storage configuration provides the connection details that allows the Time Series Insights + * service to connect to the customer storage account that is used to store the environment's + * data. + */ + storageConfiguration: Gen2StorageConfigurationInput; + /** + * The warm store configuration provides the details to create a warm store cache that will + * retain a copy of the environment's data available for faster query. + */ + warmStoreConfiguration?: WarmStoreConfigurationProperties; +} + +/** + * Parameters supplied to the Update Environment operation. + */ +export interface EnvironmentUpdateParameters { /** * Key-value pairs of additional properties for the environment. */ tags?: { [propertyName: string]: string }; +} + +/** + * Parameters supplied to the Update Environment operation to update a Gen1 environment. + */ +export interface Gen1EnvironmentUpdateParameters extends EnvironmentUpdateParameters { + /** + * The sku of the environment. + */ + sku?: Sku; /** * ISO8601 timespan specifying the minimum number of days the environment's events will be * available for query. @@ -202,10 +342,78 @@ export interface EnvironmentUpdateParameters { * include: 'PurgeOldData', 'PauseIngress' */ storageLimitExceededBehavior?: StorageLimitExceededBehavior; +} + +/** + * Parameters supplied to the Update Environment operation to update a Gen2 environment. + */ +export interface Gen2EnvironmentUpdateParameters extends EnvironmentUpdateParameters { /** - * The list of event properties which will be used to partition data in the environment. + * The storage configuration provides the connection details that allows the Time Series Insights + * service to connect to the customer storage account that is used to store the environment's + * data. + */ + storageConfiguration?: Gen2StorageConfigurationMutableProperties; + /** + * The warm store configuration provides the details to create a warm store cache that will + * retain a copy of the environment's data available for faster query. + */ + warmStoreConfiguration?: WarmStoreConfigurationProperties; +} + +/** + * Contains the possible cases for EnvironmentResource. + */ +export type EnvironmentResourceUnion = EnvironmentResource | Gen1EnvironmentResource | Gen2EnvironmentResource; + +/** + * An environment is a set of time-series data available for query, and is the top level Azure Time + * Series Insights resource. + */ +export interface EnvironmentResource { + /** + * Polymorphic Discriminator + */ + kind: "EnvironmentResource"; + /** + * 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 + */ + tags?: { [propertyName: string]: string }; + /** + * The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 + * environments the sku determines the capacity of the environment, the ingress rate, and the + * billing rate. */ - partitionKeyProperties?: PartitionKeyProperty[]; + sku: Sku; +} + +/** + * The response of the List Environments operation. + */ +export interface EnvironmentListResponse { + /** + * Result of the List Environments operation. + */ + value?: EnvironmentResourceUnion[]; } /** @@ -239,6 +447,27 @@ export interface IngressEnvironmentStatus { stateDetails?: EnvironmentStateDetails; } +/** + * An object that represents the status of warm storage on an environment. + */ +export interface WarmStorageEnvironmentStatus { + /** + * This string represents the state of warm storage properties usage. It can be "Ok", "Error", + * "Unknown". Possible values include: 'Ok', 'Error', 'Unknown' + */ + state?: WarmStoragePropertiesState; + /** + * A value that represents the number of properties used by the environment for S1/S2 SKU and + * number of properties used by Warm Store for PAYG SKU + */ + currentCount?: number; + /** + * A value that represents the maximum number of properties used allowed by the environment for + * S1/S2 SKU and maximum number of properties allowed by Warm Store for PAYG SKU. + */ + maxCount?: number; +} + /** * An object that represents the status of the environment, and its internal state in the Time * Series Insights service. @@ -248,18 +477,50 @@ export interface EnvironmentStatus { * An object that represents the status of ingress on an environment. */ ingress?: IngressEnvironmentStatus; + /** + * An object that represents the status of warm storage on an environment. + */ + warmStorage?: WarmStorageEnvironmentStatus; } /** * An environment is a set of time-series data available for query, and is the top level Azure Time - * Series Insights resource. + * Series Insights resource. Gen1 environments have data retention limits. */ -export interface EnvironmentResource extends TrackedResource { +export interface Gen1EnvironmentResource { /** - * The sku determines the capacity of the environment, the SLA (in queries-per-minute and total - * capacity), and the billing rate. + * Polymorphic Discriminator */ - sku?: Sku; + kind: "Gen1"; + /** + * 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 + */ + tags?: { [propertyName: string]: string }; + /** + * The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 + * environments the sku determines the capacity of the environment, the ingress rate, and the + * billing rate. + */ + sku: Sku; /** * ISO8601 timespan specifying the minimum number of days the environment's events will be * available for query. @@ -274,9 +535,67 @@ export interface EnvironmentResource extends TrackedResource { */ storageLimitExceededBehavior?: StorageLimitExceededBehavior; /** - * The list of partition keys according to which the data in the environment will be ordered. + * The list of event properties which will be used to partition data in the environment. + * Currently, only a single partition key property is supported. + */ + partitionKeyProperties?: TimeSeriesIdProperty[]; + /** + * An id used to access the environment data, e.g. to query the environment's events or upload + * reference data for the environment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataAccessId?: string; + /** + * The fully qualified domain name used to access the environment data, e.g. to query the + * environment's events or upload reference data for the environment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataAccessFqdn?: string; + /** + * An object that represents the status of the environment, and its internal state in the Time + * Series Insights service. + */ + status?: EnvironmentStatus; +} + +/** + * An environment is a set of time-series data available for query, and is the top level Azure Time + * Series Insights resource. Gen2 environments do not have set data retention limits. + */ +export interface Gen2EnvironmentResource { + /** + * Polymorphic Discriminator + */ + kind: "Gen2"; + /** + * 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 */ - partitionKeyProperties?: PartitionKeyProperty[]; + location: string; + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 (L1). For Gen1 + * environments the sku determines the capacity of the environment, the ingress rate, and the + * billing rate. + */ + sku: Sku; /** * Provisioning state of the resource. Possible values include: 'Accepted', 'Creating', * 'Updating', 'Succeeded', 'Failed', 'Deleting' @@ -304,16 +623,78 @@ export interface EnvironmentResource extends TrackedResource { * Series Insights service. */ status?: EnvironmentStatus; + /** + * The list of event properties which will be used to define the environment's time series id. + */ + timeSeriesIdProperties: TimeSeriesIdProperty[]; + /** + * The storage configuration provides the connection details that allows the Time Series Insights + * service to connect to the customer storage account that is used to store the environment's + * data. + */ + storageConfiguration: Gen2StorageConfigurationOutput; + /** + * The warm store configuration provides the details to create a warm store cache that will + * retain a copy of the environment's data available for faster query. + */ + warmStoreConfiguration?: WarmStoreConfigurationProperties; } /** - * The response of the List Environments operation. + * Properties of the environment. */ -export interface EnvironmentListResponse { +export interface EnvironmentResourceProperties extends ResourceProperties { /** - * Result of the List Environments operation. + * An id used to access the environment data, e.g. to query the environment's events or upload + * reference data for the environment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataAccessId?: string; + /** + * The fully qualified domain name used to access the environment data, e.g. to query the + * environment's events or upload reference data for the environment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataAccessFqdn?: string; + /** + * An object that represents the status of the environment, and its internal state in the Time + * Series Insights service. + */ + status?: EnvironmentStatus; +} + +/** + * An object that represents the offset information for the local timestamp format specified. + * Should not be specified for LocalTimestampFormat - Embedded. + */ +export interface LocalTimestampTimeZoneOffset { + /** + * The event property that will be contain the offset information to calculate the local + * timestamp. When the LocalTimestampFormat is Iana, the property name will contain the name of + * the column which contains IANA Timezone Name (eg: Americas/Los Angeles). When + * LocalTimestampFormat is Timespan, it contains the name of property which contains values + * representing the offset (eg: P1D or 1.00:00:00) */ - value?: EnvironmentResource[]; + propertyName?: string; +} + +/** + * An object that represents the local timestamp property. It contains the format of local + * timestamp that needs to be used and the corresponding timezone offset information. If a value + * isn't specified for localTimestamp, or if null, then the local timestamp will not be ingressed + * with the events. + */ +export interface LocalTimestamp { + /** + * An enum that represents the format of the local timestamp property that needs to be set. + * Possible values include: 'Embedded' + */ + format?: LocalTimestampFormat; + /** + * An object that represents the offset information for the local timestamp format specified. + * Should not be specified for LocalTimestampFormat - Embedded. + */ + timeZoneOffset?: LocalTimestampTimeZoneOffset; } /** @@ -337,6 +718,13 @@ export interface EventSourceCreateOrUpdateParameters { * Key-value pairs of additional properties for the resource. */ tags?: { [propertyName: string]: string }; + /** + * An object that represents the local timestamp property. It contains the format of local + * timestamp that needs to be used and the corresponding timezone offset information. If a value + * isn't specified for localTimestamp, or if null, then the local timestamp will not be ingressed + * with the events. + */ + localTimestamp?: LocalTimestamp; } /** @@ -355,6 +743,13 @@ export interface EventHubEventSourceCreateOrUpdateParameters { * Key-value pairs of additional properties for the resource. */ tags?: { [propertyName: string]: string }; + /** + * An object that represents the local timestamp property. It contains the format of local + * timestamp that needs to be used and the corresponding timezone offset information. If a value + * isn't specified for localTimestamp, or if null, then the local timestamp will not be ingressed + * with the events. + */ + localTimestamp?: LocalTimestamp; /** * Provisioning state of the resource. Possible values include: 'Accepted', 'Creating', * 'Updating', 'Succeeded', 'Failed', 'Deleting' @@ -416,6 +811,13 @@ export interface IoTHubEventSourceCreateOrUpdateParameters { * Key-value pairs of additional properties for the resource. */ tags?: { [propertyName: string]: string }; + /** + * An object that represents the local timestamp property. It contains the format of local + * timestamp that needs to be used and the corresponding timezone offset information. If a value + * isn't specified for localTimestamp, or if null, then the local timestamp will not be ingressed + * with the events. + */ + localTimestamp?: LocalTimestamp; /** * Provisioning state of the resource. Possible values include: 'Accepted', 'Creating', * 'Updating', 'Succeeded', 'Failed', 'Deleting' @@ -644,7 +1046,7 @@ export interface IoTHubEventSourceResource { /** * Polymorphic Discriminator */ - kind: "Microsoft.IotHub"; + kind: "Microsoft.IoTHub"; /** * Resource Id * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -772,40 +1174,6 @@ export interface IoTHubEventSourceCommonProperties extends AzureEventSourcePrope keyName: string; } -/** - * An object that represents the offset information for the local timestamp format specified. - * Should not be specified for LocalTimestampFormat - Embedded. - */ -export interface LocalTimestampTimeZoneOffset { - /** - * The event property that will be contain the offset information to calculate the local - * timestamp. When the LocalTimestampFormat is Iana, the property name will contain the name of - * the column which contains IANA Timezone Name (eg: Americas/Los Angeles). When - * LocalTimestampFormat is Timespan, it contains the name of property which contains values - * representing the offset (eg: P1D or 1.00:00:00) - */ - propertyName?: string; -} - -/** - * An object that represents the local timestamp property. It contains the format of local - * timestamp that needs to be used and the corresponding timezone offset information. If a value - * isn't specified for localTimestamp, or if null, then the local timestamp will not be ingressed - * with the events. - */ -export interface LocalTimestamp { - /** - * An enum that represents the format of the local timestamp property that needs to be set. - * Possible values include: 'Embedded', 'Iana', 'TimeSpan' - */ - format?: LocalTimestampFormat; - /** - * An object that represents the offset information for the local timestamp format specified. - * Should not be specified for LocalTimestampFormat - Embedded. - */ - timeZoneOffset?: LocalTimestampTimeZoneOffset; -} - /** * An object that represents a set of mutable event source resource properties. */ @@ -1013,11 +1381,11 @@ export type ProvisioningState = 'Accepted' | 'Creating' | 'Updating' | 'Succeede /** * Defines values for SkuName. - * Possible values include: 'S1', 'S2' + * Possible values include: 'S1', 'S2', 'P1', 'L1' * @readonly * @enum {string} */ -export type SkuName = 'S1' | 'S2'; +export type SkuName = 'S1' | 'S2' | 'P1' | 'L1'; /** * Defines values for StorageLimitExceededBehavior. @@ -1043,13 +1411,21 @@ export type PropertyType = 'String'; */ export type IngressState = 'Disabled' | 'Ready' | 'Running' | 'Paused' | 'Unknown'; +/** + * Defines values for WarmStoragePropertiesState. + * Possible values include: 'Ok', 'Error', 'Unknown' + * @readonly + * @enum {string} + */ +export type WarmStoragePropertiesState = 'Ok' | 'Error' | 'Unknown'; + /** * Defines values for LocalTimestampFormat. - * Possible values include: 'Embedded', 'Iana', 'TimeSpan' + * Possible values include: 'Embedded' * @readonly * @enum {string} */ -export type LocalTimestampFormat = 'Embedded' | 'Iana' | 'TimeSpan'; +export type LocalTimestampFormat = 'Embedded'; /** * Defines values for ReferenceDataKeyPropertyType. @@ -1118,7 +1494,7 @@ export type OperationsListNextResponse = OperationListResult & { /** * Contains response data for the createOrUpdate operation. */ -export type EnvironmentsCreateOrUpdateResponse = EnvironmentResource & { +export type EnvironmentsCreateOrUpdateResponse = EnvironmentResourceUnion & { /** * The underlying HTTP response. */ @@ -1131,14 +1507,14 @@ export type EnvironmentsCreateOrUpdateResponse = EnvironmentResource & { /** * The response body as parsed JSON or XML */ - parsedBody: EnvironmentResource; + parsedBody: EnvironmentResourceUnion; }; }; /** * Contains response data for the get operation. */ -export type EnvironmentsGetResponse = EnvironmentResource & { +export type EnvironmentsGetResponse = EnvironmentResourceUnion & { /** * The underlying HTTP response. */ @@ -1151,14 +1527,14 @@ export type EnvironmentsGetResponse = EnvironmentResource & { /** * The response body as parsed JSON or XML */ - parsedBody: EnvironmentResource; + parsedBody: EnvironmentResourceUnion; }; }; /** * Contains response data for the update operation. */ -export type EnvironmentsUpdateResponse = EnvironmentResource & { +export type EnvironmentsUpdateResponse = EnvironmentResourceUnion & { /** * The underlying HTTP response. */ @@ -1171,7 +1547,7 @@ export type EnvironmentsUpdateResponse = EnvironmentResource & { /** * The response body as parsed JSON or XML */ - parsedBody: EnvironmentResource; + parsedBody: EnvironmentResourceUnion; }; }; @@ -1218,7 +1594,7 @@ export type EnvironmentsListBySubscriptionResponse = EnvironmentListResponse & { /** * Contains response data for the beginCreateOrUpdate operation. */ -export type EnvironmentsBeginCreateOrUpdateResponse = EnvironmentResource & { +export type EnvironmentsBeginCreateOrUpdateResponse = EnvironmentResourceUnion & { /** * The underlying HTTP response. */ @@ -1231,14 +1607,14 @@ export type EnvironmentsBeginCreateOrUpdateResponse = EnvironmentResource & { /** * The response body as parsed JSON or XML */ - parsedBody: EnvironmentResource; + parsedBody: EnvironmentResourceUnion; }; }; /** * Contains response data for the beginUpdate operation. */ -export type EnvironmentsBeginUpdateResponse = EnvironmentResource & { +export type EnvironmentsBeginUpdateResponse = EnvironmentResourceUnion & { /** * The underlying HTTP response. */ @@ -1251,7 +1627,7 @@ export type EnvironmentsBeginUpdateResponse = EnvironmentResource & { /** * The response body as parsed JSON or XML */ - parsedBody: EnvironmentResource; + parsedBody: EnvironmentResourceUnion; }; }; diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/mappers.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/mappers.ts index d3731702df83..715f31a2b396 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/mappers.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -144,15 +144,7 @@ export const ResourceProperties: msRest.CompositeMapper = { provisioningState: { serializedName: "provisioningState", type: { - name: "Enum", - allowedValues: [ - "Accepted", - "Creating", - "Updating", - "Succeeded", - "Failed", - "Deleting" - ] + name: "String" } }, creationTime: { @@ -176,11 +168,7 @@ export const Sku: msRest.CompositeMapper = { required: true, serializedName: "name", type: { - name: "Enum", - allowedValues: [ - "S1", - "S2" - ] + name: "String" } }, capacity: { @@ -198,6 +186,81 @@ export const Sku: msRest.CompositeMapper = { } }; +export const WarmStoreConfigurationProperties: msRest.CompositeMapper = { + serializedName: "WarmStoreConfigurationProperties", + type: { + name: "Composite", + className: "WarmStoreConfigurationProperties", + modelProperties: { + dataRetention: { + required: true, + serializedName: "dataRetention", + type: { + name: "TimeSpan" + } + } + } + } +}; + +export const Gen2StorageConfigurationInput: msRest.CompositeMapper = { + serializedName: "Gen2StorageConfigurationInput", + type: { + name: "Composite", + className: "Gen2StorageConfigurationInput", + modelProperties: { + accountName: { + required: true, + serializedName: "accountName", + type: { + name: "String" + } + }, + managementKey: { + required: true, + serializedName: "managementKey", + type: { + name: "String" + } + } + } + } +}; + +export const Gen2StorageConfigurationOutput: msRest.CompositeMapper = { + serializedName: "Gen2StorageConfigurationOutput", + type: { + name: "Composite", + className: "Gen2StorageConfigurationOutput", + modelProperties: { + accountName: { + required: true, + serializedName: "accountName", + type: { + name: "String" + } + } + } + } +}; + +export const Gen2StorageConfigurationMutableProperties: msRest.CompositeMapper = { + serializedName: "Gen2StorageConfigurationMutableProperties", + type: { + name: "Composite", + className: "Gen2StorageConfigurationMutableProperties", + modelProperties: { + managementKey: { + required: true, + serializedName: "managementKey", + type: { + name: "String" + } + } + } + } +}; + export const CreateOrUpdateTrackedResourceProperties: msRest.CompositeMapper = { serializedName: "CreateOrUpdateTrackedResourceProperties", type: { @@ -226,11 +289,42 @@ export const CreateOrUpdateTrackedResourceProperties: msRest.CompositeMapper = { } }; -export const PartitionKeyProperty: msRest.CompositeMapper = { - serializedName: "PartitionKeyProperty", +export const EnvironmentCreateOrUpdateParameters: msRest.CompositeMapper = { + serializedName: "EnvironmentCreateOrUpdateParameters", type: { name: "Composite", - className: "PartitionKeyProperty", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "EnvironmentCreateOrUpdateParameters", + className: "EnvironmentCreateOrUpdateParameters", + modelProperties: { + ...CreateOrUpdateTrackedResourceProperties.type.modelProperties, + sku: { + required: true, + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + kind: { + required: true, + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const TimeSeriesIdProperty: msRest.CompositeMapper = { + serializedName: "TimeSeriesIdProperty", + type: { + name: "Composite", + className: "TimeSeriesIdProperty", modelProperties: { name: { serializedName: "name", @@ -248,21 +342,15 @@ export const PartitionKeyProperty: msRest.CompositeMapper = { } }; -export const EnvironmentCreateOrUpdateParameters: msRest.CompositeMapper = { - serializedName: "EnvironmentCreateOrUpdateParameters", +export const Gen1EnvironmentCreateOrUpdateParameters: msRest.CompositeMapper = { + serializedName: "Gen1", type: { name: "Composite", - className: "EnvironmentCreateOrUpdateParameters", + polymorphicDiscriminator: EnvironmentCreateOrUpdateParameters.type.polymorphicDiscriminator, + uberParent: "EnvironmentCreateOrUpdateParameters", + className: "Gen1EnvironmentCreateOrUpdateParameters", modelProperties: { - ...CreateOrUpdateTrackedResourceProperties.type.modelProperties, - sku: { - required: true, - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } - }, + ...EnvironmentCreateOrUpdateParameters.type.modelProperties, dataRetentionTime: { required: true, serializedName: "properties.dataRetentionTime", @@ -273,11 +361,7 @@ export const EnvironmentCreateOrUpdateParameters: msRest.CompositeMapper = { storageLimitExceededBehavior: { serializedName: "properties.storageLimitExceededBehavior", type: { - name: "Enum", - allowedValues: [ - "PurgeOldData", - "PauseIngress" - ] + name: "String" } }, partitionKeyProperties: { @@ -287,7 +371,7 @@ export const EnvironmentCreateOrUpdateParameters: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "PartitionKeyProperty" + className: "TimeSeriesIdProperty" } } } @@ -296,19 +380,53 @@ export const EnvironmentCreateOrUpdateParameters: msRest.CompositeMapper = { } }; -export const EnvironmentUpdateParameters: msRest.CompositeMapper = { - serializedName: "EnvironmentUpdateParameters", +export const Gen2EnvironmentCreateOrUpdateParameters: msRest.CompositeMapper = { + serializedName: "Gen2", type: { name: "Composite", - className: "EnvironmentUpdateParameters", + polymorphicDiscriminator: EnvironmentCreateOrUpdateParameters.type.polymorphicDiscriminator, + uberParent: "EnvironmentCreateOrUpdateParameters", + className: "Gen2EnvironmentCreateOrUpdateParameters", modelProperties: { - sku: { - serializedName: "sku", + ...EnvironmentCreateOrUpdateParameters.type.modelProperties, + timeSeriesIdProperties: { + required: true, + serializedName: "properties.timeSeriesIdProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TimeSeriesIdProperty" + } + } + } + }, + storageConfiguration: { + required: true, + serializedName: "properties.storageConfiguration", type: { name: "Composite", - className: "Sku" + className: "Gen2StorageConfigurationInput" } }, + warmStoreConfiguration: { + serializedName: "properties.warmStoreConfiguration", + type: { + name: "Composite", + className: "WarmStoreConfigurationProperties" + } + } + } + } +}; + +export const EnvironmentUpdateParameters: msRest.CompositeMapper = { + serializedName: "EnvironmentUpdateParameters", + type: { + name: "Composite", + className: "EnvironmentUpdateParameters", + modelProperties: { tags: { serializedName: "tags", type: { @@ -319,6 +437,24 @@ export const EnvironmentUpdateParameters: msRest.CompositeMapper = { } } } + } + } + } +}; + +export const Gen1EnvironmentUpdateParameters: msRest.CompositeMapper = { + serializedName: "Gen1EnvironmentUpdateParameters", + type: { + name: "Composite", + className: "Gen1EnvironmentUpdateParameters", + modelProperties: { + ...EnvironmentUpdateParameters.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } }, dataRetentionTime: { serializedName: "properties.dataRetentionTime", @@ -329,21 +465,83 @@ export const EnvironmentUpdateParameters: msRest.CompositeMapper = { storageLimitExceededBehavior: { serializedName: "properties.storageLimitExceededBehavior", type: { - name: "Enum", - allowedValues: [ - "PurgeOldData", - "PauseIngress" - ] + name: "String" + } + } + } + } +}; + +export const Gen2EnvironmentUpdateParameters: msRest.CompositeMapper = { + serializedName: "Gen2EnvironmentUpdateParameters", + type: { + name: "Composite", + className: "Gen2EnvironmentUpdateParameters", + modelProperties: { + ...EnvironmentUpdateParameters.type.modelProperties, + storageConfiguration: { + serializedName: "properties.storageConfiguration", + type: { + name: "Composite", + className: "Gen2StorageConfigurationMutableProperties" } }, - partitionKeyProperties: { - serializedName: "properties.partitionKeyProperties", + warmStoreConfiguration: { + serializedName: "properties.warmStoreConfiguration", + type: { + name: "Composite", + className: "WarmStoreConfigurationProperties" + } + } + } + } +}; + +export const EnvironmentResource: msRest.CompositeMapper = { + serializedName: "EnvironmentResource", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "EnvironmentResource", + className: "EnvironmentResource", + modelProperties: { + ...TrackedResource.type.modelProperties, + sku: { + required: true, + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + kind: { + required: true, + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const EnvironmentListResponse: msRest.CompositeMapper = { + serializedName: "EnvironmentListResponse", + type: { + name: "Composite", + className: "EnvironmentListResponse", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PartitionKeyProperty" + className: "EnvironmentResource" } } } @@ -383,14 +581,7 @@ export const IngressEnvironmentStatus: msRest.CompositeMapper = { state: { serializedName: "state", type: { - name: "Enum", - allowedValues: [ - "Disabled", - "Ready", - "Running", - "Paused", - "Unknown" - ] + name: "String" } }, stateDetails: { @@ -404,6 +595,42 @@ export const IngressEnvironmentStatus: msRest.CompositeMapper = { } }; +export const WarmStorageEnvironmentStatus: msRest.CompositeMapper = { + serializedName: "WarmStorageEnvironmentStatus", + type: { + name: "Composite", + className: "WarmStorageEnvironmentStatus", + modelProperties: { + state: { + serializedName: "propertiesUsage.state", + type: { + name: "String" + } + }, + currentCount: { + serializedName: "propertiesUsage.stateDetails.currentCount", + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + maxCount: { + serializedName: "propertiesUsage.stateDetails.maxCount", + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } + } + } +}; + export const EnvironmentStatus: msRest.CompositeMapper = { serializedName: "EnvironmentStatus", type: { @@ -416,25 +643,27 @@ export const EnvironmentStatus: msRest.CompositeMapper = { name: "Composite", className: "IngressEnvironmentStatus" } + }, + warmStorage: { + serializedName: "warmStorage", + type: { + name: "Composite", + className: "WarmStorageEnvironmentStatus" + } } } } }; -export const EnvironmentResource: msRest.CompositeMapper = { - serializedName: "EnvironmentResource", +export const Gen1EnvironmentResource: msRest.CompositeMapper = { + serializedName: "Gen1", type: { name: "Composite", - className: "EnvironmentResource", + polymorphicDiscriminator: EnvironmentResource.type.polymorphicDiscriminator, + uberParent: "EnvironmentResource", + className: "Gen1EnvironmentResource", modelProperties: { - ...TrackedResource.type.modelProperties, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } - }, + ...EnvironmentResource.type.modelProperties, dataRetentionTime: { required: true, serializedName: "properties.dataRetentionTime", @@ -445,11 +674,7 @@ export const EnvironmentResource: msRest.CompositeMapper = { storageLimitExceededBehavior: { serializedName: "properties.storageLimitExceededBehavior", type: { - name: "Enum", - allowedValues: [ - "PurgeOldData", - "PauseIngress" - ] + name: "String" } }, partitionKeyProperties: { @@ -459,23 +684,49 @@ export const EnvironmentResource: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "PartitionKeyProperty" + className: "TimeSeriesIdProperty" } } } }, + dataAccessId: { + readOnly: true, + serializedName: "properties.dataAccessId", + type: { + name: "Uuid" + } + }, + dataAccessFqdn: { + readOnly: true, + serializedName: "properties.dataAccessFqdn", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "EnvironmentStatus" + } + } + } + } +}; + +export const Gen2EnvironmentResource: msRest.CompositeMapper = { + serializedName: "Gen2", + type: { + name: "Composite", + polymorphicDiscriminator: EnvironmentResource.type.polymorphicDiscriminator, + uberParent: "EnvironmentResource", + className: "Gen2EnvironmentResource", + modelProperties: { + ...EnvironmentResource.type.modelProperties, provisioningState: { serializedName: "properties.provisioningState", type: { - name: "Enum", - allowedValues: [ - "Accepted", - "Creating", - "Updating", - "Succeeded", - "Failed", - "Deleting" - ] + name: "String" } }, creationTime: { @@ -505,27 +756,104 @@ export const EnvironmentResource: msRest.CompositeMapper = { name: "Composite", className: "EnvironmentStatus" } + }, + timeSeriesIdProperties: { + required: true, + serializedName: "properties.timeSeriesIdProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TimeSeriesIdProperty" + } + } + } + }, + storageConfiguration: { + required: true, + serializedName: "properties.storageConfiguration", + type: { + name: "Composite", + className: "Gen2StorageConfigurationOutput" + } + }, + warmStoreConfiguration: { + serializedName: "properties.warmStoreConfiguration", + type: { + name: "Composite", + className: "WarmStoreConfigurationProperties" + } } } } }; -export const EnvironmentListResponse: msRest.CompositeMapper = { - serializedName: "EnvironmentListResponse", +export const EnvironmentResourceProperties: msRest.CompositeMapper = { + serializedName: "EnvironmentResourceProperties", type: { name: "Composite", - className: "EnvironmentListResponse", + className: "EnvironmentResourceProperties", modelProperties: { - value: { - serializedName: "value", + ...ResourceProperties.type.modelProperties, + dataAccessId: { + readOnly: true, + serializedName: "dataAccessId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnvironmentResource" - } - } + name: "Uuid" + } + }, + dataAccessFqdn: { + readOnly: true, + serializedName: "dataAccessFqdn", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "Composite", + className: "EnvironmentStatus" + } + } + } + } +}; + +export const LocalTimestampTimeZoneOffset: msRest.CompositeMapper = { + serializedName: "LocalTimestamp_timeZoneOffset", + type: { + name: "Composite", + className: "LocalTimestampTimeZoneOffset", + modelProperties: { + propertyName: { + serializedName: "propertyName", + type: { + name: "String" + } + } + } + } +}; + +export const LocalTimestamp: msRest.CompositeMapper = { + serializedName: "LocalTimestamp", + type: { + name: "Composite", + className: "LocalTimestamp", + modelProperties: { + format: { + serializedName: "format", + type: { + name: "String" + } + }, + timeZoneOffset: { + serializedName: "timeZoneOffset", + type: { + name: "Composite", + className: "LocalTimestampTimeZoneOffset" } } } @@ -540,10 +868,17 @@ export const EventSourceCreateOrUpdateParameters: msRest.CompositeMapper = { serializedName: "kind", clientName: "kind" }, - uberParent: "CreateOrUpdateTrackedResourceProperties", + uberParent: "EventSourceCreateOrUpdateParameters", className: "EventSourceCreateOrUpdateParameters", modelProperties: { ...CreateOrUpdateTrackedResourceProperties.type.modelProperties, + localTimestamp: { + serializedName: "localTimestamp", + type: { + name: "Composite", + className: "LocalTimestamp" + } + }, kind: { required: true, serializedName: "kind", @@ -559,21 +894,15 @@ export const EventHubEventSourceCreateOrUpdateParameters: msRest.CompositeMapper serializedName: "Microsoft.EventHub", type: { name: "Composite", + polymorphicDiscriminator: EventSourceCreateOrUpdateParameters.type.polymorphicDiscriminator, + uberParent: "EventSourceCreateOrUpdateParameters", className: "EventHubEventSourceCreateOrUpdateParameters", modelProperties: { ...EventSourceCreateOrUpdateParameters.type.modelProperties, provisioningState: { serializedName: "properties.provisioningState", type: { - name: "Enum", - allowedValues: [ - "Accepted", - "Creating", - "Updating", - "Succeeded", - "Failed", - "Deleting" - ] + name: "String" } }, creationTime: { @@ -639,21 +968,15 @@ export const IoTHubEventSourceCreateOrUpdateParameters: msRest.CompositeMapper = serializedName: "Microsoft.IoTHub", type: { name: "Composite", + polymorphicDiscriminator: EventSourceCreateOrUpdateParameters.type.polymorphicDiscriminator, + uberParent: "EventSourceCreateOrUpdateParameters", className: "IoTHubEventSourceCreateOrUpdateParameters", modelProperties: { ...EventSourceCreateOrUpdateParameters.type.modelProperties, provisioningState: { serializedName: "properties.provisioningState", type: { - name: "Enum", - allowedValues: [ - "Accepted", - "Creating", - "Updating", - "Succeeded", - "Failed", - "Deleting" - ] + name: "String" } }, creationTime: { @@ -730,7 +1053,7 @@ export const EventSourceUpdateParameters: msRest.CompositeMapper = { }; export const EventHubEventSourceUpdateParameters: msRest.CompositeMapper = { - serializedName: "EventHubEventSourceUpdateParameters", + serializedName: "Microsoft.EventHub", type: { name: "Composite", className: "EventHubEventSourceUpdateParameters", @@ -760,7 +1083,7 @@ export const EventHubEventSourceUpdateParameters: msRest.CompositeMapper = { }; export const IoTHubEventSourceUpdateParameters: msRest.CompositeMapper = { - serializedName: "IoTHubEventSourceUpdateParameters", + serializedName: "Microsoft.IoTHub", type: { name: "Composite", className: "IoTHubEventSourceUpdateParameters", @@ -797,7 +1120,7 @@ export const EventSourceResource: msRest.CompositeMapper = { serializedName: "kind", clientName: "kind" }, - uberParent: "BaseResource", + uberParent: "EventSourceResource", className: "EventSourceResource", modelProperties: { ...TrackedResource.type.modelProperties, @@ -838,21 +1161,15 @@ export const EventHubEventSourceResource: msRest.CompositeMapper = { serializedName: "Microsoft.EventHub", type: { name: "Composite", + polymorphicDiscriminator: EventSourceResource.type.polymorphicDiscriminator, + uberParent: "EventSourceResource", className: "EventHubEventSourceResource", modelProperties: { ...EventSourceResource.type.modelProperties, provisioningState: { serializedName: "properties.provisioningState", type: { - name: "Enum", - allowedValues: [ - "Accepted", - "Creating", - "Updating", - "Succeeded", - "Failed", - "Deleting" - ] + name: "String" } }, creationTime: { @@ -908,24 +1225,18 @@ export const EventHubEventSourceResource: msRest.CompositeMapper = { }; export const IoTHubEventSourceResource: msRest.CompositeMapper = { - serializedName: "Microsoft.IotHub", + serializedName: "Microsoft.IoTHub", type: { name: "Composite", + polymorphicDiscriminator: EventSourceResource.type.polymorphicDiscriminator, + uberParent: "EventSourceResource", className: "IoTHubEventSourceResource", modelProperties: { ...EventSourceResource.type.modelProperties, provisioningState: { serializedName: "properties.provisioningState", type: { - name: "Enum", - allowedValues: [ - "Accepted", - "Creating", - "Updating", - "Succeeded", - "Failed", - "Deleting" - ] + name: "String" } }, creationTime: { @@ -1079,50 +1390,6 @@ export const IoTHubEventSourceCommonProperties: msRest.CompositeMapper = { } }; -export const LocalTimestampTimeZoneOffset: msRest.CompositeMapper = { - serializedName: "LocalTimestamp_timeZoneOffset", - type: { - name: "Composite", - className: "LocalTimestampTimeZoneOffset", - modelProperties: { - propertyName: { - serializedName: "propertyName", - type: { - name: "String" - } - } - } - } -}; - -export const LocalTimestamp: msRest.CompositeMapper = { - serializedName: "LocalTimestamp", - type: { - name: "Composite", - className: "LocalTimestamp", - modelProperties: { - format: { - serializedName: "format", - type: { - name: "Enum", - allowedValues: [ - "Embedded", - "Iana", - "TimeSpan" - ] - } - }, - timeZoneOffset: { - serializedName: "timeZoneOffset", - type: { - name: "Composite", - className: "LocalTimestampTimeZoneOffset" - } - } - } - } -}; - export const EventSourceMutableProperties: msRest.CompositeMapper = { serializedName: "EventSourceMutableProperties", type: { @@ -1161,13 +1428,7 @@ export const ReferenceDataSetKeyProperty: msRest.CompositeMapper = { type: { serializedName: "type", type: { - name: "Enum", - allowedValues: [ - "String", - "Double", - "Bool", - "DateTime" - ] + name: "String" } } } @@ -1197,11 +1458,7 @@ export const ReferenceDataSetCreateOrUpdateParameters: msRest.CompositeMapper = dataStringComparisonBehavior: { serializedName: "properties.dataStringComparisonBehavior", type: { - name: "Enum", - allowedValues: [ - "Ordinal", - "OrdinalIgnoreCase" - ] + name: "String" } } } @@ -1252,25 +1509,13 @@ export const ReferenceDataSetResource: msRest.CompositeMapper = { dataStringComparisonBehavior: { serializedName: "properties.dataStringComparisonBehavior", type: { - name: "Enum", - allowedValues: [ - "Ordinal", - "OrdinalIgnoreCase" - ] + name: "String" } }, provisioningState: { serializedName: "properties.provisioningState", type: { - name: "Enum", - allowedValues: [ - "Accepted", - "Creating", - "Updating", - "Succeeded", - "Failed", - "Deleting" - ] + name: "String" } }, creationTime: { @@ -1330,11 +1575,7 @@ export const AccessPolicyCreateOrUpdateParameters: msRest.CompositeMapper = { name: "Sequence", element: { type: { - name: "Enum", - allowedValues: [ - "Reader", - "Contributor" - ] + name: "String" } } } @@ -1361,11 +1602,7 @@ export const AccessPolicyUpdateParameters: msRest.CompositeMapper = { name: "Sequence", element: { type: { - name: "Enum", - allowedValues: [ - "Reader", - "Contributor" - ] + name: "String" } } } @@ -1399,11 +1636,7 @@ export const AccessPolicyResource: msRest.CompositeMapper = { name: "Sequence", element: { type: { - name: "Enum", - allowedValues: [ - "Reader", - "Contributor" - ] + name: "String" } } } @@ -1465,11 +1698,17 @@ export const OperationListResult: msRest.CompositeMapper = { }; export const discriminators = { - 'CreateOrUpdateTrackedResourceProperties.EventSourceCreateOrUpdateParameters' : EventSourceCreateOrUpdateParameters, - 'CreateOrUpdateTrackedResourceProperties.Microsoft.EventHub' : EventHubEventSourceCreateOrUpdateParameters, - 'CreateOrUpdateTrackedResourceProperties.Microsoft.IoTHub' : IoTHubEventSourceCreateOrUpdateParameters, - 'BaseResource.EventSourceResource' : EventSourceResource, - 'BaseResource.Microsoft.EventHub' : EventHubEventSourceResource, - 'BaseResource.Microsoft.IotHub' : IoTHubEventSourceResource + 'EnvironmentCreateOrUpdateParameters' : EnvironmentCreateOrUpdateParameters, + 'EnvironmentCreateOrUpdateParameters.Gen1' : Gen1EnvironmentCreateOrUpdateParameters, + 'EnvironmentCreateOrUpdateParameters.Gen2' : Gen2EnvironmentCreateOrUpdateParameters, + 'EnvironmentResource' : EnvironmentResource, + 'EnvironmentResource.Gen1' : Gen1EnvironmentResource, + 'EnvironmentResource.Gen2' : Gen2EnvironmentResource, + 'EventSourceCreateOrUpdateParameters' : EventSourceCreateOrUpdateParameters, + 'EventSourceCreateOrUpdateParameters.Microsoft.EventHub' : EventHubEventSourceCreateOrUpdateParameters, + 'EventSourceCreateOrUpdateParameters.Microsoft.IoTHub' : IoTHubEventSourceCreateOrUpdateParameters, + 'EventSourceResource' : EventSourceResource, + 'EventSourceResource.Microsoft.EventHub' : EventHubEventSourceResource, + 'EventSourceResource.Microsoft.IoTHub' : IoTHubEventSourceResource }; diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/operationsMappers.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/operationsMappers.ts index 65fc7dd1800a..1cf01eeef205 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/operationsMappers.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/parameters.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/parameters.ts index eda54e0771b8..a0358a465cea 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/parameters.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/referenceDataSetsMappers.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/referenceDataSetsMappers.ts index 26490d10e27f..156b839cb359 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/referenceDataSetsMappers.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/models/referenceDataSetsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -20,10 +20,17 @@ export { EventHubEventSourceResource, EventSourceCreateOrUpdateParameters, EventSourceResource, + Gen1EnvironmentCreateOrUpdateParameters, + Gen1EnvironmentResource, + Gen2EnvironmentCreateOrUpdateParameters, + Gen2EnvironmentResource, + Gen2StorageConfigurationInput, + Gen2StorageConfigurationOutput, IngressEnvironmentStatus, IoTHubEventSourceCreateOrUpdateParameters, IoTHubEventSourceResource, - PartitionKeyProperty, + LocalTimestamp, + LocalTimestampTimeZoneOffset, ReferenceDataSetCreateOrUpdateParameters, ReferenceDataSetKeyProperty, ReferenceDataSetListResponse, @@ -31,5 +38,8 @@ export { ReferenceDataSetUpdateParameters, Resource, Sku, - TrackedResource + TimeSeriesIdProperty, + TrackedResource, + WarmStorageEnvironmentStatus, + WarmStoreConfigurationProperties } from "../models/mappers"; diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/accessPolicies.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/accessPolicies.ts index 801834bf6530..5a5f91367ba8 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/accessPolicies.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/accessPolicies.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/environments.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/environments.ts index 375c717d8539..98b3f19833be 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/environments.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/environments.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -35,7 +34,7 @@ export class Environments { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, environmentName: string, parameters: Models.EnvironmentCreateOrUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + createOrUpdate(resourceGroupName: string, environmentName: string, parameters: Models.EnvironmentCreateOrUpdateParametersUnion, options?: msRest.RequestOptionsBase): Promise { return this.beginCreateOrUpdate(resourceGroupName,environmentName,parameters,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -55,7 +54,7 @@ export class Environments { * specified resource group. * @param callback The callback */ - get(resourceGroupName: string, environmentName: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, environmentName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of an Azure Resource group. * @param environmentName The name of the Time Series Insights environment associated with the @@ -63,8 +62,8 @@ export class Environments { * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, environmentName: string, options: Models.EnvironmentsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, environmentName: string, options?: Models.EnvironmentsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, environmentName: string, options: Models.EnvironmentsGetOptionalParams, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, environmentName: string, options?: Models.EnvironmentsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -188,7 +187,7 @@ export class Environments { * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate(resourceGroupName: string, environmentName: string, parameters: Models.EnvironmentCreateOrUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + beginCreateOrUpdate(resourceGroupName: string, environmentName: string, parameters: Models.EnvironmentCreateOrUpdateParametersUnion, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/eventSources.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/eventSources.ts index dfef5b520b67..a6185f51caf5 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/eventSources.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/eventSources.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/index.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/index.ts index 2ad013779b5f..427fd275ab86 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/index.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/operations.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/operations.ts index 966ed9c30e3d..31893278a76d 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/operations.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/referenceDataSets.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/referenceDataSets.ts index 274c8d939f1b..e1e4195875e3 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/referenceDataSets.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/operations/referenceDataSets.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClient.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClient.ts index e42685b68999..70e43e6a2b03 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClient.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClientContext.ts b/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClientContext.ts index a472e6cfb5f7..8569373e6a17 100644 --- a/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClientContext.ts +++ b/sdk/timeseriesinsights/arm-timeseriesinsights/src/timeSeriesInsightsClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -44,7 +43,7 @@ export class TimeSeriesInsightsClientContext extends msRestAzure.AzureServiceCli super(credentials, options); - this.apiVersion = '2017-11-15'; + this.apiVersion = '2020-05-15'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";