/*
 * 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 { BaseResource } from 'ms-rest-azure';
import { CloudError } from 'ms-rest-azure';
import * as moment from 'moment';

export { BaseResource } from 'ms-rest-azure';
export { CloudError } from 'ms-rest-azure';


/**
 * @class
 * Initializes a new instance of the OperationDisplay class.
 * @constructor
 * Contains the localized display information for this particular operation /
 * action.
 *
 * @member {string} [provider] The localized friendly form of the resource
 * provider name.
 * @member {string} [resource] The localized friendly form of the resource type
 * related to this action/operation.
 * @member {string} [operation] The localized friendly name for the operation.
 * @member {string} [description] The localized friendly description for the
 * operation.
 */
export interface OperationDisplay {
  readonly provider?: string;
  readonly resource?: string;
  readonly operation?: string;
  readonly description?: string;
}

/**
 * @class
 * Initializes a new instance of the Operation class.
 * @constructor
 * A Time Series Insights REST API operation
 *
 * @member {string} [name] The name of the operation being performed on this
 * particular object.
 * @member {object} [display] Contains the localized display information for
 * this particular operation / action.
 * @member {string} [display.provider] The localized friendly form of the
 * resource provider name.
 * @member {string} [display.resource] The localized friendly form of the
 * resource type related to this action/operation.
 * @member {string} [display.operation] The localized friendly name for the
 * operation.
 * @member {string} [display.description] The localized friendly description
 * for the operation.
 */
export interface Operation {
  readonly name?: string;
  readonly display?: OperationDisplay;
}

/**
 * @class
 * Initializes a new instance of the Resource class.
 * @constructor
 * Time Series Insights resource
 *
 * @member {string} [id] Resource Id
 * @member {string} [name] Resource name
 * @member {string} [type] Resource type
 */
export interface Resource extends BaseResource {
  readonly id?: string;
  readonly name?: string;
  readonly type?: string;
}

/**
 * @class
 * Initializes a new instance of the TrackedResource class.
 * @constructor
 * Time Series Insights resource that is tracked by Azure Resource Manager.
 *
 * @member {string} location Resource location
 * @member {object} [tags] Resource tags
 */
export interface TrackedResource extends Resource {
  location: string;
  tags?: { [propertyName: string]: string };
}

/**
 * @class
 * Initializes a new instance of the ResourceProperties class.
 * @constructor
 * Properties that are common to all tracked resources.
 *
 * @member {string} [provisioningState] Provisioning state of the resource.
 * Possible values include: 'Accepted', 'Creating', 'Updating', 'Succeeded',
 * 'Failed', 'Deleting'
 * @member {date} [creationTime] The time the resource was created.
 */
export interface ResourceProperties {
  provisioningState?: string;
  readonly creationTime?: Date;
}

/**
 * @class
 * Initializes a new instance of the Sku class.
 * @constructor
 * The sku determines the capacity of the environment, the SLA (in
 * queries-per-minute and total capacity), and the billing rate.
 *
 * @member {string} name The name of this SKU. Possible values include: 'S1',
 * 'S2'
 * @member {number} capacity The capacity of the sku. This value can be changed
 * to support scale out of environments after they have been created.
 */
export interface Sku {
  name: string;
  capacity: number;
}

/**
 * @class
 * Initializes a new instance of the CreateOrUpdateTrackedResourceProperties class.
 * @constructor
 * Properties required to create any resource tracked by Azure Resource
 * Manager.
 *
 * @member {string} location The location of the resource.
 * @member {object} [tags] Key-value pairs of additional properties for the
 * resource.
 */
export interface CreateOrUpdateTrackedResourceProperties {
  location: string;
  tags?: { [propertyName: string]: string };
}

/**
 * @class
 * Initializes a new instance of the PartitionKeyProperty class.
 * @constructor
 * The structure of the property that a partition key can have. An environment
 * can have multiple such properties.
 *
 * @member {string} [name] The name of the property.
 * @member {string} [type] The type of the property. Possible values include:
 * 'String'
 */
export interface PartitionKeyProperty {
  name?: string;
  type?: string;
}

/**
 * @class
 * Initializes a new instance of the EnvironmentCreateOrUpdateParameters class.
 * @constructor
 * Parameters supplied to the CreateOrUpdate Environment operation.
 *
 * @member {object} sku The sku determines the capacity of the environment, the
 * SLA (in queries-per-minute and total capacity), and the billing rate.
 * @member {string} [sku.name] The name of this SKU. Possible values include:
 * 'S1', 'S2'
 * @member {number} [sku.capacity] The capacity of the sku. This value can be
 * changed to support scale out of environments after they have been created.
 * @member {moment.duration} dataRetentionTime ISO8601 timespan specifying the
 * minimum number of days the environment's events will be available for query.
 * @member {string} [storageLimitExceededBehavior] The behavior the Time Series
 * Insights service should take when the environment's capacity has been
 * exceeded. If "PauseIngress" is specified, new events will not be read from
 * the event source. If "PurgeOldData" is specified, new events will continue
 * to be read and old events will be deleted from the environment. The default
 * behavior is PurgeOldData. Possible values include: 'PurgeOldData',
 * 'PauseIngress'
 * @member {array} [partitionKeyProperties] The list of partition keys
 * according to which the data in the environment will be ordered.
 */
export interface EnvironmentCreateOrUpdateParameters extends CreateOrUpdateTrackedResourceProperties {
  sku: Sku;
  dataRetentionTime: moment.Duration;
  storageLimitExceededBehavior?: string;
  partitionKeyProperties?: PartitionKeyProperty[];
}

/**
 * @class
 * Initializes a new instance of the EnvironmentUpdateParameters class.
 * @constructor
 * Parameters supplied to the Update Environment operation.
 *
 * @member {object} [sku] The sku of the environment.
 * @member {string} [sku.name] The name of this SKU. Possible values include:
 * 'S1', 'S2'
 * @member {number} [sku.capacity] The capacity of the sku. This value can be
 * changed to support scale out of environments after they have been created.
 * @member {object} [tags] Key-value pairs of additional properties for the
 * environment.
 * @member {moment.duration} [dataRetentionTime] ISO8601 timespan specifying
 * the minimum number of days the environment's events will be available for
 * query.
 * @member {string} [storageLimitExceededBehavior] The behavior the Time Series
 * Insights service should take when the environment's capacity has been
 * exceeded. If "PauseIngress" is specified, new events will not be read from
 * the event source. If "PurgeOldData" is specified, new events will continue
 * to be read and old events will be deleted from the environment. The default
 * behavior is PurgeOldData. Possible values include: 'PurgeOldData',
 * 'PauseIngress'
 * @member {array} [partitionKeyProperties] The list of event properties which
 * will be used to partition data in the environment.
 */
export interface EnvironmentUpdateParameters {
  sku?: Sku;
  tags?: { [propertyName: string]: string };
  dataRetentionTime?: moment.Duration;
  storageLimitExceededBehavior?: string;
  partitionKeyProperties?: PartitionKeyProperty[];
}

/**
 * @class
 * Initializes a new instance of the EnvironmentStateDetails class.
 * @constructor
 * An object that contains the details about an environment's state.
 *
 * @member {string} [code] Contains the code that represents the reason of an
 * environment being in a particular state. Can be used to programatically
 * handle specific cases.
 * @member {string} [message] A message that describes the state in detail.
 */
export interface EnvironmentStateDetails {
  code?: string;
  message?: string;
}

/**
 * @class
 * Initializes a new instance of the IngressEnvironmentStatus class.
 * @constructor
 * An object that represents the status of ingress on an environment.
 *
 * @member {string} [state] This string represents the state of ingress
 * operations on an environment. It can be "Disabled", "Ready", "Running",
 * "Paused" or "Unknown". Possible values include: 'Disabled', 'Ready',
 * 'Running', 'Paused', 'Unknown'
 * @member {object} [stateDetails] An object that contains the details about an
 * environment's state.
 * @member {string} [stateDetails.code] Contains the code that represents the
 * reason of an environment being in a particular state. Can be used to
 * programatically handle specific cases.
 * @member {string} [stateDetails.message] A message that describes the state
 * in detail.
 */
export interface IngressEnvironmentStatus {
  state?: string;
  stateDetails?: EnvironmentStateDetails;
}

/**
 * @class
 * Initializes a new instance of the EnvironmentStatus class.
 * @constructor
 * An object that represents the status of the environment, and its internal
 * state in the Time Series Insights service.
 *
 * @member {object} [ingress] An object that represents the status of ingress
 * on an environment.
 * @member {string} [ingress.state] This string represents the state of ingress
 * operations on an environment. It can be "Disabled", "Ready", "Running",
 * "Paused" or "Unknown". Possible values include: 'Disabled', 'Ready',
 * 'Running', 'Paused', 'Unknown'
 * @member {object} [ingress.stateDetails] An object that contains the details
 * about an environment's state.
 * @member {string} [ingress.stateDetails.code] Contains the code that
 * represents the reason of an environment being in a particular state. Can be
 * used to programatically handle specific cases.
 * @member {string} [ingress.stateDetails.message] A message that describes the
 * state in detail.
 */
export interface EnvironmentStatus {
  ingress?: IngressEnvironmentStatus;
}

/**
 * @class
 * Initializes a new instance of the EnvironmentResource class.
 * @constructor
 * An environment is a set of time-series data avaliable for query, and is the
 * top level Azure Time Series Insights resource.
 *
 * @member {object} [sku] The sku determines the capacity of the environment,
 * the SLA (in queries-per-minute and total capacity), and the billing rate.
 * @member {string} [sku.name] The name of this SKU. Possible values include:
 * 'S1', 'S2'
 * @member {number} [sku.capacity] The capacity of the sku. This value can be
 * changed to support scale out of environments after they have been created.
 * @member {moment.duration} dataRetentionTime ISO8601 timespan specifying the
 * minimum number of days the environment's events will be available for query.
 * @member {string} [storageLimitExceededBehavior] The behavior the Time Series
 * Insights service should take when the environment's capacity has been
 * exceeded. If "PauseIngress" is specified, new events will not be read from
 * the event source. If "PurgeOldData" is specified, new events will continue
 * to be read and old events will be deleted from the environment. The default
 * behavior is PurgeOldData. Possible values include: 'PurgeOldData',
 * 'PauseIngress'
 * @member {array} [partitionKeyProperties] The list of partition keys
 * according to which the data in the environment will be ordered.
 * @member {string} [provisioningState] Provisioning state of the resource.
 * Possible values include: 'Accepted', 'Creating', 'Updating', 'Succeeded',
 * 'Failed', 'Deleting'
 * @member {date} [creationTime] The time the resource was created.
 * @member {uuid} [dataAccessId] An id used to access the environment data,
 * e.g. to query the environment's events or upload reference data for the
 * environment.
 * @member {string} [dataAccessFqdn] 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.
 * @member {object} [status] An object that represents the status of the
 * environment, and its internal state in the Time Series Insights service.
 * @member {object} [status.ingress] An object that represents the status of
 * ingress on an environment.
 * @member {string} [status.ingress.state] This string represents the state of
 * ingress operations on an environment. It can be "Disabled", "Ready",
 * "Running", "Paused" or "Unknown". Possible values include: 'Disabled',
 * 'Ready', 'Running', 'Paused', 'Unknown'
 * @member {object} [status.ingress.stateDetails] An object that contains the
 * details about an environment's state.
 * @member {string} [status.ingress.stateDetails.code] Contains the code that
 * represents the reason of an environment being in a particular state. Can be
 * used to programatically handle specific cases.
 * @member {string} [status.ingress.stateDetails.message] A message that
 * describes the state in detail.
 */
export interface EnvironmentResource extends TrackedResource {
  sku?: Sku;
  dataRetentionTime: moment.Duration;
  storageLimitExceededBehavior?: string;
  partitionKeyProperties?: PartitionKeyProperty[];
  provisioningState?: string;
  readonly creationTime?: Date;
  readonly dataAccessId?: string;
  readonly dataAccessFqdn?: string;
  status?: EnvironmentStatus;
}

/**
 * @class
 * Initializes a new instance of the EnvironmentListResponse class.
 * @constructor
 * The response of the List Environments operation.
 *
 * @member {array} [value] Result of the List Environments operation.
 */
export interface EnvironmentListResponse {
  value?: EnvironmentResource[];
}

/**
 * @class
 * Initializes a new instance of the EventSourceCreateOrUpdateParameters class.
 * @constructor
 * Parameters supplied to the Create or Update Event Source operation.
 *
 * @member {string} kind Polymorphic Discriminator
 */
export interface EventSourceCreateOrUpdateParameters extends CreateOrUpdateTrackedResourceProperties {
  kind: string;
}

/**
 * @class
 * Initializes a new instance of the EventHubEventSourceCreateOrUpdateParameters class.
 * @constructor
 * Parameters supplied to the Create or Update Event Source operation for an
 * EventHub event source.
 *
 * @member {string} [provisioningState] Provisioning state of the resource.
 * Possible values include: 'Accepted', 'Creating', 'Updating', 'Succeeded',
 * 'Failed', 'Deleting'
 * @member {date} [creationTime] The time the resource was created.
 * @member {string} [timestampPropertyName] The event property that will be
 * used as the event source's timestamp. If a value isn't specified for
 * timestampPropertyName, or if null or empty-string is specified, the event
 * creation time will be used.
 * @member {string} eventSourceResourceId The resource id of the event source
 * in Azure Resource Manager.
 * @member {string} serviceBusNamespace The name of the service bus that
 * contains the event hub.
 * @member {string} eventHubName The name of the event hub.
 * @member {string} consumerGroupName The name of the event hub's consumer
 * group that holds the partitions from which events will be read.
 * @member {string} keyName The name of the SAS key that grants the Time Series
 * Insights service access to the event hub. The shared access policies for
 * this key must grant 'Listen' permissions to the event hub.
 * @member {string} sharedAccessKey The value of the shared access key that
 * grants the Time Series Insights service read access to the event hub. This
 * property is not shown in event source responses.
 */
export interface EventHubEventSourceCreateOrUpdateParameters extends EventSourceCreateOrUpdateParameters {
  provisioningState?: string;
  readonly creationTime?: Date;
  timestampPropertyName?: string;
  eventSourceResourceId: string;
  serviceBusNamespace: string;
  eventHubName: string;
  consumerGroupName: string;
  keyName: string;
  sharedAccessKey: string;
}

/**
 * @class
 * Initializes a new instance of the IoTHubEventSourceCreateOrUpdateParameters class.
 * @constructor
 * Parameters supplied to the Create or Update Event Source operation for an
 * IoTHub event source.
 *
 * @member {string} [provisioningState] Provisioning state of the resource.
 * Possible values include: 'Accepted', 'Creating', 'Updating', 'Succeeded',
 * 'Failed', 'Deleting'
 * @member {date} [creationTime] The time the resource was created.
 * @member {string} [timestampPropertyName] The event property that will be
 * used as the event source's timestamp. If a value isn't specified for
 * timestampPropertyName, or if null or empty-string is specified, the event
 * creation time will be used.
 * @member {string} eventSourceResourceId The resource id of the event source
 * in Azure Resource Manager.
 * @member {string} iotHubName The name of the iot hub.
 * @member {string} consumerGroupName The name of the iot hub's consumer group
 * that holds the partitions from which events will be read.
 * @member {string} keyName The name of the Shared Access Policy key that
 * grants the Time Series Insights service access to the iot hub. This shared
 * access policy key must grant 'service connect' permissions to the iot hub.
 * @member {string} sharedAccessKey The value of the Shared Access Policy key
 * that grants the Time Series Insights service read access to the iot hub.
 * This property is not shown in event source responses.
 */
export interface IoTHubEventSourceCreateOrUpdateParameters extends EventSourceCreateOrUpdateParameters {
  provisioningState?: string;
  readonly creationTime?: Date;
  timestampPropertyName?: string;
  eventSourceResourceId: string;
  iotHubName: string;
  consumerGroupName: string;
  keyName: string;
  sharedAccessKey: string;
}

/**
 * @class
 * Initializes a new instance of the EventSourceUpdateParameters class.
 * @constructor
 * Parameters supplied to the Update Event Source operation.
 *
 * @member {object} [tags] Key-value pairs of additional properties for the
 * event source.
 */
export interface EventSourceUpdateParameters {
  tags?: { [propertyName: string]: string };
}

/**
 * @class
 * Initializes a new instance of the EventHubEventSourceUpdateParameters class.
 * @constructor
 * Parameters supplied to the Update Event Source operation to update an
 * EventHub event source.
 *
 * @member {string} [timestampPropertyName] The event property that will be
 * used as the event source's timestamp. If a value isn't specified for
 * timestampPropertyName, or if null or empty-string is specified, the event
 * creation time will be used.
 * @member {object} [localTimestamp] 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.
 * @member {string} [localTimestamp.format] An enum that represents the format
 * of the local timestamp property that needs to be set. Possible values
 * include: 'Embedded', 'Iana', 'TimeSpan'
 * @member {object} [localTimestamp.timeZoneOffset] An object that represents
 * the offset information for the local timestamp format specified. Should not
 * be specified for LocalTimestampFormat - Embedded.
 * @member {string} [localTimestamp.timeZoneOffset.propertyName] 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)
 * @member {string} [sharedAccessKey] The value of the shared access key that
 * grants the Time Series Insights service read access to the event hub. This
 * property is not shown in event source responses.
 */
export interface EventHubEventSourceUpdateParameters extends EventSourceUpdateParameters {
  timestampPropertyName?: string;
  localTimestamp?: LocalTimestamp;
  sharedAccessKey?: string;
}

/**
 * @class
 * Initializes a new instance of the IoTHubEventSourceUpdateParameters class.
 * @constructor
 * Parameters supplied to the Update Event Source operation to update an IoTHub
 * event source.
 *
 * @member {string} [timestampPropertyName] The event property that will be
 * used as the event source's timestamp. If a value isn't specified for
 * timestampPropertyName, or if null or empty-string is specified, the event
 * creation time will be used.
 * @member {object} [localTimestamp] 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.
 * @member {string} [localTimestamp.format] An enum that represents the format
 * of the local timestamp property that needs to be set. Possible values
 * include: 'Embedded', 'Iana', 'TimeSpan'
 * @member {object} [localTimestamp.timeZoneOffset] An object that represents
 * the offset information for the local timestamp format specified. Should not
 * be specified for LocalTimestampFormat - Embedded.
 * @member {string} [localTimestamp.timeZoneOffset.propertyName] 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)
 * @member {string} [sharedAccessKey] The value of the shared access key that
 * grants the Time Series Insights service read access to the iot hub. This
 * property is not shown in event source responses.
 */
export interface IoTHubEventSourceUpdateParameters extends EventSourceUpdateParameters {
  timestampPropertyName?: string;
  localTimestamp?: LocalTimestamp;
  sharedAccessKey?: string;
}

/**
 * @class
 * Initializes a new instance of the EventSourceResource class.
 * @constructor
 * An environment receives data from one or more event sources. Each event
 * source has associated connection info that allows the Time Series Insights
 * ingress pipeline to connect to and pull data from the event source
 *
 * @member {string} kind Polymorphic Discriminator
 */
export interface EventSourceResource extends TrackedResource {
  kind: string;
}

/**
 * @class
 * Initializes a new instance of the EventSourceListResponse class.
 * @constructor
 * The response of the List EventSources operation.
 *
 * @member {array} [value] Result of the List EventSources operation.
 */
export interface EventSourceListResponse {
  value?: EventSourceResource[];
}

/**
 * @class
 * Initializes a new instance of the EventHubEventSourceResource class.
 * @constructor
 * An event source that receives its data from an Azure EventHub.
 *
 * @member {string} [provisioningState] Provisioning state of the resource.
 * Possible values include: 'Accepted', 'Creating', 'Updating', 'Succeeded',
 * 'Failed', 'Deleting'
 * @member {date} [creationTime] The time the resource was created.
 * @member {string} [timestampPropertyName] The event property that will be
 * used as the event source's timestamp. If a value isn't specified for
 * timestampPropertyName, or if null or empty-string is specified, the event
 * creation time will be used.
 * @member {string} eventSourceResourceId The resource id of the event source
 * in Azure Resource Manager.
 * @member {string} serviceBusNamespace The name of the service bus that
 * contains the event hub.
 * @member {string} eventHubName The name of the event hub.
 * @member {string} consumerGroupName The name of the event hub's consumer
 * group that holds the partitions from which events will be read.
 * @member {string} keyName The name of the SAS key that grants the Time Series
 * Insights service access to the event hub. The shared access policies for
 * this key must grant 'Listen' permissions to the event hub.
 */
export interface EventHubEventSourceResource extends EventSourceResource {
  provisioningState?: string;
  readonly creationTime?: Date;
  timestampPropertyName?: string;
  eventSourceResourceId: string;
  serviceBusNamespace: string;
  eventHubName: string;
  consumerGroupName: string;
  keyName: string;
}

/**
 * @class
 * Initializes a new instance of the IoTHubEventSourceResource class.
 * @constructor
 * An event source that receives its data from an Azure IoTHub.
 *
 * @member {string} [provisioningState] Provisioning state of the resource.
 * Possible values include: 'Accepted', 'Creating', 'Updating', 'Succeeded',
 * 'Failed', 'Deleting'
 * @member {date} [creationTime] The time the resource was created.
 * @member {string} [timestampPropertyName] The event property that will be
 * used as the event source's timestamp. If a value isn't specified for
 * timestampPropertyName, or if null or empty-string is specified, the event
 * creation time will be used.
 * @member {string} eventSourceResourceId The resource id of the event source
 * in Azure Resource Manager.
 * @member {string} iotHubName The name of the iot hub.
 * @member {string} consumerGroupName The name of the iot hub's consumer group
 * that holds the partitions from which events will be read.
 * @member {string} keyName The name of the Shared Access Policy key that
 * grants the Time Series Insights service access to the iot hub. This shared
 * access policy key must grant 'service connect' permissions to the iot hub.
 */
export interface IoTHubEventSourceResource extends EventSourceResource {
  provisioningState?: string;
  readonly creationTime?: Date;
  timestampPropertyName?: string;
  eventSourceResourceId: string;
  iotHubName: string;
  consumerGroupName: string;
  keyName: string;
}

/**
 * @class
 * Initializes a new instance of the EventSourceCommonProperties class.
 * @constructor
 * Properties of the event source.
 *
 * @member {string} [timestampPropertyName] The event property that will be
 * used as the event source's timestamp. If a value isn't specified for
 * timestampPropertyName, or if null or empty-string is specified, the event
 * creation time will be used.
 */
export interface EventSourceCommonProperties extends ResourceProperties {
  timestampPropertyName?: string;
}

/**
 * @class
 * Initializes a new instance of the AzureEventSourceProperties class.
 * @constructor
 * Properties of an event source that reads events from an event broker in
 * Azure.
 *
 * @member {string} eventSourceResourceId The resource id of the event source
 * in Azure Resource Manager.
 */
export interface AzureEventSourceProperties extends EventSourceCommonProperties {
  eventSourceResourceId: string;
}

/**
 * @class
 * Initializes a new instance of the EventHubEventSourceCommonProperties class.
 * @constructor
 * Properties of the EventHub event source.
 *
 * @member {string} serviceBusNamespace The name of the service bus that
 * contains the event hub.
 * @member {string} eventHubName The name of the event hub.
 * @member {string} consumerGroupName The name of the event hub's consumer
 * group that holds the partitions from which events will be read.
 * @member {string} keyName The name of the SAS key that grants the Time Series
 * Insights service access to the event hub. The shared access policies for
 * this key must grant 'Listen' permissions to the event hub.
 */
export interface EventHubEventSourceCommonProperties extends AzureEventSourceProperties {
  serviceBusNamespace: string;
  eventHubName: string;
  consumerGroupName: string;
  keyName: string;
}

/**
 * @class
 * Initializes a new instance of the IoTHubEventSourceCommonProperties class.
 * @constructor
 * Properties of the IoTHub event source.
 *
 * @member {string} iotHubName The name of the iot hub.
 * @member {string} consumerGroupName The name of the iot hub's consumer group
 * that holds the partitions from which events will be read.
 * @member {string} keyName The name of the Shared Access Policy key that
 * grants the Time Series Insights service access to the iot hub. This shared
 * access policy key must grant 'service connect' permissions to the iot hub.
 */
export interface IoTHubEventSourceCommonProperties extends AzureEventSourceProperties {
  iotHubName: string;
  consumerGroupName: string;
  keyName: string;
}

/**
 * @class
 * Initializes a new instance of the LocalTimestampTimeZoneOffset class.
 * @constructor
 * An object that represents the offset information for the local timestamp
 * format specified. Should not be specified for LocalTimestampFormat -
 * Embedded.
 *
 * @member {string} [propertyName] 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)
 */
export interface LocalTimestampTimeZoneOffset {
  propertyName?: string;
}

/**
 * @class
 * Initializes a new instance of the LocalTimestamp class.
 * @constructor
 * 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.
 *
 * @member {string} [format] An enum that represents the format of the local
 * timestamp property that needs to be set. Possible values include:
 * 'Embedded', 'Iana', 'TimeSpan'
 * @member {object} [timeZoneOffset] An object that represents the offset
 * information for the local timestamp format specified. Should not be
 * specified for LocalTimestampFormat - Embedded.
 * @member {string} [timeZoneOffset.propertyName] 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)
 */
export interface LocalTimestamp {
  format?: string;
  timeZoneOffset?: LocalTimestampTimeZoneOffset;
}

/**
 * @class
 * Initializes a new instance of the EventSourceMutableProperties class.
 * @constructor
 * An object that represents a set of mutable event source resource properties.
 *
 * @member {string} [timestampPropertyName] The event property that will be
 * used as the event source's timestamp. If a value isn't specified for
 * timestampPropertyName, or if null or empty-string is specified, the event
 * creation time will be used.
 * @member {object} [localTimestamp] 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.
 * @member {string} [localTimestamp.format] An enum that represents the format
 * of the local timestamp property that needs to be set. Possible values
 * include: 'Embedded', 'Iana', 'TimeSpan'
 * @member {object} [localTimestamp.timeZoneOffset] An object that represents
 * the offset information for the local timestamp format specified. Should not
 * be specified for LocalTimestampFormat - Embedded.
 * @member {string} [localTimestamp.timeZoneOffset.propertyName] 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)
 */
export interface EventSourceMutableProperties {
  timestampPropertyName?: string;
  localTimestamp?: LocalTimestamp;
}

/**
 * @class
 * Initializes a new instance of the ReferenceDataSetKeyProperty class.
 * @constructor
 * A key property for the reference data set. A reference data set can have
 * multiple key properties.
 *
 * @member {string} [name] The name of the key property.
 * @member {string} [type] The type of the key property. Possible values
 * include: 'String', 'Double', 'Bool', 'DateTime'
 */
export interface ReferenceDataSetKeyProperty {
  name?: string;
  type?: string;
}

/**
 * @class
 * Initializes a new instance of the ReferenceDataSetCreateOrUpdateParameters class.
 * @constructor
 * @member {array} keyProperties The list of key properties for the reference
 * data set.
 * @member {string} [dataStringComparisonBehavior] The reference data set key
 * comparison behavior can be set using this property. By default, the value is
 * 'Ordinal' - which means case sensitive key comparison will be performed
 * while joining reference data with events or while adding new reference data.
 * When 'OrdinalIgnoreCase' is set, case insensitive comparison will be used.
 * Possible values include: 'Ordinal', 'OrdinalIgnoreCase'
 */
export interface ReferenceDataSetCreateOrUpdateParameters extends CreateOrUpdateTrackedResourceProperties {
  keyProperties: ReferenceDataSetKeyProperty[];
  dataStringComparisonBehavior?: string;
}

/**
 * @class
 * Initializes a new instance of the ReferenceDataSetUpdateParameters class.
 * @constructor
 * Parameters supplied to the Update Reference Data Set operation.
 *
 * @member {object} [tags] Key-value pairs of additional properties for the
 * reference data set.
 */
export interface ReferenceDataSetUpdateParameters {
  tags?: { [propertyName: string]: string };
}

/**
 * @class
 * Initializes a new instance of the ReferenceDataSetResource class.
 * @constructor
 * A reference data set provides metadata about the events in an environment.
 * Metadata in the reference data set will be joined with events as they are
 * read from event sources. The metadata that makes up the reference data set
 * is uploaded or modified through the Time Series Insights data plane APIs.
 *
 * @member {array} keyProperties The list of key properties for the reference
 * data set.
 * @member {string} [dataStringComparisonBehavior] The reference data set key
 * comparison behavior can be set using this property. By default, the value is
 * 'Ordinal' - which means case sensitive key comparison will be performed
 * while joining reference data with events or while adding new reference data.
 * When 'OrdinalIgnoreCase' is set, case insensitive comparison will be used.
 * Possible values include: 'Ordinal', 'OrdinalIgnoreCase'
 * @member {string} [provisioningState] Provisioning state of the resource.
 * Possible values include: 'Accepted', 'Creating', 'Updating', 'Succeeded',
 * 'Failed', 'Deleting'
 * @member {date} [creationTime] The time the resource was created.
 */
export interface ReferenceDataSetResource extends TrackedResource {
  keyProperties: ReferenceDataSetKeyProperty[];
  dataStringComparisonBehavior?: string;
  provisioningState?: string;
  readonly creationTime?: Date;
}

/**
 * @class
 * Initializes a new instance of the ReferenceDataSetListResponse class.
 * @constructor
 * The response of the List Reference Data Sets operation.
 *
 * @member {array} [value] Result of the List Reference Data Sets operation.
 */
export interface ReferenceDataSetListResponse {
  value?: ReferenceDataSetResource[];
}

/**
 * @class
 * Initializes a new instance of the AccessPolicyCreateOrUpdateParameters class.
 * @constructor
 * @member {string} [principalObjectId] The objectId of the principal in Azure
 * Active Directory.
 * @member {string} [description] An description of the access policy.
 * @member {array} [roles] The list of roles the principal is assigned on the
 * environment.
 */
export interface AccessPolicyCreateOrUpdateParameters {
  principalObjectId?: string;
  description?: string;
  roles?: string[];
}

/**
 * @class
 * Initializes a new instance of the AccessPolicyUpdateParameters class.
 * @constructor
 * @member {string} [description] An description of the access policy.
 * @member {array} [roles] The list of roles the principal is assigned on the
 * environment.
 */
export interface AccessPolicyUpdateParameters {
  description?: string;
  roles?: string[];
}

/**
 * @class
 * Initializes a new instance of the AccessPolicyResource class.
 * @constructor
 * An access policy is used to grant users and applications access to the
 * environment. Roles are assigned to service principals in Azure Active
 * Directory. These roles define the actions the principal can perform through
 * the Time Series Insights data plane APIs.
 *
 * @member {string} [principalObjectId] The objectId of the principal in Azure
 * Active Directory.
 * @member {string} [description] An description of the access policy.
 * @member {array} [roles] The list of roles the principal is assigned on the
 * environment.
 */
export interface AccessPolicyResource extends Resource {
  principalObjectId?: string;
  description?: string;
  roles?: string[];
}

/**
 * @class
 * Initializes a new instance of the AccessPolicyListResponse class.
 * @constructor
 * The response of the List access policies operation.
 *
 * @member {array} [value] Result of the List access policies operation.
 */
export interface AccessPolicyListResponse {
  value?: AccessPolicyResource[];
}


/**
 * @class
 * Initializes a new instance of the OperationListResult class.
 * @constructor
 * Result of the request to list Time Series Insights operations. It contains a
 * list of operations and a URL link to get the next set of results.
 *
 * @member {string} [nextLink] URL to get the next set of operation list
 * results if there are any.
 */
export interface OperationListResult extends Array<Operation> {
  readonly nextLink?: string;
}
