text:
# This file is auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: backup
using AWS.Compat
using AWS.UUIDs
"""
    CreateBackupPlan()

Creates a backup plan using a backup plan name and backup rules. A backup plan is a document that contains information that AWS Backup uses to schedule tasks that create recovery points for resources. If you call CreateBackupPlan with a plan that already exists, an AlreadyExistsException is returned.

# Required Parameters
- `BackupPlan`: Specifies the body of a backup plan. Includes a BackupPlanName and one or more sets of Rules.

# Optional Parameters
- `BackupPlanTags`: To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair. The specified tags are assigned to all backups created with this plan.
- `CreatorRequestId`: Identifies the request and allows failed requests to be retried without the risk of running the operation twice. If the request includes a CreatorRequestId that matches an existing backup plan, that plan is returned. This parameter is optional.
"""

create_backup_plan(BackupPlan; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/backup/plans/", Dict{String, Any}("BackupPlan"=>BackupPlan); aws_config=aws_config)
create_backup_plan(BackupPlan, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/backup/plans/", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("BackupPlan"=>BackupPlan), args)); aws_config=aws_config)

"""
    CreateBackupSelection()

Creates a JSON document that specifies a set of resources to assign to a backup plan. Resources can be included by specifying patterns for a ListOfTags and selected Resources.  For example, consider the following patterns:    Resources: \"arn:aws:ec2:region:account-id:volume/volume-id\"     ConditionKey:\"department\"   ConditionValue:\"finance\"   ConditionType:\"StringEquals\"     ConditionKey:\"importance\"   ConditionValue:\"critical\"   ConditionType:\"StringEquals\"    Using these patterns would back up all Amazon Elastic Block Store (Amazon EBS) volumes that are tagged as \"department=finance\", \"importance=critical\", in addition to an EBS volume with the specified volume ID. Resources and conditions are additive in that all resources that match the pattern are selected. This shouldn't be confused with a logical AND, where all conditions must match. The matching patterns are logically put together using the OR operator. In other words, all patterns that match are selected for backup.

# Required Parameters
- `BackupSelection`: Specifies the body of a request to assign a set of resources to a backup plan.
- `backupPlanId`: Uniquely identifies the backup plan to be associated with the selection of resources.

# Optional Parameters
- `CreatorRequestId`: A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice.
"""

create_backup_selection(BackupSelection, backupPlanId; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/backup/plans/$(backupPlanId)/selections/", Dict{String, Any}("BackupSelection"=>BackupSelection); aws_config=aws_config)
create_backup_selection(BackupSelection, backupPlanId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/backup/plans/$(backupPlanId)/selections/", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("BackupSelection"=>BackupSelection), args)); aws_config=aws_config)

"""
    CreateBackupVault()

Creates a logical container where backups are stored. A CreateBackupVault request includes a name, optionally one or more resource tags, an encryption key, and a request ID.  Sensitive data, such as passport numbers, should not be included the name of a backup vault.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

# Optional Parameters
- `BackupVaultTags`: Metadata that you can assign to help organize the resources that you create. Each tag is a key-value pair.
- `CreatorRequestId`: A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice.
- `EncryptionKeyArn`: The server-side encryption key that is used to protect your backups; for example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
"""

create_backup_vault(backupVaultName; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/backup-vaults/$(backupVaultName)"; aws_config=aws_config)
create_backup_vault(backupVaultName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/backup-vaults/$(backupVaultName)", args; aws_config=aws_config)

"""
    DeleteBackupPlan()

Deletes a backup plan. A backup plan can only be deleted after all associated selections of resources have been deleted. Deleting a backup plan deletes the current version of a backup plan. Previous versions, if any, will still exist.

# Required Parameters
- `backupPlanId`: Uniquely identifies a backup plan.

"""

delete_backup_plan(backupPlanId; aws_config::AWSConfig=global_aws_config()) = backup("DELETE", "/backup/plans/$(backupPlanId)"; aws_config=aws_config)
delete_backup_plan(backupPlanId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("DELETE", "/backup/plans/$(backupPlanId)", args; aws_config=aws_config)

"""
    DeleteBackupSelection()

Deletes the resource selection associated with a backup plan that is specified by the SelectionId.

# Required Parameters
- `backupPlanId`: Uniquely identifies a backup plan.
- `selectionId`: Uniquely identifies the body of a request to assign a set of resources to a backup plan.

"""

delete_backup_selection(backupPlanId, selectionId; aws_config::AWSConfig=global_aws_config()) = backup("DELETE", "/backup/plans/$(backupPlanId)/selections/$(selectionId)"; aws_config=aws_config)
delete_backup_selection(backupPlanId, selectionId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("DELETE", "/backup/plans/$(backupPlanId)/selections/$(selectionId)", args; aws_config=aws_config)

"""
    DeleteBackupVault()

Deletes the backup vault identified by its name. A vault can be deleted only if it is empty.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

"""

delete_backup_vault(backupVaultName; aws_config::AWSConfig=global_aws_config()) = backup("DELETE", "/backup-vaults/$(backupVaultName)"; aws_config=aws_config)
delete_backup_vault(backupVaultName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("DELETE", "/backup-vaults/$(backupVaultName)", args; aws_config=aws_config)

"""
    DeleteBackupVaultAccessPolicy()

Deletes the policy document that manages permissions on a backup vault.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

"""

delete_backup_vault_access_policy(backupVaultName; aws_config::AWSConfig=global_aws_config()) = backup("DELETE", "/backup-vaults/$(backupVaultName)/access-policy"; aws_config=aws_config)
delete_backup_vault_access_policy(backupVaultName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("DELETE", "/backup-vaults/$(backupVaultName)/access-policy", args; aws_config=aws_config)

"""
    DeleteBackupVaultNotifications()

Deletes event notifications for the specified backup vault.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Region where they are created. They consist of lowercase letters, numbers, and hyphens.

"""

delete_backup_vault_notifications(backupVaultName; aws_config::AWSConfig=global_aws_config()) = backup("DELETE", "/backup-vaults/$(backupVaultName)/notification-configuration"; aws_config=aws_config)
delete_backup_vault_notifications(backupVaultName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("DELETE", "/backup-vaults/$(backupVaultName)/notification-configuration", args; aws_config=aws_config)

"""
    DeleteRecoveryPoint()

Deletes the recovery point specified by a recovery point ID.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
- `recoveryPointArn`: An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

"""

delete_recovery_point(backupVaultName, recoveryPointArn; aws_config::AWSConfig=global_aws_config()) = backup("DELETE", "/backup-vaults/$(backupVaultName)/recovery-points/$(recoveryPointArn)"; aws_config=aws_config)
delete_recovery_point(backupVaultName, recoveryPointArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("DELETE", "/backup-vaults/$(backupVaultName)/recovery-points/$(recoveryPointArn)", args; aws_config=aws_config)

"""
    DescribeBackupJob()

Returns backup job details for the specified BackupJobId.

# Required Parameters
- `backupJobId`: Uniquely identifies a request to AWS Backup to back up a resource.

"""

describe_backup_job(backupJobId; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-jobs/$(backupJobId)"; aws_config=aws_config)
describe_backup_job(backupJobId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-jobs/$(backupJobId)", args; aws_config=aws_config)

"""
    DescribeBackupVault()

Returns metadata about a backup vault specified by its name.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

"""

describe_backup_vault(backupVaultName; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/$(backupVaultName)"; aws_config=aws_config)
describe_backup_vault(backupVaultName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/$(backupVaultName)", args; aws_config=aws_config)

"""
    DescribeCopyJob()

Returns metadata associated with creating a copy of a resource.

# Required Parameters
- `copyJobId`: Uniquely identifies a copy job.

"""

describe_copy_job(copyJobId; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/copy-jobs/$(copyJobId)"; aws_config=aws_config)
describe_copy_job(copyJobId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/copy-jobs/$(copyJobId)", args; aws_config=aws_config)

"""
    DescribeProtectedResource()

Returns information about a saved resource, including the last time it was backed up, its Amazon Resource Name (ARN), and the AWS service type of the saved resource.

# Required Parameters
- `resourceArn`: An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.

"""

describe_protected_resource(resourceArn; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/resources/$(resourceArn)"; aws_config=aws_config)
describe_protected_resource(resourceArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/resources/$(resourceArn)", args; aws_config=aws_config)

"""
    DescribeRecoveryPoint()

Returns metadata associated with a recovery point, including ID, status, encryption, and lifecycle.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
- `recoveryPointArn`: An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

"""

describe_recovery_point(backupVaultName, recoveryPointArn; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/$(backupVaultName)/recovery-points/$(recoveryPointArn)"; aws_config=aws_config)
describe_recovery_point(backupVaultName, recoveryPointArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/$(backupVaultName)/recovery-points/$(recoveryPointArn)", args; aws_config=aws_config)

"""
    DescribeRegionSettings()

Returns the current service opt-in settings for the Region. If the service has a value set to true, AWS Backup tries to protect that service's resources in this Region, when included in an on-demand backup or scheduled backup plan. If the value is set to false for a service, AWS Backup does not try to protect that service's resources in this Region.

"""

describe_region_settings(; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/account-settings"; aws_config=aws_config)
describe_region_settings(args::AbstractDict{String, Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/account-settings", args; aws_config=aws_config)

"""
    DescribeRestoreJob()

Returns metadata associated with a restore job that is specified by a job ID.

# Required Parameters
- `restoreJobId`: Uniquely identifies the job that restores a recovery point.

"""

describe_restore_job(restoreJobId; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/restore-jobs/$(restoreJobId)"; aws_config=aws_config)
describe_restore_job(restoreJobId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/restore-jobs/$(restoreJobId)", args; aws_config=aws_config)

"""
    ExportBackupPlanTemplate()

Returns the backup plan that is specified by the plan ID as a backup template.

# Required Parameters
- `backupPlanId`: Uniquely identifies a backup plan.

"""

export_backup_plan_template(backupPlanId; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/plans/$(backupPlanId)/toTemplate/"; aws_config=aws_config)
export_backup_plan_template(backupPlanId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/plans/$(backupPlanId)/toTemplate/", args; aws_config=aws_config)

"""
    GetBackupPlan()

Returns BackupPlan details for the specified BackupPlanId. Returns the body of a backup plan in JSON format, in addition to plan metadata.

# Required Parameters
- `backupPlanId`: Uniquely identifies a backup plan.

# Optional Parameters
- `versionId`: Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.
"""

get_backup_plan(backupPlanId; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/plans/$(backupPlanId)/"; aws_config=aws_config)
get_backup_plan(backupPlanId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/plans/$(backupPlanId)/", args; aws_config=aws_config)

"""
    GetBackupPlanFromJSON()

Returns a valid JSON document specifying a backup plan or an error.

# Required Parameters
- `BackupPlanTemplateJson`: A customer-supplied backup plan document in JSON format.

"""

get_backup_plan_from_json(BackupPlanTemplateJson; aws_config::AWSConfig=global_aws_config()) = backup("POST", "/backup/template/json/toPlan", Dict{String, Any}("BackupPlanTemplateJson"=>BackupPlanTemplateJson); aws_config=aws_config)
get_backup_plan_from_json(BackupPlanTemplateJson, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("POST", "/backup/template/json/toPlan", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("BackupPlanTemplateJson"=>BackupPlanTemplateJson), args)); aws_config=aws_config)

"""
    GetBackupPlanFromTemplate()

Returns the template specified by its templateId as a backup plan.

# Required Parameters
- `templateId`: Uniquely identifies a stored backup plan template.

"""

get_backup_plan_from_template(templateId; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/template/plans/$(templateId)/toPlan"; aws_config=aws_config)
get_backup_plan_from_template(templateId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/template/plans/$(templateId)/toPlan", args; aws_config=aws_config)

"""
    GetBackupSelection()

Returns selection metadata and a document in JSON format that specifies a list of resources that are associated with a backup plan.

# Required Parameters
- `backupPlanId`: Uniquely identifies a backup plan.
- `selectionId`: Uniquely identifies the body of a request to assign a set of resources to a backup plan.

"""

get_backup_selection(backupPlanId, selectionId; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/plans/$(backupPlanId)/selections/$(selectionId)"; aws_config=aws_config)
get_backup_selection(backupPlanId, selectionId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/plans/$(backupPlanId)/selections/$(selectionId)", args; aws_config=aws_config)

"""
    GetBackupVaultAccessPolicy()

Returns the access policy document that is associated with the named backup vault.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

"""

get_backup_vault_access_policy(backupVaultName; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/$(backupVaultName)/access-policy"; aws_config=aws_config)
get_backup_vault_access_policy(backupVaultName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/$(backupVaultName)/access-policy", args; aws_config=aws_config)

"""
    GetBackupVaultNotifications()

Returns event notifications for the specified backup vault.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

"""

get_backup_vault_notifications(backupVaultName; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/$(backupVaultName)/notification-configuration"; aws_config=aws_config)
get_backup_vault_notifications(backupVaultName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/$(backupVaultName)/notification-configuration", args; aws_config=aws_config)

"""
    GetRecoveryPointRestoreMetadata()

Returns a set of metadata key-value pairs that were used to create the backup.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
- `recoveryPointArn`: An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

"""

get_recovery_point_restore_metadata(backupVaultName, recoveryPointArn; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/$(backupVaultName)/recovery-points/$(recoveryPointArn)/restore-metadata"; aws_config=aws_config)
get_recovery_point_restore_metadata(backupVaultName, recoveryPointArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/$(backupVaultName)/recovery-points/$(recoveryPointArn)/restore-metadata", args; aws_config=aws_config)

"""
    GetSupportedResourceTypes()

Returns the AWS resource types supported by AWS Backup.

"""

get_supported_resource_types(; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/supported-resource-types"; aws_config=aws_config)
get_supported_resource_types(args::AbstractDict{String, Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/supported-resource-types", args; aws_config=aws_config)

"""
    ListBackupJobs()

Returns a list of existing backup jobs for an authenticated account.

# Optional Parameters
- `accountId`: The account ID to list the jobs from. Returns only backup jobs associated with the specified account ID.
- `backupVaultName`: Returns only backup jobs that will be stored in the specified backup vault. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
- `createdAfter`: Returns only backup jobs that were created after the specified date.
- `createdBefore`: Returns only backup jobs that were created before the specified date.
- `maxResults`: The maximum number of items to be returned.
- `nextToken`: The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
- `resourceArn`: Returns only backup jobs that match the specified resource Amazon Resource Name (ARN).
- `resourceType`: Returns only backup jobs for the specified resources:    DynamoDB for Amazon DynamoDB    EBS for Amazon Elastic Block Store    EC2 for Amazon Elastic Compute Cloud    EFS for Amazon Elastic File System    RDS for Amazon Relational Database Service    Storage Gateway for AWS Storage Gateway
- `state`: Returns only backup jobs that are in the specified state.
"""

list_backup_jobs(; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-jobs/"; aws_config=aws_config)
list_backup_jobs(args::AbstractDict{String, Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-jobs/", args; aws_config=aws_config)

"""
    ListBackupPlanTemplates()

Returns metadata of your saved backup plan templates, including the template ID, name, and the creation and deletion dates.

# Optional Parameters
- `maxResults`: The maximum number of items to be returned.
- `nextToken`: The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
"""

list_backup_plan_templates(; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/template/plans"; aws_config=aws_config)
list_backup_plan_templates(args::AbstractDict{String, Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/template/plans", args; aws_config=aws_config)

"""
    ListBackupPlanVersions()

Returns version metadata of your backup plans, including Amazon Resource Names (ARNs), backup plan IDs, creation and deletion dates, plan names, and version IDs.

# Required Parameters
- `backupPlanId`: Uniquely identifies a backup plan.

# Optional Parameters
- `maxResults`: The maximum number of items to be returned.
- `nextToken`: The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
"""

list_backup_plan_versions(backupPlanId; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/plans/$(backupPlanId)/versions/"; aws_config=aws_config)
list_backup_plan_versions(backupPlanId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/plans/$(backupPlanId)/versions/", args; aws_config=aws_config)

"""
    ListBackupPlans()

Returns a list of existing backup plans for an authenticated account. The list is populated only if the advanced option is set for the backup plan. The list contains information such as Amazon Resource Names (ARNs), plan IDs, creation and deletion dates, version IDs, plan names, and creator request IDs.

# Optional Parameters
- `includeDeleted`: A Boolean value with a default value of FALSE that returns deleted backup plans when set to TRUE.
- `maxResults`: The maximum number of items to be returned.
- `nextToken`: The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
"""

list_backup_plans(; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/plans/"; aws_config=aws_config)
list_backup_plans(args::AbstractDict{String, Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/plans/", args; aws_config=aws_config)

"""
    ListBackupSelections()

Returns an array containing metadata of the resources associated with the target backup plan.

# Required Parameters
- `backupPlanId`: Uniquely identifies a backup plan.

# Optional Parameters
- `maxResults`: The maximum number of items to be returned.
- `nextToken`: The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
"""

list_backup_selections(backupPlanId; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/plans/$(backupPlanId)/selections/"; aws_config=aws_config)
list_backup_selections(backupPlanId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup/plans/$(backupPlanId)/selections/", args; aws_config=aws_config)

"""
    ListBackupVaults()

Returns a list of recovery point storage containers along with information about them.

# Optional Parameters
- `maxResults`: The maximum number of items to be returned.
- `nextToken`: The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
"""

list_backup_vaults(; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/"; aws_config=aws_config)
list_backup_vaults(args::AbstractDict{String, Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/", args; aws_config=aws_config)

"""
    ListCopyJobs()

Returns metadata about your copy jobs.

# Optional Parameters
- `accountId`: The account ID to list the jobs from. Returns only copy jobs associated with the specified account ID.
- `createdAfter`: Returns only copy jobs that were created after the specified date.
- `createdBefore`: Returns only copy jobs that were created before the specified date.
- `destinationVaultArn`: An Amazon Resource Name (ARN) that uniquely identifies a source backup vault to copy from; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- `maxResults`: The maximum number of items to be returned.
- `nextToken`: The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
- `resourceArn`: Returns only copy jobs that match the specified resource Amazon Resource Name (ARN).
- `resourceType`: Returns only backup jobs for the specified resources:    DynamoDB for Amazon DynamoDB    EBS for Amazon Elastic Block Store    EC2 for Amazon Elastic Compute Cloud    EFS for Amazon Elastic File System    RDS for Amazon Relational Database Service    Storage Gateway for AWS Storage Gateway
- `state`: Returns only copy jobs that are in the specified state.
"""

list_copy_jobs(; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/copy-jobs/"; aws_config=aws_config)
list_copy_jobs(args::AbstractDict{String, Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/copy-jobs/", args; aws_config=aws_config)

"""
    ListProtectedResources()

Returns an array of resources successfully backed up by AWS Backup, including the time the resource was saved, an Amazon Resource Name (ARN) of the resource, and a resource type.

# Optional Parameters
- `maxResults`: The maximum number of items to be returned.
- `nextToken`: The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
"""

list_protected_resources(; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/resources/"; aws_config=aws_config)
list_protected_resources(args::AbstractDict{String, Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/resources/", args; aws_config=aws_config)

"""
    ListRecoveryPointsByBackupVault()

Returns detailed information about the recovery points stored in a backup vault.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

# Optional Parameters
- `backupPlanId`: Returns only recovery points that match the specified backup plan ID.
- `createdAfter`: Returns only recovery points that were created after the specified timestamp.
- `createdBefore`: Returns only recovery points that were created before the specified timestamp.
- `maxResults`: The maximum number of items to be returned.
- `nextToken`: The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
- `resourceArn`: Returns only recovery points that match the specified resource Amazon Resource Name (ARN).
- `resourceType`: Returns only recovery points that match the specified resource type.
"""

list_recovery_points_by_backup_vault(backupVaultName; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/$(backupVaultName)/recovery-points/"; aws_config=aws_config)
list_recovery_points_by_backup_vault(backupVaultName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/backup-vaults/$(backupVaultName)/recovery-points/", args; aws_config=aws_config)

"""
    ListRecoveryPointsByResource()

Returns detailed information about recovery points of the type specified by a resource Amazon Resource Name (ARN).

# Required Parameters
- `resourceArn`: An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.

# Optional Parameters
- `maxResults`: The maximum number of items to be returned.
- `nextToken`: The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
"""

list_recovery_points_by_resource(resourceArn; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/resources/$(resourceArn)/recovery-points/"; aws_config=aws_config)
list_recovery_points_by_resource(resourceArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/resources/$(resourceArn)/recovery-points/", args; aws_config=aws_config)

"""
    ListRestoreJobs()

Returns a list of jobs that AWS Backup initiated to restore a saved resource, including metadata about the recovery process.

# Optional Parameters
- `accountId`: The account ID to list the jobs from. Returns only restore jobs associated with the specified account ID.
- `createdAfter`: Returns only restore jobs that were created after the specified date.
- `createdBefore`: Returns only restore jobs that were created before the specified date.
- `maxResults`: The maximum number of items to be returned.
- `nextToken`: The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
- `status`: Returns only restore jobs associated with the specified job status.
"""

list_restore_jobs(; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/restore-jobs/"; aws_config=aws_config)
list_restore_jobs(args::AbstractDict{String, Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/restore-jobs/", args; aws_config=aws_config)

"""
    ListTags()

Returns a list of key-value pairs assigned to a target recovery point, backup plan, or backup vault.   ListTags are currently only supported with Amazon EFS backups.

# Required Parameters
- `resourceArn`: An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the type of resource. Valid targets for ListTags are recovery points, backup plans, and backup vaults.

# Optional Parameters
- `maxResults`: The maximum number of items to be returned.
- `nextToken`: The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
"""

list_tags(resourceArn; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/tags/$(resourceArn)/"; aws_config=aws_config)
list_tags(resourceArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("GET", "/tags/$(resourceArn)/", args; aws_config=aws_config)

"""
    PutBackupVaultAccessPolicy()

Sets a resource-based policy that is used to manage access permissions on the target backup vault. Requires a backup vault name and an access policy document in JSON format.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

# Optional Parameters
- `Policy`: The backup vault access policy document in JSON format.
"""

put_backup_vault_access_policy(backupVaultName; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/backup-vaults/$(backupVaultName)/access-policy"; aws_config=aws_config)
put_backup_vault_access_policy(backupVaultName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/backup-vaults/$(backupVaultName)/access-policy", args; aws_config=aws_config)

"""
    PutBackupVaultNotifications()

Turns on notifications on a backup vault for the specified topic and events.

# Required Parameters
- `BackupVaultEvents`: An array of events that indicate the status of jobs to back up resources to the backup vault.
- `SNSTopicArn`: The Amazon Resource Name (ARN) that specifies the topic for a backup vault’s events; for example, arn:aws:sns:us-west-2:111122223333:MyVaultTopic.
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

"""

put_backup_vault_notifications(BackupVaultEvents, SNSTopicArn, backupVaultName; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/backup-vaults/$(backupVaultName)/notification-configuration", Dict{String, Any}("BackupVaultEvents"=>BackupVaultEvents, "SNSTopicArn"=>SNSTopicArn); aws_config=aws_config)
put_backup_vault_notifications(BackupVaultEvents, SNSTopicArn, backupVaultName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/backup-vaults/$(backupVaultName)/notification-configuration", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("BackupVaultEvents"=>BackupVaultEvents, "SNSTopicArn"=>SNSTopicArn), args)); aws_config=aws_config)

"""
    StartBackupJob()

Starts an on-demand backup job for the specified resource.

# Required Parameters
- `BackupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
- `IamRoleArn`: Specifies the IAM role ARN used to create the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access.
- `ResourceArn`: An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.

# Optional Parameters
- `BackupOptions`: Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs. Valid values: Set to \"WindowsVSS”:“enabled\" to enable WindowsVSS backup option and create a VSS Windows backup. Set to “WindowsVSS”:”disabled” to create a regular backup. The WindowsVSS option is not enabled by default.
- `CompleteWindowMinutes`: A value in minutes after a backup job is successfully started before it must be completed or it will be canceled by AWS Backup. This value is optional.
- `IdempotencyToken`: A customer chosen string that can be used to distinguish between calls to StartBackupJob.
- `Lifecycle`: The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup will transition and expire backups automatically according to the lifecycle that you define.  Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
- `RecoveryPointTags`: To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair.
- `StartWindowMinutes`: A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional.
"""

start_backup_job(BackupVaultName, IamRoleArn, ResourceArn; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/backup-jobs", Dict{String, Any}("BackupVaultName"=>BackupVaultName, "IamRoleArn"=>IamRoleArn, "ResourceArn"=>ResourceArn); aws_config=aws_config)
start_backup_job(BackupVaultName, IamRoleArn, ResourceArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/backup-jobs", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("BackupVaultName"=>BackupVaultName, "IamRoleArn"=>IamRoleArn, "ResourceArn"=>ResourceArn), args)); aws_config=aws_config)

"""
    StartCopyJob()

Starts a job to create a one-time copy of the specified resource.

# Required Parameters
- `DestinationBackupVaultArn`: An Amazon Resource Name (ARN) that uniquely identifies a destination backup vault to copy to; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- `IamRoleArn`: Specifies the IAM role ARN used to copy the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access.
- `RecoveryPointArn`: An ARN that uniquely identifies a recovery point to use for the copy job; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- `SourceBackupVaultName`: The name of a logical source container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

# Optional Parameters
- `IdempotencyToken`: A customer chosen string that can be used to distinguish between calls to StartCopyJob.
- `Lifecycle`:
"""

start_copy_job(DestinationBackupVaultArn, IamRoleArn, RecoveryPointArn, SourceBackupVaultName; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/copy-jobs", Dict{String, Any}("DestinationBackupVaultArn"=>DestinationBackupVaultArn, "IamRoleArn"=>IamRoleArn, "RecoveryPointArn"=>RecoveryPointArn, "SourceBackupVaultName"=>SourceBackupVaultName); aws_config=aws_config)
start_copy_job(DestinationBackupVaultArn, IamRoleArn, RecoveryPointArn, SourceBackupVaultName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/copy-jobs", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DestinationBackupVaultArn"=>DestinationBackupVaultArn, "IamRoleArn"=>IamRoleArn, "RecoveryPointArn"=>RecoveryPointArn, "SourceBackupVaultName"=>SourceBackupVaultName), args)); aws_config=aws_config)

"""
    StartRestoreJob()

Recovers the saved resource identified by an Amazon Resource Name (ARN).

# Required Parameters
- `IamRoleArn`: The Amazon Resource Name (ARN) of the IAM role that AWS Backup uses to create the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access.
- `Metadata`: A set of metadata key-value pairs. Contains information, such as a resource name, required to restore a recovery point.  You can get configuration metadata about a resource at the time it was backed up by calling GetRecoveryPointRestoreMetadata. However, values in addition to those provided by GetRecoveryPointRestoreMetadata might be required to restore a resource. For example, you might need to provide a new resource name if the original already exists. You need to specify specific metadata to restore an Amazon Elastic File System (Amazon EFS) instance:    file-system-id: The ID of the Amazon EFS file system that is backed up by AWS Backup. Returned in GetRecoveryPointRestoreMetadata.    Encrypted: A Boolean value that, if true, specifies that the file system is encrypted. If KmsKeyId is specified, Encrypted must be set to true.    KmsKeyId: Specifies the AWS KMS key that is used to encrypt the restored file system. You can specify a key from another AWS account provided that key it is properly shared with your account via AWS KMS.    PerformanceMode: Specifies the throughput mode of the file system.    CreationToken: A user-supplied value that ensures the uniqueness (idempotency) of the request.    newFileSystem: A Boolean value that, if true, specifies that the recovery point is restored to a new Amazon EFS file system.    ItemsToRestore : A serialized list of up to five strings where each string is a file path. Use ItemsToRestore to restore specific files or directories rather than the entire file system. This parameter is optional.
- `RecoveryPointArn`: An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

# Optional Parameters
- `IdempotencyToken`: A customer chosen string that can be used to distinguish between calls to StartRestoreJob.
- `ResourceType`: Starts a job to restore a recovery point for one of the following resources:    DynamoDB for Amazon DynamoDB    EBS for Amazon Elastic Block Store    EC2 for Amazon Elastic Compute Cloud    EFS for Amazon Elastic File System    RDS for Amazon Relational Database Service    Storage Gateway for AWS Storage Gateway
"""

start_restore_job(IamRoleArn, Metadata, RecoveryPointArn; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/restore-jobs", Dict{String, Any}("IamRoleArn"=>IamRoleArn, "Metadata"=>Metadata, "RecoveryPointArn"=>RecoveryPointArn); aws_config=aws_config)
start_restore_job(IamRoleArn, Metadata, RecoveryPointArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/restore-jobs", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("IamRoleArn"=>IamRoleArn, "Metadata"=>Metadata, "RecoveryPointArn"=>RecoveryPointArn), args)); aws_config=aws_config)

"""
    StopBackupJob()

Attempts to cancel a job to create a one-time backup of a resource.

# Required Parameters
- `backupJobId`: Uniquely identifies a request to AWS Backup to back up a resource.

"""

stop_backup_job(backupJobId; aws_config::AWSConfig=global_aws_config()) = backup("POST", "/backup-jobs/$(backupJobId)"; aws_config=aws_config)
stop_backup_job(backupJobId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("POST", "/backup-jobs/$(backupJobId)", args; aws_config=aws_config)

"""
    TagResource()

Assigns a set of key-value pairs to a recovery point, backup plan, or backup vault identified by an Amazon Resource Name (ARN).

# Required Parameters
- `Tags`: Key-value pairs that are used to help organize your resources. You can assign your own metadata to the resources you create.
- `resourceArn`: An ARN that uniquely identifies a resource. The format of the ARN depends on the type of the tagged resource.

"""

tag_resource(Tags, resourceArn; aws_config::AWSConfig=global_aws_config()) = backup("POST", "/tags/$(resourceArn)", Dict{String, Any}("Tags"=>Tags); aws_config=aws_config)
tag_resource(Tags, resourceArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("POST", "/tags/$(resourceArn)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Tags"=>Tags), args)); aws_config=aws_config)

"""
    UntagResource()

Removes a set of key-value pairs from a recovery point, backup plan, or backup vault identified by an Amazon Resource Name (ARN)

# Required Parameters
- `TagKeyList`: A list of keys to identify which key-value tags to remove from a resource.
- `resourceArn`: An ARN that uniquely identifies a resource. The format of the ARN depends on the type of the tagged resource.

"""

untag_resource(TagKeyList, resourceArn; aws_config::AWSConfig=global_aws_config()) = backup("POST", "/untag/$(resourceArn)", Dict{String, Any}("TagKeyList"=>TagKeyList); aws_config=aws_config)
untag_resource(TagKeyList, resourceArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("POST", "/untag/$(resourceArn)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TagKeyList"=>TagKeyList), args)); aws_config=aws_config)

"""
    UpdateBackupPlan()

Updates an existing backup plan identified by its backupPlanId with the input document in JSON format. The new version is uniquely identified by a VersionId.

# Required Parameters
- `BackupPlan`: Specifies the body of a backup plan. Includes a BackupPlanName and one or more sets of Rules.
- `backupPlanId`: Uniquely identifies a backup plan.

"""

update_backup_plan(BackupPlan, backupPlanId; aws_config::AWSConfig=global_aws_config()) = backup("POST", "/backup/plans/$(backupPlanId)", Dict{String, Any}("BackupPlan"=>BackupPlan); aws_config=aws_config)
update_backup_plan(BackupPlan, backupPlanId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("POST", "/backup/plans/$(backupPlanId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("BackupPlan"=>BackupPlan), args)); aws_config=aws_config)

"""
    UpdateRecoveryPointLifecycle()

Sets the transition lifecycle of a recovery point. The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define.  Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.

# Required Parameters
- `backupVaultName`: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
- `recoveryPointArn`: An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

# Optional Parameters
- `Lifecycle`: The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define.  Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
"""

update_recovery_point_lifecycle(backupVaultName, recoveryPointArn; aws_config::AWSConfig=global_aws_config()) = backup("POST", "/backup-vaults/$(backupVaultName)/recovery-points/$(recoveryPointArn)"; aws_config=aws_config)
update_recovery_point_lifecycle(backupVaultName, recoveryPointArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = backup("POST", "/backup-vaults/$(backupVaultName)/recovery-points/$(recoveryPointArn)", args; aws_config=aws_config)

"""
    UpdateRegionSettings()

Updates the current service opt-in settings for the Region. If the service has a value set to true, AWS Backup tries to protect that service's resources in this Region, when included in an on-demand backup or scheduled backup plan. If the value is set to false for a service, AWS Backup does not try to protect that service's resources in this Region.

# Optional Parameters
- `ResourceTypeOptInPreference`: Updates the list of services along with the opt-in preferences for the Region.
"""

update_region_settings(; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/account-settings"; aws_config=aws_config)
update_region_settings(args::AbstractDict{String, Any}; aws_config::AWSConfig=global_aws_config()) = backup("PUT", "/account-settings", args; aws_config=aws_config)


text:
@testset "547.friend-circles.jl" begin
    @test find_circle_num([[1,1,0],[1,1,1],[0,1,1]]) == 1
    @test find_circle_num([[1,1,0],[1,1,0],[0,0,1]]) == 2
    @test find_circle_num([[1,0,0],[0,1,0],[0,0,1]]) == 3
    @test find_circle_num([[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]]) == 11
end

ext: jl


text:
#=
function Base.show(io::IO, op_problem::OperationsProblem)
    println(io, "Operation Model")
end
=#

function _organize_device_model(val::Dict{Symbol, DeviceModel}, field::Symbol, io::IO)

    println(io, "  $(field): ")
    for (i, ix) in val

        println(io, "      $(i):")
        for inner_field in fieldnames(DeviceModel)

            value = getfield(val[i], Symbol(inner_field))

            if !isnothing(value)
                println(io, "        $(inner_field) = $value")
            end
        end
    end

end

"""
    Base.show(io::IO, ::MIME"text/plain", op_problem::OperationsProblem)

This function goes through the fields in OperationsProblem and then in OperationsTemplate,
if the field contains a Device model dictionary, it calls organize_device_model() &
prints the data by field, key, value. If the field is not a Device model dictionary,
and a value exists for that field it prints the value.

"""
function Base.show(io::IO, ::MIME"text/plain", op_problem::OperationsProblem)

    println(io, "\nOperations Problem")
    println(io, "===============\n")

    for field in fieldnames(OperationsTemplate)

        val = getfield(op_problem.template, Symbol(field))

        if typeof(val) == Dict{Symbol, DeviceModel}

            _organize_device_model(val, field, io)

        else
            if !isnothing(val)
                println(io, "  $(field):  $(val)")
            else
                println(io, "no data")
            end
        end
    end
end

function Base.show(io::IO, op_problem::Canonical)
    println(io, "Canonical()")
end

function Base.show(io::IO, op_problem::Simulation)
    println(io, "Simulation()")
end
#=
function Base.show(io::IO, results::OperationsProblemResults)
    println(io, "Results Model")
 end

=#

function Base.show(io::IO, ::MIME"text/plain", results::Results)
    println(io, "\nResults")
    println(io, "===============\n")

    for (k, v) in results.variables
        time = DataFrames.DataFrame(Time = results.time_stamp[!, :Range])
        if size(time, 1) == size(v, 1)
            var = hcat(time, v)
        else
            var = v
        end
        println(io, "$(k)")
        println(io, "==================")
        println(io, "$(var)\n")
    end
    println(io, "Optimizer Log")
    println(io, "-------------")
    for (k, v) in results.optimizer_log
        println(io, "        $(k) = $(v)")
    end
    println(io, "\n")
    for (k, v) in results.total_cost
        println(io, "Total Cost: $(k) = $(v)")
    end
    if :check_sum in fieldnames(typeof(results))
        println(io, "check sum: $(results.check_sum[1])\n")
    end
 end

 function Base.show(io::IO, ::MIME"text/html", results::PSI.Results)

    println(io, "
Results
")
    for (k, v) in results.variables
        time = DataFrames.DataFrame(Time = results.time_stamp[!, :Range])
        if size(time, 1) == size(v, 1)
            var = hcat(time, v)
        else
            var = v
        end
        println(io, "$(k)")
        show(io, MIME"text/html"(), var)
    end
    println(io, "
Optimizer Log
")
    for (k, v) in results.optimizer_log
        println(io, "
        $(k) = $(v)
")
    end
    println(io, "\n")
    for (k, v) in results.total_cost
        println(io, "
Total Cost: $(v)
")
    end
    if :check_sum in fieldnames(typeof(results))
        println(io, "
check sum: $(results.check_sum[1])
")
    end
 end

 function Base.show(io::IO, stage::Stage)
    println(io, "Stage()")
 end

 function Base.show(io::IO, ::MIME"text/html", services::Dict{Symbol, PSI.ServiceModel})
    println(io, "
Services
")
    for (k, v) in services
        println(io, "
$(k)
")
        println(io, "
$(v)
")
    end
 end


text:
export load_tensor!, save_tensor!, delete_tensor!, contract_tensors, view!
export reshape_tensor, transpose_tensor, conjugate_tensor, execute_dsl_file
export decompose_tensor, permute_tensor, tensor_view

using CUDA
using TensorOperations, HDF5
using JSON

# *************************************************************************** #
#                             dsl functions
# *************************************************************************** #
"""
    load_tensor!(tensors::Dict{Symbol, Array{T}},
                          tensor_label::String,
                          data_label::String,
                          tensor_data_filename::String) where T <: Number

Load tensor data, identified by tensor_label, from a .h5 file and store
it in the dictionary 'tensors'
"""
function load_tensor!(tensors::Dict{Symbol, T},
                      tensor_label::String,
                      data_label::String,
                      tensor_data_filename::String) where T <: AbstractArray

    tensor = Symbol(tensor_label)
    tensors[tensor] = h5open(tensor_data_filename, "r") do file
        convert(T, read(file, data_label))
    end
end

"""
    save_tensor!(tensor_data_filename::String,
                 tensors::Dict{Symbol, <: AbstractArray},
                 tensor_label::String,
                 group_name::String="")

Save tensor data to a .h5 file. If no group name is given for the data the
label that identifies the tensor in the dictionary 'tensors' is used.
"""
function save_tensor!(tensor_data_filename::String,
                      tensors::Dict{Symbol, <: AbstractArray},
                      tensor_label::String,
                      group_name::String="")

    # If no group name given then use the tensor label.
    if group_name == ""
        group_name = tensor_label
    end
    h5open(tensor_data_filename, "cw") do file
        # TODO: Maybe this first if clause is redundant.
        if exists(file, tensor_label)
            o_delete(file, tensor_label)
        end
        if exists(file, group_name)
            o_delete(file, group_name)
        end
    end
    tensor_label = Symbol(tensor_label)
    #FIXME: This is used for testing purposes only :FIXME
    # h5write(tensor_data_filename, group_name, tensors[tensor_label])
    h5write(tensor_data_filename, group_name, tensors[tensor_label])
end

"""
    delete_tensor!(tensors::Dict{Symbol, <: AbstractArray,
                            tensor_label::String)

Delete the specified tensor from the dictionary 'tensors'
"""
function delete_tensor!(tensors::Dict{Symbol, <: AbstractArray},
                        tensor_label::String)

    delete!(tensors, Symbol(tensor_label))
end

"""
    contract_tensors(tensors_to_contract::Tuple{<: AbstractArray, <: AbstractArray},
                     tensor_indices::Tuple{Array{Int,1},Array{Int,1}})

Function to contract the tensors contained in the tuple 'tensors_to_contract'
according to the ncon indices given and return the result.
"""
function contract_tensors(tensors_to_contract::Tuple{<: AbstractArray, <: AbstractArray},
                          tensor_indices::Tuple{Array{Int,1},Array{Int,1}})
    a_idx = Tuple(tensor_indices[1])
    b_idx = Tuple(tensor_indices[2])
    tensorcontract(tensors_to_contract[1], a_idx,
                   tensors_to_contract[2], b_idx,
                   Tuple(symdiff(a_idx,b_idx)))
end

"""
    reshape_tensor(tensor::AbstractArray,
                            dims::Union{Int, Array{Int,1}})

Reshape a tensor
"""
function reshape_tensor(tensor::AbstractArray,
                        dims::Union{Int, Array{Int,1}})
    reshape(tensor, dims...)
end

"""
    function permute_tensor(tensor::AbstractArray,
                            dims::Union{Int, Array{Int,1}})

Permute a tensor
"""
function permute_tensor(tensor::AbstractArray,
                        dims::Union{Int, Array{Int, 1}})
    permutedims(tensor, dims)
end

"""
    transpose_tensor(tensor::AbstractArray,
                              index_permutation::Array{Int, 1})

Transpose a tensor by permuting the indices as specified in index_permutation.
"""
function transpose_tensor(tensor::AbstractArray,
                        index_permutation::Array{Int, 1})
    permutedims(tensor, index_permutation)
end

"""
    function conjugate_tensor(tensor::AbstractArray)

Conjugate the elements of a tensor.
"""
function conjugate_tensor(tensor::AbstractArray)
    conj.(tensor)
end

"""
    decompose_tensor(tensor::AbstractArray{<: T},
                     left_positions::Array{Int, 1},
                     right_positions::Array{Int, 1};
                     threshold::AbstractFloat=1e-13,
                     max_rank::Int=0) where T <: Number

Function to decompose a single tensor into two tensors and return the dimension
of the newly created virtual edge.
"""
function decompose_tensor(tensor::AbstractArray{<: T},
                          left_positions::Array{Int, 1},
                          right_positions::Array{Int, 1};
                          threshold::AbstractFloat=1e-13,
                          max_rank::Int=0) where T <: Number

    dims = size(tensor)
    left_dims = [dims[x] for x in left_positions]
    right_dims = [dims[x] for x in right_positions]

    A = permutedims(tensor, vcat(left_positions, right_positions))
    A = reshape(A, Tuple([prod(left_dims), prod(right_dims)]))

    # Use SVD here but QR could also be used
    F = try
        svd(A)
    catch
        # if divide and conquer approach fails fallback to QRIteration approach
        svd(A, alg=LinearAlgebra.QRIteration)
    end

    # ensure that the threshold is at least equal to the precision
    threshold = max(threshold, sqrt(eps(real(T))))

    # find number of singular values above the threshold
    s_norm = sqrt(sum(F.S .^ 2))
    chi = sum(F.S ./ s_norm .> threshold)
    if max_rank > 0
        chi = min(max_rank, chi)
    end
    S_sqrt = sqrt.(F.S[1:chi])

    # assume that singular values and basis of U and V matrices are sorted
    # in descending order of singular value
    B = reshape(F.U[:, 1:chi] * Diagonal(S_sqrt), Tuple(vcat(left_dims, [chi,])))
    C = reshape(Diagonal(S_sqrt) * Adjoint(F.V[:, 1:chi]), Tuple(vcat([chi,], right_dims)))

    B, C, chi
end

"""
    tensor_view(node_data, bond_idx, bond_range)

Create a view on the given tensor
"""
function tensor_view(node_data, bond_idx, bond_range)
    dims = size(node_data)
    node_data[[i == bond_idx ? bond_range : UnitRange(1, dims[i]) for i in 1:length(dims)]...]
end

# *************************************************************************** #
#                Reading and executing dsl commands from file
# *************************************************************************** #

"""
    execute_dsl_file(::Type{T}, dsl_filename::String="contract_network.tl",
                            tensor_data_filename::String="tensor_data.h5",
                            output_data_filename::String="") where T <: AbstractArray

Function to read dsl commands from a given dsl file and execute them using
tensor data from the given tensor data file.
The type of tensor storage to use for the simulation is specified by the first argument
"""
function execute_dsl_file(::Type{T}, dsl_filename::String="contract_network.tl",
                         tensor_data_filename::String="tensor_data.h5",
                         output_data_filename::String="") where T <: AbstractArray

    # Open file to read dsl commands from.
    file = open(dsl_filename)

    # Create dictionary to hold tensors
    tensors = Dict{Symbol, T}()

    # Read each line of the dsl file and execute specified functions.
    for command in eachline(file)
        # Split the line into the command name and arguments.
        command = string.(split(command))

        if command[1] == "ncon"
            C_label, A_label, A_indices, B_label, B_indices = command[2:end]

            C_label = Symbol(C_label)
            A_label = Symbol(A_label)
            B_label = Symbol(B_label)

            # Convert indices into integer array for ncon.
            A_indices = parse.(Int, split(A_indices, ","))
            B_indices = parse.(Int, split(B_indices, ","))

            # Contract A and B and save the result.
            A = tensors[A_label]; B = tensors[B_label]
            tensors[C_label] = contract_tensors((A, B), (A_indices, B_indices))

        elseif command[1] == "del"
            delete_tensor!(tensors, command[2])

        elseif command[1] == "tensor"
            load_tensor!(tensors, command[2], command[3], tensor_data_filename)

        elseif command[1] == "save"
            tensor_to_save = command[2]
            if output_data_filename == ""
                output_data_filename = command[3]
            end
            group_name = command[4]
            save_tensor!(output_data_filename, tensors,
                        tensor_to_save, group_name)

        elseif command[1] == "reshape"
            tensor_label, groups = command[2:end]
            tensor_label = Symbol(tensor_label)
            tensor = tensors[tensor_label]
            tensor_dims = size(tensor)

            # Convert the groups of indices to array of arrays
            groups = [parse.(Int, split(x, ",")) for x in split(groups, ";")]
            new_dims = [prod([tensor_dims[y] for y in x]) for x in groups]

            # Reshape the tensor.
            tensors[tensor_label] = reshape_tensor(tensor, new_dims)

        elseif command[1] == "permute"
            tensor_label, dims = command[2:end]
            tensor_label = Symbol(tensor_label)
            tensor = tensors[tensor_label]

            # Convert dimensions into integer array for reshaping.
            dims = parse.(Int, split(dims, ","))

            # Reshape the tensor.
            tensors[tensor_label] = permute_tensor(tensor, dims)

        elseif command[1] == "decompose"
            A_label, B_label, B_idxs, C_label, C_idxs = command[2:6]
            options = join(command[7:end])

            A_label = Symbol(A_label)
            B_label = Symbol(B_label)
            C_label = Symbol(C_label)

            # Convert indices into integer array for ncon.
            B_idxs = parse.(Int, split(B_idxs, ","))
            C_idxs = parse.(Int, split(C_idxs, ","))

            # Contract A and B and save the result.
            A = tensors[A_label]

            (B, C) = decompose_tensor(A,
                                        B_idxs,
                                        C_idxs;
                                        JSON.parse(options, dicttype=Dict{Symbol, Any})...)

            tensors[B_label] = B
            tensors[C_label] = C
        elseif command[1] == "view"
            view_label, node_label, bond_idx, bond_range = command[2:5]

            view_label = Symbol(view_label)
            node_label = Symbol(node_label)
            bond_idx = parse(Int, bond_idx)
            bond_range = parse.(Int, split(bond_range, ","))

            tensors[view_label] = tensor_view(tensors[node_label], bond_idx, bond_range)
        end
    end

    close(file)
end

"""
    execute_dsl_file(dsl_filename::String="contract_network.tl",
                              tensor_data_filename::String="tensor_data.h5",
                              output_data_filename::String="")

Function to read dsl commands from a given dsl file and execute them using
tensor data from the given tensor data file.
If the type of tensor storage to use is not specified, it defaults to Array{ComplexF32}
"""
function execute_dsl_file(dsl_filename::String="contract_network.tl",
                          tensor_data_filename::String="tensor_data.h5",
                          output_data_filename::String="")
    execute_dsl_file(Array{ComplexF32}, dsl_filename, tensor_data_filename, output_data_filename)
end


text:
export iauEform
"""
Earth reference ellipsoids.

This function is part of the International Astronomical Union's
SOFA (Standards of Fundamental Astronomy) software collection.

Status:  canonical.

Given:
   n    int         ellipsoid identifier (Note 1)

Returned:
   a    double      equatorial radius (meters, Note 2)
   f    double      flattening (Note 2)

Returned (function value):
         int         status:  0 = OK
                           -1 = illegal identifier (Note 3)

Notes:

   1. The identifier n is a number that specifies the choice of
   reference ellipsoid.  The following are supported:

      n    ellipsoid

      1     WGS84
      2     GRS80
      3     WGS72

   The n value has no significance outside the SOFA software.  For
   convenience, symbols WGS84 etc. are defined in sofam.h.

   2. The ellipsoid parameters are returned in the form of equatorial
   radius in meters (a) and flattening (f).  The latter is a number
   around 0.00335, i.e. around 1/298.

   3. For the case where an unsupported n value is supplied, zero a and
   f are returned, as well as error status.

References:

   Department of Defense World Geodetic System 1984, National
   Imagery and Mapping Agency Technical Report 8350.2, Third
   Edition, p3-2.

   Moritz, H., Bull. Geodesique 66-2, 187 (1992).

   The Department of Defense World Geodetic System 1972, World
   Geodetic System Committee, May 1974.

   Explanatory Supplement to the Astronomical Almanac,
   P. Kenneth Seidelmann (ed), University Science Books (1992),
   p220.

This revision:  2013 June 18

SOFA release 2018-01-30

Copyright (C) 2018 IAU SOFA Board.  See notes at end.
"""

# int iauEform ( int n, double *a, double *f )

function iauEform(n::Int)
   # Initialize return variables
   ref_a = Ref{Float64}(0.0)
   ref_f = Ref{Float64}(0.0)

   status = ccall((:iauEform, libsofa_c), Cint,
               (Cint, Ref{Float64}, Ref{Float64}),
               convert(Int32, n),
               ref_a, ref_f)

   # if status != 0
   #    @warn "iauEform return non-zero exit status: $status"
   # end

   return status, ref_a[], ref_f[]
end


text:
"""
AllEqual(dimension::Int)

The set corresponding to an all-equal constraint.

All expressions of a vector-valued function are enforced to take the same value
in the solution.

## Example

    [x, y, z] in AllEqual(3)
    # enforces `x == y` AND `x == z`.
"""
struct AllEqual <: MOI.AbstractVectorSet
    dimension::Int
end

"""
    AllDifferent(dimension::Int)

The set corresponding to an all-different constraint.

All expressions of a vector-valued function are enforced to take distinct
values in the solution: for all pairs of expressions, their values must
differ.

This constraint is sometimes called `distinct`.

## Example

    [x, y, z] in AllDifferent(3)
    # enforces `x != y` AND `x != z` AND `y != z`.
"""
struct AllDifferent <: MOI.AbstractVectorSet
    dimension::Int
end

# https://sofdem.github.io/gccat/gccat/Calldifferent_cst.html should be modelled
# with AllDifferent, because it is just shifting all expressions by constants,
# i.e. scalar affine expressions.

"""
    AllDifferentExceptConstants{T <: Number}(dimension::Int, k::Set{T})

All expressions of a vector-valued function are enforced to take distinct
values in the solution, but values equal to any value in `k` are not
considered: for all pairs of expressions, either their values must differ or
at least one of the two variables has a value in `k`.

This constraint is sometimes called `distinct`.

## Example

    [x, y] in AllDifferentExceptConstant(2, 0)
    # enforces `x != y` OR `x == 0` OR `y == 0`.

    [x, y] in AllDifferentExceptConstant(2, Set([0, 1]))
    # enforces `x != y` OR `x == 0` OR `y == 0` OR `x == 1` OR `y == 1`.
"""
struct AllDifferentExceptConstants{T <: Number} <: MOI.AbstractVectorSet
    dimension::Int
    k::Set{T}
end

function copy(set::AllDifferentExceptConstants{T}) where {T}
    return AllDifferentExceptConstants(set.dimension, copy(set.k))
end
function Base.:(==)(
    x::AllDifferentExceptConstants{T},
    y::AllDifferentExceptConstants{T},
) where {T}
    return x.dimension == y.dimension && x.k == y.k
end

"""
Special case of [`AllDifferentExceptConstants`](@ref) where only one value is
ignored.
"""
function AllDifferentExceptConstant(dimension::Int, value::T) where {T <: Number}
    return AllDifferentExceptConstants(dimension, Set(value))
end

"""
    SymmetricAllDifferent(dimension::Int)

The set corresponding to an all-different constraint, with the additional
requirement that the array must be symmetric.

All expressions of a vector-valued function are enforced to take distinct
values in the solution: for all pairs of expressions, their values must
differ. Symmetry means that, if ``x[i]=j``, then ``x[j]=i``.

This constraint is sometimes called [`symmetric_alldifferent`](https://sofdem.github.io/gccat/gccat/Csymmetric_alldifferent.html).

## Example

    [x, y, z] in SymmetricAllDifferent(3)
    # enforces `x != y` AND `x != z` AND `y != z` AND `(x == 2 => y == 1)` AND
    # `(x == 3 => z = 1)` AND `(y == 1 => x == 2)` AND `(y == 3 => z == 2)` AND
    # `(z == 1 => x == 3)` AND `(z == 2 => y == 3)`.
"""
struct SymmetricAllDifferent <: MOI.AbstractVectorSet
    dimension::Int
end

"""
    Domain{T <: Number}(values::Set{T})

The set corresponding to an enumeration of constant values.

The value of a scalar function is enforced to take a value from this set of
values.

This constraint is sometimes called `in`, `member` or `allowed_assignments`.
https://sofdem.github.io/gccat/gccat/Cdomain.html

## Example

    x in Domain(1:3)
    # enforces `x == 1` OR `x == 2` OR `x == 3`.
"""
struct Domain{T <: Number} <: MOI.AbstractScalarSet
    values::Set{T}
end

copy(set::Domain{T}) where {T} = Domain(copy(set.values))
Base.:(==)(x::Domain{T}, y::Domain{T}) where {T} = x.values == y.values

"""
    VectorDomain{T <: Number}(dimension::Int, values::Set{Vector{T}})

The set corresponding to an enumeration of constant values.

The value of a vector function is enforced to take a value from this set of
vector values.

This constraint is sometimes called `in`, `member` or `allowed_assignments`.
https://sofdem.github.io/gccat/gccat/Cdomain.html

## Example

    [x, y] in Domain(2, Set([[1, 2], [2, 3]]))
    # enforces (`x == 1` AND `y == 2`) OR (`x == 2` AND `y == 3`).
"""
struct VectorDomain{T <: Number} <: MOI.AbstractVectorSet
    dimension::Int
    values::Set{Vector{T}}
end

copy(set::VectorDomain{T}) where {T} = VectorDomain(set.dimension, copy(set.values))
Base.:(==)(x::VectorDomain{T}, y::VectorDomain{T}) where {T} = x.dimension == y.dimension && x.values == y.values

"""
    AntiDomain{T <: Number}(values::Set{T})

The set corresponding to an enumeration of constant values that are excluded.

The value of a scalar function is enforced to take a value that is not from
this set of values.

This constraint is sometimes called (`not_in`)[https://sofdem.github.io/gccat/gccat/Cnot_in.html],
`not_member`, `rel`, `forbidden_assignments`, or `no_good`.

## Example

    x in AntiDomain(1:3)
    # enforces `x != 1` AND `x != 2` AND `x != 3`.
"""
struct AntiDomain{T <: Number} <: MOI.AbstractScalarSet
    values::Set{T}
end

copy(set::AntiDomain{T}) where {T} = AntiDomain(copy(set.values))
Base.:(==)(x::AntiDomain{T}, y::AntiDomain{T}) where {T} = x.values == y.values

"""
    VectorAntiDomain{T <: Number}(values::Set{T})

The set corresponding to an enumeration of constant values that are excluded.

The value of a vector function is enforced to take a value that is not from
this set of vector values.

This constraint is sometimes called (`not_in`)[https://sofdem.github.io/gccat/gccat/Cnot_in.html],
`not_member`, `rel`, `forbidden_assignments`, or `no_good`.

## Example

    [x, y] in VectorAntiDomain(2, Set([[1, 2], [2, 3]]))
    # enforces (`x != 1` AND `y != 2`) OR (`x != 2` AND `y != 3`).
"""
struct VectorAntiDomain{T <: Number} <: MOI.AbstractScalarSet
    dimension::Int
    values::Set{Vector{T}}
end

copy(set::VectorAntiDomain{T}) where {T} = VectorAntiDomain(set.dimension, copy(set.values))
Base.:(==)(x::VectorAntiDomain{T}, y::VectorAntiDomain{T}) where {T} = x.values == y.values
MOI.dimension(set::VectorAntiDomain{T}) where {T} = set.dimension # TODO: why is this needed?

"""
    Membership(dimension)

The first element of a function of dimension `dimension` must equal at least
one of the following `dimension - 1` elements of the function.

This constraint is sometimes called `in_set`.

## Example

    [x, y, z] in Membership(3)
    # enforces `x == y` OR `x == z`.
"""
struct Membership <: MOI.AbstractVectorSet
    dimension::Int
end

"""
    DifferentFrom{T <: Number}(value::T)

The set excluding the single point ``x \\in \\mathbb{R}`` where ``x`` is given
by `value`.
"""
struct DifferentFrom{T <: Number} <: MOI.AbstractScalarSet
    value::T
end

MOI.constant(set::DifferentFrom{T}) where {T} = set.value
copy(set::DifferentFrom{T}) where {T} = DifferentFrom(copy(set.value))
function MOIU.shift_constant(set::DifferentFrom{T}, offset::T) where {T}
    return typeof(set)(MOI.constant(set) + offset)
end

"""
    Element{T <: Real}(values::Vector{T})

``\\{(x, i) \\in \\mathbb{R} \\times \\mathbb{N} | x = values[i]\\}``

Less formally, the first element constrained in this set will take the value of
`values` at the index given by the second element.

Also called [`indexing`](https://sofdem.github.io/gccat/gccat/Celement.html)
or `nth`.

## Examples

    [x, 3] in Element([4, 5, 6])
    # Enforces that x = 6, because 6 is the 3rd element from the array.

    [y, j] in Element([4, 5, 6])
    # Enforces that y = array[j], depending on the value of j (an integer
    # between 1 and 3).
"""
struct Element{T <: Real} <: MOI.AbstractVectorSet
    values::Vector{T}
end

MOI.dimension(set::Element{T}) where {T} = 2
copy(set::Element{T}) where {T} = Element(copy(set.values))
Base.:(==)(x::Element{T}, y::Element{T}) where {T} = x.values == y.values

"""
    ElementVariableArray(dimension::Int)

``\\{(x, i, values) \\in \\mathbb{R} \\times \\mathbb{N} \\times \\mathbb{R}^{\\mathtt{dimension}} | x = values[i]\\}``

Less formally, the first element constrained in this set will take the value of
`values` at the index given by the second element in the array given by the
remaining elements constrained in the set.

## Examples

    [x, 3, a, b, c] in ElementVariableArray(3)
    # Enforces that x = c, because 6 is the 3rd element from the array [a, b, c].

    [y, j, a, b, c] in ElementVariableArray(3)
    # Enforces that y = array[j], depending on the value of j (an integer
    # between 1 and 3), from the array [a, b, c].
"""
struct ElementVariableArray <: MOI.AbstractVectorSet
    dimension::Int
end

MOI.dimension(set::ElementVariableArray) = 2 + set.dimension
copy(set::ElementVariableArray) = ElementVariableArray(set.dimension)
function Base.:(==)(x::ElementVariableArray, y::ElementVariableArray)
    return x.dimension == y.dimension
end

"""
    MinimumDistance{T <: Real}(dimension::Int, k::T)

Ensures that all the `dimension` expressions in this set are at least `k`
apart, in absolute value:

``\\Big\\{x \\in \\mathbb{S}^{\\mathtt{dimension}} \\Big| |x_i - x_j| \\geq k, \\forall i \\neq j \\in \\{1, 2\\dots \\mathtt{dimension}\\} \\Big\\}``

Also called [`all_min_dist`](https://sofdem.github.io/gccat/gccat/Call_min_dist.html)
or `inter_distance`.
"""
struct MinimumDistance{T <: Real} <: MOI.AbstractVectorSet
    dimension::Int
    k::T
end

function copy(set::MinimumDistance{T}) where {T}
    return MinimumDistance(set.dimension, copy(set.k))
end
function Base.:(==)(x::MinimumDistance{T}, y::MinimumDistance{T}) where {T}
    return x.dimension == y.dimension && x.k == y.k
end

"""
    MaximumDistance{T <: Real}(dimension::Int, k::T)

Ensures that all the `dimension` expressions in this set are at most `k`
apart, in absolute value:

``\\Big\\{x \\in \\mathbb{S}^{\\mathtt{dimension}} \\Big| |x_i - x_j| \\leq k, \\forall i \\neq j \\in \\{1, 2\\dots \\mathtt{dimension}\\} \\Big\\}``
"""
struct MaximumDistance{T <: Real} <: MOI.AbstractVectorSet
    dimension::Int
    k::T
end

function copy(set::MaximumDistance{T}) where {T}
    return MaximumDistance(set.dimension, copy(set.k))
end
function Base.:(==)(x::MaximumDistance{T}, y::MaximumDistance{T}) where {T}
    return x.dimension == y.dimension && x.k == y.k
end

"""
    Inverse(dimension::Int)

Ensures that the two arrays of variables of size `dimension` are the inverse
one of the other.

``\\Big\\{(x, y) \\in \\mathbb{R}^{\\mathtt{dimension}} \\times \\mathbb{R}^{dimension} \\Big| x_i = j \\iff y_j = i, \\forall i, j \\in \\{1, 2 \\dots \\mathtt{dimension}\\} \\Big\\}``

Indices start at 1, like Julia.

Also called [`channel`](https://sofdem.github.io/gccat/gccat/Cinverse.html),
`inverse_channeling`, or `assignment`.
"""
struct Inverse <: MOI.AbstractVectorSet
    dimension::Int
end

"""
    SlidingSum{T}(low::T, high::T, length::Int, dimension::Int)

Ensures that the sum of all sequences of size `length` have a value between
`low` and `high`.

``\\{x \\in \\mathbb{R}^{\\mathtt{dimension}} | \\mathtt{low} \\leq \\sum_{j=i}^{i+\\mathtt{length}-1} x_i \\leq \\mathtt{high}, \\forall i \\in \\{ 0, 1 \\dots \\mathtt{dimension} - \\mathtt{length} \\} \\}``

https://sofdem.github.io/gccat/gccat/Csliding_sum.html
"""
struct SlidingSum{T <: Real} <: MOI.AbstractVectorSet
    low::T
    high::T
    length::Int
    dimension::Int
end

"""
    ValuePrecedence(before::T, value::T, dimension::Int)

Ensures that the value `before` happens before `value` in the array of size
`dimension`.

``\\{x \\in \\mathbb{R}^{\\mathtt{dimension}} | \\exists i < j: x_i = \\mathtt{before}, x_j = \\mathtt{value} \\}``

Also called `precede` or `value_precede`.

https://sofdem.github.io/gccat/gccat/Cint_value_precede.html
"""
struct ValuePrecedence{T <: Real} <: MOI.AbstractVectorSet
    before::T
    value::T
    dimension::Int
end

function copy(set::ValuePrecedence{T}) where {T}
    return ValuePrecedence(copy(set.before), copy(set.value), set.dimension)
end
function Base.:(==)(x::ValuePrecedence{T}, y::ValuePrecedence{T}) where {T}
    return x.dimension == y.dimension && x.before == y.before && x.value == y.value
end

# Solvers tend not to agree on the name of this one... "Inverse" is the most common one, though.
#     https://sofdem.github.io/gccat/gccat/Cinverse.html
# - inverse: CPLEX, MiniZinc, GCC, CHIP
# - inverseChanneling: Choco
# - channel: Gecode
# - assignment: SICStus

MOI.dimension(set::Inverse) = 2 * set.dimension

# isbits types, nothing to copy
function copy(
    set::Union{AllEqual, AllDifferent, SymmetricAllDifferent, Membership, Inverse, SlidingSum,},
)
    return set
end


text:
using MetaGraphsNext
using Documenter: deploydocs, makedocs

makedocs(sitename = "MetaGraphsNext.jl", modules = [MetaGraphsNext], doctest = false)
deploydocs(repo = "github.com/JuliaGraphs/MetaGraphsNext.jl.git")


text:
# src/core.jl
# Abstractions of Digital Wallets

export missing_api,
       AbstractAddress,
       AbstractPortfolio,
       AbstractWallet,
       AbstractWalletOrAddress,
       portfoliotype,
       portfolio,
       wallet,
       addresstype,
       address,
       new_address!

"""```
missing_api(name, args...; kwargs...)
```
Throw an `ArgumentError` if the function with name `name` is not defined on
the given `args` and `kwargs`.
"""
function missing_api(name::Union{Symbol,AbstractString}, args...; kwargs...)
    throw(ArgumentError("`$name` is not defined for `$args, $kwargs`"))
end

"""```
AbstractAddress
```
Abstraction for asset container addresses.
"""
abstract type AbstractAddress end

"""```
AbstractPortfolio{K, N} <: AbstractDict{K, N}
```
Abstraction for asset container.
"""
abstract type AbstractPortfolio{K,N} <: AbstractDict{K,N} end

"""```
AbstractWallet{K, N, P <: AbstractPortfolio{K, N}, A <: AbstractAddress}
```
Abstraction for asset container with address.
"""
abstract type AbstractWallet{K,N,P<:AbstractPortfolio{K,N},A<:AbstractAddress} end

"""```
AbstractWalletOrAddress === Union{<: AbstractWallet, <: AbstractAddress}
```
A type which is either an `AbstractWallet` or an `AbstractAddress`.
"""
const AbstractWalletOrAddress = Union{<:AbstractWallet,<:AbstractAddress}

"""```
portfoliotype(::Type{AbstractWallet{K, N, P, A}}) === P
```
Return portfolio type for a given `wallet`.
"""
portfoliotype(::Type{AbstractWallet{K,N,P,A}}) where {K,N,P,A} = P

"""```
portfoliotype(::AbstractWallet{K, N, P, A}) === A
```
Return portfolio type for a given `wallet`.
"""
portfoliotype(wallet::AbstractWallet) = portfoliotype(typeof(wallet))

"""```
portfolio(wallet::AbstractWallet) <: AbstractPortfolio
```
Return the `portfolio` of a given `wallet`.
"""
function portfolio(wallet::AbstractWallet{K,N,P})::P where {K,N,P}
    missing_api("portfolio", wallet)
end

"""```
wallet(portfolio::AbstractWallet) <: AbstractWallet
```
Return the `wallet` of a given `portfolio`.
"""
function wallet(portfolio::AbstractPortfolio{K,N})::AbstractWallet{K,N,P} where {K,N,P}
    missing_api("wallet", portfolio)
end

"""```
addresstype(::Type{AbstractWallet{K, N, P, A}}) === A
```
Return address type for a given `wallet`.
"""
addresstype(::Type{AbstractWallet{K,N,P,A}}) where {K,N,P,A} = A

"""```
addresstype(::AbstractWallet{K, N, P, A}) === A
```
Return address type for a given `wallet`.
"""
addresstype(wallet::AbstractWallet) = addresstype(typeof(wallet))

"""```
address(wallet::AbstractWallet)
```
Return current `address` of `wallet` for depositing.
"""
function address(wallet::AbstractWallet{K,N,P,A})::A where {K,N,P,A}
    missing_api("address", portfolio)
end

"""```
new_address!(wallet::AbstractWallet)
```
Return new `address` of `wallet` for depositing.
"""
function new_address!(wallet::AbstractWallet{K,N,P,A})::A where {K,N,P,A}
    missing_api("new_address!", wallet)
end


text:
function Amount(amount::Currencies.Cash)
    currency = Currencies.cashcurrency(amount)
    val = Currencies.cashvalue(amount)
    return Amount(val, currency)
end

function Amount(value::Number, currency::Currencies.Currency)
    if value == 0
        return Worthless()
    elseif value == 1
        return Unit(currency)
    else
        return Amount(Konst(value), currency)
    end
end

function Amount(obs::Observable, currency::Currencies.Currency)
    currency_unit = Unit(currency)
    return Scale(obs, currency_unit)
end

Unit(c::Currencies.Currency; carryless::Bool=false) = Unit(SpotCurrency(c), carryless=carryless)

ZCB(mat::Date, amount::Currencies.Cash) = Currencies.cashvalue(amount) == 0 ? Worthless() : WhenAt(mat, Amount(amount))

Forward(mat::Date, amount::Currencies.Cash, strike::Currencies.Cash) = WhenAt(mat, Both(Amount(amount), Give(Amount(strike))))

const EuropeanOption = WhenAt{Either{Both, Worthless}}

function european_call(stock_ticker::Symbol, k::Currencies.Cash, maturity::Date)
    WhenAt(
        maturity,
        Either(
                Both(
                        Unit(Stock(stock_ticker)),
                        Give(Amount(k))
                    ),
                Worthless()
            )
    )
end

function european_put(stock_ticker::Symbol, k::Currencies.Cash, maturity::Date)
    WhenAt(
        maturity,
        Either(
                Both(
                        Amount(k),
                        Give(Unit(Stock(stock_ticker)))
                    ),
                Worthless()
            )
    )
end

function american_call(stock_ticker::Symbol, k::Currencies.Cash, maturity::Date)
    Anytime(
        maturity,
        Either(
                Both(
                        Unit(Stock(stock_ticker)),
                        Give(Amount(k))
                    ),
                Worthless()
            )
    )
end

function american_put(stock_ticker::Symbol, k::Currencies.Cash, maturity::Date)
    Anytime(
        maturity,
        Either(
                Both(
                        Amount(k),
                        Give(Unit(Stock(stock_ticker)))
                    ),
                Worthless()
            )
    )
end


text:
export riffle, riffle!, cut, cut!

"""
    riffle!(list)

Perform an in-place riffle shuffle permutation on
`list` using the Gilbert–Shannon–Reeds model.
"""
function riffle!(list::Vector)
    n = length(list)
    if n < 2
        return
    end
    t = _simple_binomial(n)
    A = list[1:t]
    B = list[t+1:end]

    na = length(A)
    nb = length(B)

    # pointers into A and B lists
    a = 1
    b = 1

    for j = 1:n
        top = na - a + 1
        bot = (na - a + 1) + (nb - b + 1)
        p = top / bot   # prob we choose from A

        if rand() <= p
            list[j] = A[a]
            a += 1
        else
            list[j] = B[b]
            b += 1
        end
    end
    list
end

"""
    riffle(list)

Perform a riffle shuffle permutation on a copy of `list` using the
Gilbert–Shannon–Reeds model. The original `list` is unchanged.
"""
function riffle(list::Vector)
    tmp = deepcopy(list)
    riffle!(tmp)
end

"""
    _simple_binomial(n::Int)

Return a random B(n,0.5) random value.
"""
function _simple_binomial(n::Int)
    return sum(rand() > 0.5 for _ = 1:n)
end

"""
    cut!(list,idx)

Cut the deck `list` by moving cards `1` through `idx`
(inclusive) to the back of the deck so the first card now was formerly
the one at position `idx+1`.

    cut!(list)

Cut the deck at a random location. If the deck has `n`
cards, then the cut location is given by the binomial random
variable `B(n,1/2)`.
"""
function cut!(list::Vector, idx::Int)
    n = length(list)
    @assert 0 <= idx <= n "Cut index must be between 0 and $n [got $idx]"

    if idx == 0 || idx == n
        return
    end

    A = list[1:idx]
    B = list[idx+1:end]

    na = length(A)
    nb = length(B)

    for j = 1:nb
        list[j] = B[j]
    end

    for j = 1:na
        list[nb+j] = A[j]
    end
    return list
end

function cut!(list::Vector)
    idx = _simple_binomial(length(list))
    cut!(list, idx)
end

"""
    cut(list,idx)
    cut(list)

Use `cut!` to cut a copy of the deck `list`
leaving the original `list` unchanged.
"""
function cut(list::Vector, idx::Int)
    tmp = deepcopy(list)
    cut!(tmp, idx)
end
function cut(list::Vector)
    tmp = deepcopy(list)
    cut!(tmp)
end

import Random: shuffle!, shuffle
export shuffle!, shuffle


text:
module DataManager

    using NCDatasets
    using Formatting
    using Dates

    export DataUnit, DataTable, regVariable!
    export Recorder, setNewNCFile!, record!, avgAndOutput!

    const missing_value = 1e20

    include("DataUnit.jl")
    include("DataTable.jl")
    include("Recorder.jl")
end

max_stars_repo_name: meteorologytoday/IOM

max_issues_repo_name: meteorologytoday/IOM

max_forks_repo_name: meteorologytoday/IOM


text:
using ApproxFun, LinearAlgebra, Test
    import ApproxFun: Infinity, ∞

@testset "Helper" begin
    @testset "interlace" begin
        @test ApproxFun.interlace!([-1.0],0) == [-1.0]
        @test ApproxFun.interlace!([1.0,2.0],0) == [2.0,1.0]
        @test ApproxFun.interlace!([1,2,3],0) == [2,1,3]
        @test ApproxFun.interlace!([1,2,3,4],0) == [3,1,4,2]

        @test ApproxFun.interlace!([-1.0],1) == [-1.0]
        @test ApproxFun.interlace!([1.0,2.0],1) == [1.0,2.0]
        @test ApproxFun.interlace!([1,2,3],1) == [1,3,2]
        @test ApproxFun.interlace!([1,2,3,4],1) == [1,3,2,4]

        @test ApproxFun.interlace(collect(6:10),collect(1:5)) == ApproxFun.interlace!(collect(1:10),0)
        @test ApproxFun.interlace(collect(1:5),collect(6:10)) == ApproxFun.interlace!(collect(1:10),1)
    end

    @testset "Iterators" begin
        @test cache(ApproxFun.BlockInterlacer((1:∞,[2],[2])))[1:6] ==
            [(1,1),(2,1),(2,2),(3,1),(3,2),(1,2)]

        @test collect(ApproxFun.BlockInterlacer(([2],[2],[2]))) ==
            [(1,1),(1,2),(2,1),(2,2),(3,1),(3,2)]
    end

    # TODO: Tensorizer tests
end

@testset "Domain" begin
    @test 0.45-0.65im ∉ Segment(-1,1)

    @test reverseorientation(Arc(1,2,(0.1,0.2))) == Arc(1,2,(0.2,0.1))
    @test 0.1 ∈ PeriodicSegment(2π,0)
    @test 100.0 ∈ PeriodicSegment(0,2π)
    @test -100.0 ∈ PeriodicSegment(0,2π)

    @test ApproxFun.AnySegment() == ApproxFun.AnySegment()

    @test 10.0 ∈ PeriodicLine()
    @test -10.0 ∈ PeriodicLine()
    @test -10.0+im ∉ PeriodicLine()

    @test ApproxFun.Vec(0,0.5) ∈ PeriodicSegment(ApproxFun.Vec(0.0,0), ApproxFun.Vec(0,1))

    @test ApproxFun.dimension(Domain{Float64}) == 1
    @test ApproxFun.dimension(Segment{Float64}) == 1
    @test ApproxFun.dimension(ChebyshevInterval()) == 1
    @test ApproxFun.dimension(ChebyshevInterval()^2) == 2
    @test ApproxFun.dimension(ChebyshevInterval()^3) == 3

    @test ApproxFun.Vec(1,0) ∈ Circle((0.,0.),1.)

    @test isambiguous(convert(ApproxFun.Point,ApproxFun.AnyDomain()))
    @test isambiguous(ApproxFun.Point(ApproxFun.AnyDomain()))

    @test_skip ApproxFun.Point(NaN) == ApproxFun.Point(NaN)
end

@time include("MatrixTest.jl")
@time include("ClenshawTest.jl")
@time include("ChebyshevTest.jl")
@time include("FourierTest.jl")
@time include("ComplexTest.jl")
@time include("NumberTypeTest.jl")
@time include("broadcastingtest.jl")
@time include("OperatorTest.jl")
@time include("ODETest.jl")
@time include("VectorTest.jl")
@time include("SingularitiesTest.jl")
@time include("IntegralEquationsTest.jl")
@time include("SpacesTest.jl")
@time include("JacobiTest.jl")
@time include("LaguerreTest.jl")
@time include("HermiteTest.jl")
@time include("ETDRK4Test.jl")
@time include("MultivariateTest.jl")
@time include("PDETest.jl")
@time include("ExtrasTest.jl")