/* eslint-disable @typescript-eslint/no-empty-object-type */

export declare interface IAmfDomainElement {
  '@id': string
  '@type': string[]
  '@context'?: Record<string, string>
  'http://a.ml/vocabularies/document#customDomainProperties'?: []
}

export interface IAmfExternalDomainElement extends IAmfDomainElement {
  'http://a.ml/vocabularies/document#raw': IAmfLdValueString[]
  'http://a.ml/vocabularies/core#mediaType': IAmfLdValueString[]
}

export declare interface IAmfLinkable {
  'http://a.ml/vocabularies/document#link-target'?: IAmfLdIdValue[]
  'http://a.ml/vocabularies/document#link-label'?: IAmfLdValueString[]
}

export declare interface IAmfLdValue<T> {
  '@value': T
}

export declare interface IAmfLdIdValue {
  '@id': string
}

export declare interface IAmfLdValueString extends IAmfLdValue<string> {}

export declare interface IAmfLdValueBoolean extends IAmfLdValue<boolean> {}

export declare interface IAmfLdValueNumber extends IAmfLdValue<number> {}

export declare interface IAmfLdValueRange extends IAmfLdIdValue {
  '@type'?: string[]
}

export interface IAmfDocument extends IAmfDomainElement {
  'http://a.ml/vocabularies/document#version'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/document#root'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/document#encodes'?: IAmfDomainElement[]
  'http://a.ml/vocabularies/document#references'?: IAmfDomainElement[]
  'http://a.ml/vocabularies/document#declares'?: IAmfDomainElement[]
}

export interface IAmfApi extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#server'?: IAmfServer[]
  'http://a.ml/vocabularies/apiContract#accepts'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#contentType'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#scheme'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#version'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#documentation'?: IAmfCreativeWork[]
  'http://a.ml/vocabularies/apiContract#endpoint'?: IAmfEndPoint[]
  'http://a.ml/vocabularies/apiContract#tag'?: IAmfTag[]
  'http://a.ml/vocabularies/core#provider'?: IAmfOrganization[]
  'http://a.ml/vocabularies/core#license'?: IAmfLicense[]
}

export interface IAmfWebApi extends IAmfApi {}
export interface IAmfAsyncApi extends IAmfApi {}

export interface IAmfModule extends IAmfDomainElement {
  'http://a.ml/vocabularies/document#version'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/document#root'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/document#declares'?: IAmfDomainElement[]
  'http://a.ml/vocabularies/document#usage'?: IAmfLdValueString[]
}

export interface IAmfDataTypeFragment extends IAmfDomainElement {
  'http://a.ml/vocabularies/document#version'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/document#root'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/document#encodes'?: IAmfShape[]
  'http://a.ml/vocabularies/document#references'?: IAmfDomainElement[]
}

export interface IAmfExternalFragment extends IAmfDomainElement {
  'http://a.ml/vocabularies/document#version'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/document#root'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/document#encodes'?: IAmfExternalDomainElement[]
}

export interface IAmfOrganization extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#email'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#url'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
}

export interface IAmfLicense extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#url'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
}

export declare interface IAmfServer extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#urlTemplate'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#variable'?: IAmfParameter[]
}

export declare interface IAmfEndPoint extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#guiSummary'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#path'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#supportedOperation'?: IAmfOperation[]
  'http://a.ml/vocabularies/apiContract#parameter'?: IAmfParameter[]
  'http://a.ml/vocabularies/apiContract#payload'?: IAmfPayload[]
  'http://a.ml/vocabularies/apiContract#server'?: IAmfServer[]
  'http://a.ml/vocabularies/security#security'?: IAmfSecurityRequirement[]
  'http://a.ml/vocabularies/document#extends'?: IAmfParametrizedDeclaration[]
}

export declare interface IAmfOperation extends IAmfDomainElement {
  'http://a.ml/vocabularies/apiContract#method': IAmfLdValueString[]
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/shapes#deprecated'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/apiContract#guiSummary'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#documentation'?: IAmfCreativeWork[]
  'http://a.ml/vocabularies/apiContract#scheme'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#accepts'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#contentType'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#expects'?: IAmfRequest[]
  'http://a.ml/vocabularies/apiContract#returns'?: IAmfResponse[]
  'http://a.ml/vocabularies/security#security'?: IAmfSecurityRequirement[]
  'http://a.ml/vocabularies/apiContract#callback'?: IAmfCallback[]
  'http://a.ml/vocabularies/apiContract#server'?: IAmfServer[]
  'http://a.ml/vocabularies/document#extends'?: IAmfParametrizedTrait[]
}

export interface IAmfPayload extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#mediaType': IAmfLdValueString[]
  'http://a.ml/vocabularies/shapes#schema'?: IAmfDomainElement[]
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#examples'?: IAmfExample[]
  // encoding: Encoding[]
}

export interface IAmfRequest extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#payload'?: IAmfPayload[]
  'http://a.ml/vocabularies/apiContract#required'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/apiContract#parameter'?: IAmfParameter[]
  'http://a.ml/vocabularies/apiContract#uriParameter'?: IAmfParameter[]
  'http://a.ml/vocabularies/apiContract#header'?: IAmfParameter[]
  'http://a.ml/vocabularies/apiContract#cookieParameter'?: IAmfParameter[]
  'http://a.ml/vocabularies/apiContract#queryString'?: IAmfShape
}

export interface IAmfResponse extends IAmfDomainElement {
  'http://a.ml/vocabularies/apiContract#statusCode': IAmfLdValueString[]
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#payload'?: IAmfPayload[]
  'http://a.ml/vocabularies/apiContract#header'?: IAmfParameter[]
  'http://a.ml/vocabularies/apiContract#examples'?: IAmfExample[]
  'http://a.ml/vocabularies/apiContract#link'?: IAmfTemplatedLink[]
}

export declare interface IAmfParameter extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/shapes#schema'?: IAmfDomainElement[]
  'http://a.ml/vocabularies/shapes#deprecated'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/apiContract#paramName'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#required'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/apiContract#binding'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#allowEmptyValue'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/apiContract#style'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#explode'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/apiContract#allowReserved'?: IAmfLdValueBoolean[]

  // payloads: Payload[]
  // examples: Example[]
}

export interface IAmfTemplatedLink extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#operationId': IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#mapping': IAmfIriTemplateMapping[]
  'http://a.ml/vocabularies/apiContract#server'?: IAmfServer[]
  // not sure what this is
  // template: StrField
  // requestBody: StrField
}

export interface IAmfIriTemplateMapping extends IAmfDomainElement {
  'http://a.ml/vocabularies/apiContract#templateVariable'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#linkExpression'?: IAmfLdValueString[]
}

export declare interface IAmfShape extends IAmfDomainElement, IAmfLinkable {
  'http://www.w3.org/ns/shacl#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#displayName'?: IAmfLdValueString[]
  'http://www.w3.org/ns/shacl#defaultValueStr'?: IAmfLdValueString[]
  'http://www.w3.org/ns/shacl#defaultValue'?: IAmfDataNode[]
  'http://a.ml/vocabularies/shapes#readOnly'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/shapes#writeOnly'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/shapes#deprecated'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/document#location'?: IAmfLdValueString[]
  'http://www.w3.org/ns/shacl#or'?: IAmfShape[]
  'http://www.w3.org/ns/shacl#and'?: IAmfShape[]
  'http://www.w3.org/ns/shacl#xone'?: IAmfShape[]
  'http://www.w3.org/ns/shacl#not'?: IAmfShape[]
  // values: DataNode[]
  // inherits: Shape[]
}

export declare interface IAmfPropertyShape extends IAmfShape {
  'http://www.w3.org/ns/shacl#path'?: IAmfLdIdValue[]
  'http://a.ml/vocabularies/shapes#range'?: IAmfShape[]
  'http://www.w3.org/ns/shacl#minCount'?: IAmfLdValueNumber[]
  'http://www.w3.org/ns/shacl#maxCount'?: IAmfLdValueNumber[]
  // patternName: StrField
}

export declare interface IAmfAnyShape extends IAmfShape {
  'http://a.ml/vocabularies/core#documentation'?: IAmfCreativeWork[]
  'http://a.ml/vocabularies/shapes#xmlSerialization'?: IAmfDomainElement[]
  'http://a.ml/vocabularies/apiContract#examples'?: IAmfDomainElement[]
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
}

export declare interface IAmfDataArrangeShape extends IAmfAnyShape {
  // minItems: IntField
  // maxItems: IntField
  // uniqueItems: BoolField
}

export declare interface IAmfArrayShape extends IAmfDataArrangeShape {
  'http://a.ml/vocabularies/shapes#items'?: IAmfShape[]
}

export declare interface IAmfUnionShape extends IAmfAnyShape {
  'http://a.ml/vocabularies/shapes#anyOf'?: IAmfShape[]
}

export declare interface IAmfTupleShape extends IAmfAnyShape {
  'http://a.ml/vocabularies/shapes#items'?: IAmfShape[]
}

export declare interface IAmfFileShape extends IAmfAnyShape {
  'http://a.ml/vocabularies/shapes#fileType'?: IAmfLdValueString[]
  'http://www.w3.org/ns/shacl#pattern'?: IAmfLdValueString[]
  'http://www.w3.org/ns/shacl#minLength'?: IAmfLdValueNumber[]
  'http://www.w3.org/ns/shacl#maxLength'?: IAmfLdValueNumber[]
  'http://a.ml/vocabularies/shapes#minimum'?: IAmfLdValueNumber[]
  'http://a.ml/vocabularies/shapes#maximum'?: IAmfLdValueNumber[]
  'http://a.ml/vocabularies/shapes#exclusiveMinimum'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/shapes#exclusiveMaximum'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/shapes#format'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/shapes#multipleOf'?: IAmfLdValueNumber[]
}

export declare interface IAmfNilShape extends IAmfAnyShape {}

export declare interface IAmfRecursiveShape extends IAmfShape {
  'http://a.ml/vocabularies/shapes#fixPoint'?: IAmfLdIdValue[]
  'http://a.ml/vocabularies/document#recursive'?: IAmfLdValueBoolean[]
}

export declare interface IAmfScalarShape extends IAmfShape {
  'http://www.w3.org/ns/shacl#datatype'?: IAmfLdIdValue[]
  'http://www.w3.org/ns/shacl#pattern'?: IAmfLdValueString[]
  'http://www.w3.org/ns/shacl#minLength'?: IAmfLdValueNumber[]
  'http://www.w3.org/ns/shacl#maxLength'?: IAmfLdValueNumber[]
  'http://a.ml/vocabularies/shapes#minimum': IAmfLdValueNumber[]
  'http://a.ml/vocabularies/shapes#maximum': IAmfLdValueNumber[]
  'http://a.ml/vocabularies/shapes#exclusiveMinimum': IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/shapes#exclusiveMaximum': IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/shapes#format'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/shapes#multipleOf'?: IAmfLdValueNumber[]
}

export declare interface IAmfSchemaShape extends IAmfShape {
  'http://a.ml/vocabularies/core#mediaType': IAmfLdValueString[]
  'http://a.ml/vocabularies/document#raw'?: IAmfLdValueString[]
}

export declare interface IAmfNodeShape extends IAmfAnyShape {
  // minProperties: IntField
  // maxProperties: IntField
  'http://www.w3.org/ns/shacl#closed'?: IAmfLdValueBoolean[]
  // customShapeProperties?: PropertyShape[]
  // customShapePropertyDefinitions?: PropertyShape[]
  'http://a.ml/vocabularies/shapes#discriminator'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/shapes#discriminatorValue'?: IAmfLdValueString[]
  'http://www.w3.org/ns/shacl#property'?: IAmfPropertyShape[]
  // dependencies: PropertyDependencies[]
}

export declare interface IAmfDataNode extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
}

export declare interface IAmfObjectNode extends IAmfDataNode {
  // [key: string]: DataNode[];
}

export declare interface IAmfArrayNode extends IAmfDataNode {}

export declare interface IAmfScalarNode extends IAmfDataNode {
  'http://a.ml/vocabularies/data#value'?: IAmfLdValueString[]
  'http://www.w3.org/ns/shacl#datatype'?: IAmfLdIdValue[]
}

export declare interface IAmfExample extends IAmfDomainElement, IAmfLinkable {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#displayName'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/data#value'?: IAmfLdIdValue[]
  'http://a.ml/vocabularies/document#structuredValue'?: IAmfDataNode[]
  'http://a.ml/vocabularies/document#strict'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/core#mediaType'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/document#raw'?: IAmfLdValueString[]
}

export interface IAmfCreativeWork extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#title'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
}

export interface IAmfSecurityRequirement extends IAmfDomainElement {
  'http://a.ml/vocabularies/security#schemes'?: IAmfParametrizedSecurityScheme[]
  // not sure if this is the right key. Can't generate an example.
  'http://a.ml/vocabularies/security#name'?: IAmfLdValueString[]
}

export interface IAmfParametrizedSecurityScheme extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/security#scheme'?: IAmfSecurityScheme[]
  'http://a.ml/vocabularies/security#settings': IAmfSettings[]
}

export interface IAmfSecurityScheme extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/security#type'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#displayName'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#parameter'?: IAmfParameter[]
  'http://a.ml/vocabularies/apiContract#header'?: IAmfParameter[]
  'http://a.ml/vocabularies/security#settings'?: IAmfSettings[]
  'http://a.ml/vocabularies/apiContract#response'?: IAmfResponse[]
  'http://a.ml/vocabularies/apiContract#queryString'?: IAmfShape
}

export interface IAmfSettings extends IAmfDomainElement {
  // additionalProperties: DataNode;
}

export interface IAmfOAuth1Settings extends IAmfSettings {
  'http://a.ml/vocabularies/security#requestTokenUri'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/security#authorizationUri'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/security#tokenCredentialsUri'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/security#signature': IAmfLdValueString[]
}

export interface IAmfOAuth2Settings extends IAmfSettings {
  'http://a.ml/vocabularies/security#authorizationGrant': IAmfLdValueString[]
  'http://a.ml/vocabularies/security#flows'?: IAmfOAuth2Flow[]
}

export interface IAmfOAuth2Flow extends IAmfSettings {
  'http://a.ml/vocabularies/security#authorizationUri'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/security#accessTokenUri': IAmfLdValueString[]
  'http://a.ml/vocabularies/security#flow'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/security#refreshUri': IAmfLdValueString[]
  'http://a.ml/vocabularies/security#scope'?: IAmfScope[]
}

export interface IAmfApiKeySettings extends IAmfSettings {
  'http://a.ml/vocabularies/core#name': IAmfLdValueString[]
  'http://a.ml/vocabularies/security#in': IAmfLdValueString[]
}

export interface IAmfHttpSettings extends IAmfSettings {
  'http://a.ml/vocabularies/security#scheme'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/security#bearerFormat'?: IAmfLdValueString[]
}

export interface IAmfOpenIdConnectSettings extends IAmfSettings {
  'http://a.ml/vocabularies/security#openIdConnectUrl': IAmfLdValueString[]
}

export interface IAmfScope extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name': IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description': IAmfLdValueString[]
}

export interface IAmfCallback extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#expression'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/apiContract#endpoint'?: IAmfEndPoint[]
}

export interface IAmfXMLSerializer extends IAmfDomainElement {
  'http://a.ml/vocabularies/shapes#xmlAttribute'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/shapes#xmlWrapped'?: IAmfLdValueBoolean[]
  'http://a.ml/vocabularies/shapes#xmlName'?: IAmfLdValueBoolean[]
}

export interface IAmfTag extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
}

export interface IAmfDocumentSourceMaps extends IAmfDomainElement {
  'http://a.ml/vocabularies/document-source-maps#synthesized-field'?: IAmfSynthesizedField[]
  'http://a.ml/vocabularies/document-source-maps#lexical'?: IAmfSynthesizedField[]
  'http://a.ml/vocabularies/document-source-maps#tracked-element'?: IAmfSynthesizedField[]
}

export interface IAmfSynthesizedField {
  '@id': string
  'http://a.ml/vocabularies/document-source-maps#element'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/document-source-maps#value'?: IAmfLdValueString[]
}

export interface IAmfParametrizedDeclaration extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/document#target'?: IAmfAbstractDeclaration[]
  'http://a.ml/vocabularies/document#variable'?: IAmfVariableValue[]
}

export interface IAmfVariableValue extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/document#value'?: IAmfDataNode[]
}

export interface IAmfAbstractDeclaration extends IAmfDomainElement {
  'http://a.ml/vocabularies/core#name'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/core#description'?: IAmfLdValueString[]
  'http://a.ml/vocabularies/document#dataNode'?: IAmfDataNode[]
  'http://a.ml/vocabularies/document#variable'?: IAmfLdValueString[]
}

export interface IAmfParametrizedTrait extends IAmfParametrizedDeclaration {}
export interface IAmfParametrizedResourceType extends IAmfParametrizedDeclaration {}
