text:
# This file is auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: auditmanager
using AWS.Compat
using AWS.UUIDs

"""
    associate_assessment_report_evidence_folder(assessment_id, evidence_folder_id)
    associate_assessment_report_evidence_folder(assessment_id, evidence_folder_id, params::Dict{String,<:Any})

 Associates an evidence folder to an assessment report in a Audit Manager assessment.

# Arguments
- `assessment_id`:  The identifier for the assessment.
- `evidence_folder_id`:  The identifier for the folder that the evidence is stored in.

"""
function associate_assessment_report_evidence_folder(
    assessmentId, evidenceFolderId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/associateToAssessmentReport",
        Dict{String,Any}("evidenceFolderId" => evidenceFolderId);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function associate_assessment_report_evidence_folder(
    assessmentId,
    evidenceFolderId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/associateToAssessmentReport",
        Dict{String,Any}(
            mergewith(
                _merge, Dict{String,Any}("evidenceFolderId" => evidenceFolderId), params
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    batch_associate_assessment_report_evidence(assessment_id, evidence_folder_id, evidence_ids)
    batch_associate_assessment_report_evidence(assessment_id, evidence_folder_id, evidence_ids, params::Dict{String,<:Any})

 Associates a list of evidence to an assessment report in an Audit Manager assessment.

# Arguments
- `assessment_id`:  The identifier for the assessment.
- `evidence_folder_id`:  The identifier for the folder that the evidence is stored in.
- `evidence_ids`:  The list of evidence identifiers.

"""
function batch_associate_assessment_report_evidence(
    assessmentId,
    evidenceFolderId,
    evidenceIds;
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/batchAssociateToAssessmentReport",
        Dict{String,Any}(
            "evidenceFolderId" => evidenceFolderId, "evidenceIds" => evidenceIds
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function batch_associate_assessment_report_evidence(
    assessmentId,
    evidenceFolderId,
    evidenceIds,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/batchAssociateToAssessmentReport",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "evidenceFolderId" => evidenceFolderId, "evidenceIds" => evidenceIds
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    batch_create_delegation_by_assessment(assessment_id, create_delegation_requests)
    batch_create_delegation_by_assessment(assessment_id, create_delegation_requests, params::Dict{String,<:Any})

 Creates a batch of delegations for an assessment in Audit Manager.

# Arguments
- `assessment_id`:  The identifier for the assessment.
- `create_delegation_requests`:  The API request to batch create delegations in Audit
  Manager.

"""
function batch_create_delegation_by_assessment(
    assessmentId,
    createDelegationRequests;
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/assessments/$(assessmentId)/delegations",
        Dict{String,Any}("createDelegationRequests" => createDelegationRequests);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function batch_create_delegation_by_assessment(
    assessmentId,
    createDelegationRequests,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/assessments/$(assessmentId)/delegations",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}("createDelegationRequests" => createDelegationRequests),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    batch_delete_delegation_by_assessment(assessment_id, delegation_ids)
    batch_delete_delegation_by_assessment(assessment_id, delegation_ids, params::Dict{String,<:Any})

 Deletes a batch of delegations for an assessment in Audit Manager.

# Arguments
- `assessment_id`:  The identifier for the assessment.
- `delegation_ids`:  The identifiers for the delegations.

"""
function batch_delete_delegation_by_assessment(
    assessmentId, delegationIds; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/delegations",
        Dict{String,Any}("delegationIds" => delegationIds);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function batch_delete_delegation_by_assessment(
    assessmentId,
    delegationIds,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/delegations",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("delegationIds" => delegationIds), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    batch_disassociate_assessment_report_evidence(assessment_id, evidence_folder_id, evidence_ids)
    batch_disassociate_assessment_report_evidence(assessment_id, evidence_folder_id, evidence_ids, params::Dict{String,<:Any})

 Disassociates a list of evidence from an assessment report in Audit Manager.

# Arguments
- `assessment_id`:  The identifier for the assessment.
- `evidence_folder_id`:  The identifier for the folder that the evidence is stored in.
- `evidence_ids`:  The list of evidence identifiers.

"""
function batch_disassociate_assessment_report_evidence(
    assessmentId,
    evidenceFolderId,
    evidenceIds;
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/batchDisassociateFromAssessmentReport",
        Dict{String,Any}(
            "evidenceFolderId" => evidenceFolderId, "evidenceIds" => evidenceIds
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function batch_disassociate_assessment_report_evidence(
    assessmentId,
    evidenceFolderId,
    evidenceIds,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/batchDisassociateFromAssessmentReport",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "evidenceFolderId" => evidenceFolderId, "evidenceIds" => evidenceIds
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    batch_import_evidence_to_assessment_control(assessment_id, control_id, control_set_id, manual_evidence)
    batch_import_evidence_to_assessment_control(assessment_id, control_id, control_set_id, manual_evidence, params::Dict{String,<:Any})

 Uploads one or more pieces of evidence to a control in an Audit Manager assessment.

# Arguments
- `assessment_id`:  The identifier for the assessment.
- `control_id`:  The identifier for the control.
- `control_set_id`:  The identifier for the control set.
- `manual_evidence`:  The list of manual evidence objects.

"""
function batch_import_evidence_to_assessment_control(
    assessmentId,
    controlId,
    controlSetId,
    manualEvidence;
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/assessments/$(assessmentId)/controlSets/$(controlSetId)/controls/$(controlId)/evidence",
        Dict{String,Any}("manualEvidence" => manualEvidence);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function batch_import_evidence_to_assessment_control(
    assessmentId,
    controlId,
    controlSetId,
    manualEvidence,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/assessments/$(assessmentId)/controlSets/$(controlSetId)/controls/$(controlId)/evidence",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("manualEvidence" => manualEvidence), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    create_assessment(assessment_reports_destination, framework_id, name, roles, scope)
    create_assessment(assessment_reports_destination, framework_id, name, roles, scope, params::Dict{String,<:Any})

 Creates an assessment in Audit Manager.

# Arguments
- `assessment_reports_destination`:  The assessment report storage destination for the
  assessment that's being created.
- `framework_id`:  The identifier for the framework that the assessment will be created
  from.
- `name`:  The name of the assessment to be created.
- `roles`:  The list of roles for the assessment.
- `scope`:

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"description"`:  The optional description of the assessment to be created.
- `"tags"`:  The tags that are associated with the assessment.
"""
function create_assessment(
    assessmentReportsDestination,
    frameworkId,
    name,
    roles,
    scope;
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/assessments",
        Dict{String,Any}(
            "assessmentReportsDestination" => assessmentReportsDestination,
            "frameworkId" => frameworkId,
            "name" => name,
            "roles" => roles,
            "scope" => scope,
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function create_assessment(
    assessmentReportsDestination,
    frameworkId,
    name,
    roles,
    scope,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/assessments",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "assessmentReportsDestination" => assessmentReportsDestination,
                    "frameworkId" => frameworkId,
                    "name" => name,
                    "roles" => roles,
                    "scope" => scope,
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    create_assessment_framework(control_sets, name)
    create_assessment_framework(control_sets, name, params::Dict{String,<:Any})

 Creates a custom framework in Audit Manager.

# Arguments
- `control_sets`:  The control sets that are associated with the framework.
- `name`:  The name of the new custom framework.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"complianceType"`:  The compliance type that the new custom framework supports, such as
  CIS or HIPAA.
- `"description"`:  An optional description for the new custom framework.
- `"tags"`:  The tags that are associated with the framework.
"""
function create_assessment_framework(
    controlSets, name; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "POST",
        "/assessmentFrameworks",
        Dict{String,Any}("controlSets" => controlSets, "name" => name);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function create_assessment_framework(
    controlSets,
    name,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/assessmentFrameworks",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}("controlSets" => controlSets, "name" => name),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    create_assessment_report(assessment_id, name)
    create_assessment_report(assessment_id, name, params::Dict{String,<:Any})

 Creates an assessment report for the specified assessment.

# Arguments
- `assessment_id`:  The identifier for the assessment.
- `name`:  The name of the new assessment report.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"description"`:  The description of the assessment report.
"""
function create_assessment_report(
    assessmentId, name; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "POST",
        "/assessments/$(assessmentId)/reports",
        Dict{String,Any}("name" => name);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function create_assessment_report(
    assessmentId,
    name,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/assessments/$(assessmentId)/reports",
        Dict{String,Any}(mergewith(_merge, Dict{String,Any}("name" => name), params));
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    create_control(control_mapping_sources, name)
    create_control(control_mapping_sources, name, params::Dict{String,<:Any})

 Creates a new custom control in Audit Manager.

# Arguments
- `control_mapping_sources`:  The data mapping sources for the control.
- `name`:  The name of the control.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"actionPlanInstructions"`:  The recommended actions to carry out if the control isn't
  fulfilled.
- `"actionPlanTitle"`:  The title of the action plan for remediating the control.
- `"description"`:  The description of the control.
- `"tags"`:  The tags that are associated with the control.
- `"testingInformation"`:  The steps to follow to determine if the control is satisfied.
"""
function create_control(
    controlMappingSources, name; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "POST",
        "/controls",
        Dict{String,Any}("controlMappingSources" => controlMappingSources, "name" => name);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function create_control(
    controlMappingSources,
    name,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/controls",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "controlMappingSources" => controlMappingSources, "name" => name
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    delete_assessment(assessment_id)
    delete_assessment(assessment_id, params::Dict{String,<:Any})

 Deletes an assessment in Audit Manager.

# Arguments
- `assessment_id`:  The identifier for the assessment.

"""
function delete_assessment(assessmentId; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "DELETE",
        "/assessments/$(assessmentId)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function delete_assessment(
    assessmentId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "DELETE",
        "/assessments/$(assessmentId)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    delete_assessment_framework(framework_id)
    delete_assessment_framework(framework_id, params::Dict{String,<:Any})

 Deletes a custom framework in Audit Manager.

# Arguments
- `framework_id`:  The identifier for the custom framework.

"""
function delete_assessment_framework(
    frameworkId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "DELETE",
        "/assessmentFrameworks/$(frameworkId)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function delete_assessment_framework(
    frameworkId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "DELETE",
        "/assessmentFrameworks/$(frameworkId)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    delete_assessment_framework_share(request_id, request_type)
    delete_assessment_framework_share(request_id, request_type, params::Dict{String,<:Any})

 Deletes a share request for a custom framework in Audit Manager.

# Arguments
- `request_id`: The unique identifier for the share request to be deleted.
- `request_type`: Specifies whether the share request is a sent request or a received
  request.

"""
function delete_assessment_framework_share(
    requestId, requestType; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "DELETE",
        "/assessmentFrameworkShareRequests/$(requestId)",
        Dict{String,Any}("requestType" => requestType);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function delete_assessment_framework_share(
    requestId,
    requestType,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "DELETE",
        "/assessmentFrameworkShareRequests/$(requestId)",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("requestType" => requestType), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    delete_assessment_report(assessment_id, assessment_report_id)
    delete_assessment_report(assessment_id, assessment_report_id, params::Dict{String,<:Any})

 Deletes an assessment report from an assessment in Audit Manager.

# Arguments
- `assessment_id`:  The unique identifier for the assessment.
- `assessment_report_id`:  The unique identifier for the assessment report.

"""
function delete_assessment_report(
    assessmentId, assessmentReportId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "DELETE",
        "/assessments/$(assessmentId)/reports/$(assessmentReportId)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function delete_assessment_report(
    assessmentId,
    assessmentReportId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "DELETE",
        "/assessments/$(assessmentId)/reports/$(assessmentReportId)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    delete_control(control_id)
    delete_control(control_id, params::Dict{String,<:Any})

 Deletes a custom control in Audit Manager.

# Arguments
- `control_id`:  The unique identifier for the control.

"""
function delete_control(controlId; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "DELETE",
        "/controls/$(controlId)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function delete_control(
    controlId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "DELETE",
        "/controls/$(controlId)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    deregister_account()
    deregister_account(params::Dict{String,<:Any})

 Deregisters an account in Audit Manager.

"""
function deregister_account(; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "POST",
        "/account/deregisterAccount";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function deregister_account(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "POST",
        "/account/deregisterAccount",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    deregister_organization_admin_account()
    deregister_organization_admin_account(params::Dict{String,<:Any})

Removes the specified member Amazon Web Services account as a delegated administrator for
Audit Manager.   When you remove a delegated administrator from your Audit Manager
settings, you continue to have access to the evidence that you previously collected under
that account. This is also the case when you deregister a delegated administrator from
Audit Manager. However, Audit Manager will stop collecting and attaching evidence to that
delegated administrator account moving forward.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"adminAccountId"`:  The identifier for the administrator account.
"""
function deregister_organization_admin_account(;
    aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "POST",
        "/account/deregisterOrganizationAdminAccount";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function deregister_organization_admin_account(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "POST",
        "/account/deregisterOrganizationAdminAccount",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    disassociate_assessment_report_evidence_folder(assessment_id, evidence_folder_id)
    disassociate_assessment_report_evidence_folder(assessment_id, evidence_folder_id, params::Dict{String,<:Any})

 Disassociates an evidence folder from the specified assessment report in Audit Manager.

# Arguments
- `assessment_id`:  The unique identifier for the assessment.
- `evidence_folder_id`:  The unique identifier for the folder that the evidence is stored
  in.

"""
function disassociate_assessment_report_evidence_folder(
    assessmentId, evidenceFolderId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/disassociateFromAssessmentReport",
        Dict{String,Any}("evidenceFolderId" => evidenceFolderId);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function disassociate_assessment_report_evidence_folder(
    assessmentId,
    evidenceFolderId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/disassociateFromAssessmentReport",
        Dict{String,Any}(
            mergewith(
                _merge, Dict{String,Any}("evidenceFolderId" => evidenceFolderId), params
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_account_status()
    get_account_status(params::Dict{String,<:Any})

 Returns the registration status of an account in Audit Manager.

"""
function get_account_status(; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET", "/account/status"; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end
function get_account_status(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/account/status",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_assessment(assessment_id)
    get_assessment(assessment_id, params::Dict{String,<:Any})

Returns an assessment from Audit Manager.

# Arguments
- `assessment_id`: The unique identifier for the assessment.

"""
function get_assessment(assessmentId; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_assessment(
    assessmentId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_assessment_framework(framework_id)
    get_assessment_framework(framework_id, params::Dict{String,<:Any})

Returns a framework from Audit Manager.

# Arguments
- `framework_id`:  The identifier for the framework.

"""
function get_assessment_framework(
    frameworkId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/assessmentFrameworks/$(frameworkId)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_assessment_framework(
    frameworkId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessmentFrameworks/$(frameworkId)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_assessment_report_url(assessment_id, assessment_report_id)
    get_assessment_report_url(assessment_id, assessment_report_id, params::Dict{String,<:Any})

 Returns the URL of an assessment report in Audit Manager.

# Arguments
- `assessment_id`:  The unique identifier for the assessment.
- `assessment_report_id`:  The unique identifier for the assessment report.

"""
function get_assessment_report_url(
    assessmentId, assessmentReportId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/reports/$(assessmentReportId)/url";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_assessment_report_url(
    assessmentId,
    assessmentReportId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/reports/$(assessmentReportId)/url",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_change_logs(assessment_id)
    get_change_logs(assessment_id, params::Dict{String,<:Any})

 Returns a list of changelogs from Audit Manager.

# Arguments
- `assessment_id`: The unique identifier for the assessment.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"controlId"`:  The unique identifier for the control.
- `"controlSetId"`:  The unique identifier for the control set.
- `"maxResults"`: Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`:  The pagination token that's used to fetch the next set of results.
"""
function get_change_logs(assessmentId; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/changelogs";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_change_logs(
    assessmentId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/changelogs",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_control(control_id)
    get_control(control_id, params::Dict{String,<:Any})

 Returns a control from Audit Manager.

# Arguments
- `control_id`:  The identifier for the control.

"""
function get_control(controlId; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET",
        "/controls/$(controlId)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_control(
    controlId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/controls/$(controlId)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_delegations()
    get_delegations(params::Dict{String,<:Any})

 Returns a list of delegations from an audit owner to a delegate.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`:  Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`:  The pagination token that's used to fetch the next set of results.
"""
function get_delegations(; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET", "/delegations"; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end
function get_delegations(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/delegations",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_evidence(assessment_id, control_set_id, evidence_folder_id, evidence_id)
    get_evidence(assessment_id, control_set_id, evidence_folder_id, evidence_id, params::Dict{String,<:Any})

 Returns evidence from Audit Manager.

# Arguments
- `assessment_id`:  The unique identifier for the assessment.
- `control_set_id`:  The unique identifier for the control set.
- `evidence_folder_id`:  The unique identifier for the folder that the evidence is stored
  in.
- `evidence_id`:  The unique identifier for the evidence.

"""
function get_evidence(
    assessmentId,
    controlSetId,
    evidenceFolderId,
    evidenceId;
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/controlSets/$(controlSetId)/evidenceFolders/$(evidenceFolderId)/evidence/$(evidenceId)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_evidence(
    assessmentId,
    controlSetId,
    evidenceFolderId,
    evidenceId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/controlSets/$(controlSetId)/evidenceFolders/$(evidenceFolderId)/evidence/$(evidenceId)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_evidence_by_evidence_folder(assessment_id, control_set_id, evidence_folder_id)
    get_evidence_by_evidence_folder(assessment_id, control_set_id, evidence_folder_id, params::Dict{String,<:Any})

 Returns all evidence from a specified evidence folder in Audit Manager.

# Arguments
- `assessment_id`:  The identifier for the assessment.
- `control_set_id`:  The identifier for the control set.
- `evidence_folder_id`:  The unique identifier for the folder that the evidence is stored
  in.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`:  Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`:  The pagination token that's used to fetch the next set of results.
"""
function get_evidence_by_evidence_folder(
    assessmentId,
    controlSetId,
    evidenceFolderId;
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/controlSets/$(controlSetId)/evidenceFolders/$(evidenceFolderId)/evidence";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_evidence_by_evidence_folder(
    assessmentId,
    controlSetId,
    evidenceFolderId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/controlSets/$(controlSetId)/evidenceFolders/$(evidenceFolderId)/evidence",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_evidence_folder(assessment_id, control_set_id, evidence_folder_id)
    get_evidence_folder(assessment_id, control_set_id, evidence_folder_id, params::Dict{String,<:Any})

 Returns an evidence folder from the specified assessment in Audit Manager.

# Arguments
- `assessment_id`:  The unique identifier for the assessment.
- `control_set_id`:  The unique identifier for the control set.
- `evidence_folder_id`:  The unique identifier for the folder that the evidence is stored
  in.

"""
function get_evidence_folder(
    assessmentId,
    controlSetId,
    evidenceFolderId;
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/controlSets/$(controlSetId)/evidenceFolders/$(evidenceFolderId)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_evidence_folder(
    assessmentId,
    controlSetId,
    evidenceFolderId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/controlSets/$(controlSetId)/evidenceFolders/$(evidenceFolderId)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_evidence_folders_by_assessment(assessment_id)
    get_evidence_folders_by_assessment(assessment_id, params::Dict{String,<:Any})

 Returns the evidence folders from a specified assessment in Audit Manager.

# Arguments
- `assessment_id`:  The unique identifier for the assessment.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`:  Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`:  The pagination token that's used to fetch the next set of results.
"""
function get_evidence_folders_by_assessment(
    assessmentId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/evidenceFolders";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_evidence_folders_by_assessment(
    assessmentId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/evidenceFolders",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_evidence_folders_by_assessment_control(assessment_id, control_id, control_set_id)
    get_evidence_folders_by_assessment_control(assessment_id, control_id, control_set_id, params::Dict{String,<:Any})

 Returns a list of evidence folders that are associated with a specified control of an
assessment in Audit Manager.

# Arguments
- `assessment_id`:  The identifier for the assessment.
- `control_id`:  The identifier for the control.
- `control_set_id`:  The identifier for the control set.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`:  Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`:  The pagination token that's used to fetch the next set of results.
"""
function get_evidence_folders_by_assessment_control(
    assessmentId, controlId, controlSetId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/evidenceFolders-by-assessment-control/$(controlSetId)/$(controlId)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_evidence_folders_by_assessment_control(
    assessmentId,
    controlId,
    controlSetId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessments/$(assessmentId)/evidenceFolders-by-assessment-control/$(controlSetId)/$(controlId)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_insights()
    get_insights(params::Dict{String,<:Any})

Gets the latest analytics data for all your current active assessments.

"""
function get_insights(; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET", "/insights"; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end
function get_insights(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET", "/insights", params; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end

"""
    get_insights_by_assessment(assessment_id)
    get_insights_by_assessment(assessment_id, params::Dict{String,<:Any})

Gets the latest analytics data for a specific active assessment.

# Arguments
- `assessment_id`: The unique identifier for the assessment.

"""
function get_insights_by_assessment(
    assessmentId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/insights/assessments/$(assessmentId)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_insights_by_assessment(
    assessmentId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/insights/assessments/$(assessmentId)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_organization_admin_account()
    get_organization_admin_account(params::Dict{String,<:Any})

 Returns the name of the delegated Amazon Web Services administrator account for the
organization.

"""
function get_organization_admin_account(; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET",
        "/account/organizationAdminAccount";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_organization_admin_account(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/account/organizationAdminAccount",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    get_services_in_scope()
    get_services_in_scope(params::Dict{String,<:Any})

 Returns a list of the in-scope Amazon Web Services services for the specified assessment.

"""
function get_services_in_scope(; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET", "/services"; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end
function get_services_in_scope(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET", "/services", params; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end

"""
    get_settings(attribute)
    get_settings(attribute, params::Dict{String,<:Any})

 Returns the settings for the specified Amazon Web Services account.

# Arguments
- `attribute`:  The list of SettingAttribute enum values.

"""
function get_settings(attribute; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET",
        "/settings/$(attribute)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_settings(
    attribute,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/settings/$(attribute)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_assessment_control_insights_by_control_domain(assessment_id, control_domain_id)
    list_assessment_control_insights_by_control_domain(assessment_id, control_domain_id, params::Dict{String,<:Any})

Lists the latest analytics data for controls within a specific control domain and a
specific active assessment.  Control insights are listed only if the control belongs to the
control domain and assessment that was specified. Moreover, the control must have collected
evidence on the lastUpdated date of controlInsightsByAssessment. If neither of these
conditions are met, no data is listed for that control.

# Arguments
- `assessment_id`: The unique identifier for the active assessment.
- `control_domain_id`: The unique identifier for the control domain.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`: The pagination token that's used to fetch the next set of results.
"""
function list_assessment_control_insights_by_control_domain(
    assessmentId, controlDomainId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/insights/controls-by-assessment",
        Dict{String,Any}(
            "assessmentId" => assessmentId, "controlDomainId" => controlDomainId
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function list_assessment_control_insights_by_control_domain(
    assessmentId,
    controlDomainId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/insights/controls-by-assessment",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "assessmentId" => assessmentId, "controlDomainId" => controlDomainId
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_assessment_framework_share_requests(request_type)
    list_assessment_framework_share_requests(request_type, params::Dict{String,<:Any})

 Returns a list of sent or received share requests for custom frameworks in Audit Manager.

# Arguments
- `request_type`:  Specifies whether the share request is a sent request or a received
  request.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`:  Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`:  The pagination token that's used to fetch the next set of results.
"""
function list_assessment_framework_share_requests(
    requestType; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/assessmentFrameworkShareRequests",
        Dict{String,Any}("requestType" => requestType);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function list_assessment_framework_share_requests(
    requestType,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessmentFrameworkShareRequests",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("requestType" => requestType), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_assessment_frameworks(framework_type)
    list_assessment_frameworks(framework_type, params::Dict{String,<:Any})

 Returns a list of the frameworks that are available in the Audit Manager framework
library.

# Arguments
- `framework_type`:  The type of framework, such as a standard framework or a custom
  framework.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`:  Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`:  The pagination token that's used to fetch the next set of results.
"""
function list_assessment_frameworks(
    frameworkType; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/assessmentFrameworks",
        Dict{String,Any}("frameworkType" => frameworkType);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function list_assessment_frameworks(
    frameworkType,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/assessmentFrameworks",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("frameworkType" => frameworkType), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_assessment_reports()
    list_assessment_reports(params::Dict{String,<:Any})

 Returns a list of assessment reports created in Audit Manager.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`:  Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`:  The pagination token that's used to fetch the next set of results.
"""
function list_assessment_reports(; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET", "/assessmentReports"; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end
function list_assessment_reports(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/assessmentReports",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_assessments()
    list_assessments(params::Dict{String,<:Any})

 Returns a list of current and past assessments from Audit Manager.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`:  Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`:  The pagination token that's used to fetch the next set of results.
- `"status"`:  The current status of the assessment.
"""
function list_assessments(; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET", "/assessments"; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end
function list_assessments(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/assessments",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_control_domain_insights()
    list_control_domain_insights(params::Dict{String,<:Any})

Lists the latest analytics data for control domains across all of your active assessments.
 A control domain is listed only if at least one of the controls within that domain
collected evidence on the lastUpdated date of controlDomainInsights. If this condition
isn’t met, no data is listed for that control domain.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`: The pagination token that's used to fetch the next set of results.
"""
function list_control_domain_insights(; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET",
        "/insights/control-domains";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function list_control_domain_insights(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/insights/control-domains",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_control_domain_insights_by_assessment(assessment_id)
    list_control_domain_insights_by_assessment(assessment_id, params::Dict{String,<:Any})

Lists analytics data for control domains within a specified active assessment.  A control
domain is listed only if at least one of the controls within that domain collected evidence
on the lastUpdated date of controlDomainInsights. If this condition isn’t met, no data is
listed for that domain.

# Arguments
- `assessment_id`: The unique identifier for the active assessment.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`: The pagination token that's used to fetch the next set of results.
"""
function list_control_domain_insights_by_assessment(
    assessmentId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/insights/control-domains-by-assessment",
        Dict{String,Any}("assessmentId" => assessmentId);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function list_control_domain_insights_by_assessment(
    assessmentId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/insights/control-domains-by-assessment",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("assessmentId" => assessmentId), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_control_insights_by_control_domain(control_domain_id)
    list_control_insights_by_control_domain(control_domain_id, params::Dict{String,<:Any})

Lists the latest analytics data for controls within a specific control domain across all
active assessments.  Control insights are listed only if the control belongs to the control
domain that was specified and the control collected evidence on the lastUpdated date of
controlInsightsMetadata. If neither of these conditions are met, no data is listed for that
control.

# Arguments
- `control_domain_id`: The unique identifier for the control domain.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`: The pagination token that's used to fetch the next set of results.
"""
function list_control_insights_by_control_domain(
    controlDomainId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/insights/controls",
        Dict{String,Any}("controlDomainId" => controlDomainId);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function list_control_insights_by_control_domain(
    controlDomainId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/insights/controls",
        Dict{String,Any}(
            mergewith(
                _merge, Dict{String,Any}("controlDomainId" => controlDomainId), params
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_controls(control_type)
    list_controls(control_type, params::Dict{String,<:Any})

 Returns a list of controls from Audit Manager.

# Arguments
- `control_type`:  The type of control, such as a standard control or a custom control.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`:  Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`:  The pagination token that's used to fetch the next set of results.
"""
function list_controls(controlType; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET",
        "/controls",
        Dict{String,Any}("controlType" => controlType);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function list_controls(
    controlType,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/controls",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("controlType" => controlType), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_keywords_for_data_source(source)
    list_keywords_for_data_source(source, params::Dict{String,<:Any})

 Returns a list of keywords that are pre-mapped to the specified control data source.

# Arguments
- `source`:  The control mapping data source that the keywords apply to.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`:  Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`:  The pagination token that's used to fetch the next set of results.
"""
function list_keywords_for_data_source(
    source; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/dataSourceKeywords",
        Dict{String,Any}("source" => source);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function list_keywords_for_data_source(
    source, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/dataSourceKeywords",
        Dict{String,Any}(mergewith(_merge, Dict{String,Any}("source" => source), params));
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_notifications()
    list_notifications(params::Dict{String,<:Any})

 Returns a list of all Audit Manager notifications.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`:  Represents the maximum number of results on a page or for an API request
  call.
- `"nextToken"`:  The pagination token that's used to fetch the next set of results.
"""
function list_notifications(; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "GET", "/notifications"; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end
function list_notifications(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/notifications",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_tags_for_resource(resource_arn)
    list_tags_for_resource(resource_arn, params::Dict{String,<:Any})

 Returns a list of tags for the specified resource in Audit Manager.

# Arguments
- `resource_arn`:  The Amazon Resource Name (ARN) of the resource.

"""
function list_tags_for_resource(
    resourceArn; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "GET",
        "/tags/$(resourceArn)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function list_tags_for_resource(
    resourceArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "GET",
        "/tags/$(resourceArn)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    register_account()
    register_account(params::Dict{String,<:Any})

 Enables Audit Manager for the specified Amazon Web Services account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"delegatedAdminAccount"`:  The delegated administrator account for Audit Manager.
- `"kmsKey"`:  The KMS key details.
"""
function register_account(; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "POST",
        "/account/registerAccount";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function register_account(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "POST",
        "/account/registerAccount",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    register_organization_admin_account(admin_account_id)
    register_organization_admin_account(admin_account_id, params::Dict{String,<:Any})

 Enables an Amazon Web Services account within the organization as the delegated
administrator for Audit Manager.

# Arguments
- `admin_account_id`:  The identifier for the delegated administrator account.

"""
function register_organization_admin_account(
    adminAccountId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "POST",
        "/account/registerOrganizationAdminAccount",
        Dict{String,Any}("adminAccountId" => adminAccountId);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function register_organization_admin_account(
    adminAccountId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/account/registerOrganizationAdminAccount",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("adminAccountId" => adminAccountId), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    start_assessment_framework_share(destination_account, destination_region, framework_id)
    start_assessment_framework_share(destination_account, destination_region, framework_id, params::Dict{String,<:Any})

 Creates a share request for a custom framework in Audit Manager.  The share request
specifies a recipient and notifies them that a custom framework is available. Recipients
have 120 days to accept or decline the request. If no action is taken, the share request
expires.  When you invoke the StartAssessmentFrameworkShare API, you are about to share a
custom framework with another Amazon Web Services account. You may not share a custom
framework that is derived from a standard framework if the standard framework is designated
as not eligible for sharing by Amazon Web Services, unless you have obtained permission to
do so from the owner of the standard framework. To learn more about which standard
frameworks are eligible for sharing, see Framework sharing eligibility in the Audit Manager
User Guide.

# Arguments
- `destination_account`:  The Amazon Web Services account of the recipient.
- `destination_region`:  The Amazon Web Services Region of the recipient.
- `framework_id`:  The unique identifier for the custom framework to be shared.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"comment"`:  An optional comment from the sender about the share request.
"""
function start_assessment_framework_share(
    destinationAccount,
    destinationRegion,
    frameworkId;
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/assessmentFrameworks/$(frameworkId)/shareRequests",
        Dict{String,Any}(
            "destinationAccount" => destinationAccount,
            "destinationRegion" => destinationRegion,
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function start_assessment_framework_share(
    destinationAccount,
    destinationRegion,
    frameworkId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/assessmentFrameworks/$(frameworkId)/shareRequests",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "destinationAccount" => destinationAccount,
                    "destinationRegion" => destinationRegion,
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    tag_resource(resource_arn, tags)
    tag_resource(resource_arn, tags, params::Dict{String,<:Any})

 Tags the specified resource in Audit Manager.

# Arguments
- `resource_arn`:  The Amazon Resource Name (ARN) of the resource.
- `tags`:  The tags that are associated with the resource.

"""
function tag_resource(resourceArn, tags; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "POST",
        "/tags/$(resourceArn)",
        Dict{String,Any}("tags" => tags);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function tag_resource(
    resourceArn,
    tags,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/tags/$(resourceArn)",
        Dict{String,Any}(mergewith(_merge, Dict{String,Any}("tags" => tags), params));
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    untag_resource(resource_arn, tag_keys)
    untag_resource(resource_arn, tag_keys, params::Dict{String,<:Any})

 Removes a tag from a resource in Audit Manager.

# Arguments
- `resource_arn`:  The Amazon Resource Name (ARN) of the specified resource.
- `tag_keys`:  The name or key of the tag.

"""
function untag_resource(
    resourceArn, tagKeys; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "DELETE",
        "/tags/$(resourceArn)",
        Dict{String,Any}("tagKeys" => tagKeys);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function untag_resource(
    resourceArn,
    tagKeys,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "DELETE",
        "/tags/$(resourceArn)",
        Dict{String,Any}(mergewith(_merge, Dict{String,Any}("tagKeys" => tagKeys), params));
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    update_assessment(assessment_id, scope)
    update_assessment(assessment_id, scope, params::Dict{String,<:Any})

 Edits an Audit Manager assessment.

# Arguments
- `assessment_id`:  The unique identifier for the assessment.
- `scope`:  The scope of the assessment.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"assessmentDescription"`:  The description of the assessment.
- `"assessmentName"`:  The name of the assessment to be updated.
- `"assessmentReportsDestination"`:  The assessment report storage destination for the
  assessment that's being updated.
- `"roles"`:  The list of roles for the assessment.
"""
function update_assessment(
    assessmentId, scope; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)",
        Dict{String,Any}("scope" => scope);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function update_assessment(
    assessmentId,
    scope,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)",
        Dict{String,Any}(mergewith(_merge, Dict{String,Any}("scope" => scope), params));
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    update_assessment_control(assessment_id, control_id, control_set_id)
    update_assessment_control(assessment_id, control_id, control_set_id, params::Dict{String,<:Any})

 Updates a control within an assessment in Audit Manager.

# Arguments
- `assessment_id`:  The unique identifier for the assessment.
- `control_id`:  The unique identifier for the control.
- `control_set_id`:  The unique identifier for the control set.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"commentBody"`:  The comment body text for the control.
- `"controlStatus"`:  The status of the control.
"""
function update_assessment_control(
    assessmentId, controlId, controlSetId; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/controlSets/$(controlSetId)/controls/$(controlId)";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function update_assessment_control(
    assessmentId,
    controlId,
    controlSetId,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/controlSets/$(controlSetId)/controls/$(controlId)",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    update_assessment_control_set_status(assessment_id, comment, control_set_id, status)
    update_assessment_control_set_status(assessment_id, comment, control_set_id, status, params::Dict{String,<:Any})

 Updates the status of a control set in an Audit Manager assessment.

# Arguments
- `assessment_id`:  The unique identifier for the assessment.
- `comment`:  The comment that's related to the status update.
- `control_set_id`:  The unique identifier for the control set.
- `status`:  The status of the control set that's being updated.

"""
function update_assessment_control_set_status(
    assessmentId,
    comment,
    controlSetId,
    status;
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/controlSets/$(controlSetId)/status",
        Dict{String,Any}("comment" => comment, "status" => status);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function update_assessment_control_set_status(
    assessmentId,
    comment,
    controlSetId,
    status,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/controlSets/$(controlSetId)/status",
        Dict{String,Any}(
            mergewith(
                _merge, Dict{String,Any}("comment" => comment, "status" => status), params
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    update_assessment_framework(control_sets, framework_id, name)
    update_assessment_framework(control_sets, framework_id, name, params::Dict{String,<:Any})

 Updates a custom framework in Audit Manager.

# Arguments
- `control_sets`:  The control sets that are associated with the framework.
- `framework_id`:  The unique identifier for the framework.
- `name`:  The name of the framework to be updated.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"complianceType"`:  The compliance type that the new custom framework supports, such as
  CIS or HIPAA.
- `"description"`:  The description of the updated framework.
"""
function update_assessment_framework(
    controlSets, frameworkId, name; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "PUT",
        "/assessmentFrameworks/$(frameworkId)",
        Dict{String,Any}("controlSets" => controlSets, "name" => name);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function update_assessment_framework(
    controlSets,
    frameworkId,
    name,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessmentFrameworks/$(frameworkId)",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}("controlSets" => controlSets, "name" => name),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    update_assessment_framework_share(action, request_id, request_type)
    update_assessment_framework_share(action, request_id, request_type, params::Dict{String,<:Any})

 Updates a share request for a custom framework in Audit Manager.

# Arguments
- `action`: Specifies the update action for the share request.
- `request_id`:  The unique identifier for the share request.
- `request_type`: Specifies whether the share request is a sent request or a received
  request.

"""
function update_assessment_framework_share(
    action, requestId, requestType; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "PUT",
        "/assessmentFrameworkShareRequests/$(requestId)",
        Dict{String,Any}("action" => action, "requestType" => requestType);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function update_assessment_framework_share(
    action,
    requestId,
    requestType,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessmentFrameworkShareRequests/$(requestId)",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}("action" => action, "requestType" => requestType),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    update_assessment_status(assessment_id, status)
    update_assessment_status(assessment_id, status, params::Dict{String,<:Any})

 Updates the status of an assessment in Audit Manager.

# Arguments
- `assessment_id`:  The unique identifier for the assessment.
- `status`:  The current status of the assessment.

"""
function update_assessment_status(
    assessmentId, status; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/status",
        Dict{String,Any}("status" => status);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function update_assessment_status(
    assessmentId,
    status,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/assessments/$(assessmentId)/status",
        Dict{String,Any}(mergewith(_merge, Dict{String,Any}("status" => status), params));
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    update_control(control_id, control_mapping_sources, name)
    update_control(control_id, control_mapping_sources, name, params::Dict{String,<:Any})

 Updates a custom control in Audit Manager.

# Arguments
- `control_id`:  The identifier for the control.
- `control_mapping_sources`:  The data mapping sources for the control.
- `name`:  The name of the updated control.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"actionPlanInstructions"`:  The recommended actions to carry out if the control isn't
  fulfilled.
- `"actionPlanTitle"`:  The title of the action plan for remediating the control.
- `"description"`:  The optional description of the control.
- `"testingInformation"`:  The steps that you should follow to determine if the control is
  met.
"""
function update_control(
    controlId,
    controlMappingSources,
    name;
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/controls/$(controlId)",
        Dict{String,Any}("controlMappingSources" => controlMappingSources, "name" => name);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function update_control(
    controlId,
    controlMappingSources,
    name,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "PUT",
        "/controls/$(controlId)",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "controlMappingSources" => controlMappingSources, "name" => name
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    update_settings()
    update_settings(params::Dict{String,<:Any})

 Updates Audit Manager settings for the current user account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"defaultAssessmentReportsDestination"`:  The default storage destination for assessment
  reports.
- `"defaultProcessOwners"`:  A list of the default audit owners.
- `"kmsKey"`:  The KMS key details.
- `"snsTopic"`:  The Amazon Simple Notification Service (Amazon SNS) topic that Audit
  Manager sends notifications to.
"""
function update_settings(; aws_config::AbstractAWSConfig=global_aws_config())
    return auditmanager(
        "PUT", "/settings"; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end
function update_settings(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "PUT", "/settings", params; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end

"""
    validate_assessment_report_integrity(s3_relative_path)
    validate_assessment_report_integrity(s3_relative_path, params::Dict{String,<:Any})

 Validates the integrity of an assessment report in Audit Manager.

# Arguments
- `s3_relative_path`:  The relative path of the Amazon S3 bucket that the assessment report
  is stored in.

"""
function validate_assessment_report_integrity(
    s3RelativePath; aws_config::AbstractAWSConfig=global_aws_config()
)
    return auditmanager(
        "POST",
        "/assessmentReports/integrity",
        Dict{String,Any}("s3RelativePath" => s3RelativePath);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function validate_assessment_report_integrity(
    s3RelativePath,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return auditmanager(
        "POST",
        "/assessmentReports/integrity",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("s3RelativePath" => s3RelativePath), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end


text:
# watch https://github.com/FluxML/Zygote.jl/pull/623

using Zygote

ignore(f) = f()
Zygote.@adjoint ignore(f) = ignore(f), _ -> nothing

using ReinforcementLearningCore

(app::NeuralNetworkApproximator)(args...; kwargs...) = app.model(args...; kwargs...)

ext: jl


text:
using Distributions

@testset "Simulate" begin

    @testset "Poisson Simulation" begin
        inferTests && @inferred HawkesProcesses.poisson_simulation(0.5, 10)
        inferTests && @inferred HawkesProcesses.poisson_simulation(x->x, 10)
    end
    @testset "Hawkes Simulation with Kernel Function" begin
        kern(x) = pdf.(Distributions.Exponential(1/0.5), x)
        testevents = HawkesProcesses.simulate(0.5, 0.5, kern, 10)

        @test length(testevents) > 0
        inferTests && @inferred HawkesProcesses.simulate(0.5, 0.5, kern, 100)
    end

    @testset "Hawkes Simulation with Distribution" begin
        kernD = Distributions.Exponential(1/0.5)
        testevents = HawkesProcesses.simulate(0.5, 0.5, kernD, 10)

        @test length(testevents) > 0
        inferTests && @inferred HawkesProcesses.simulate(0.5, 0.5, kernD, 100)
    end

    @testset "Hawkes Simulation with function background" begin
        kernD = Distributions.Exponential(1/0.5)
        testevents = HawkesProcesses.simulate(x-> 0.5*x, 0.5, kernD, 10)
        @test length(testevents) > 0
    end

end


text:
struct MechanismVisualizer{M <: MechanismState, V <: AbstractVisualizer}
    state::M
    visualizer::V
    modcount::Int

    function MechanismVisualizer(state::M, vis::V) where {M <: MechanismState, V <: AbstractVisualizer}
        new{M, V}(state, vis, rbd.modcount(state.mechanism))
    end
end

function MechanismVisualizer(state::MechanismState, source::AbstractGeometrySource=Skeleton(), vis::AbstractVisualizer=Visualizer())
    vis = MechanismVisualizer(state, vis)
    setelement!(vis, source)
    vis
end

function setelement!(vis::MechanismVisualizer, source::AbstractGeometrySource)
    elements = visual_elements(mechanism(vis), source)
    _set_mechanism!(vis, elements)
    _render_state!(vis)
end

MechanismVisualizer(m::Mechanism, args...) = MechanismVisualizer(MechanismState{Float64}(m), args...)

state(mvis::MechanismVisualizer) = mvis.state
mechanism(mvis::MechanismVisualizer) = mvis.state.mechanism
visualizer(mvis::MechanismVisualizer) = mvis.visualizer

to_affine_map(tform::Transform3D) = AffineMap(rotation(tform), translation(tform))

function _set_mechanism!(mvis::MechanismVisualizer, elements::AbstractVector{<:VisualElement})
    for (i, element) in enumerate(elements)
        setelement!(mvis, element, "geometry_$i")
    end
end

Base.getindex(mvis::MechanismVisualizer, x...) = getindex(mvis.visualizer, x...)

# TODO: much of this information can be cached if this
# method becomes a performance bottleneck.
# We can probably just put `@memoize` from Memoize.jl right here.
function Base.getindex(mvis::MechanismVisualizer, frame::CartesianFrame3D)
    body = rbd.body_fixed_frame_to_body(mechanism(mvis), frame)
    mvis[body][string(frame)]
end

function Base.getindex(mvis::MechanismVisualizer, body::RigidBody)
    path = _path(mechanism(mvis), body)
    mvis[path...]
end

"""
    setelement!(mvis::MechanismVisualizer, element::VisualElement, name::AbstractString="<element>")

Attach the given visual element to the visualizer.
The element's frame will determine how its geometry is attached to the scene
tree, so that any other geometries attached to the same body will all move together.
"""
function setelement!(mvis::MechanismVisualizer, element::VisualElement, name::AbstractString="<element>")
    setelement!(mvis, element.frame, element.geometry, MeshLambertMaterial(color=element.color), name)
    settransform!(mvis[element.frame][name], element.transform)
end

"""
    setelement!(mvis::MechanismVisualizer, frame::CartesianFrame3D, object::AbstractObject, name::AbstractString="<element>")

Attach the given geometric object (geometry + material) to the visualizer at the given frame
"""
function setelement!(mvis::MechanismVisualizer, frame::CartesianFrame3D, object::AbstractObject, name::AbstractString="<element>")
    body = rbd.body_fixed_frame_to_body(mechanism(mvis), frame)
    definition = rbd.frame_definition(body, frame)
    frame_vis = mvis[frame]
    settransform!(frame_vis, to_affine_map(definition))
    setobject!(frame_vis[name], object)
end

"""
    setelement!(mvis::MechanismVisualizer, frame::CartesianFrame3D, geometry::GeometryLike, name::AbstractString="<element>")

Attach the given geometry to the visualizer at the given frame, using its default material.
"""
function setelement!(mvis::MechanismVisualizer, frame::CartesianFrame3D, geometry::GeometryLike, name::AbstractString="<element>")
    setelement!(mvis, frame, Object(geometry), name)
end

"""
    setelement!(mvis::MechanismVisualizer, frame::CartesianFrame3D, geometry::GeometryLike, material::AbstractMaterial, name::AbstractString="<element>")

Construct an object with the given geometry and material and attach it to the visualizer
"""
function setelement!(mvis::MechanismVisualizer, frame::CartesianFrame3D, geometry::GeometryLike, material::AbstractMaterial, name::AbstractString="<element>")
    setelement!(mvis, frame, Object(geometry, material), name)
end

function setelement!(mvis::MechanismVisualizer, frame::CartesianFrame3D, geometry::MeshFile, material::AbstractMaterial, name::AbstractString="<element>")
    ext = lowercase(splitext(geometry.filename)[2])
    # We load .dae files as MeshFileObject so that threejs can handle loading
    # their built-in primitives, materials, and textures. All other meshes are
    # loaded as MeshFileGeometry which uses MeshIO to load the mesh geometry in
    # Julia (but does not currently handle any materials or textures).
    if ext == ".dae"
        obj = MeshFileObject(geometry.filename)
    else
        obj = Object(MeshFileGeometry(geometry.filename), material)
    end
    setelement!(mvis, frame, obj, name)
end

# Special cases for visualizing frames and points
"""
    setelement!(mvis::MechanismVisualizer, frame::CartesianFrame3D, scale::Real=0.5, name::AbstractString="<element>")

Add a Triad geometry with the given scale to the visualizer at the specified frame
"""
function setelement!(mvis::MechanismVisualizer, frame::CartesianFrame3D, scale::Real=0.5, name::AbstractString="<element>")
    setelement!(mvis, frame, Triad(scale), name)
end

"""
    setelement!(mvis::MechanismVisualizer, point::Point3D, radius::Real=0.05, name::AbstractString="<element>")

Add a HyperSphere geometry with the given radius to the visualizer at the given point
"""
function setelement!(mvis::MechanismVisualizer, point::Point3D, radius::Real=0.05, name::AbstractString="<element>")
    setelement!(mvis, point.frame, HyperSphere(Point(point.v[1], point.v[2], point.v[3]), convert(eltype(point.v), radius)), name)
end

function _path(mechanism, body)
    body_ancestors = ancestors(body, mechanism.tree)
    path = string.(reverse(body_ancestors))
end

function _render_state!(mvis::MechanismVisualizer, state::MechanismState=mvis.state)
    @assert mvis.state.mechanism === state.mechanism
    if rbd.modcount(state.mechanism) != mvis.modcount
        error("Mechanism has been modified after creating the visualizer. Please create a new MechanismVisualizer")
    end
    vis = mvis.visualizer
    tree = mechanism(mvis).tree # TODO: tree accessor?
    for body in vertices(tree)
        if body == root(tree)
            continue
        else
            parent = source(edge_to_parent(body, tree), tree)
            tform = relative_transform(state, default_frame(body), default_frame(parent))
            settransform!(mvis[body], to_affine_map(tform))
        end
    end
end

"""
    set_configuration!(mvis::MechanismVisualizer, args...)

Set the configuration of the mechanism visualizer and re-render it.

# Examples
```julia-repl
julia> set_configuration!(vis, [1., 2., 3.])
```

```julia-repl
julia> set_configuration!(vis, findjoint(robot, "shoulder"), 1.0)
```
"""
function rbd.set_configuration!(mvis::MechanismVisualizer, args...)
    set_configuration!(mvis.state, args...)
    _render_state!(mvis)
end

rbd.configuration(mvis::MechanismVisualizer, args...) = configuration(mvis.state, args...)

MeshCat.render(mvis::MechanismVisualizer, args...; kw...) = MeshCat.render(mvis.visualizer, args...; kw...)
Base.open(mvis::MechanismVisualizer, args...; kw...) = open(mvis.visualizer, args...; kw...)
Base.wait(mvis::MechanismVisualizer) = wait(mvis.visualizer)

function Base.copyto!(mvis::MechanismVisualizer, state::Union{MechanismState, AbstractVector})
    copyto!(mvis.state, state)
    _render_state!(mvis)
end


text:
@@ -0,0 +1,104 @@
using Plots
t = t1:τ:result.solution.t[end-1]
cc = get_position.(result, t)
pl = plot()
for i = 1:length(result.simulation.system.bodies)

    y = zeros(length(t))
    for j=1:length(t)
        positions = @view cc[j]
        if result.simulation.boundary_conditions isa PeriodicBoundaryConditions
            L = result.simulation.boundary_conditions[2]
            map!(x ->  x -= L * floor(x / L), positions, positions)
        end
        y[j]=cc[j][:,i][3]
    end
    plot!(pl, t, y, ylim = [0, L], xlim = [t1:t[end]])
end

#-------------Velocity

using Plots
t = t1:τ:result.solution.t[end-1]
cc = get_velocity.(result, t)
pl = plot()
for i = 1:length(result.simulation.system.bodies)

    y = zeros(length(t))
    for j=1:length(t)
        y[j]=cc[j][:,i][3]
    end
    plot!(pl, t, y, ylim = [0, L], xlim = [t1:t[end]])
end
display(pl)

#---------Temperature
using Plots
t = t1:τ:result.solution.t[end-1]
temper = temperature.(result, t)
plot(t, temper, xlabel="t, s", ylabel = "T, °K", label="Temperature, °K" )

#--------Energy
using Plots
t = t1:τ:result.solution.t[end-2]
e_kin = kinetic_energy.(result, t)/(kb*T)
e_pot = potential_energy.(result, t)/(kb*T)
#e_tot = total_energy.(result, t)/(kb*T)
e_tot = e_kin+e_pot
plot(t, [signif.(e_tot,4), signif.(e_kin,4), signif.(e_pot,4)], label=["Total energy","Kinetic energy","Potential energy"], legend = :right, ylabel="E/kT", xlabel="t, s", formatter=:scientific)
plot(d["t"], [signif.(d["e_tot"],4), signif.(d["e_kin"],4), signif.(d["e_pot"],4)], label=["Total energy","Kinetic energy","Potential energy"], legend = :right, ylabel="E/kT", xlabel="t, s", formatter=:scientific)

_e_tot=signif.(e_tot,4)
_e_pot=signif.(e_pot,4)
_e_kin=signif.(e_kin,4)
plot(t, [_e_tot, _e_kin, _e_pot], label=["Total energy","Kinetic energy","Potential energy"], legend = :right, ylabel="Energy, J", xlabel="t, s", formatter=:scientific)

#----------------------------------------
using DifferentialEquations
function f!(du,u,p,t)
    du[3] = -u[4]
    du[4] = -u[3]
    du[1] = dot([du[3]-du[1], du[4]-du[2]], [u[3]-u[1], u[4]-u[2]])
    du[2] = sqrt((u[3]-u[1])^2+(u[4]-u[2])^2)-1

end

# x1, y1, x2, y2
u0 = [0.0, 0.5, 0.0, -0.5]
M = [0 0 0 0; 0 0 0 0; 0 0 1 0; 0 0 0 1]
tspan = (0.0, 10.0)

prob = ODEProblem(f!,u0,tspan, mass_matrix=M)
sol = solve(prob, Rosenbrock23(), dt = 0.01);

using Plots
u = sol(2)
scatter([u[1], u[3]], [u[2], u[4]], ylim = [0, 1.0], xlim = [-1.0, 0.0])

#-----------rdf--------------
using Plots
import GR
(rs, grf) = rdf(result)
plot(rs/σ, grf, xlim=[0, 0.4999L/σ], label=["Radial distribution function"],ylabel="g(r)", xlabel="r/σ")
plot(d["rs"]/σ, d["grf"], xlim=[0, 0.4999L/σ], label=["Radial distribution function"],ylabel="g(r)", xlabel="r/σ")

using Plots
import GR
(rs, grf) = rdf(result)
plot(rs/1e-10, grf, xlim=[0, 0.4999L/1e-10], label=["Radial distribution function"],ylabel="g(r)", xlabel="r, Å")
plot(d["rs"]/1e-10, d["grf"], xlim=[0, 0.4999L/1e-10], label=["Radial distribution function"],ylabel="g(r)", xlabel="r, Å")
plot(d["rs"], d["grf"], label=["Radial distribution function"],ylabel="g(r)", xlabel="r, Å")
plot(rs, grf, label=["Radial distribution function"],ylabel="g(r)", xlabel="r, Å")

#-------------msd-------------------
using Plots
import GR
plot(ts, dr2/1e-20, label=["Mean square distance"],ylabel="MSD, Å^2", xlabel="t, s")
plot(d["ts"], d["dr2"]/1e-20, label=["Mean square distance"],ylabel="MSD, Å^2", xlabel="t, s")
plot(ts, 100*dr2, label=["Mean square distance"],ylabel="MSD, Å^2", xlabel="t, s")
#----------aus file-------------
e_kin = d["e_kin"];
e_tot = d["e_tot"];
e_pot = d["e_pot"];

#---------------------------------

T0 = d["T0"]
temper = d["temper"]
thermostat = d["thermostat"]
t = d["t"]

#---------------------------------
Ok, I just updated AbstractPlotting! If you do `Pkg.add("Makie"); Pkg.checkout.(("Makie", "AbstractPlotting")))` the following should work
https://gist.github.com/SimonDanisch/8c59e79e6eaf8267796334bc2e6daa25#file-molecule_recipe-jl

function calculate!(c,a,b)
    @. c = a*b
end

function test()
    n = 100
    a = rand(n,n)
    b = rand(n,n)
    c = zero(a)
    m=70
    calculate!(c[:,1:m], a[:,1:m], b[:,1:m])
end


text:
#!/usr/bin/env julia

# Note!  This requires GuassianMixtures, which is not in REQURE.

using FITSIO
using GaussianMixtures
using Distributions
using JLD

function mag_to_nanomaggies(mag::Float64)
	10 ^ (( mag - 22.5 ) / -2.5)
end

function read_r_colors(prior_file)
	fits = FITS(prior_file)
    cat = fits[2]
	num_rows, = read_key(cat, "NAXIS2")
	table = Matrix{Float64}(num_rows, 12)
	for i in 1:12
    col_name, = read_key(cat, "TTYPE$i")
		table[:, i] = read(cat, col_name)
	end
	close(fits)

	t2 = table[:,:]
	for b in 2:7
		t2 = t2[t2[:, b] .> -50, :]
	end

	t3 = mag_to_nanomaggies.(t2[:, 3:7])
	colors = Matrix{Float64}(size(t2, 1), 4)
	for i in 1:4
		colors[:, i] = log(t3[:, i + 1] ./ t3[:, i])
	end

	#TODO: convert 'r' band to nanomaggies
	colors, mag_to_nanomaggies.(table[table[:, 5] .> 1, 5])
end

function read_quasar_catalog(prior_file)
	cat = FITS(prior_file)[2]
    mags = read(cat, "PSFMAG")'
    log_nmgys = log.(mag_to_nanomaggies.(mags))
    colors = log_nmgys[:, 2:5] - log_nmgys[:, 1:4]
    r = exp.(log_nmgys[:, 3])
    colors, r
end

function vecmat_to_tensor(vecmat::Vector{Matrix{Float64}})
    ret = Array{Float64,3}(size(vecmat[1], 1), size(vecmat[1], 2), length(vecmat))
    for i in 1:length(vecmat)
        ret[:, :, i] = vecmat[i]
    end
    ret
end

if length(ARGS) != 2
    println("usage: gen_priors.jl [catalog.fits] [out_file.dat]")
else
    c0, r0 = read_r_colors(ARGS[1])
    if false && contains(ARGS[1], "stars")
        c0_quasar, r0_quasar = read_quasar_catalog("xdcore_005972.fits")
        c0 = vcat(c0, c0_quasar)
        r0 = vcat(r0, r0_quasar)
    end

    fit_r = fit_mle(LogNormal, r0)
    println(fit_r)

    NUM_COLOR_COMPONENTS = 8
    c0_train = c0
    #c0_test = c0[120001:end, :]
    fit_gmm = GMM(NUM_COLOR_COMPONENTS, c0_train, kind=:full, method=:split)
    println("train avll:", GaussianMixtures.avll(fit_gmm, c0_train))
    #println("test avll:", GaussianMixtures.avll(fit_gmm, c0_test))

    save(ARGS[2], "r_params", collect(params(fit_r)),
        "c_weights", weights(fit_gmm),
        "color_means", means(fit_gmm)',
        "color_covs", vecmat_to_tensor(covars(fit_gmm)))
end


text:
using BlackBoxOptim
using Serialization

# Lets start an optimization of 2D rosenbrock
# as in the README, then save its state to disc,
# read it back in and continue optimization.
rosenbrock2d(x) = abs2(1.0 - x[1]) + 100.0 * abs2(x[2] - x[1]^2)

# If you want to restart optimization you need to get a handle
# to an optimization controller. Use the function bbsetup
# instead of bboptimize, but with the same parameters.
# We just run it for 100 steps though:
optctrl = bbsetup(rosenbrock2d; SearchRange = (-5.0, 5.0), NumDimensions = 2,
    MaxSteps = 100, TraceMode = :silent);

# Now we can run it:
res100 = bboptimize(optctrl)

# Print the best and a randomly selected candidate solution so we can ensure
# they are the same later.
best100  = best_candidate(res100)
idx = rand(1:popsize(optctrl.optimizer.population))
acand100 = optctrl.optimizer.population[idx]
println("Best candidate: ", best100)
println("Candidate num $(idx): ", acand100)

# Now serialize to a temp file:
tempfilename = "./temp" * string(rand(1:Int(1e8))) * ".tmp"
fh = open(tempfilename, "w")
serialize(fh, (optctrl, res100))
close(fh)

# Read back in from file:
fh = open(tempfilename, "r")
optctrlb, res100b = deserialize(fh);
close(fh)

# Print the same candidates:
best100b  = best_candidate(res100b)
acand100b = optctrlb.optimizer.population[idx]
println("Best candidate after load: ", best100)
println("Candidate num $(idx) after load: ", acand100)

# Clean up the temp file:
rm(tempfilename)

# Now restart the optimization (but run more steps):
res1100 = bboptimize(optctrlb; MaxSteps = 1000)

# And print the fitness progress:
println("Fitness progress: ", (best_fitness(res100), best_fitness(res1100)))

# NOTE! This method is not guaranteed to give stable results when you change
# version of julia between saving and loading the data.


text:
# Heatmaps with date-time-axis

begin
    using Dates
    z = rand(5, 5)
    x = DateTime.(2016:2020)
    y = 1:5
    heatmap(x, y, z)
end

max_stars_repo_name: Ellon-M/visualizations

max_issues_repo_name: Ellon-M/visualizations

max_forks_repo_name: Ellon-M/visualizations


text:
######################################################################################################
# Copy from https://bitbucket.org/wmkoolen/tidnabbil/src/master/purex_games_paper/ by Wouter Koolen  #
######################################################################################################
struct GK16
    δ;
end

function (β::GK16)(t) # Recommended in Sec 6 (Garivier and Kaufmann 2016)
    log((log(t)+1)/β.δ);
end


text:
#!/usr/local/bin/julia

using Miners
using Scenarios

function test{State, Action}(s::Scenario{State, Action}, seasons, episodes)
    const L = length(s.validActions);
    const AGENTS_NO = s.AGENTS_NO;
    for season in 1:seasons
        gs = s.init();
        ags = map(i->s.perceive(gs, i), 1:AGENTS_NO);
        for episode in 1:episodes
            actions = [s.validActions[rand(1:L)] for a in 1:AGENTS_NO];
            s.doActions!(gs, actions);
            ags = map((i,ag)->s.perceive(gs, i, ag), 1:AGENTS_NO, ags);
            map(i->s.neighbours(gs, i), 1:AGENTS_NO);
        end
    end
end

test(Gatherers, 10, 20);

@time test(Gatherers, 5000, 1000);

max_stars_repo_name: tudor-berariu/phd

max_issues_repo_name: tudor-berariu/phd

max_forks_repo_name: tudor-berariu/phd