text:
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 ErrorFieldContract class.
 * @constructor
 * Error Field contract.
 *
 * @member {string} [code] Property level error code.
 * @member {string} [message] Human-readable representation of property-level
 * error.
 * @member {string} [target] Property name.
 */
export interface ErrorFieldContract {
  code?: string;
  message?: string;
  target?: string;
}

/**
 * @class
 * Initializes a new instance of the ErrorResponse class.
 * @constructor
 * Error Body contract.
 *
 * @member {string} [code] Service-defined error code. This code serves as a
 * sub-status for the HTTP error code specified in the response.
 * @member {string} [message] Human-readable representation of the error.
 * @member {array} [details] The list of invalid fields send in request, in
 * case of validation error.
 */
export interface ErrorResponse {
  code?: string;
  message?: string;
  details?: ErrorFieldContract[];
}

/**
 * @class
 * Initializes a new instance of the Resource class.
 * @constructor
 * The Resource definition.
 *
 * @member {string} [id] Resource ID.
 * @member {string} [name] Resource name.
 * @member {string} [type] Resource type for API Management resource.
 */
export interface Resource extends BaseResource {
  readonly id?: string;
  readonly name?: string;
  readonly type?: string;
}

/**
 * @class
 * Initializes a new instance of the PolicyContract class.
 * @constructor
 * Policy Contract details.
 *
 * @member {string} policyContent Json escaped Xml Encoded contents of the
 * Policy.
 * @member {string} [contentFormat] Format of the policyContent. Possible
 * values include: 'xml', 'xml-link'. Default value: 'xml' .
 */
export interface PolicyContract extends Resource {
  policyContent: string;
  contentFormat?: string;
}

/**
 * @class
 * Initializes a new instance of the PolicyCollection class.
 * @constructor
 * The response of the list policy operation.
 *
 * @member {array} [value] Policy Contract value.
 * @member {string} [nextLink] Next page link if any.
 */
export interface PolicyCollection {
  value?: PolicyContract[];
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the PolicySnippetContract class.
 * @constructor
 * Policy snippet.
 *
 * @member {string} [name] Snippet name.
 * @member {string} [content] Snippet content.
 * @member {string} [toolTip] Snippet toolTip.
 * @member {number} [scope] Binary OR value of the Snippet scope.
 */
export interface PolicySnippetContract {
  readonly name?: string;
  readonly content?: string;
  readonly toolTip?: string;
  readonly scope?: number;
}

/**
 * @class
 * Initializes a new instance of the PolicySnippetsCollection class.
 * @constructor
 * The response of the list policy snippets operation.
 *
 * @member {array} [value] Policy snippet value.
 */
export interface PolicySnippetsCollection {
  value?: PolicySnippetContract[];
}

/**
 * @class
 * Initializes a new instance of the RegionContract class.
 * @constructor
 * Region profile.
 *
 * @member {string} [name] Region name.
 * @member {boolean} [isMasterRegion] whether Region is the master region.
 * @member {boolean} [isDeleted] whether Region is deleted.
 */
export interface RegionContract {
  readonly name?: string;
  isMasterRegion?: boolean;
  isDeleted?: boolean;
}

/**
 * @class
 * Initializes a new instance of the ApiExportResult class.
 * @constructor
 * API Export result Blob Uri.
 *
 * @member {string} [link] Link to the Storage Blob containing the result of
 * the export operation. The Blob Uri is only valid for 5 minutes.
 */
export interface ApiExportResult {
  link?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiVersionSetContractDetails class.
 * @constructor
 * An API Version Set contains the common configuration for a set of API
 * Versions relating
 *
 * @member {string} [id] Identifier for existing API Version Set. Omit this
 * value to create a new Version Set.
 * @member {string} [description] Description of API Version Set.
 * @member {string} [versioningScheme] An value that determines where the API
 * Version identifer will be located in a HTTP request. Possible values
 * include: 'Segment', 'Query', 'Header'
 * @member {string} [versionQueryName] Name of query parameter that indicates
 * the API Version if versioningScheme is set to `query`.
 * @member {string} [versionHeaderName] Name of HTTP header parameter that
 * indicates the API Version if versioningScheme is set to `header`.
 */
export interface ApiVersionSetContractDetails {
  id?: string;
  description?: string;
  versioningScheme?: string;
  versionQueryName?: string;
  versionHeaderName?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiEntityBaseContract class.
 * @constructor
 * API base contract details.
 *
 * @member {string} [description] Description of the API. May include HTML
 * formatting tags.
 * @member {object} [authenticationSettings] Collection of authentication
 * settings included into this API.
 * @member {object} [authenticationSettings.oAuth2] OAuth2 Authentication
 * settings
 * @member {string} [authenticationSettings.oAuth2.authorizationServerId] OAuth
 * authorization server identifier.
 * @member {string} [authenticationSettings.oAuth2.scope] operations scope.
 * @member {object} [subscriptionKeyParameterNames] Protocols over which API is
 * made available.
 * @member {string} [subscriptionKeyParameterNames.header] Subscription key
 * header name.
 * @member {string} [subscriptionKeyParameterNames.query] Subscription key
 * query string parameter name.
 * @member {string} [apiType] Type of API. Possible values include: 'http',
 * 'soap'
 * @member {string} [apiRevision] Describes the Revision of the Api. If no
 * value is provided, default revision 1 is created
 * @member {string} [apiVersion] Indicates the Version identifier of the API if
 * the API is versioned
 * @member {boolean} [isCurrent] Indicates if API revision is current api
 * revision.
 * @member {boolean} [isOnline] Indicates if API revision is accessible via the
 * gateway.
 * @member {string} [apiVersionSetId] A resource identifier for the related
 * ApiVersionSet.
 */
export interface ApiEntityBaseContract {
  description?: string;
  authenticationSettings?: AuthenticationSettingsContract;
  subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract;
  apiType?: string;
  apiRevision?: string;
  apiVersion?: string;
  readonly isCurrent?: boolean;
  readonly isOnline?: boolean;
  apiVersionSetId?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiContractProperties class.
 * @constructor
 * Api Entity Properties
 *
 * @member {string} [displayName] API name.
 * @member {string} [serviceUrl] Absolute URL of the backend service
 * implementing this API.
 * @member {string} path Relative URL uniquely identifying this API and all of
 * its resource paths within the API Management service instance. It is
 * appended to the API endpoint base URL specified during the service instance
 * creation to form a public URL for this API.
 * @member {array} [protocols] Describes on which protocols the operations in
 * this API can be invoked.
 * @member {object} [apiVersionSet]
 * @member {string} [apiVersionSet.id] Identifier for existing API Version Set.
 * Omit this value to create a new Version Set.
 * @member {string} [apiVersionSet.description] Description of API Version Set.
 * @member {string} [apiVersionSet.versioningScheme] An value that determines
 * where the API Version identifer will be located in a HTTP request. Possible
 * values include: 'Segment', 'Query', 'Header'
 * @member {string} [apiVersionSet.versionQueryName] Name of query parameter
 * that indicates the API Version if versioningScheme is set to `query`.
 * @member {string} [apiVersionSet.versionHeaderName] Name of HTTP header
 * parameter that indicates the API Version if versioningScheme is set to
 * `header`.
 */
export interface ApiContractProperties extends ApiEntityBaseContract {
  displayName?: string;
  serviceUrl?: string;
  path: string;
  protocols?: string[];
  apiVersionSet?: ApiVersionSetContractDetails;
}

/**
 * @class
 * Initializes a new instance of the ApiContract class.
 * @constructor
 * API details.
 *
 * @member {string} [description] Description of the API. May include HTML
 * formatting tags.
 * @member {object} [authenticationSettings] Collection of authentication
 * settings included into this API.
 * @member {object} [authenticationSettings.oAuth2] OAuth2 Authentication
 * settings
 * @member {string} [authenticationSettings.oAuth2.authorizationServerId] OAuth
 * authorization server identifier.
 * @member {string} [authenticationSettings.oAuth2.scope] operations scope.
 * @member {object} [subscriptionKeyParameterNames] Protocols over which API is
 * made available.
 * @member {string} [subscriptionKeyParameterNames.header] Subscription key
 * header name.
 * @member {string} [subscriptionKeyParameterNames.query] Subscription key
 * query string parameter name.
 * @member {string} [apiType] Type of API. Possible values include: 'http',
 * 'soap'
 * @member {string} [apiRevision] Describes the Revision of the Api. If no
 * value is provided, default revision 1 is created
 * @member {string} [apiVersion] Indicates the Version identifier of the API if
 * the API is versioned
 * @member {boolean} [isCurrent] Indicates if API revision is current api
 * revision.
 * @member {boolean} [isOnline] Indicates if API revision is accessible via the
 * gateway.
 * @member {string} [apiVersionSetId] A resource identifier for the related
 * ApiVersionSet.
 * @member {string} [displayName] API name.
 * @member {string} [serviceUrl] Absolute URL of the backend service
 * implementing this API.
 * @member {string} path Relative URL uniquely identifying this API and all of
 * its resource paths within the API Management service instance. It is
 * appended to the API endpoint base URL specified during the service instance
 * creation to form a public URL for this API.
 * @member {array} [protocols] Describes on which protocols the operations in
 * this API can be invoked.
 * @member {object} [apiVersionSet]
 * @member {string} [apiVersionSet.id] Identifier for existing API Version Set.
 * Omit this value to create a new Version Set.
 * @member {string} [apiVersionSet.description] Description of API Version Set.
 * @member {string} [apiVersionSet.versioningScheme] An value that determines
 * where the API Version identifer will be located in a HTTP request. Possible
 * values include: 'Segment', 'Query', 'Header'
 * @member {string} [apiVersionSet.versionQueryName] Name of query parameter
 * that indicates the API Version if versioningScheme is set to `query`.
 * @member {string} [apiVersionSet.versionHeaderName] Name of HTTP header
 * parameter that indicates the API Version if versioningScheme is set to
 * `header`.
 */
export interface ApiContract extends Resource {
  description?: string;
  authenticationSettings?: AuthenticationSettingsContract;
  subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract;
  apiType?: string;
  apiRevision?: string;
  apiVersion?: string;
  readonly isCurrent?: boolean;
  readonly isOnline?: boolean;
  apiVersionSetId?: string;
  displayName?: string;
  serviceUrl?: string;
  path: string;
  protocols?: string[];
  apiVersionSet?: ApiVersionSetContractDetails;
}

/**
 * @class
 * Initializes a new instance of the ApiCreateOrUpdatePropertiesWsdlSelector class.
 * @constructor
 * Criteria to limit import of WSDL to a subset of the document.
 *
 * @member {string} [wsdlServiceName] Name of service to import from WSDL
 * @member {string} [wsdlEndpointName] Name of endpoint(port) to import from
 * WSDL
 */
export interface ApiCreateOrUpdatePropertiesWsdlSelector {
  wsdlServiceName?: string;
  wsdlEndpointName?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiCreateOrUpdateParameter class.
 * @constructor
 * API Create or Update Parameters.
 *
 * @member {string} [description] Description of the API. May include HTML
 * formatting tags.
 * @member {object} [authenticationSettings] Collection of authentication
 * settings included into this API.
 * @member {object} [authenticationSettings.oAuth2] OAuth2 Authentication
 * settings
 * @member {string} [authenticationSettings.oAuth2.authorizationServerId] OAuth
 * authorization server identifier.
 * @member {string} [authenticationSettings.oAuth2.scope] operations scope.
 * @member {object} [subscriptionKeyParameterNames] Protocols over which API is
 * made available.
 * @member {string} [subscriptionKeyParameterNames.header] Subscription key
 * header name.
 * @member {string} [subscriptionKeyParameterNames.query] Subscription key
 * query string parameter name.
 * @member {string} [apiType] Type of API. Possible values include: 'http',
 * 'soap'
 * @member {string} [apiRevision] Describes the Revision of the Api. If no
 * value is provided, default revision 1 is created
 * @member {string} [apiVersion] Indicates the Version identifier of the API if
 * the API is versioned
 * @member {boolean} [isCurrent] Indicates if API revision is current api
 * revision.
 * @member {boolean} [isOnline] Indicates if API revision is accessible via the
 * gateway.
 * @member {string} [apiVersionSetId] A resource identifier for the related
 * ApiVersionSet.
 * @member {string} [displayName] API name.
 * @member {string} [serviceUrl] Absolute URL of the backend service
 * implementing this API.
 * @member {string} path Relative URL uniquely identifying this API and all of
 * its resource paths within the API Management service instance. It is
 * appended to the API endpoint base URL specified during the service instance
 * creation to form a public URL for this API.
 * @member {array} [protocols] Describes on which protocols the operations in
 * this API can be invoked.
 * @member {object} [apiVersionSet]
 * @member {string} [apiVersionSet.id] Identifier for existing API Version Set.
 * Omit this value to create a new Version Set.
 * @member {string} [apiVersionSet.description] Description of API Version Set.
 * @member {string} [apiVersionSet.versioningScheme] An value that determines
 * where the API Version identifer will be located in a HTTP request. Possible
 * values include: 'Segment', 'Query', 'Header'
 * @member {string} [apiVersionSet.versionQueryName] Name of query parameter
 * that indicates the API Version if versioningScheme is set to `query`.
 * @member {string} [apiVersionSet.versionHeaderName] Name of HTTP header
 * parameter that indicates the API Version if versioningScheme is set to
 * `header`.
 * @member {string} [contentValue] Content value when Importing an API.
 * @member {string} [contentFormat] Format of the Content in which the API is
 * getting imported. Possible values include: 'wadl-xml', 'wadl-link-json',
 * 'swagger-json', 'swagger-link-json', 'wsdl', 'wsdl-link'
 * @member {object} [wsdlSelector] Criteria to limit import of WSDL to a subset
 * of the document.
 * @member {string} [wsdlSelector.wsdlServiceName] Name of service to import
 * from WSDL
 * @member {string} [wsdlSelector.wsdlEndpointName] Name of endpoint(port) to
 * import from WSDL
 * @member {string} [soapApiType] Type of Api to create.
 * * `http` creates a SOAP to REST API
 * * `soap` creates a SOAP pass-through API. Possible values include:
 * 'SoapToRest', 'SoapPassThrough'
 */
export interface ApiCreateOrUpdateParameter {
  description?: string;
  authenticationSettings?: AuthenticationSettingsContract;
  subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract;
  apiType?: string;
  apiRevision?: string;
  apiVersion?: string;
  readonly isCurrent?: boolean;
  readonly isOnline?: boolean;
  apiVersionSetId?: string;
  displayName?: string;
  serviceUrl?: string;
  path: string;
  protocols?: string[];
  apiVersionSet?: ApiVersionSetContractDetails;
  contentValue?: string;
  contentFormat?: string;
  wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector;
  soapApiType?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiUpdateContract class.
 * @constructor
 * API update contract details.
 *
 * @member {string} [description] Description of the API. May include HTML
 * formatting tags.
 * @member {object} [authenticationSettings] Collection of authentication
 * settings included into this API.
 * @member {object} [authenticationSettings.oAuth2] OAuth2 Authentication
 * settings
 * @member {string} [authenticationSettings.oAuth2.authorizationServerId] OAuth
 * authorization server identifier.
 * @member {string} [authenticationSettings.oAuth2.scope] operations scope.
 * @member {object} [subscriptionKeyParameterNames] Protocols over which API is
 * made available.
 * @member {string} [subscriptionKeyParameterNames.header] Subscription key
 * header name.
 * @member {string} [subscriptionKeyParameterNames.query] Subscription key
 * query string parameter name.
 * @member {string} [apiType] Type of API. Possible values include: 'http',
 * 'soap'
 * @member {string} [apiRevision] Describes the Revision of the Api. If no
 * value is provided, default revision 1 is created
 * @member {string} [apiVersion] Indicates the Version identifier of the API if
 * the API is versioned
 * @member {boolean} [isCurrent] Indicates if API revision is current api
 * revision.
 * @member {boolean} [isOnline] Indicates if API revision is accessible via the
 * gateway.
 * @member {string} [apiVersionSetId] A resource identifier for the related
 * ApiVersionSet.
 * @member {string} [displayName] API name.
 * @member {string} [serviceUrl] Absolute URL of the backend service
 * implementing this API.
 * @member {string} [path] Relative URL uniquely identifying this API and all
 * of its resource paths within the API Management service instance. It is
 * appended to the API endpoint base URL specified during the service instance
 * creation to form a public URL for this API.
 * @member {array} [protocols] Describes on which protocols the operations in
 * this API can be invoked.
 */
export interface ApiUpdateContract {
  description?: string;
  authenticationSettings?: AuthenticationSettingsContract;
  subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract;
  apiType?: string;
  apiRevision?: string;
  apiVersion?: string;
  readonly isCurrent?: boolean;
  readonly isOnline?: boolean;
  apiVersionSetId?: string;
  displayName?: string;
  serviceUrl?: string;
  path?: string;
  protocols?: string[];
}

/**
 * @class
 * Initializes a new instance of the OAuth2AuthenticationSettingsContract class.
 * @constructor
 * API OAuth2 Authentication settings details.
 *
 * @member {string} [authorizationServerId] OAuth authorization server
 * identifier.
 * @member {string} [scope] operations scope.
 */
export interface OAuth2AuthenticationSettingsContract {
  authorizationServerId?: string;
  scope?: string;
}

/**
 * @class
 * Initializes a new instance of the AuthenticationSettingsContract class.
 * @constructor
 * API Authentication Settings.
 *
 * @member {object} [oAuth2] OAuth2 Authentication settings
 * @member {string} [oAuth2.authorizationServerId] OAuth authorization server
 * identifier.
 * @member {string} [oAuth2.scope] operations scope.
 */
export interface AuthenticationSettingsContract {
  oAuth2?: OAuth2AuthenticationSettingsContract;
}

/**
 * @class
 * Initializes a new instance of the SubscriptionKeyParameterNamesContract class.
 * @constructor
 * Subscription key parameter names details.
 *
 * @member {string} [header] Subscription key header name.
 * @member {string} [query] Subscription key query string parameter name.
 */
export interface SubscriptionKeyParameterNamesContract {
  header?: string;
  query?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiRevisionContract class.
 * @constructor
 * Summary of revision metadata.
 *
 * @member {string} [apiId] Identifier of the API Revision.
 * @member {string} [apiRevision] Revision number of API.
 * @member {date} [createdDateTime] The time the API Revision was created. The
 * date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by
 * the ISO 8601 standard.
 * @member {date} [updatedDateTime] The time the API Revision were updated. The
 * date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by
 * the ISO 8601 standard.
 * @member {string} [description] Description of the API Revision.
 * @member {string} [privateUrl] Gateway URL for accessing the non-current API
 * Revision.
 * @member {boolean} [isOnline] Indicates if API revision is the current api
 * revision.
 * @member {boolean} [isCurrent] Indicates if API revision is accessible via
 * the gateway.
 */
export interface ApiRevisionContract {
  readonly apiId?: string;
  readonly apiRevision?: string;
  readonly createdDateTime?: Date;
  readonly updatedDateTime?: Date;
  readonly description?: string;
  readonly privateUrl?: string;
  readonly isOnline?: boolean;
  readonly isCurrent?: boolean;
}

/**
 * @class
 * Initializes a new instance of the ApiRevisionInfoContract class.
 * @constructor
 * Object used to create an API Revision or Version based on an existing API
 * Revision
 *
 * @member {string} [sourceApiId] Resource identifier of API to be used to
 * create the revision from.
 * @member {string} [apiVersionName] Version identifier for the new API
 * Version.
 * @member {string} [apiRevisionDescription] Description of new API Revision.
 * @member {object} [apiVersionSet] Version set details
 * @member {string} [apiVersionSet.id] Identifier for existing API Version Set.
 * Omit this value to create a new Version Set.
 * @member {string} [apiVersionSet.description] Description of API Version Set.
 * @member {string} [apiVersionSet.versioningScheme] An value that determines
 * where the API Version identifer will be located in a HTTP request. Possible
 * values include: 'Segment', 'Query', 'Header'
 * @member {string} [apiVersionSet.versionQueryName] Name of query parameter
 * that indicates the API Version if versioningScheme is set to `query`.
 * @member {string} [apiVersionSet.versionHeaderName] Name of HTTP header
 * parameter that indicates the API Version if versioningScheme is set to
 * `header`.
 */
export interface ApiRevisionInfoContract {
  sourceApiId?: string;
  apiVersionName?: string;
  apiRevisionDescription?: string;
  apiVersionSet?: ApiVersionSetContractDetails;
}

/**
 * @class
 * Initializes a new instance of the ApiReleaseContract class.
 * @constructor
 * Api Release details.
 *
 * @member {string} [apiId] Identifier of the API the release belongs to.
 * @member {date} [createdDateTime] The time the API was released. The date
 * conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the
 * ISO 8601 standard.
 * @member {date} [updatedDateTime] The time the API release was updated.
 * @member {string} [notes] Release Notes
 */
export interface ApiReleaseContract extends Resource {
  apiId?: string;
  readonly createdDateTime?: Date;
  readonly updatedDateTime?: Date;
  notes?: string;
}

/**
 * @class
 * Initializes a new instance of the OperationContract class.
 * @constructor
 * Api Operation details.
 *
 * @member {array} [templateParameters] Collection of URL template parameters.
 * @member {string} [description] Description of the operation. May include
 * HTML formatting tags.
 * @member {object} [request] An entity containing request details.
 * @member {string} [request.description] Operation request description.
 * @member {array} [request.queryParameters] Collection of operation request
 * query parameters.
 * @member {array} [request.headers] Collection of operation request headers.
 * @member {array} [request.representations] Collection of operation request
 * representations.
 * @member {array} [responses] Array of Operation responses.
 * @member {string} [policies] Operation Policies
 * @member {string} displayName Operation Name.
 * @member {string} method A Valid HTTP Operation Method. Typical Http Methods
 * like GET, PUT, POST but not limited by only them.
 * @member {string} urlTemplate Relative URL template identifying the target
 * resource for this operation. May include parameters. Example:
 * /customers/{cid}/orders/{oid}/?date={date}
 */
export interface OperationContract extends Resource {
  templateParameters?: ParameterContract[];
  description?: string;
  request?: RequestContract;
  responses?: ResponseContract[];
  policies?: string;
  displayName: string;
  method: string;
  urlTemplate: string;
}

/**
 * @class
 * Initializes a new instance of the ParameterContract class.
 * @constructor
 * Operation parameters details.
 *
 * @member {string} name Parameter name.
 * @member {string} [description] Parameter description.
 * @member {string} type Parameter type.
 * @member {string} [defaultValue] Default parameter value.
 * @member {boolean} [required] whether parameter is required or not.
 * @member {array} [values] Parameter values.
 */
export interface ParameterContract {
  name: string;
  description?: string;
  type: string;
  defaultValue?: string;
  required?: boolean;
  values?: string[];
}

/**
 * @class
 * Initializes a new instance of the RepresentationContract class.
 * @constructor
 * Operation request/response representation details.
 *
 * @member {string} contentType Specifies a registered or custom content type
 * for this representation, e.g. application/xml.
 * @member {string} [sample] An example of the representation.
 * @member {string} [schemaId] Schema identifier. Applicable only if
 * 'contentType' value is neither 'application/x-www-form-urlencoded' nor
 * 'multipart/form-data'.
 * @member {string} [typeName] Type name defined by the schema. Applicable only
 * if 'contentType' value is neither 'application/x-www-form-urlencoded' nor
 * 'multipart/form-data'.
 * @member {array} [formParameters] Collection of form parameters. Required if
 * 'contentType' value is either 'application/x-www-form-urlencoded' or
 * 'multipart/form-data'..
 */
export interface RepresentationContract {
  contentType: string;
  sample?: string;
  schemaId?: string;
  typeName?: string;
  formParameters?: ParameterContract[];
}

/**
 * @class
 * Initializes a new instance of the RequestContract class.
 * @constructor
 * Operation request details.
 *
 * @member {string} [description] Operation request description.
 * @member {array} [queryParameters] Collection of operation request query
 * parameters.
 * @member {array} [headers] Collection of operation request headers.
 * @member {array} [representations] Collection of operation request
 * representations.
 */
export interface RequestContract {
  description?: string;
  queryParameters?: ParameterContract[];
  headers?: ParameterContract[];
  representations?: RepresentationContract[];
}

/**
 * @class
 * Initializes a new instance of the ResponseContract class.
 * @constructor
 * Operation response details.
 *
 * @member {number} statusCode Operation response HTTP status code.
 * @member {string} [description] Operation response description.
 * @member {array} [representations] Collection of operation response
 * representations.
 * @member {array} [headers] Collection of operation response headers.
 */
export interface ResponseContract {
  statusCode: number;
  description?: string;
  representations?: RepresentationContract[];
  headers?: ParameterContract[];
}

/**
 * @class
 * Initializes a new instance of the OperationEntityBaseContract class.
 * @constructor
 * Api Operation Entity Base Contract details.
 *
 * @member {array} [templateParameters] Collection of URL template parameters.
 * @member {string} [description] Description of the operation. May include
 * HTML formatting tags.
 * @member {object} [request] An entity containing request details.
 * @member {string} [request.description] Operation request description.
 * @member {array} [request.queryParameters] Collection of operation request
 * query parameters.
 * @member {array} [request.headers] Collection of operation request headers.
 * @member {array} [request.representations] Collection of operation request
 * representations.
 * @member {array} [responses] Array of Operation responses.
 * @member {string} [policies] Operation Policies
 */
export interface OperationEntityBaseContract {
  templateParameters?: ParameterContract[];
  description?: string;
  request?: RequestContract;
  responses?: ResponseContract[];
  policies?: string;
}

/**
 * @class
 * Initializes a new instance of the OperationUpdateContract class.
 * @constructor
 * Api Operation Update Contract details.
 *
 * @member {array} [templateParameters] Collection of URL template parameters.
 * @member {string} [description] Description of the operation. May include
 * HTML formatting tags.
 * @member {object} [request] An entity containing request details.
 * @member {string} [request.description] Operation request description.
 * @member {array} [request.queryParameters] Collection of operation request
 * query parameters.
 * @member {array} [request.headers] Collection of operation request headers.
 * @member {array} [request.representations] Collection of operation request
 * representations.
 * @member {array} [responses] Array of Operation responses.
 * @member {string} [policies] Operation Policies
 * @member {string} [displayName] Operation Name.
 * @member {string} [method] A Valid HTTP Operation Method. Typical Http
 * Methods like GET, PUT, POST but not limited by only them.
 * @member {string} [urlTemplate] Relative URL template identifying the target
 * resource for this operation. May include parameters. Example:
 * /customers/{cid}/orders/{oid}/?date={date}
 */
export interface OperationUpdateContract {
  templateParameters?: ParameterContract[];
  description?: string;
  request?: RequestContract;
  responses?: ResponseContract[];
  policies?: string;
  displayName?: string;
  method?: string;
  urlTemplate?: string;
}

/**
 * @class
 * Initializes a new instance of the SchemaContract class.
 * @constructor
 * Schema Contract details.
 *
 * @member {string} contentType Must be a valid a media type used in a
 * Content-Type header as defined in the RFC 2616. Media type of the schema
 * document (e.g. application/json, application/xml).
 * @member {string} [value] Json escaped string defining the document
 * representing the Schema.
 */
export interface SchemaContract extends Resource {
  contentType: string;
  value?: string;
}

/**
 * @class
 * Initializes a new instance of the LoggerContract class.
 * @constructor
 * Logger details.
 *
 * @member {string} loggerType Logger type. Possible values include:
 * 'azureEventHub', 'applicationInsights'
 * @member {string} [description] Logger description.
 * @member {object} credentials The name and SendRule connection string of the
 * event hub for azureEventHub logger.
 * Instrumentation key for applicationInsights logger.
 * @member {boolean} [isBuffered] Whether records are buffered in the logger
 * before publishing. Default is assumed to be true.
 */
export interface LoggerContract extends Resource {
  loggerType: string;
  description?: string;
  credentials: { [propertyName: string]: string };
  isBuffered?: boolean;
}

/**
 * @class
 * Initializes a new instance of the DiagnosticContract class.
 * @constructor
 * Diagnostic details.
 *
 * @member {boolean} enabled Indicates whether a diagnostic should receive data
 * or not.
 */
export interface DiagnosticContract extends Resource {
  enabled: boolean;
}

/**
 * @class
 * Initializes a new instance of the ProductEntityBaseParameters class.
 * @constructor
 * Product Entity Base Parameters
 *
 * @member {string} [description] Product description. May include HTML
 * formatting tags.
 * @member {string} [terms] Product terms of use. Developers trying to
 * subscribe to the product will be presented and required to accept these
 * terms before they can complete the subscription process.
 * @member {boolean} [subscriptionRequired] Whether a product subscription is
 * required for accessing APIs included in this product. If true, the product
 * is referred to as "protected" and a valid subscription key is required for a
 * request to an API included in the product to succeed. If false, the product
 * is referred to as "open" and requests to an API included in the product can
 * be made without a subscription key. If property is omitted when creating a
 * new product it's value is assumed to be true.
 * @member {boolean} [approvalRequired] whether subscription approval is
 * required. If false, new subscriptions will be approved automatically
 * enabling developers to call the product's APIs immediately after
 * subscribing. If true, administrators must manually approve the subscription
 * before the developer can any of the product's APIs. Can be present only if
 * subscriptionRequired property is present and has a value of false.
 * @member {number} [subscriptionsLimit] Whether the number of subscriptions a
 * user can have to this product at the same time. Set to null or omit to allow
 * unlimited per user subscriptions. Can be present only if
 * subscriptionRequired property is present and has a value of false.
 * @member {string} [state] whether product is published or not. Published
 * products are discoverable by users of developer portal. Non published
 * products are visible only to administrators. Default state of Product is
 * notPublished. Possible values include: 'notPublished', 'published'
 */
export interface ProductEntityBaseParameters {
  description?: string;
  terms?: string;
  subscriptionRequired?: boolean;
  approvalRequired?: boolean;
  subscriptionsLimit?: number;
  state?: string;
}

/**
 * @class
 * Initializes a new instance of the ProductTagResourceContractProperties class.
 * @constructor
 * Product profile.
 *
 * @member {string} [id] Identifier of the product in the form of
 * /products/{productId}
 * @member {string} name Product name.
 */
export interface ProductTagResourceContractProperties extends ProductEntityBaseParameters {
  id?: string;
  name: string;
}

/**
 * @class
 * Initializes a new instance of the OperationTagResourceContractProperties class.
 * @constructor
 * Operation Entity contract Properties.
 *
 * @member {string} [id] Identifier of the operation in form
 * /operations/{operationId}.
 * @member {string} [name] Operation name.
 * @member {string} [apiName] Api Name.
 * @member {string} [apiRevision] Api Revision.
 * @member {string} [apiVersion] Api Version.
 * @member {string} [description] Operation Description.
 * @member {string} [method] A Valid HTTP Operation Method. Typical Http
 * Methods like GET, PUT, POST but not limited by only them.
 * @member {string} [urlTemplate] Relative URL template identifying the target
 * resource for this operation. May include parameters. Example:
 * /customers/{cid}/orders/{oid}/?date={date}
 */
export interface OperationTagResourceContractProperties {
  id?: string;
  readonly name?: string;
  readonly apiName?: string;
  readonly apiRevision?: string;
  readonly apiVersion?: string;
  readonly description?: string;
  readonly method?: string;
  readonly urlTemplate?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiTagResourceContractProperties class.
 * @constructor
 * API contract properties for the Tag Resources.
 *
 * @member {string} [id] API identifier in the form /apis/{apiId}.
 * @member {string} [name] API name.
 * @member {string} [serviceUrl] Absolute URL of the backend service
 * implementing this API.
 * @member {string} [path] Relative URL uniquely identifying this API and all
 * of its resource paths within the API Management service instance. It is
 * appended to the API endpoint base URL specified during the service instance
 * creation to form a public URL for this API.
 * @member {array} [protocols] Describes on which protocols the operations in
 * this API can be invoked.
 */
export interface ApiTagResourceContractProperties extends ApiEntityBaseContract {
  id?: string;
  name?: string;
  serviceUrl?: string;
  path?: string;
  protocols?: string[];
}

/**
 * @class
 * Initializes a new instance of the TagTagResourceContractProperties class.
 * @constructor
 * Contract defining the Tag property in the Tag Resource Contract
 *
 * @member {string} [id] Tag identifier
 * @member {string} [name] Tag Name
 */
export interface TagTagResourceContractProperties {
  id?: string;
  name?: string;
}

/**
 * @class
 * Initializes a new instance of the TagResourceContract class.
 * @constructor
 * TagResource contract properties.
 *
 * @member {object} tag Tag associated with the resource.
 * @member {string} [tag.id] Tag identifier
 * @member {string} [tag.name] Tag Name
 * @member {object} [api] Api associated with the tag.
 * @member {string} [api.id] API identifier in the form /apis/{apiId}.
 * @member {string} [api.name] API name.
 * @member {string} [api.serviceUrl] Absolute URL of the backend service
 * implementing this API.
 * @member {string} [api.path] Relative URL uniquely identifying this API and
 * all of its resource paths within the API Management service instance. It is
 * appended to the API endpoint base URL specified during the service instance
 * creation to form a public URL for this API.
 * @member {array} [api.protocols] Describes on which protocols the operations
 * in this API can be invoked.
 * @member {object} [operation] Operation associated with the tag.
 * @member {string} [operation.id] Identifier of the operation in form
 * /operations/{operationId}.
 * @member {string} [operation.name] Operation name.
 * @member {string} [operation.apiName] Api Name.
 * @member {string} [operation.apiRevision] Api Revision.
 * @member {string} [operation.apiVersion] Api Version.
 * @member {string} [operation.description] Operation Description.
 * @member {string} [operation.method] A Valid HTTP Operation Method. Typical
 * Http Methods like GET, PUT, POST but not limited by only them.
 * @member {string} [operation.urlTemplate] Relative URL template identifying
 * the target resource for this operation. May include parameters. Example:
 * /customers/{cid}/orders/{oid}/?date={date}
 * @member {object} [product] Product associated with the tag.
 * @member {string} [product.id] Identifier of the product in the form of
 * /products/{productId}
 * @member {string} [product.name] Product name.
 */
export interface TagResourceContract {
  tag: TagTagResourceContractProperties;
  api?: ApiTagResourceContractProperties;
  operation?: OperationTagResourceContractProperties;
  product?: ProductTagResourceContractProperties;
}

/**
 * @class
 * Initializes a new instance of the ProductContract class.
 * @constructor
 * Product details.
 *
 * @member {string} [description] Product description. May include HTML
 * formatting tags.
 * @member {string} [terms] Product terms of use. Developers trying to
 * subscribe to the product will be presented and required to accept these
 * terms before they can complete the subscription process.
 * @member {boolean} [subscriptionRequired] Whether a product subscription is
 * required for accessing APIs included in this product. If true, the product
 * is referred to as "protected" and a valid subscription key is required for a
 * request to an API included in the product to succeed. If false, the product
 * is referred to as "open" and requests to an API included in the product can
 * be made without a subscription key. If property is omitted when creating a
 * new product it's value is assumed to be true.
 * @member {boolean} [approvalRequired] whether subscription approval is
 * required. If false, new subscriptions will be approved automatically
 * enabling developers to call the product's APIs immediately after
 * subscribing. If true, administrators must manually approve the subscription
 * before the developer can any of the product's APIs. Can be present only if
 * subscriptionRequired property is present and has a value of false.
 * @member {number} [subscriptionsLimit] Whether the number of subscriptions a
 * user can have to this product at the same time. Set to null or omit to allow
 * unlimited per user subscriptions. Can be present only if
 * subscriptionRequired property is present and has a value of false.
 * @member {string} [state] whether product is published or not. Published
 * products are discoverable by users of developer portal. Non published
 * products are visible only to administrators. Default state of Product is
 * notPublished. Possible values include: 'notPublished', 'published'
 * @member {string} displayName Product name.
 */
export interface ProductContract extends Resource {
  description?: string;
  terms?: string;
  subscriptionRequired?: boolean;
  approvalRequired?: boolean;
  subscriptionsLimit?: number;
  state?: string;
  displayName: string;
}

/**
 * @class
 * Initializes a new instance of the AuthorizationServerContract class.
 * @constructor
 * External OAuth authorization server settings.
 *
 * @member {string} [description] Description of the authorization server. Can
 * contain HTML formatting tags.
 * @member {array} [authorizationMethods] HTTP verbs supported by the
 * authorization endpoint. GET must be always present. POST is optional.
 * @member {array} [clientAuthenticationMethod] Method of authentication
 * supported by the token endpoint of this authorization server. Possible
 * values are Basic and/or Body. When Body is specified, client credentials and
 * other parameters are passed within the request body in the
 * application/x-www-form-urlencoded format.
 * @member {array} [tokenBodyParameters] Additional parameters required by the
 * token endpoint of this authorization server represented as an array of JSON
 * objects with name and value string properties, i.e. {"name" : "name value",
 * "value": "a value"}.
 * @member {string} [tokenEndpoint] OAuth token endpoint. Contains absolute URI
 * to entity being referenced.
 * @member {boolean} [supportState] If true, authorization server will include
 * state parameter from the authorization request to its response. Client may
 * use state parameter to raise protocol security.
 * @member {string} [defaultScope] Access token scope that is going to be
 * requested by default. Can be overridden at the API level. Should be provided
 * in the form of a string containing space-delimited values.
 * @member {array} [bearerTokenSendingMethods] Specifies the mechanism by which
 * access token is passed to the API.
 * @member {string} [clientSecret] Client or app secret registered with this
 * authorization server.
 * @member {string} [resourceOwnerUsername] Can be optionally specified when
 * resource owner password grant type is supported by this authorization
 * server. Default resource owner username.
 * @member {string} [resourceOwnerPassword] Can be optionally specified when
 * resource owner password grant type is supported by this authorization
 * server. Default resource owner password.
 * @member {string} displayName User-friendly authorization server name.
 * @member {string} clientRegistrationEndpoint Optional reference to a page
 * where client or app registration for this authorization server is performed.
 * Contains absolute URL to entity being referenced.
 * @member {string} authorizationEndpoint OAuth authorization endpoint. See
 * http://tools.ietf.org/html/rfc6749#section-3.2.
 * @member {array} grantTypes Form of an authorization grant, which the client
 * uses to request the access token.
 * @member {string} clientId Client or app id registered with this
 * authorization server.
 */
export interface AuthorizationServerContract extends Resource {
  description?: string;
  authorizationMethods?: string[];
  clientAuthenticationMethod?: string[];
  tokenBodyParameters?: TokenBodyParameterContract[];
  tokenEndpoint?: string;
  supportState?: boolean;
  defaultScope?: string;
  bearerTokenSendingMethods?: string[];
  clientSecret?: string;
  resourceOwnerUsername?: string;
  resourceOwnerPassword?: string;
  displayName: string;
  clientRegistrationEndpoint: string;
  authorizationEndpoint: string;
  grantTypes: string[];
  clientId: string;
}

/**
 * @class
 * Initializes a new instance of the AuthorizationServerUpdateContract class.
 * @constructor
 * External OAuth authorization server settings.
 *
 * @member {string} [description] Description of the authorization server. Can
 * contain HTML formatting tags.
 * @member {array} [authorizationMethods] HTTP verbs supported by the
 * authorization endpoint. GET must be always present. POST is optional.
 * @member {array} [clientAuthenticationMethod] Method of authentication
 * supported by the token endpoint of this authorization server. Possible
 * values are Basic and/or Body. When Body is specified, client credentials and
 * other parameters are passed within the request body in the
 * application/x-www-form-urlencoded format.
 * @member {array} [tokenBodyParameters] Additional parameters required by the
 * token endpoint of this authorization server represented as an array of JSON
 * objects with name and value string properties, i.e. {"name" : "name value",
 * "value": "a value"}.
 * @member {string} [tokenEndpoint] OAuth token endpoint. Contains absolute URI
 * to entity being referenced.
 * @member {boolean} [supportState] If true, authorization server will include
 * state parameter from the authorization request to its response. Client may
 * use state parameter to raise protocol security.
 * @member {string} [defaultScope] Access token scope that is going to be
 * requested by default. Can be overridden at the API level. Should be provided
 * in the form of a string containing space-delimited values.
 * @member {array} [bearerTokenSendingMethods] Specifies the mechanism by which
 * access token is passed to the API.
 * @member {string} [clientSecret] Client or app secret registered with this
 * authorization server.
 * @member {string} [resourceOwnerUsername] Can be optionally specified when
 * resource owner password grant type is supported by this authorization
 * server. Default resource owner username.
 * @member {string} [resourceOwnerPassword] Can be optionally specified when
 * resource owner password grant type is supported by this authorization
 * server. Default resource owner password.
 * @member {string} [displayName] User-friendly authorization server name.
 * @member {string} [clientRegistrationEndpoint] Optional reference to a page
 * where client or app registration for this authorization server is performed.
 * Contains absolute URL to entity being referenced.
 * @member {string} [authorizationEndpoint] OAuth authorization endpoint. See
 * http://tools.ietf.org/html/rfc6749#section-3.2.
 * @member {array} [grantTypes] Form of an authorization grant, which the
 * client uses to request the access token.
 * @member {string} [clientId] Client or app id registered with this
 * authorization server.
 */
export interface AuthorizationServerUpdateContract extends Resource {
  description?: string;
  authorizationMethods?: string[];
  clientAuthenticationMethod?: string[];
  tokenBodyParameters?: TokenBodyParameterContract[];
  tokenEndpoint?: string;
  supportState?: boolean;
  defaultScope?: string;
  bearerTokenSendingMethods?: string[];
  clientSecret?: string;
  resourceOwnerUsername?: string;
  resourceOwnerPassword?: string;
  displayName?: string;
  clientRegistrationEndpoint?: string;
  authorizationEndpoint?: string;
  grantTypes?: string[];
  clientId?: string;
}

/**
 * @class
 * Initializes a new instance of the TokenBodyParameterContract class.
 * @constructor
 * OAuth acquire token request body parameter (www-url-form-encoded).
 *
 * @member {string} name body parameter name.
 * @member {string} value body parameter value.
 */
export interface TokenBodyParameterContract {
  name: string;
  value: string;
}

/**
 * @class
 * Initializes a new instance of the AuthorizationServerContractBaseProperties class.
 * @constructor
 * External OAuth authorization server Update settings contract.
 *
 * @member {string} [description] Description of the authorization server. Can
 * contain HTML formatting tags.
 * @member {array} [authorizationMethods] HTTP verbs supported by the
 * authorization endpoint. GET must be always present. POST is optional.
 * @member {array} [clientAuthenticationMethod] Method of authentication
 * supported by the token endpoint of this authorization server. Possible
 * values are Basic and/or Body. When Body is specified, client credentials and
 * other parameters are passed within the request body in the
 * application/x-www-form-urlencoded format.
 * @member {array} [tokenBodyParameters] Additional parameters required by the
 * token endpoint of this authorization server represented as an array of JSON
 * objects with name and value string properties, i.e. {"name" : "name value",
 * "value": "a value"}.
 * @member {string} [tokenEndpoint] OAuth token endpoint. Contains absolute URI
 * to entity being referenced.
 * @member {boolean} [supportState] If true, authorization server will include
 * state parameter from the authorization request to its response. Client may
 * use state parameter to raise protocol security.
 * @member {string} [defaultScope] Access token scope that is going to be
 * requested by default. Can be overridden at the API level. Should be provided
 * in the form of a string containing space-delimited values.
 * @member {array} [bearerTokenSendingMethods] Specifies the mechanism by which
 * access token is passed to the API.
 * @member {string} [clientSecret] Client or app secret registered with this
 * authorization server.
 * @member {string} [resourceOwnerUsername] Can be optionally specified when
 * resource owner password grant type is supported by this authorization
 * server. Default resource owner username.
 * @member {string} [resourceOwnerPassword] Can be optionally specified when
 * resource owner password grant type is supported by this authorization
 * server. Default resource owner password.
 */
export interface AuthorizationServerContractBaseProperties {
  description?: string;
  authorizationMethods?: string[];
  clientAuthenticationMethod?: string[];
  tokenBodyParameters?: TokenBodyParameterContract[];
  tokenEndpoint?: string;
  supportState?: boolean;
  defaultScope?: string;
  bearerTokenSendingMethods?: string[];
  clientSecret?: string;
  resourceOwnerUsername?: string;
  resourceOwnerPassword?: string;
}

/**
 * @class
 * Initializes a new instance of the BackendAuthorizationHeaderCredentials class.
 * @constructor
 * Authorization header information.
 *
 * @member {string} scheme Authentication Scheme name.
 * @member {string} parameter Authentication Parameter value.
 */
export interface BackendAuthorizationHeaderCredentials {
  scheme: string;
  parameter: string;
}

/**
 * @class
 * Initializes a new instance of the X509CertificateName class.
 * @constructor
 * Properties of server X509Names.
 *
 * @member {string} [name] Common Name of the Certificate.
 * @member {string} [issuerCertificateThumbprint] Thumbprint for the Issuer of
 * the Certificate.
 */
export interface X509CertificateName {
  name?: string;
  issuerCertificateThumbprint?: string;
}

/**
 * @class
 * Initializes a new instance of the BackendServiceFabricClusterProperties class.
 * @constructor
 * Properties of the Service Fabric Type Backend.
 *
 * @member {string} clientCertificatethumbprint The client certificate
 * thumbprint for the management endpoint.
 * @member {number} [maxPartitionResolutionRetries] Maximum number of retries
 * while attempting resolve the parition.
 * @member {array} managementEndpoints The cluster management endpoint.
 * @member {array} [serverCertificateThumbprints] Thumbprints of certificates
 * cluster management service uses for tls communication
 * @member {array} [serverX509Names] Server X509 Certificate Names Collection
 */
export interface BackendServiceFabricClusterProperties {
  clientCertificatethumbprint: string;
  maxPartitionResolutionRetries?: number;
  managementEndpoints: string[];
  serverCertificateThumbprints?: string[];
  serverX509Names?: X509CertificateName[];
}

/**
 * @class
 * Initializes a new instance of the BackendProperties class.
 * @constructor
 * Properties specific to the Backend Type.
 *
 * @member {object} [serviceFabricCluster] Backend Service Fabric Cluster
 * Properties
 * @member {string} [serviceFabricCluster.clientCertificatethumbprint] The
 * client certificate thumbprint for the management endpoint.
 * @member {number} [serviceFabricCluster.maxPartitionResolutionRetries]
 * Maximum number of retries while attempting resolve the parition.
 * @member {array} [serviceFabricCluster.managementEndpoints] The cluster
 * management endpoint.
 * @member {array} [serviceFabricCluster.serverCertificateThumbprints]
 * Thumbprints of certificates cluster management service uses for tls
 * communication
 * @member {array} [serviceFabricCluster.serverX509Names] Server X509
 * Certificate Names Collection
 */
export interface BackendProperties {
  serviceFabricCluster?: BackendServiceFabricClusterProperties;
}

/**
 * @class
 * Initializes a new instance of the BackendCredentialsContract class.
 * @constructor
 * Details of the Credentials used to connect to Backend.
 *
 * @member {array} [certificate] List of Client Certificate Thumbprint.
 * @member {object} [query] Query Parameter description.
 * @member {object} [header] Header Parameter description.
 * @member {object} [authorization] Authorization header authentication
 * @member {string} [authorization.scheme] Authentication Scheme name.
 * @member {string} [authorization.parameter] Authentication Parameter value.
 */
export interface BackendCredentialsContract {
  certificate?: string[];
  query?: { [propertyName: string]: string[] };
  header?: { [propertyName: string]: string[] };
  authorization?: BackendAuthorizationHeaderCredentials;
}

/**
 * @class
 * Initializes a new instance of the BackendProxyContract class.
 * @constructor
 * Details of the Backend WebProxy Server to use in the Request to Backend.
 *
 * @member {string} url WebProxy Server AbsoluteUri property which includes the
 * entire URI stored in the Uri instance, including all fragments and query
 * strings.
 * @member {string} [username] Username to connect to the WebProxy server
 * @member {string} [password] Password to connect to the WebProxy Server
 */
export interface BackendProxyContract {
  url: string;
  username?: string;
  password?: string;
}

/**
 * @class
 * Initializes a new instance of the BackendTlsProperties class.
 * @constructor
 * Properties controlling TLS Certificate Validation.
 *
 * @member {boolean} [validateCertificateChain] Flag indicating whether SSL
 * certificate chain validation should be done when using self-signed
 * certificates for this backend host. Default value: true .
 * @member {boolean} [validateCertificateName] Flag indicating whether SSL
 * certificate name validation should be done when using self-signed
 * certificates for this backend host. Default value: true .
 */
export interface BackendTlsProperties {
  validateCertificateChain?: boolean;
  validateCertificateName?: boolean;
}

/**
 * @class
 * Initializes a new instance of the BackendBaseParameters class.
 * @constructor
 * Backend entity base Parameter set.
 *
 * @member {string} [title] Backend Title.
 * @member {string} [description] Backend Description.
 * @member {string} [resourceId] Management Uri of the Resource in External
 * System. This url can be the Arm Resource Id of Logic Apps, Function Apps or
 * Api Apps.
 * @member {object} [properties] Backend Properties contract
 * @member {object} [properties.serviceFabricCluster] Backend Service Fabric
 * Cluster Properties
 * @member {string}
 * [properties.serviceFabricCluster.clientCertificatethumbprint] The client
 * certificate thumbprint for the management endpoint.
 * @member {number}
 * [properties.serviceFabricCluster.maxPartitionResolutionRetries] Maximum
 * number of retries while attempting resolve the parition.
 * @member {array} [properties.serviceFabricCluster.managementEndpoints] The
 * cluster management endpoint.
 * @member {array}
 * [properties.serviceFabricCluster.serverCertificateThumbprints] Thumbprints
 * of certificates cluster management service uses for tls communication
 * @member {array} [properties.serviceFabricCluster.serverX509Names] Server
 * X509 Certificate Names Collection
 * @member {object} [credentials] Backend Credentials Contract Properties
 * @member {array} [credentials.certificate] List of Client Certificate
 * Thumbprint.
 * @member {object} [credentials.query] Query Parameter description.
 * @member {object} [credentials.header] Header Parameter description.
 * @member {object} [credentials.authorization] Authorization header
 * authentication
 * @member {string} [credentials.authorization.scheme] Authentication Scheme
 * name.
 * @member {string} [credentials.authorization.parameter] Authentication
 * Parameter value.
 * @member {object} [proxy] Backend Proxy Contract Properties
 * @member {string} [proxy.url] WebProxy Server AbsoluteUri property which
 * includes the entire URI stored in the Uri instance, including all fragments
 * and query strings.
 * @member {string} [proxy.username] Username to connect to the WebProxy server
 * @member {string} [proxy.password] Password to connect to the WebProxy Server
 * @member {object} [tls] Backend TLS Properties
 * @member {boolean} [tls.validateCertificateChain] Flag indicating whether SSL
 * certificate chain validation should be done when using self-signed
 * certificates for this backend host.
 * @member {boolean} [tls.validateCertificateName] Flag indicating whether SSL
 * certificate name validation should be done when using self-signed
 * certificates for this backend host.
 */
export interface BackendBaseParameters {
  title?: string;
  description?: string;
  resourceId?: string;
  properties?: BackendProperties;
  credentials?: BackendCredentialsContract;
  proxy?: BackendProxyContract;
  tls?: BackendTlsProperties;
}

/**
 * @class
 * Initializes a new instance of the BackendContract class.
 * @constructor
 * Backend details.
 *
 * @member {string} [title] Backend Title.
 * @member {string} [description] Backend Description.
 * @member {string} [resourceId] Management Uri of the Resource in External
 * System. This url can be the Arm Resource Id of Logic Apps, Function Apps or
 * Api Apps.
 * @member {object} [properties] Backend Properties contract
 * @member {object} [properties.serviceFabricCluster] Backend Service Fabric
 * Cluster Properties
 * @member {string}
 * [properties.serviceFabricCluster.clientCertificatethumbprint] The client
 * certificate thumbprint for the management endpoint.
 * @member {number}
 * [properties.serviceFabricCluster.maxPartitionResolutionRetries] Maximum
 * number of retries while attempting resolve the parition.
 * @member {array} [properties.serviceFabricCluster.managementEndpoints] The
 * cluster management endpoint.
 * @member {array}
 * [properties.serviceFabricCluster.serverCertificateThumbprints] Thumbprints
 * of certificates cluster management service uses for tls communication
 * @member {array} [properties.serviceFabricCluster.serverX509Names] Server
 * X509 Certificate Names Collection
 * @member {object} [credentials] Backend Credentials Contract Properties
 * @member {array} [credentials.certificate] List of Client Certificate
 * Thumbprint.
 * @member {object} [credentials.query] Query Parameter description.
 * @member {object} [credentials.header] Header Parameter description.
 * @member {object} [credentials.authorization] Authorization header
 * authentication
 * @member {string} [credentials.authorization.scheme] Authentication Scheme
 * name.
 * @member {string} [credentials.authorization.parameter] Authentication
 * Parameter value.
 * @member {object} [proxy] Backend Proxy Contract Properties
 * @member {string} [proxy.url] WebProxy Server AbsoluteUri property which
 * includes the entire URI stored in the Uri instance, including all fragments
 * and query strings.
 * @member {string} [proxy.username] Username to connect to the WebProxy server
 * @member {string} [proxy.password] Password to connect to the WebProxy Server
 * @member {object} [tls] Backend TLS Properties
 * @member {boolean} [tls.validateCertificateChain] Flag indicating whether SSL
 * certificate chain validation should be done when using self-signed
 * certificates for this backend host.
 * @member {boolean} [tls.validateCertificateName] Flag indicating whether SSL
 * certificate name validation should be done when using self-signed
 * certificates for this backend host.
 * @member {string} url Runtime Url of the Backend.
 * @member {string} protocol Backend communication protocol. Possible values
 * include: 'http', 'soap'
 */
export interface BackendContract extends Resource {
  title?: string;
  description?: string;
  resourceId?: string;
  properties?: BackendProperties;
  credentials?: BackendCredentialsContract;
  proxy?: BackendProxyContract;
  tls?: BackendTlsProperties;
  url: string;
  protocol: string;
}

/**
 * @class
 * Initializes a new instance of the BackendUpdateParameters class.
 * @constructor
 * Backend update parameters.
 *
 * @member {string} [title] Backend Title.
 * @member {string} [description] Backend Description.
 * @member {string} [resourceId] Management Uri of the Resource in External
 * System. This url can be the Arm Resource Id of Logic Apps, Function Apps or
 * Api Apps.
 * @member {object} [properties] Backend Properties contract
 * @member {object} [properties.serviceFabricCluster] Backend Service Fabric
 * Cluster Properties
 * @member {string}
 * [properties.serviceFabricCluster.clientCertificatethumbprint] The client
 * certificate thumbprint for the management endpoint.
 * @member {number}
 * [properties.serviceFabricCluster.maxPartitionResolutionRetries] Maximum
 * number of retries while attempting resolve the parition.
 * @member {array} [properties.serviceFabricCluster.managementEndpoints] The
 * cluster management endpoint.
 * @member {array}
 * [properties.serviceFabricCluster.serverCertificateThumbprints] Thumbprints
 * of certificates cluster management service uses for tls communication
 * @member {array} [properties.serviceFabricCluster.serverX509Names] Server
 * X509 Certificate Names Collection
 * @member {object} [credentials] Backend Credentials Contract Properties
 * @member {array} [credentials.certificate] List of Client Certificate
 * Thumbprint.
 * @member {object} [credentials.query] Query Parameter description.
 * @member {object} [credentials.header] Header Parameter description.
 * @member {object} [credentials.authorization] Authorization header
 * authentication
 * @member {string} [credentials.authorization.scheme] Authentication Scheme
 * name.
 * @member {string} [credentials.authorization.parameter] Authentication
 * Parameter value.
 * @member {object} [proxy] Backend Proxy Contract Properties
 * @member {string} [proxy.url] WebProxy Server AbsoluteUri property which
 * includes the entire URI stored in the Uri instance, including all fragments
 * and query strings.
 * @member {string} [proxy.username] Username to connect to the WebProxy server
 * @member {string} [proxy.password] Password to connect to the WebProxy Server
 * @member {object} [tls] Backend TLS Properties
 * @member {boolean} [tls.validateCertificateChain] Flag indicating whether SSL
 * certificate chain validation should be done when using self-signed
 * certificates for this backend host.
 * @member {boolean} [tls.validateCertificateName] Flag indicating whether SSL
 * certificate name validation should be done when using self-signed
 * certificates for this backend host.
 * @member {string} [url] Runtime Url of the Backend.
 * @member {string} [protocol] Backend communication protocol. Possible values
 * include: 'http', 'soap'
 */
export interface BackendUpdateParameters {
  title?: string;
  description?: string;
  resourceId?: string;
  properties?: BackendProperties;
  credentials?: BackendCredentialsContract;
  proxy?: BackendProxyContract;
  tls?: BackendTlsProperties;
  url?: string;
  protocol?: string;
}

/**
 * @class
 * Initializes a new instance of the BackendReconnectContract class.
 * @constructor
 * Reconnect request parameters.
 *
 * @member {moment.duration} [after] Duration in ISO8601 format after which
 * reconnect will be initiated. Minimum duration of the Reconect is PT2M.
 */
export interface BackendReconnectContract extends Resource {
  after?: moment.Duration;
}

/**
 * @class
 * Initializes a new instance of the CertificateContract class.
 * @constructor
 * Certificate details.
 *
 * @member {string} subject Subject attribute of the certificate.
 * @member {string} thumbprint Thumbprint of the certificate.
 * @member {date} expirationDate Expiration date of the certificate. The date
 * conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the
 * ISO 8601 standard.
 */
export interface CertificateContract extends Resource {
  subject: string;
  thumbprint: string;
  expirationDate: Date;
}

/**
 * @class
 * Initializes a new instance of the CertificateCreateOrUpdateParameters class.
 * @constructor
 * Certificate create or update details.
 *
 * @member {string} data Base 64 encoded certificate using the
 * application/x-pkcs12 representation.
 * @member {string} password Password for the Certificate
 */
export interface CertificateCreateOrUpdateParameters {
  data: string;
  password: string;
}

/**
 * @class
 * Initializes a new instance of the CertificateInformation class.
 * @constructor
 * SSL certificate information.
 *
 * @member {date} expiry Expiration date of the certificate. The date conforms
 * to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601
 * standard.
 * @member {string} thumbprint Thumbprint of the certificate.
 * @member {string} subject Subject of the certificate.
 */
export interface CertificateInformation {
  expiry: Date;
  thumbprint: string;
  subject: string;
}

/**
 * @class
 * Initializes a new instance of the CertificateConfiguration class.
 * @constructor
 * Certificate configuration which consist of non-trusted intermediates and
 * root certificates.
 *
 * @member {string} [encodedCertificate] Base64 Encoded certificate.
 * @member {string} [certificatePassword] Certificate Password.
 * @member {string} storeName The
 * System.Security.Cryptography.x509certificates.Storename certificate store
 * location. Only Root and CertificateAuthority are valid locations. Possible
 * values include: 'CertificateAuthority', 'Root'
 * @member {object} [certificate] Certificate information.
 * @member {date} [certificate.expiry] Expiration date of the certificate. The
 * date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified
 * by the ISO 8601 standard.
 * @member {string} [certificate.thumbprint] Thumbprint of the certificate.
 * @member {string} [certificate.subject] Subject of the certificate.
 */
export interface CertificateConfiguration {
  encodedCertificate?: string;
  certificatePassword?: string;
  storeName: string;
  readonly certificate?: CertificateInformation;
}

/**
 * @class
 * Initializes a new instance of the HostnameConfiguration class.
 * @constructor
 * Custom hostname configuration.
 *
 * @member {string} type Hostname type. Possible values include: 'Proxy',
 * 'Portal', 'Management', 'Scm'
 * @member {string} hostName Hostname to configure on the Api Management
 * service.
 * @member {string} [keyVaultId] Url to the KeyVault Secret containing the Ssl
 * Certificate. If absolute Url containing version is provided, auto-update of
 * ssl certificate will not work. This requires Api Management service to be
 * configured with MSI. The secret should be of type *application/x-pkcs12*
 * @member {string} [encodedCertificate] Base64 Encoded certificate.
 * @member {string} [certificatePassword] Certificate Password.
 * @member {boolean} [defaultSslBinding] Specify true to setup the certificate
 * associated with this Hostname as the Default SSL Certificate. If a client
 * does not send the SNI header, then this will be the certificate that will be
 * challenged. The property is useful if a service has multiple custom hostname
 * enabled and it needs to decide on the default ssl certificate. The setting
 * only applied to Proxy Hostname Type. Default value: false .
 * @member {boolean} [negotiateClientCertificate] Specify true to always
 * negotiate client certificate on the hostname. Default Value is false.
 * Default value: false .
 * @member {object} [certificate] Certificate information.
 * @member {date} [certificate.expiry] Expiration date of the certificate. The
 * date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified
 * by the ISO 8601 standard.
 * @member {string} [certificate.thumbprint] Thumbprint of the certificate.
 * @member {string} [certificate.subject] Subject of the certificate.
 */
export interface HostnameConfiguration {
  type: string;
  hostName: string;
  keyVaultId?: string;
  encodedCertificate?: string;
  certificatePassword?: string;
  defaultSslBinding?: boolean;
  negotiateClientCertificate?: boolean;
  readonly certificate?: CertificateInformation;
}

/**
 * @class
 * Initializes a new instance of the VirtualNetworkConfiguration class.
 * @constructor
 * Configuration of a virtual network to which API Management service is
 * deployed.
 *
 * @member {string} [vnetid] The virtual network ID. This is typically a GUID.
 * Expect a null GUID by default.
 * @member {string} [subnetname] The name of the subnet.
 * @member {string} [subnetResourceId] The full resource ID of a subnet in a
 * virtual network to deploy the API Management service in.
 */
export interface VirtualNetworkConfiguration {
  readonly vnetid?: string;
  readonly subnetname?: string;
  subnetResourceId?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceSkuProperties class.
 * @constructor
 * API Management service resource SKU properties.
 *
 * @member {string} name Name of the Sku. Possible values include: 'Developer',
 * 'Standard', 'Premium', 'Basic'
 * @member {number} [capacity] Capacity of the SKU (number of deployed units of
 * the SKU). The default value is 1. Default value: 1 .
 */
export interface ApiManagementServiceSkuProperties {
  name: string;
  capacity?: number;
}

/**
 * @class
 * Initializes a new instance of the AdditionalLocation class.
 * @constructor
 * Description of an additional API Management resource location.
 *
 * @member {string} location The location name of the additional region among
 * Azure Data center regions.
 * @member {object} sku SKU properties of the API Management service.
 * @member {string} [sku.name] Name of the Sku. Possible values include:
 * 'Developer', 'Standard', 'Premium', 'Basic'
 * @member {number} [sku.capacity] Capacity of the SKU (number of deployed
 * units of the SKU). The default value is 1.
 * @member {array} [publicIPAddresses] Static IP addresses of the location's
 * virtual machines.
 * @member {object} [virtualNetworkConfiguration] Virtual network configuration
 * for the location.
 * @member {string} [virtualNetworkConfiguration.vnetid] The virtual network
 * ID. This is typically a GUID. Expect a null GUID by default.
 * @member {string} [virtualNetworkConfiguration.subnetname] The name of the
 * subnet.
 * @member {string} [virtualNetworkConfiguration.subnetResourceId] The full
 * resource ID of a subnet in a virtual network to deploy the API Management
 * service in.
 * @member {string} [gatewayRegionalUrl] Gateway URL of the API Management
 * service in the Region.
 */
export interface AdditionalLocation {
  location: string;
  sku: ApiManagementServiceSkuProperties;
  readonly publicIPAddresses?: string[];
  virtualNetworkConfiguration?: VirtualNetworkConfiguration;
  readonly gatewayRegionalUrl?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceBackupRestoreParameters class.
 * @constructor
 * Parameters supplied to the Backup/Restore of an API Management service
 * operation.
 *
 * @member {string} storageAccount Azure Cloud Storage account (used to
 * place/retrieve the backup) name.
 * @member {string} accessKey Azure Cloud Storage account (used to
 * place/retrieve the backup) access key.
 * @member {string} containerName Azure Cloud Storage blob container name used
 * to place/retrieve the backup.
 * @member {string} backupName The name of the backup file to create.
 */
export interface ApiManagementServiceBackupRestoreParameters {
  storageAccount: string;
  accessKey: string;
  containerName: string;
  backupName: string;
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceBaseProperties class.
 * @constructor
 * Base Properties of an API Management service resource description.
 *
 * @member {string} [notificationSenderEmail] Email address from which the
 * notification will be sent.
 * @member {string} [provisioningState] The current provisioning state of the
 * API Management service which can be one of the following:
 * Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
 * @member {string} [targetProvisioningState] The provisioning state of the API
 * Management service, which is targeted by the long running operation started
 * on the service.
 * @member {date} [createdAtUtc] Creation UTC date of the API Management
 * service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as
 * specified by the ISO 8601 standard.
 * @member {string} [gatewayUrl] Gateway URL of the API Management service.
 * @member {string} [gatewayRegionalUrl] Gateway URL of the API Management
 * service in the Default Region.
 * @member {string} [portalUrl] Publisher portal endpoint Url of the API
 * Management service.
 * @member {string} [managementApiUrl] Management API endpoint URL of the API
 * Management service.
 * @member {string} [scmUrl] SCM endpoint URL of the API Management service.
 * @member {array} [hostnameConfigurations] Custom hostname configuration of
 * the API Management service.
 * @member {array} [publicIPAddresses] Public Static Load Balanced IP addresses
 * of the API Management service. Available only for Basic, Standard and
 * Premium SKU.
 * @member {array} [privateIPAddresses] Private Static Load Balanced IP
 * addresses of the API Management service which is deployed in an Internal
 * Virtual Network. Available only for Basic, Standard and Premium SKU.
 * @member {object} [virtualNetworkConfiguration] Virtual network configuration
 * of the API Management service.
 * @member {string} [virtualNetworkConfiguration.vnetid] The virtual network
 * ID. This is typically a GUID. Expect a null GUID by default.
 * @member {string} [virtualNetworkConfiguration.subnetname] The name of the
 * subnet.
 * @member {string} [virtualNetworkConfiguration.subnetResourceId] The full
 * resource ID of a subnet in a virtual network to deploy the API Management
 * service in.
 * @member {array} [additionalLocations] Additional datacenter locations of the
 * API Management service.
 * @member {object} [customProperties] Custom properties of the API Management
 * service. Setting
 * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`
 * will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1
 * and 1.2). Setting
 * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can
 * be used to disable just TLS 1.1 and setting
 * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can
 * be used to disable TLS 1.0 on an API Management service.
 * @member {array} [certificates] List of Certificates that need to be
 * installed in the API Management service. Max supported certificates that can
 * be installed is 10.
 * @member {string} [virtualNetworkType] The type of VPN in which API Managemet
 * service needs to be configured in. None (Default Value) means the API
 * Management service is not part of any Virtual Network, External means the
 * API Management deployment is set up inside a Virtual Network having an
 * Internet Facing Endpoint, and Internal means that API Management deployment
 * is setup inside a Virtual Network having an Intranet Facing Endpoint only.
 * Possible values include: 'None', 'External', 'Internal'. Default value:
 * 'None' .
 */
export interface ApiManagementServiceBaseProperties {
  notificationSenderEmail?: string;
  readonly provisioningState?: string;
  readonly targetProvisioningState?: string;
  readonly createdAtUtc?: Date;
  readonly gatewayUrl?: string;
  readonly gatewayRegionalUrl?: string;
  readonly portalUrl?: string;
  readonly managementApiUrl?: string;
  readonly scmUrl?: string;
  hostnameConfigurations?: HostnameConfiguration[];
  readonly publicIPAddresses?: string[];
  readonly privateIPAddresses?: string[];
  virtualNetworkConfiguration?: VirtualNetworkConfiguration;
  additionalLocations?: AdditionalLocation[];
  customProperties?: { [propertyName: string]: string };
  certificates?: CertificateConfiguration[];
  virtualNetworkType?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceIdentity class.
 * @constructor
 * Identity properties of the Api Management service resource.
 *
 * @member {uuid} [principalId] The principal id of the identity.
 * @member {uuid} [tenantId] The client tenant id of the identity.
 */
export interface ApiManagementServiceIdentity {
  readonly principalId?: string;
  readonly tenantId?: string;
}

/**
 * @class
 * Initializes a new instance of the ApimResource class.
 * @constructor
 * The Resource definition.
 *
 * @member {string} [id] Resource ID.
 * @member {string} [name] Resource name.
 * @member {string} [type] Resource type for API Management resource is set to
 * Microsoft.ApiManagement.
 * @member {object} [tags] Resource tags.
 */
export interface ApimResource extends BaseResource {
  readonly id?: string;
  readonly name?: string;
  readonly type?: string;
  tags?: { [propertyName: string]: string };
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceResource class.
 * @constructor
 * A single API Management service resource in List or Get response.
 *
 * @member {string} [notificationSenderEmail] Email address from which the
 * notification will be sent.
 * @member {string} [provisioningState] The current provisioning state of the
 * API Management service which can be one of the following:
 * Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
 * @member {string} [targetProvisioningState] The provisioning state of the API
 * Management service, which is targeted by the long running operation started
 * on the service.
 * @member {date} [createdAtUtc] Creation UTC date of the API Management
 * service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as
 * specified by the ISO 8601 standard.
 * @member {string} [gatewayUrl] Gateway URL of the API Management service.
 * @member {string} [gatewayRegionalUrl] Gateway URL of the API Management
 * service in the Default Region.
 * @member {string} [portalUrl] Publisher portal endpoint Url of the API
 * Management service.
 * @member {string} [managementApiUrl] Management API endpoint URL of the API
 * Management service.
 * @member {string} [scmUrl] SCM endpoint URL of the API Management service.
 * @member {array} [hostnameConfigurations] Custom hostname configuration of
 * the API Management service.
 * @member {array} [publicIPAddresses] Public Static Load Balanced IP addresses
 * of the API Management service. Available only for Basic, Standard and
 * Premium SKU.
 * @member {array} [privateIPAddresses] Private Static Load Balanced IP
 * addresses of the API Management service which is deployed in an Internal
 * Virtual Network. Available only for Basic, Standard and Premium SKU.
 * @member {object} [virtualNetworkConfiguration] Virtual network configuration
 * of the API Management service.
 * @member {string} [virtualNetworkConfiguration.vnetid] The virtual network
 * ID. This is typically a GUID. Expect a null GUID by default.
 * @member {string} [virtualNetworkConfiguration.subnetname] The name of the
 * subnet.
 * @member {string} [virtualNetworkConfiguration.subnetResourceId] The full
 * resource ID of a subnet in a virtual network to deploy the API Management
 * service in.
 * @member {array} [additionalLocations] Additional datacenter locations of the
 * API Management service.
 * @member {object} [customProperties] Custom properties of the API Management
 * service. Setting
 * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`
 * will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1
 * and 1.2). Setting
 * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can
 * be used to disable just TLS 1.1 and setting
 * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can
 * be used to disable TLS 1.0 on an API Management service.
 * @member {array} [certificates] List of Certificates that need to be
 * installed in the API Management service. Max supported certificates that can
 * be installed is 10.
 * @member {string} [virtualNetworkType] The type of VPN in which API Managemet
 * service needs to be configured in. None (Default Value) means the API
 * Management service is not part of any Virtual Network, External means the
 * API Management deployment is set up inside a Virtual Network having an
 * Internet Facing Endpoint, and Internal means that API Management deployment
 * is setup inside a Virtual Network having an Intranet Facing Endpoint only.
 * Possible values include: 'None', 'External', 'Internal'. Default value:
 * 'None' .
 * @member {string} publisherEmail Publisher email.
 * @member {string} publisherName Publisher name.
 * @member {object} sku SKU properties of the API Management service.
 * @member {string} [sku.name] Name of the Sku. Possible values include:
 * 'Developer', 'Standard', 'Premium', 'Basic'
 * @member {number} [sku.capacity] Capacity of the SKU (number of deployed
 * units of the SKU). The default value is 1.
 * @member {object} [identity] Managed service identity of the Api Management
 * service.
 * @member {uuid} [identity.principalId] The principal id of the identity.
 * @member {uuid} [identity.tenantId] The client tenant id of the identity.
 * @member {string} location Resource location.
 * @member {string} [etag] ETag of the resource.
 */
export interface ApiManagementServiceResource extends ApimResource {
  notificationSenderEmail?: string;
  readonly provisioningState?: string;
  readonly targetProvisioningState?: string;
  readonly createdAtUtc?: Date;
  readonly gatewayUrl?: string;
  readonly gatewayRegionalUrl?: string;
  readonly portalUrl?: string;
  readonly managementApiUrl?: string;
  readonly scmUrl?: string;
  hostnameConfigurations?: HostnameConfiguration[];
  readonly publicIPAddresses?: string[];
  readonly privateIPAddresses?: string[];
  virtualNetworkConfiguration?: VirtualNetworkConfiguration;
  additionalLocations?: AdditionalLocation[];
  customProperties?: { [propertyName: string]: string };
  certificates?: CertificateConfiguration[];
  virtualNetworkType?: string;
  publisherEmail: string;
  publisherName: string;
  sku: ApiManagementServiceSkuProperties;
  identity?: ApiManagementServiceIdentity;
  location: string;
  readonly etag?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceUpdateParameters class.
 * @constructor
 * Parameter supplied to Update Api Management Service.
 *
 * @member {string} [notificationSenderEmail] Email address from which the
 * notification will be sent.
 * @member {string} [provisioningState] The current provisioning state of the
 * API Management service which can be one of the following:
 * Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
 * @member {string} [targetProvisioningState] The provisioning state of the API
 * Management service, which is targeted by the long running operation started
 * on the service.
 * @member {date} [createdAtUtc] Creation UTC date of the API Management
 * service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as
 * specified by the ISO 8601 standard.
 * @member {string} [gatewayUrl] Gateway URL of the API Management service.
 * @member {string} [gatewayRegionalUrl] Gateway URL of the API Management
 * service in the Default Region.
 * @member {string} [portalUrl] Publisher portal endpoint Url of the API
 * Management service.
 * @member {string} [managementApiUrl] Management API endpoint URL of the API
 * Management service.
 * @member {string} [scmUrl] SCM endpoint URL of the API Management service.
 * @member {array} [hostnameConfigurations] Custom hostname configuration of
 * the API Management service.
 * @member {array} [publicIPAddresses] Public Static Load Balanced IP addresses
 * of the API Management service. Available only for Basic, Standard and
 * Premium SKU.
 * @member {array} [privateIPAddresses] Private Static Load Balanced IP
 * addresses of the API Management service which is deployed in an Internal
 * Virtual Network. Available only for Basic, Standard and Premium SKU.
 * @member {object} [virtualNetworkConfiguration] Virtual network configuration
 * of the API Management service.
 * @member {string} [virtualNetworkConfiguration.vnetid] The virtual network
 * ID. This is typically a GUID. Expect a null GUID by default.
 * @member {string} [virtualNetworkConfiguration.subnetname] The name of the
 * subnet.
 * @member {string} [virtualNetworkConfiguration.subnetResourceId] The full
 * resource ID of a subnet in a virtual network to deploy the API Management
 * service in.
 * @member {array} [additionalLocations] Additional datacenter locations of the
 * API Management service.
 * @member {object} [customProperties] Custom properties of the API Management
 * service. Setting
 * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`
 * will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1
 * and 1.2). Setting
 * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can
 * be used to disable just TLS 1.1 and setting
 * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can
 * be used to disable TLS 1.0 on an API Management service.
 * @member {array} [certificates] List of Certificates that need to be
 * installed in the API Management service. Max supported certificates that can
 * be installed is 10.
 * @member {string} [virtualNetworkType] The type of VPN in which API Managemet
 * service needs to be configured in. None (Default Value) means the API
 * Management service is not part of any Virtual Network, External means the
 * API Management deployment is set up inside a Virtual Network having an
 * Internet Facing Endpoint, and Internal means that API Management deployment
 * is setup inside a Virtual Network having an Intranet Facing Endpoint only.
 * Possible values include: 'None', 'External', 'Internal'. Default value:
 * 'None' .
 * @member {string} [publisherEmail] Publisher email.
 * @member {string} [publisherName] Publisher name.
 * @member {object} [sku] SKU properties of the API Management service.
 * @member {string} [sku.name] Name of the Sku. Possible values include:
 * 'Developer', 'Standard', 'Premium', 'Basic'
 * @member {number} [sku.capacity] Capacity of the SKU (number of deployed
 * units of the SKU). The default value is 1.
 * @member {object} [identity] Managed service identity of the Api Management
 * service.
 * @member {uuid} [identity.principalId] The principal id of the identity.
 * @member {uuid} [identity.tenantId] The client tenant id of the identity.
 * @member {string} [etag] ETag of the resource.
 */
export interface ApiManagementServiceUpdateParameters extends ApimResource {
  notificationSenderEmail?: string;
  readonly provisioningState?: string;
  readonly targetProvisioningState?: string;
  readonly createdAtUtc?: Date;
  readonly gatewayUrl?: string;
  readonly gatewayRegionalUrl?: string;
  readonly portalUrl?: string;
  readonly managementApiUrl?: string;
  readonly scmUrl?: string;
  hostnameConfigurations?: HostnameConfiguration[];
  readonly publicIPAddresses?: string[];
  readonly privateIPAddresses?: string[];
  virtualNetworkConfiguration?: VirtualNetworkConfiguration;
  additionalLocations?: AdditionalLocation[];
  customProperties?: { [propertyName: string]: string };
  certificates?: CertificateConfiguration[];
  virtualNetworkType?: string;
  publisherEmail?: string;
  publisherName?: string;
  sku?: ApiManagementServiceSkuProperties;
  identity?: ApiManagementServiceIdentity;
  readonly etag?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceGetSsoTokenResult class.
 * @constructor
 * The response of the GetSsoToken operation.
 *
 * @member {string} [redirectUri] Redirect URL to the Publisher Portal
 * containing the SSO token.
 */
export interface ApiManagementServiceGetSsoTokenResult {
  redirectUri?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceCheckNameAvailabilityParameters class.
 * @constructor
 * Parameters supplied to the CheckNameAvailability operation.
 *
 * @member {string} name The name to check for availability.
 */
export interface ApiManagementServiceCheckNameAvailabilityParameters {
  name: string;
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceNameAvailabilityResult class.
 * @constructor
 * Response of the CheckNameAvailability operation.
 *
 * @member {boolean} [nameAvailable] True if the name is available and can be
 * used to create a new API Management service; otherwise false.
 * @member {string} [message] If reason == invalid, provide the user with the
 * reason why the given name is invalid, and provide the resource naming
 * requirements so that the user can select a valid name. If reason ==
 * AlreadyExists, explain that <resourceName> is already in use, and direct
 * them to select a different name.
 * @member {string} [reason] Invalid indicates the name provided does not match
 * the resource provider's naming requirements (incorrect length, unsupported
 * characters, etc.)  AlreadyExists indicates that the name is already in use
 * and is therefore unavailable. Possible values include: 'Valid', 'Invalid',
 * 'AlreadyExists'
 */
export interface ApiManagementServiceNameAvailabilityResult {
  readonly nameAvailable?: boolean;
  readonly message?: string;
  reason?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceApplyNetworkConfigurationParameters class.
 * @constructor
 * Parameter supplied to the Apply Network configuration operation.
 *
 * @member {string} [location] Location of the Api Management service to update
 * for a multi-region service. For a service deployed in a single region, this
 * parameter is not required.
 */
export interface ApiManagementServiceApplyNetworkConfigurationParameters {
  location?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceUploadCertificateParameters class.
 * @constructor
 * Parameters supplied to the Upload SSL certificate for an API Management
 * service operation.
 *
 * @member {string} type Hostname type. Possible values include: 'Proxy',
 * 'Portal', 'Management', 'Scm'
 * @member {string} certificate Base64 Encoded certificate.
 * @member {string} certificatePassword Certificate password.
 */
export interface ApiManagementServiceUploadCertificateParameters {
  type: string;
  certificate: string;
  certificatePassword: string;
}

/**
 * @class
 * Initializes a new instance of the HostnameConfigurationOld class.
 * @constructor
 * Custom hostname configuration.
 *
 * @member {string} type Hostname type. Possible values include: 'Proxy',
 * 'Portal', 'Management', 'Scm'
 * @member {string} hostname Hostname to configure.
 * @member {object} certificate Certificate information.
 * @member {date} [certificate.expiry] Expiration date of the certificate. The
 * date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified
 * by the ISO 8601 standard.
 * @member {string} [certificate.thumbprint] Thumbprint of the certificate.
 * @member {string} [certificate.subject] Subject of the certificate.
 */
export interface HostnameConfigurationOld {
  type: string;
  hostname: string;
  certificate: CertificateInformation;
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceUpdateHostnameParameters class.
 * @constructor
 * Parameters supplied to the UpdateHostname operation.
 *
 * @member {array} [update] Hostnames to create or update.
 * @member {array} [deleteProperty] Hostnames types to delete.
 */
export interface ApiManagementServiceUpdateHostnameParameters {
  update?: HostnameConfigurationOld[];
  deleteProperty?: string[];
}

/**
 * @class
 * Initializes a new instance of the OperationDisplay class.
 * @constructor
 * The object that describes the operation.
 *
 * @member {string} [provider] Friendly name of the resource provider
 * @member {string} [operation] Operation type: read, write, delete,
 * listKeys/action, etc.
 * @member {string} [resource] Resource type on which the operation is
 * performed.
 * @member {string} [description] Friendly name of the operation
 */
export interface OperationDisplay {
  provider?: string;
  operation?: string;
  resource?: string;
  description?: string;
}

/**
 * @class
 * Initializes a new instance of the Operation class.
 * @constructor
 * REST API operation
 *
 * @member {string} [name] Operation name: {provider}/{resource}/{operation}
 * @member {object} [display] The object that describes the operation.
 * @member {string} [display.provider] Friendly name of the resource provider
 * @member {string} [display.operation] Operation type: read, write, delete,
 * listKeys/action, etc.
 * @member {string} [display.resource] Resource type on which the operation is
 * performed.
 * @member {string} [display.description] Friendly name of the operation
 * @member {string} [origin] The operation origin.
 * @member {object} [properties] The operation properties.
 */
export interface Operation {
  name?: string;
  display?: OperationDisplay;
  origin?: string;
  properties?: any;
}

/**
 * @class
 * Initializes a new instance of the EmailTemplateParametersContractProperties class.
 * @constructor
 * Email Template Parameter contract.
 *
 * @member {string} [name] Template parameter name.
 * @member {string} [title] Template parameter title.
 * @member {string} [description] Template parameter description.
 */
export interface EmailTemplateParametersContractProperties {
  name?: string;
  title?: string;
  description?: string;
}

/**
 * @class
 * Initializes a new instance of the EmailTemplateContract class.
 * @constructor
 * Email Template details.
 *
 * @member {string} subject Subject of the Template.
 * @member {string} body Email Template Body. This should be a valid XDocument
 * @member {string} [title] Title of the Template.
 * @member {string} [description] Description of the Email Template.
 * @member {boolean} [isDefault] Whether the template is the default template
 * provided by Api Management or has been edited.
 * @member {array} [parameters] Email Template Parameter values.
 */
export interface EmailTemplateContract extends Resource {
  subject: string;
  body: string;
  title?: string;
  description?: string;
  readonly isDefault?: boolean;
  parameters?: EmailTemplateParametersContractProperties[];
}

/**
 * @class
 * Initializes a new instance of the EmailTemplateUpdateParameters class.
 * @constructor
 * Email Template update Parameters.
 *
 * @member {string} [subject] Subject of the Template.
 * @member {string} [title] Title of the Template.
 * @member {string} [description] Description of the Email Template.
 * @member {string} [body] Email Template Body. This should be a valid
 * XDocument
 * @member {array} [parameters] Email Template Parameter values.
 */
export interface EmailTemplateUpdateParameters {
  subject?: string;
  title?: string;
  description?: string;
  body?: string;
  parameters?: EmailTemplateParametersContractProperties[];
}

/**
 * @class
 * Initializes a new instance of the GroupContractProperties class.
 * @constructor
 * Group contract Properties.
 *
 * @member {string} displayName Group name.
 * @member {string} [description] Group description. Can contain HTML
 * formatting tags.
 * @member {boolean} [builtIn] true if the group is one of the three system
 * groups (Administrators, Developers, or Guests); otherwise false.
 * @member {string} [type] Group type. Possible values include: 'custom',
 * 'system', 'external'
 * @member {string} [externalId] For external groups, this property contains
 * the id of the group from the external identity provider, e.g. for Azure
 * Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>;
 * otherwise the value is null.
 */
export interface GroupContractProperties {
  displayName: string;
  description?: string;
  readonly builtIn?: boolean;
  type?: string;
  externalId?: string;
}

/**
 * @class
 * Initializes a new instance of the GroupContract class.
 * @constructor
 * Contract details.
 *
 * @member {string} displayName Group name.
 * @member {string} [description] Group description. Can contain HTML
 * formatting tags.
 * @member {boolean} [builtIn] true if the group is one of the three system
 * groups (Administrators, Developers, or Guests); otherwise false.
 * @member {string} [groupContractType] Group type. Possible values include:
 * 'custom', 'system', 'external'
 * @member {string} [externalId] For external groups, this property contains
 * the id of the group from the external identity provider, e.g. for Azure
 * Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>;
 * otherwise the value is null.
 */
export interface GroupContract extends Resource {
  displayName: string;
  description?: string;
  readonly builtIn?: boolean;
  groupContractType?: string;
  externalId?: string;
}

/**
 * @class
 * Initializes a new instance of the GroupCreateParameters class.
 * @constructor
 * Parameters supplied to the Create Group operation.
 *
 * @member {string} displayName Group name.
 * @member {string} [description] Group description.
 * @member {string} [type] Group type. Possible values include: 'custom',
 * 'system', 'external'
 * @member {string} [externalId] Identifier of the external groups, this
 * property contains the id of the group from the external identity provider,
 * e.g. for Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group
 * object id>; otherwise the value is null.
 */
export interface GroupCreateParameters {
  displayName: string;
  description?: string;
  type?: string;
  externalId?: string;
}

/**
 * @class
 * Initializes a new instance of the GroupUpdateParameters class.
 * @constructor
 * Parameters supplied to the Update Group operation.
 *
 * @member {string} [displayName] Group name.
 * @member {string} [description] Group description.
 * @member {string} [type] Group type. Possible values include: 'custom',
 * 'system', 'external'
 * @member {string} [externalId] Identifier of the external groups, this
 * property contains the id of the group from the external identity provider,
 * e.g. for Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group
 * object id>; otherwise the value is null.
 */
export interface GroupUpdateParameters {
  displayName?: string;
  description?: string;
  type?: string;
  externalId?: string;
}

/**
 * @class
 * Initializes a new instance of the UserIdentityContract class.
 * @constructor
 * User identity details.
 *
 * @member {string} [provider] Identity provider name.
 * @member {string} [id] Identifier value within provider.
 */
export interface UserIdentityContract {
  provider?: string;
  id?: string;
}

/**
 * @class
 * Initializes a new instance of the UserEntityBaseParameters class.
 * @constructor
 * User Entity Base Parameters set.
 *
 * @member {string} [state] Account state. Specifies whether the user is active
 * or not. Blocked users are unable to sign into the developer portal or call
 * any APIs of subscribed products. Default state is Active. Possible values
 * include: 'active', 'blocked', 'pending', 'deleted'. Default value: 'active'
 * .
 * @member {string} [note] Optional note about a user set by the administrator.
 * @member {array} [identities] Collection of user identities.
 */
export interface UserEntityBaseParameters {
  state?: string;
  note?: string;
  readonly identities?: UserIdentityContract[];
}

/**
 * @class
 * Initializes a new instance of the UserContract class.
 * @constructor
 * User details.
 *
 * @member {string} [state] Account state. Specifies whether the user is active
 * or not. Blocked users are unable to sign into the developer portal or call
 * any APIs of subscribed products. Default state is Active. Possible values
 * include: 'active', 'blocked', 'pending', 'deleted'. Default value: 'active'
 * .
 * @member {string} [note] Optional note about a user set by the administrator.
 * @member {array} [identities] Collection of user identities.
 * @member {string} [firstName] First name.
 * @member {string} [lastName] Last name.
 * @member {string} [email] Email address.
 * @member {date} [registrationDate] Date of user registration. The date
 * conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the
 * ISO 8601 standard.
 * @member {array} [groups] Collection of groups user is part of.
 */
export interface UserContract extends Resource {
  state?: string;
  note?: string;
  readonly identities?: UserIdentityContract[];
  firstName?: string;
  lastName?: string;
  email?: string;
  registrationDate?: Date;
  readonly groups?: GroupContractProperties[];
}

/**
 * @class
 * Initializes a new instance of the IdentityProviderContract class.
 * @constructor
 * Identity Provider details.
 *
 * @member {string} [identityProviderContractType] Identity Provider Type
 * identifier. Possible values include: 'facebook', 'google', 'microsoft',
 * 'twitter', 'aad', 'aadB2C'
 * @member {array} [allowedTenants] List of Allowed Tenants when configuring
 * Azure Active Directory login.
 * @member {string} [signupPolicyName] Signup Policy Name. Only applies to AAD
 * B2C Identity Provider.
 * @member {string} [signinPolicyName] Signin Policy Name. Only applies to AAD
 * B2C Identity Provider.
 * @member {string} [profileEditingPolicyName] Profile Editing Policy Name.
 * Only applies to AAD B2C Identity Provider.
 * @member {string} [passwordResetPolicyName] Password Reset Policy Name. Only
 * applies to AAD B2C Identity Provider.
 * @member {string} clientId Client Id of the Application in the external
 * Identity Provider. It is App ID for Facebook login, Client ID for Google
 * login, App ID for Microsoft.
 * @member {string} clientSecret Client secret of the Application in external
 * Identity Provider, used to authenticate login request. For example, it is
 * App Secret for Facebook login, API Key for Google login, Public Key for
 * Microsoft.
 */
export interface IdentityProviderContract extends Resource {
  identityProviderContractType?: string;
  allowedTenants?: string[];
  signupPolicyName?: string;
  signinPolicyName?: string;
  profileEditingPolicyName?: string;
  passwordResetPolicyName?: string;
  clientId: string;
  clientSecret: string;
}

/**
 * @class
 * Initializes a new instance of the IdentityProviderUpdateParameters class.
 * @constructor
 * Parameters supplied to update Identity Provider
 *
 * @member {string} [type] Identity Provider Type identifier. Possible values
 * include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C'
 * @member {array} [allowedTenants] List of Allowed Tenants when configuring
 * Azure Active Directory login.
 * @member {string} [signupPolicyName] Signup Policy Name. Only applies to AAD
 * B2C Identity Provider.
 * @member {string} [signinPolicyName] Signin Policy Name. Only applies to AAD
 * B2C Identity Provider.
 * @member {string} [profileEditingPolicyName] Profile Editing Policy Name.
 * Only applies to AAD B2C Identity Provider.
 * @member {string} [passwordResetPolicyName] Password Reset Policy Name. Only
 * applies to AAD B2C Identity Provider.
 * @member {string} [clientId] Client Id of the Application in the external
 * Identity Provider. It is App ID for Facebook login, Client ID for Google
 * login, App ID for Microsoft.
 * @member {string} [clientSecret] Client secret of the Application in external
 * Identity Provider, used to authenticate login request. For example, it is
 * App Secret for Facebook login, API Key for Google login, Public Key for
 * Microsoft.
 */
export interface IdentityProviderUpdateParameters {
  type?: string;
  allowedTenants?: string[];
  signupPolicyName?: string;
  signinPolicyName?: string;
  profileEditingPolicyName?: string;
  passwordResetPolicyName?: string;
  clientId?: string;
  clientSecret?: string;
}

/**
 * @class
 * Initializes a new instance of the IdentityProviderBaseParameters class.
 * @constructor
 * Identity Provider Base Parameter Properties.
 *
 * @member {string} [type] Identity Provider Type identifier. Possible values
 * include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C'
 * @member {array} [allowedTenants] List of Allowed Tenants when configuring
 * Azure Active Directory login.
 * @member {string} [signupPolicyName] Signup Policy Name. Only applies to AAD
 * B2C Identity Provider.
 * @member {string} [signinPolicyName] Signin Policy Name. Only applies to AAD
 * B2C Identity Provider.
 * @member {string} [profileEditingPolicyName] Profile Editing Policy Name.
 * Only applies to AAD B2C Identity Provider.
 * @member {string} [passwordResetPolicyName] Password Reset Policy Name. Only
 * applies to AAD B2C Identity Provider.
 */
export interface IdentityProviderBaseParameters {
  type?: string;
  allowedTenants?: string[];
  signupPolicyName?: string;
  signinPolicyName?: string;
  profileEditingPolicyName?: string;
  passwordResetPolicyName?: string;
}

/**
 * @class
 * Initializes a new instance of the LoggerUpdateContract class.
 * @constructor
 * Logger update contract.
 *
 * @member {string} [loggerType] Logger type. Possible values include:
 * 'azureEventHub', 'applicationInsights'
 * @member {string} [description] Logger description.
 * @member {object} [credentials] Logger credentials.
 * @member {boolean} [isBuffered] Whether records are buffered in the logger
 * before publishing. Default is assumed to be true.
 */
export interface LoggerUpdateContract {
  loggerType?: string;
  description?: string;
  credentials?: { [propertyName: string]: string };
  isBuffered?: boolean;
}

/**
 * @class
 * Initializes a new instance of the RecipientsContractProperties class.
 * @constructor
 * Notification Parameter contract.
 *
 * @member {array} [emails] List of Emails subscribed for the notification.
 * @member {array} [users] List of Users subscribed for the notification.
 */
export interface RecipientsContractProperties {
  emails?: string[];
  users?: string[];
}

/**
 * @class
 * Initializes a new instance of the NotificationContract class.
 * @constructor
 * Notification details.
 *
 * @member {string} title Title of the Notification.
 * @member {string} [description] Description of the Notification.
 * @member {object} [recipients] Recipient Parameter values.
 * @member {array} [recipients.emails] List of Emails subscribed for the
 * notification.
 * @member {array} [recipients.users] List of Users subscribed for the
 * notification.
 */
export interface NotificationContract extends Resource {
  title: string;
  description?: string;
  recipients?: RecipientsContractProperties;
}

/**
 * @class
 * Initializes a new instance of the RecipientUserContract class.
 * @constructor
 * Recipient User details.
 *
 * @member {string} [userId] API Management UserId subscribed to notification.
 */
export interface RecipientUserContract extends Resource {
  userId?: string;
}

/**
 * @class
 * Initializes a new instance of the RecipientUserCollection class.
 * @constructor
 * Paged Recipient User list representation.
 *
 * @member {array} [value] Page values.
 * @member {string} [nextLink] Next page link if any.
 */
export interface RecipientUserCollection {
  value?: RecipientUserContract[];
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the RecipientEmailContract class.
 * @constructor
 * Recipient Email details.
 *
 * @member {string} [email] User Email subscribed to notification.
 */
export interface RecipientEmailContract extends Resource {
  email?: string;
}

/**
 * @class
 * Initializes a new instance of the RecipientEmailCollection class.
 * @constructor
 * Paged Recipient User list representation.
 *
 * @member {array} [value] Page values.
 * @member {string} [nextLink] Next page link if any.
 */
export interface RecipientEmailCollection {
  value?: RecipientEmailContract[];
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the ConnectivityStatusContract class.
 * @constructor
 * Details about connectivity to a resource.
 *
 * @member {string} name The hostname of the resource which the service depends
 * on. This can be the database, storage or any other azure resource on which
 * the service depends upon.
 * @member {string} status Resource Connectivity Status Type identifier.
 * Possible values include: 'initializing', 'success', 'failure'
 * @member {string} [error] Error details of the connectivity to the resource.
 * @member {date} lastUpdated The date when the resource connectivity status
 * was last updated. This status should be updated every 15 minutes. If this
 * status has not been updated, then it means that the service has lost network
 * connectivity to the resource, from inside the Virtual Network.The date
 * conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the
 * ISO 8601 standard.
 * @member {date} lastStatusChange The date when the resource connectivity
 * status last Changed from success to failure or vice-versa. The date conforms
 * to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601
 * standard.
 */
export interface ConnectivityStatusContract {
  name: string;
  status: string;
  error?: string;
  lastUpdated: Date;
  lastStatusChange: Date;
}

/**
 * @class
 * Initializes a new instance of the NetworkStatusContract class.
 * @constructor
 * Network Status details.
 *
 * @member {array} dnsServers Gets the list of DNS servers IPV4 addresses.
 * @member {array} connectivityStatus Gets the list of Connectivity Status to
 * the Resources on which the service depends upon.
 */
export interface NetworkStatusContract {
  dnsServers: string[];
  connectivityStatus: ConnectivityStatusContract[];
}

/**
 * @class
 * Initializes a new instance of the NetworkStatusContractByLocation class.
 * @constructor
 * Network Status in the Location
 *
 * @member {string} [location] Location of service
 * @member {object} [networkStatus] Network status in Location
 * @member {array} [networkStatus.dnsServers] Gets the list of DNS servers IPV4
 * addresses.
 * @member {array} [networkStatus.connectivityStatus] Gets the list of
 * Connectivity Status to the Resources on which the service depends upon.
 */
export interface NetworkStatusContractByLocation {
  location?: string;
  networkStatus?: NetworkStatusContract;
}

/**
 * @class
 * Initializes a new instance of the OpenidConnectProviderContract class.
 * @constructor
 * OpenId Connect Provider details.
 *
 * @member {string} displayName User-friendly OpenID Connect Provider name.
 * @member {string} [description] User-friendly description of OpenID Connect
 * Provider.
 * @member {string} metadataEndpoint Metadata endpoint URI.
 * @member {string} clientId Client ID of developer console which is the client
 * application.
 * @member {string} [clientSecret] Client Secret of developer console which is
 * the client application.
 */
export interface OpenidConnectProviderContract extends Resource {
  displayName: string;
  description?: string;
  metadataEndpoint: string;
  clientId: string;
  clientSecret?: string;
}

/**
 * @class
 * Initializes a new instance of the OpenidConnectProviderUpdateContract class.
 * @constructor
 * Parameters supplied to the Update OpenID Connect Provider operation.
 *
 * @member {string} [displayName] User-friendly OpenID Connect Provider name.
 * @member {string} [description] User-friendly description of OpenID Connect
 * Provider.
 * @member {string} [metadataEndpoint] Metadata endpoint URI.
 * @member {string} [clientId] Client ID of developer console which is the
 * client application.
 * @member {string} [clientSecret] Client Secret of developer console which is
 * the client application.
 */
export interface OpenidConnectProviderUpdateContract {
  displayName?: string;
  description?: string;
  metadataEndpoint?: string;
  clientId?: string;
  clientSecret?: string;
}

/**
 * @class
 * Initializes a new instance of the PortalSigninSettings class.
 * @constructor
 * Sign-In settings for the Developer Portal.
 *
 * @member {boolean} [enabled] Redirect Anonymous users to the Sign-In page.
 */
export interface PortalSigninSettings extends Resource {
  enabled?: boolean;
}

/**
 * @class
 * Initializes a new instance of the TermsOfServiceProperties class.
 * @constructor
 * Terms of service contract properties.
 *
 * @member {string} [text] A terms of service text.
 * @member {boolean} [enabled] Display terms of service during a sign-up
 * process.
 * @member {boolean} [consentRequired] Ask user for consent to the terms of
 * service.
 */
export interface TermsOfServiceProperties {
  text?: string;
  enabled?: boolean;
  consentRequired?: boolean;
}

/**
 * @class
 * Initializes a new instance of the PortalSignupSettings class.
 * @constructor
 * Sign-Up settings for a developer portal.
 *
 * @member {boolean} [enabled] Allow users to sign up on a developer portal.
 * @member {object} [termsOfService] Terms of service contract properties.
 * @member {string} [termsOfService.text] A terms of service text.
 * @member {boolean} [termsOfService.enabled] Display terms of service during a
 * sign-up process.
 * @member {boolean} [termsOfService.consentRequired] Ask user for consent to
 * the terms of service.
 */
export interface PortalSignupSettings extends Resource {
  enabled?: boolean;
  termsOfService?: TermsOfServiceProperties;
}

/**
 * @class
 * Initializes a new instance of the SubscriptionsDelegationSettingsProperties class.
 * @constructor
 * Subscriptions delegation settings properties.
 *
 * @member {boolean} [enabled] Enable or disable delegation for subscriptions.
 */
export interface SubscriptionsDelegationSettingsProperties {
  enabled?: boolean;
}

/**
 * @class
 * Initializes a new instance of the RegistrationDelegationSettingsProperties class.
 * @constructor
 * User registration delegation settings properties.
 *
 * @member {boolean} [enabled] Enable or disable delegation for user
 * registration.
 */
export interface RegistrationDelegationSettingsProperties {
  enabled?: boolean;
}

/**
 * @class
 * Initializes a new instance of the PortalDelegationSettings class.
 * @constructor
 * Delegation settings for a developer portal.
 *
 * @member {string} [url] A delegation Url.
 * @member {string} [validationKey] A base64-encoded validation key to
 * validate, that a request is coming from Azure API Management.
 * @member {object} [subscriptions] Subscriptions delegation settings.
 * @member {boolean} [subscriptions.enabled] Enable or disable delegation for
 * subscriptions.
 * @member {object} [userRegistration] User registration delegation settings.
 * @member {boolean} [userRegistration.enabled] Enable or disable delegation
 * for user registration.
 */
export interface PortalDelegationSettings extends Resource {
  url?: string;
  validationKey?: string;
  subscriptions?: SubscriptionsDelegationSettingsProperties;
  userRegistration?: RegistrationDelegationSettingsProperties;
}

/**
 * @class
 * Initializes a new instance of the ProductUpdateParameters class.
 * @constructor
 * Product Update parameters.
 *
 * @member {string} [description] Product description. May include HTML
 * formatting tags.
 * @member {string} [terms] Product terms of use. Developers trying to
 * subscribe to the product will be presented and required to accept these
 * terms before they can complete the subscription process.
 * @member {boolean} [subscriptionRequired] Whether a product subscription is
 * required for accessing APIs included in this product. If true, the product
 * is referred to as "protected" and a valid subscription key is required for a
 * request to an API included in the product to succeed. If false, the product
 * is referred to as "open" and requests to an API included in the product can
 * be made without a subscription key. If property is omitted when creating a
 * new product it's value is assumed to be true.
 * @member {boolean} [approvalRequired] whether subscription approval is
 * required. If false, new subscriptions will be approved automatically
 * enabling developers to call the product's APIs immediately after
 * subscribing. If true, administrators must manually approve the subscription
 * before the developer can any of the product's APIs. Can be present only if
 * subscriptionRequired property is present and has a value of false.
 * @member {number} [subscriptionsLimit] Whether the number of subscriptions a
 * user can have to this product at the same time. Set to null or omit to allow
 * unlimited per user subscriptions. Can be present only if
 * subscriptionRequired property is present and has a value of false.
 * @member {string} [state] whether product is published or not. Published
 * products are discoverable by users of developer portal. Non published
 * products are visible only to administrators. Default state of Product is
 * notPublished. Possible values include: 'notPublished', 'published'
 * @member {string} [displayName] Product name.
 */
export interface ProductUpdateParameters {
  description?: string;
  terms?: string;
  subscriptionRequired?: boolean;
  approvalRequired?: boolean;
  subscriptionsLimit?: number;
  state?: string;
  displayName?: string;
}

/**
 * @class
 * Initializes a new instance of the SubscriptionContract class.
 * @constructor
 * Subscription details.
 *
 * @member {string} userId The user resource identifier of the subscription
 * owner. The value is a valid relative URL in the format of /users/{uid} where
 * {uid} is a user identifier.
 * @member {string} productId The product resource identifier of the subscribed
 * product. The value is a valid relative URL in the format of
 * /products/{productId} where {productId} is a product identifier.
 * @member {string} [displayName] The name of the subscription, or null if the
 * subscription has no name.
 * @member {string} state Subscription state. Possible states are * active –
 * the subscription is active, * suspended – the subscription is blocked, and
 * the subscriber cannot call any APIs of the product, * submitted – the
 * subscription request has been made by the developer, but has not yet been
 * approved or rejected, * rejected – the subscription request has been denied
 * by an administrator, * cancelled – the subscription has been cancelled by
 * the developer or administrator, * expired – the subscription reached its
 * expiration date and was deactivated. Possible values include: 'suspended',
 * 'active', 'expired', 'submitted', 'rejected', 'cancelled'
 * @member {date} [createdDate] Subscription creation date. The date conforms
 * to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601
 * standard.
 * @member {date} [startDate] Subscription activation date. The setting is for
 * audit purposes only and the subscription is not automatically activated. The
 * subscription lifecycle can be managed by using the `state` property. The
 * date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified
 * by the ISO 8601 standard.
 * @member {date} [expirationDate] Subscription expiration date. The setting is
 * for audit purposes only and the subscription is not automatically expired.
 * The subscription lifecycle can be managed by using the `state` property. The
 * date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified
 * by the ISO 8601 standard.
 * @member {date} [endDate] Date when subscription was cancelled or expired.
 * The setting is for audit purposes only and the subscription is not
 * automatically cancelled. The subscription lifecycle can be managed by using
 * the `state` property. The date conforms to the following format:
 * `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
 * @member {date} [notificationDate] Upcoming subscription expiration
 * notification date. The date conforms to the following format:
 * `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
 * @member {string} primaryKey Subscription primary key.
 * @member {string} secondaryKey Subscription secondary key.
 * @member {string} [stateComment] Optional subscription comment added by an
 * administrator.
 */
export interface SubscriptionContract extends Resource {
  userId: string;
  productId: string;
  displayName?: string;
  state: string;
  readonly createdDate?: Date;
  startDate?: Date;
  expirationDate?: Date;
  endDate?: Date;
  notificationDate?: Date;
  primaryKey: string;
  secondaryKey: string;
  stateComment?: string;
}

/**
 * @class
 * Initializes a new instance of the PropertyContract class.
 * @constructor
 * Property details.
 *
 * @member {array} [tags] Optional tags that when provided can be used to
 * filter the property list.
 * @member {boolean} [secret] Determines whether the value is a secret and
 * should be encrypted or not. Default value is false.
 * @member {string} displayName Unique name of Property. It may contain only
 * letters, digits, period, dash, and underscore characters.
 * @member {string} value Value of the property. Can contain policy
 * expressions. It may not be empty or consist only of whitespace.
 */
export interface PropertyContract extends Resource {
  tags?: string[];
  secret?: boolean;
  displayName: string;
  value: string;
}

/**
 * @class
 * Initializes a new instance of the PropertyUpdateParameters class.
 * @constructor
 * Property update Parameters.
 *
 * @member {array} [tags] Optional tags that when provided can be used to
 * filter the property list.
 * @member {boolean} [secret] Determines whether the value is a secret and
 * should be encrypted or not. Default value is false.
 * @member {string} [displayName] Unique name of Property. It may contain only
 * letters, digits, period, dash, and underscore characters.
 * @member {string} [value] Value of the property. Can contain policy
 * expressions. It may not be empty or consist only of whitespace.
 */
export interface PropertyUpdateParameters {
  tags?: string[];
  secret?: boolean;
  displayName?: string;
  value?: string;
}

/**
 * @class
 * Initializes a new instance of the PropertyEntityBaseParameters class.
 * @constructor
 * Property Entity Base Parameters set.
 *
 * @member {array} [tags] Optional tags that when provided can be used to
 * filter the property list.
 * @member {boolean} [secret] Determines whether the value is a secret and
 * should be encrypted or not. Default value is false.
 */
export interface PropertyEntityBaseParameters {
  tags?: string[];
  secret?: boolean;
}

/**
 * @class
 * Initializes a new instance of the QuotaCounterValueContractProperties class.
 * @constructor
 * Quota counter value details.
 *
 * @member {number} [callsCount] Number of times Counter was called.
 * @member {number} [kbTransferred] Data Transferred in KiloBytes.
 */
export interface QuotaCounterValueContractProperties {
  callsCount?: number;
  kbTransferred?: number;
}

/**
 * @class
 * Initializes a new instance of the QuotaCounterContract class.
 * @constructor
 * Quota counter details.
 *
 * @member {string} counterKey The Key value of the Counter. Must not be empty.
 * @member {string} periodKey Identifier of the Period for which the counter
 * was collected. Must not be empty.
 * @member {date} periodStartTime The date of the start of Counter Period. The
 * date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified
 * by the ISO 8601 standard.
 * @member {date} periodEndTime The date of the end of Counter Period. The date
 * conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the
 * ISO 8601 standard.
 * @member {object} [value] Quota Value Properties
 * @member {number} [value.callsCount] Number of times Counter was called.
 * @member {number} [value.kbTransferred] Data Transferred in KiloBytes.
 */
export interface QuotaCounterContract {
  counterKey: string;
  periodKey: string;
  periodStartTime: Date;
  periodEndTime: Date;
  value?: QuotaCounterValueContractProperties;
}

/**
 * @class
 * Initializes a new instance of the QuotaCounterCollection class.
 * @constructor
 * Paged Quota Counter list representation.
 *
 * @member {array} [value] Quota counter values.
 * @member {number} [count] Total record count number across all pages.
 * @member {string} [nextLink] Next page link if any.
 */
export interface QuotaCounterCollection {
  value?: QuotaCounterContract[];
  count?: number;
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the QuotaCounterValueContract class.
 * @constructor
 * Quota counter value details.
 *
 * @member {number} [callsCount] Number of times Counter was called.
 * @member {number} [kbTransferred] Data Transferred in KiloBytes.
 */
export interface QuotaCounterValueContract {
  callsCount?: number;
  kbTransferred?: number;
}

/**
 * @class
 * Initializes a new instance of the ReportRecordContract class.
 * @constructor
 * Report data.
 *
 * @member {string} [name] Name depending on report endpoint specifies product,
 * API, operation or developer name.
 * @member {date} [timestamp] Start of aggregation period. The date conforms to
 * the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601
 * standard.
 * @member {string} [interval] Length of agregation period.  Interval must be
 * multiple of 15 minutes and may not be zero. The value should be in ISO 8601
 * format (http://en.wikipedia.org/wiki/ISO_8601#Durations).
 * @member {string} [country] Country to which this record data is related.
 * @member {string} [region] Country region to which this record data is
 * related.
 * @member {string} [zip] Zip code to which this record data is related.
 * @member {string} [userId] User identifier path. /users/{userId}
 * @member {string} [productId] Product identifier path. /products/{productId}
 * @member {string} [apiId] API identifier path. /apis/{apiId}
 * @member {string} [operationId] Operation identifier path.
 * /apis/{apiId}/operations/{operationId}
 * @member {string} [apiRegion] API region identifier.
 * @member {string} [subscriptionId] Subscription identifier path.
 * /subscriptions/{subscriptionId}
 * @member {number} [callCountSuccess] Number of succesful calls. This includes
 * calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and
 * HttpStatusCode.TemporaryRedirect
 * @member {number} [callCountBlocked] Number of calls blocked due to invalid
 * credentials. This includes calls returning HttpStatusCode.Unauthorize and
 * HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests
 * @member {number} [callCountFailed] Number of calls failed due to proxy or
 * backend errors. This includes calls returning HttpStatusCode.BadRequest(400)
 * and any Code between HttpStatusCode.InternalServerError (500) and 600
 * @member {number} [callCountOther] Number of other calls.
 * @member {number} [callCountTotal] Total number of calls.
 * @member {number} [bandwidth] Bandwidth consumed.
 * @member {number} [cacheHitCount] Number of times when content was served
 * from cache policy.
 * @member {number} [cacheMissCount] Number of times content was fetched from
 * backend.
 * @member {number} [apiTimeAvg] Average time it took to process request.
 * @member {number} [apiTimeMin] Minimum time it took to process request.
 * @member {number} [apiTimeMax] Maximum time it took to process request.
 * @member {number} [serviceTimeAvg] Average time it took to process request on
 * backend.
 * @member {number} [serviceTimeMin] Minimum time it took to process request on
 * backend.
 * @member {number} [serviceTimeMax] Maximum time it took to process request on
 * backend.
 */
export interface ReportRecordContract {
  name?: string;
  timestamp?: Date;
  interval?: string;
  country?: string;
  region?: string;
  zip?: string;
  readonly userId?: string;
  readonly productId?: string;
  apiId?: string;
  operationId?: string;
  apiRegion?: string;
  subscriptionId?: string;
  callCountSuccess?: number;
  callCountBlocked?: number;
  callCountFailed?: number;
  callCountOther?: number;
  callCountTotal?: number;
  bandwidth?: number;
  cacheHitCount?: number;
  cacheMissCount?: number;
  apiTimeAvg?: number;
  apiTimeMin?: number;
  apiTimeMax?: number;
  serviceTimeAvg?: number;
  serviceTimeMin?: number;
  serviceTimeMax?: number;
}

/**
 * @class
 * Initializes a new instance of the RequestReportRecordContract class.
 * @constructor
 * Request Report data.
 *
 * @member {string} [apiId] API identifier path. /apis/{apiId}
 * @member {string} [operationId] Operation identifier path.
 * /apis/{apiId}/operations/{operationId}
 * @member {string} [productId] Product identifier path. /products/{productId}
 * @member {string} [userId] User identifier path. /users/{userId}
 * @member {string} [method] The HTTP method associated with this request..
 * @member {string} [url] The full URL associated with this request.
 * @member {string} [ipAddress] The client IP address associated with this
 * request.
 * @member {string} [backendResponseCode] The HTTP status code received by the
 * gateway as a result of forwarding this request to the backend.
 * @member {number} [responseCode] The HTTP status code returned by the
 * gateway.
 * @member {number} [responseSize] The size of the response returned by the
 * gateway.
 * @member {date} [timestamp] The date and time when this request was received
 * by the gateway in ISO 8601 format.
 * @member {string} [cache] Specifies if response cache was involved in
 * generating the response. If the value is none, the cache was not used. If
 * the value is hit, cached response was returned. If the value is miss, the
 * cache was used but lookup resulted in a miss and request was fullfilled by
 * the backend.
 * @member {number} [apiTime] The total time it took to process this request.
 * @member {number} [serviceTime] he time it took to forward this request to
 * the backend and get the response back.
 * @member {string} [apiRegion] Azure region where the gateway that processed
 * this request is located.
 * @member {string} [subscriptionId] Subscription identifier path.
 * /subscriptions/{subscriptionId}
 * @member {string} [requestId] Request Identifier.
 * @member {number} [requestSize] The size of this request..
 */
export interface RequestReportRecordContract {
  apiId?: string;
  operationId?: string;
  readonly productId?: string;
  readonly userId?: string;
  method?: string;
  url?: string;
  ipAddress?: string;
  backendResponseCode?: string;
  responseCode?: number;
  responseSize?: number;
  timestamp?: Date;
  cache?: string;
  apiTime?: number;
  serviceTime?: number;
  apiRegion?: string;
  subscriptionId?: string;
  requestId?: string;
  requestSize?: number;
}

/**
 * @class
 * Initializes a new instance of the SubscriptionCreateParameters class.
 * @constructor
 * Subscription create details.
 *
 * @member {string} userId User (user id path) for whom subscription is being
 * created in form /users/{uid}
 * @member {string} productId Product (product id path) for which subscription
 * is being created in form /products/{productid}
 * @member {string} displayName Subscription name.
 * @member {string} [primaryKey] Primary subscription key. If not specified
 * during request key will be generated automatically.
 * @member {string} [secondaryKey] Secondary subscription key. If not specified
 * during request key will be generated automatically.
 * @member {string} [state] Initial subscription state. If no value is
 * specified, subscription is created with Submitted state. Possible states are
 * * active – the subscription is active, * suspended – the subscription is
 * blocked, and the subscriber cannot call any APIs of the product, * submitted
 * – the subscription request has been made by the developer, but has not yet
 * been approved or rejected, * rejected – the subscription request has been
 * denied by an administrator, * cancelled – the subscription has been
 * cancelled by the developer or administrator, * expired – the subscription
 * reached its expiration date and was deactivated. Possible values include:
 * 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled'
 */
export interface SubscriptionCreateParameters {
  userId: string;
  productId: string;
  displayName: string;
  primaryKey?: string;
  secondaryKey?: string;
  state?: string;
}

/**
 * @class
 * Initializes a new instance of the SubscriptionUpdateParameters class.
 * @constructor
 * Subscription update details.
 *
 * @member {string} [userId] User identifier path: /users/{uid}
 * @member {string} [productId] Product identifier path: /products/{productId}
 * @member {date} [expirationDate] Subscription expiration date. The setting is
 * for audit purposes only and the subscription is not automatically expired.
 * The subscription lifecycle can be managed by using the `state` property. The
 * date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified
 * by the ISO 8601 standard.
 * @member {string} [displayName] Subscription name.
 * @member {string} [primaryKey] Primary subscription key.
 * @member {string} [secondaryKey] Secondary subscription key.
 * @member {string} [state] Subscription state. Possible states are * active –
 * the subscription is active, * suspended – the subscription is blocked, and
 * the subscriber cannot call any APIs of the product, * submitted – the
 * subscription request has been made by the developer, but has not yet been
 * approved or rejected, * rejected – the subscription request has been denied
 * by an administrator, * cancelled – the subscription has been cancelled by
 * the developer or administrator, * expired – the subscription reached its
 * expiration date and was deactivated. Possible values include: 'suspended',
 * 'active', 'expired', 'submitted', 'rejected', 'cancelled'
 * @member {string} [stateComment] Comments describing subscription state
 * change by the administrator.
 */
export interface SubscriptionUpdateParameters {
  userId?: string;
  productId?: string;
  expirationDate?: Date;
  displayName?: string;
  primaryKey?: string;
  secondaryKey?: string;
  state?: string;
  stateComment?: string;
}

/**
 * @class
 * Initializes a new instance of the TagContract class.
 * @constructor
 * Tag Contract details.
 *
 * @member {string} displayName Tag name.
 */
export interface TagContract extends Resource {
  displayName: string;
}

/**
 * @class
 * Initializes a new instance of the TagCreateUpdateParameters class.
 * @constructor
 * Parameters supplied to Create/Update Tag operations.
 *
 * @member {string} displayName Tag name.
 */
export interface TagCreateUpdateParameters {
  displayName: string;
}

/**
 * @class
 * Initializes a new instance of the TagDescriptionContract class.
 * @constructor
 * Contract details.
 *
 * @member {string} [description] Description of the Tag.
 * @member {string} [externalDocsUrl] Absolute URL of external resources
 * describing the tag.
 * @member {string} [externalDocsDescription] Description of the external
 * resources describing the tag.
 * @member {string} [displayName] Tag name.
 */
export interface TagDescriptionContract extends Resource {
  description?: string;
  externalDocsUrl?: string;
  externalDocsDescription?: string;
  displayName?: string;
}

/**
 * @class
 * Initializes a new instance of the TagDescriptionCreateParameters class.
 * @constructor
 * Parameters supplied to the Create TagDescription operation.
 *
 * @member {string} [description] Description of the Tag.
 * @member {string} [externalDocsUrl] Absolute URL of external resources
 * describing the tag.
 * @member {string} [externalDocsDescription] Description of the external
 * resources describing the tag.
 */
export interface TagDescriptionCreateParameters {
  description?: string;
  externalDocsUrl?: string;
  externalDocsDescription?: string;
}

/**
 * @class
 * Initializes a new instance of the AccessInformationContract class.
 * @constructor
 * Tenant access information contract of the API Management service.
 *
 * @member {string} [id] Identifier.
 * @member {string} [primaryKey] Primary access key.
 * @member {string} [secondaryKey] Secondary access key.
 * @member {boolean} [enabled] Tenant access information of the API Management
 * service.
 */
export interface AccessInformationContract {
  id?: string;
  primaryKey?: string;
  secondaryKey?: string;
  enabled?: boolean;
}

/**
 * @class
 * Initializes a new instance of the AccessInformationUpdateParameters class.
 * @constructor
 * Tenant access information update parameters of the API Management service.
 *
 * @member {boolean} [enabled] Tenant access information of the API Management
 * service.
 */
export interface AccessInformationUpdateParameters {
  enabled?: boolean;
}

/**
 * @class
 * Initializes a new instance of the DeployConfigurationParameters class.
 * @constructor
 * Parameters supplied to the Deploy Configuration operation.
 *
 * @member {string} branch The name of the Git branch from which the
 * configuration is to be deployed to the configuration database.
 * @member {boolean} [force] The value enforcing deleting subscriptions to
 * products that are deleted in this update.
 */
export interface DeployConfigurationParameters {
  branch: string;
  force?: boolean;
}

/**
 * @class
 * Initializes a new instance of the OperationResultLogItemContract class.
 * @constructor
 * Log of the entity being created, updated or deleted.
 *
 * @member {string} [objectType] The type of entity contract.
 * @member {string} [action] Action like create/update/delete.
 * @member {string} [objectKey] Identifier of the entity being
 * created/updated/deleted.
 */
export interface OperationResultLogItemContract {
  objectType?: string;
  action?: string;
  objectKey?: string;
}

/**
 * @class
 * Initializes a new instance of the OperationResultContract class.
 * @constructor
 * Operation Result.
 *
 * @member {string} [id] Operation result identifier.
 * @member {string} [status] Status of an async operation. Possible values
 * include: 'Started', 'InProgress', 'Succeeded', 'Failed'
 * @member {date} [started] Start time of an async operation. The date conforms
 * to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601
 * standard.
 * @member {date} [updated] Last update time of an async operation. The date
 * conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the
 * ISO 8601 standard.
 * @member {string} [resultInfo] Optional result info.
 * @member {object} [error] Error Body Contract
 * @member {string} [error.code] Service-defined error code. This code serves
 * as a sub-status for the HTTP error code specified in the response.
 * @member {string} [error.message] Human-readable representation of the error.
 * @member {array} [error.details] The list of invalid fields send in request,
 * in case of validation error.
 * @member {array} [actionLog] This property if only provided as part of the
 * TenantConfiguration_Validate operation. It contains the log the entities
 * which will be updated/created/deleted as part of the
 * TenantConfiguration_Deploy operation.
 */
export interface OperationResultContract {
  id?: string;
  status?: string;
  started?: Date;
  updated?: Date;
  resultInfo?: string;
  error?: ErrorResponse;
  readonly actionLog?: OperationResultLogItemContract[];
}

/**
 * @class
 * Initializes a new instance of the SaveConfigurationParameter class.
 * @constructor
 * Parameters supplied to the Save Tenant Configuration operation.
 *
 * @member {string} branch The name of the Git branch in which to commit the
 * current configuration snapshot.
 * @member {boolean} [force] The value if true, the current configuration
 * database is committed to the Git repository, even if the Git repository has
 * newer changes that would be overwritten.
 */
export interface SaveConfigurationParameter {
  branch: string;
  force?: boolean;
}

/**
 * @class
 * Initializes a new instance of the TenantConfigurationSyncStateContract class.
 * @constructor
 * Tenant Configuration Synchronization State.
 *
 * @member {string} [branch] The name of Git branch.
 * @member {string} [commitId] The latest commit Id.
 * @member {boolean} [isExport] value indicating if last sync was save (true)
 * or deploy (false) operation.
 * @member {boolean} [isSynced] value indicating if last synchronization was
 * later than the configuration change.
 * @member {boolean} [isGitEnabled] value indicating whether Git configuration
 * access is enabled.
 * @member {date} [syncDate] The date of the latest synchronization. The date
 * conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the
 * ISO 8601 standard.
 * @member {date} [configurationChangeDate] The date of the latest
 * configuration change. The date conforms to the following format:
 * `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
 */
export interface TenantConfigurationSyncStateContract {
  branch?: string;
  commitId?: string;
  isExport?: boolean;
  isSynced?: boolean;
  isGitEnabled?: boolean;
  syncDate?: Date;
  configurationChangeDate?: Date;
}

/**
 * @class
 * Initializes a new instance of the GenerateSsoUrlResult class.
 * @constructor
 * Generate SSO Url operations response details.
 *
 * @member {string} [value] Redirect Url containing the SSO URL value.
 */
export interface GenerateSsoUrlResult {
  value?: string;
}

/**
 * @class
 * Initializes a new instance of the UserCreateParameters class.
 * @constructor
 * User create details.
 *
 * @member {string} [state] Account state. Specifies whether the user is active
 * or not. Blocked users are unable to sign into the developer portal or call
 * any APIs of subscribed products. Default state is Active. Possible values
 * include: 'active', 'blocked', 'pending', 'deleted'. Default value: 'active'
 * .
 * @member {string} [note] Optional note about a user set by the administrator.
 * @member {array} [identities] Collection of user identities.
 * @member {string} email Email address. Must not be empty and must be unique
 * within the service instance.
 * @member {string} firstName First name.
 * @member {string} lastName Last name.
 * @member {string} [password] User Password. If no value is provided, a
 * default password is generated.
 * @member {string} [confirmation] Determines the type of confirmation e-mail
 * that will be sent to the newly created user. Possible values include:
 * 'signup', 'invite'
 */
export interface UserCreateParameters {
  state?: string;
  note?: string;
  readonly identities?: UserIdentityContract[];
  email: string;
  firstName: string;
  lastName: string;
  password?: string;
  confirmation?: string;
}

/**
 * @class
 * Initializes a new instance of the UserTokenParameters class.
 * @constructor
 * Parameters supplied to the Get User Token operation.
 *
 * @member {string} keyType The Key to be used to generate token for user.
 * Possible values include: 'primary', 'secondary'. Default value: 'primary' .
 * @member {date} expiry The Expiry time of the Token. Maximum token expiry
 * time is set to 30 days. The date conforms to the following format:
 * `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
 */
export interface UserTokenParameters {
  keyType: string;
  expiry: Date;
}

/**
 * @class
 * Initializes a new instance of the UserTokenResult class.
 * @constructor
 * Get User Token response details.
 *
 * @member {string} [value] Shared Access Authorization token for the User.
 */
export interface UserTokenResult {
  value?: string;
}

/**
 * @class
 * Initializes a new instance of the UserUpdateParameters class.
 * @constructor
 * User update parameters.
 *
 * @member {string} [state] Account state. Specifies whether the user is active
 * or not. Blocked users are unable to sign into the developer portal or call
 * any APIs of subscribed products. Default state is Active. Possible values
 * include: 'active', 'blocked', 'pending', 'deleted'. Default value: 'active'
 * .
 * @member {string} [note] Optional note about a user set by the administrator.
 * @member {array} [identities] Collection of user identities.
 * @member {string} [email] Email address. Must not be empty and must be unique
 * within the service instance.
 * @member {string} [password] User Password.
 * @member {string} [firstName] First name.
 * @member {string} [lastName] Last name.
 */
export interface UserUpdateParameters {
  state?: string;
  note?: string;
  readonly identities?: UserIdentityContract[];
  email?: string;
  password?: string;
  firstName?: string;
  lastName?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiVersionSetContract class.
 * @constructor
 * Api Version Set Contract details.
 *
 * @member {string} [description] Description of API Version Set.
 * @member {string} [versionQueryName] Name of query parameter that indicates
 * the API Version if versioningScheme is set to `query`.
 * @member {string} [versionHeaderName] Name of HTTP header parameter that
 * indicates the API Version if versioningScheme is set to `header`.
 * @member {string} displayName Name of API Version Set
 * @member {string} versioningScheme An value that determines where the API
 * Version identifer will be located in a HTTP request. Possible values
 * include: 'Segment', 'Query', 'Header'
 */
export interface ApiVersionSetContract extends Resource {
  description?: string;
  versionQueryName?: string;
  versionHeaderName?: string;
  displayName: string;
  versioningScheme: string;
}

/**
 * @class
 * Initializes a new instance of the ApiVersionSetEntityBase class.
 * @constructor
 * Api Version set base parameters
 *
 * @member {string} [description] Description of API Version Set.
 * @member {string} [versionQueryName] Name of query parameter that indicates
 * the API Version if versioningScheme is set to `query`.
 * @member {string} [versionHeaderName] Name of HTTP header parameter that
 * indicates the API Version if versioningScheme is set to `header`.
 */
export interface ApiVersionSetEntityBase {
  description?: string;
  versionQueryName?: string;
  versionHeaderName?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiVersionSetUpdateParameters class.
 * @constructor
 * Parameters to update or create an Api Version Set Contract.
 *
 * @member {string} [description] Description of API Version Set.
 * @member {string} [versionQueryName] Name of query parameter that indicates
 * the API Version if versioningScheme is set to `query`.
 * @member {string} [versionHeaderName] Name of HTTP header parameter that
 * indicates the API Version if versioningScheme is set to `header`.
 * @member {string} [displayName] Name of API Version Set
 * @member {string} [versioningScheme] An value that determines where the API
 * Version identifer will be located in a HTTP request. Possible values
 * include: 'Segment', 'Query', 'Header'
 */
export interface ApiVersionSetUpdateParameters {
  description?: string;
  versionQueryName?: string;
  versionHeaderName?: string;
  displayName?: string;
  versioningScheme?: string;
}

/**
 * @class
 * Initializes a new instance of the RegionListResult class.
 * @constructor
 * Lists Regions operation response details.
 *
 * @member {number} [count] Total record count number across all pages.
 * @member {string} [nextLink] Next page link if any.
 */
export interface RegionListResult extends Array<RegionContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiCollection class.
 * @constructor
 * Paged Api list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface ApiCollection extends Array<ApiContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the TagResourceCollection class.
 * @constructor
 * Paged Tag list representation.
 *
 * @member {number} [count] Total record count number across all pages.
 * @member {string} [nextLink] Next page link if any.
 */
export interface TagResourceCollection extends Array<TagResourceContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiRevisionCollection class.
 * @constructor
 * Paged Api Revision list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface ApiRevisionCollection extends Array<ApiRevisionContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiReleaseCollection class.
 * @constructor
 * Paged Api Revision list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface ApiReleaseCollection extends Array<ApiReleaseContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the OperationCollection class.
 * @constructor
 * Paged Operation list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface OperationCollection extends Array<OperationContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the ProductCollection class.
 * @constructor
 * Paged Products list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface ProductCollection extends Array<ProductContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the SchemaCollection class.
 * @constructor
 * The response of the list schema operation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface SchemaCollection extends Array<SchemaContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the DiagnosticCollection class.
 * @constructor
 * Paged Diagnostic list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface DiagnosticCollection extends Array<DiagnosticContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the LoggerCollection class.
 * @constructor
 * Paged Logger list representation.
 *
 * @member {number} [count] Total record count number across all pages.
 * @member {string} [nextLink] Next page link if any.
 */
export interface LoggerCollection extends Array<LoggerContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the AuthorizationServerCollection class.
 * @constructor
 * Paged OAuth2 Authorization Servers list representation.
 *
 * @member {number} [count] Total record count number across all pages.
 * @member {string} [nextLink] Next page link if any.
 */
export interface AuthorizationServerCollection extends Array<AuthorizationServerContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the BackendCollection class.
 * @constructor
 * Paged Backend list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface BackendCollection extends Array<BackendContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the CertificateCollection class.
 * @constructor
 * Paged Certificates list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface CertificateCollection extends Array<CertificateContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the OperationListResult class.
 * @constructor
 * Result of the request to list REST API operations. It contains a list of
 * operations and a URL nextLink 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> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiManagementServiceListResult class.
 * @constructor
 * The response of the List API Management services operation.
 *
 * @member {string} [nextLink] Link to the next set of results. Not empty if
 * Value contains incomplete list of API Management services.
 */
export interface ApiManagementServiceListResult extends Array<ApiManagementServiceResource> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the EmailTemplateCollection class.
 * @constructor
 * Paged email template list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface EmailTemplateCollection extends Array<EmailTemplateContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the GroupCollection class.
 * @constructor
 * Paged Group list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface GroupCollection extends Array<GroupContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the UserCollection class.
 * @constructor
 * Paged Users list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface UserCollection extends Array<UserContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the IdentityProviderList class.
 * @constructor
 * List of all the Identity Providers configured on the service instance.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface IdentityProviderList extends Array<IdentityProviderContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the NotificationCollection class.
 * @constructor
 * Paged Notification list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface NotificationCollection extends Array<NotificationContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the OpenIdConnectProviderCollection class.
 * @constructor
 * Paged OpenIdProviders list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface OpenIdConnectProviderCollection extends Array<OpenidConnectProviderContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the SubscriptionCollection class.
 * @constructor
 * Paged Subscriptions list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface SubscriptionCollection extends Array<SubscriptionContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the PropertyCollection class.
 * @constructor
 * Paged Property list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface PropertyCollection extends Array<PropertyContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the ReportCollection class.
 * @constructor
 * Paged Report records list representation.
 *
 * @member {number} [count] Total record count number across all pages.
 * @member {string} [nextLink] Next page link if any.
 */
export interface ReportCollection extends Array<ReportRecordContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the RequestReportCollection class.
 * @constructor
 * Paged Report records list representation.
 *
 * @member {number} [count] Total record count number across all pages.
 */
export interface RequestReportCollection extends Array<RequestReportRecordContract> {
}

/**
 * @class
 * Initializes a new instance of the TagCollection class.
 * @constructor
 * Paged Tag list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface TagCollection extends Array<TagContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the TagDescriptionCollection class.
 * @constructor
 * Paged TagDescription list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface TagDescriptionCollection extends Array<TagDescriptionContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the UserIdentityCollection class.
 * @constructor
 * List of Users Identity list representation.
 *
 * @member {number} [count] Total record count number across all pages.
 * @member {string} [nextLink] Next page link if any.
 */
export interface UserIdentityCollection extends Array<UserIdentityContract> {
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the ApiVersionSetCollection class.
 * @constructor
 * Paged Api Version Set list representation.
 *
 * @member {string} [nextLink] Next page link if any.
 */
export interface ApiVersionSetCollection extends Array<ApiVersionSetContract> {
  nextLink?: string;
}

redpajama_set_name: RedPajamaGithub