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

"""
    associate_assets(asset_id, child_asset_id, hierarchy_id)
    associate_assets(asset_id, child_asset_id, hierarchy_id, params::Dict{String,<:Any})

Associates a child asset with the given parent asset through a hierarchy defined in the
parent asset's model. For more information, see Associating assets in the IoT SiteWise User
Guide.

# Arguments
- `asset_id`: The ID of the parent asset.
- `child_asset_id`: The ID of the child asset to be associated.
- `hierarchy_id`: The ID of a hierarchy in the parent asset's model. Hierarchies allow
  different groupings of assets to be formed that all come from the same asset model. For
  more information, see Asset hierarchies in the IoT SiteWise User Guide.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
associate_assets(assetId, childAssetId, hierarchyId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/assets/$(assetId)/associate", Dict{String, Any}("childAssetId"=>childAssetId, "hierarchyId"=>hierarchyId, "clientToken"=>string(uuid4())); aws_config=aws_config)
associate_assets(assetId, childAssetId, hierarchyId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/assets/$(assetId)/associate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("childAssetId"=>childAssetId, "hierarchyId"=>hierarchyId, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    batch_associate_project_assets(asset_ids, project_id)
    batch_associate_project_assets(asset_ids, project_id, params::Dict{String,<:Any})

Associates a group (batch) of assets with an IoT SiteWise Monitor project.

# Arguments
- `asset_ids`: The IDs of the assets to be associated to the project.
- `project_id`: The ID of the project to which to associate the assets.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
batch_associate_project_assets(assetIds, projectId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/projects/$(projectId)/assets/associate", Dict{String, Any}("assetIds"=>assetIds, "clientToken"=>string(uuid4())); aws_config=aws_config)
batch_associate_project_assets(assetIds, projectId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/projects/$(projectId)/assets/associate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("assetIds"=>assetIds, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    batch_disassociate_project_assets(asset_ids, project_id)
    batch_disassociate_project_assets(asset_ids, project_id, params::Dict{String,<:Any})

Disassociates a group (batch) of assets from an IoT SiteWise Monitor project.

# Arguments
- `asset_ids`: The IDs of the assets to be disassociated from the project.
- `project_id`: The ID of the project from which to disassociate the assets.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
batch_disassociate_project_assets(assetIds, projectId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/projects/$(projectId)/assets/disassociate", Dict{String, Any}("assetIds"=>assetIds, "clientToken"=>string(uuid4())); aws_config=aws_config)
batch_disassociate_project_assets(assetIds, projectId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/projects/$(projectId)/assets/disassociate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("assetIds"=>assetIds, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

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

Sends a list of asset property values to IoT SiteWise. Each value is a
timestamp-quality-value (TQV) data point. For more information, see Ingesting data using
the API in the IoT SiteWise User Guide. To identify an asset property, you must specify one
of the following:   The assetId and propertyId of an asset property.   A propertyAlias,
which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To
define an asset property's alias, see UpdateAssetProperty.    With respect to Unix epoch
time, IoT SiteWise accepts only TQVs that have a timestamp of no more than 7 days in the
past and no more than 10 minutes in the future. IoT SiteWise rejects timestamps outside of
the inclusive range of [-7 days, +10 minutes] and returns a TimestampOutOfRangeException
error. For each asset property, IoT SiteWise overwrites TQVs with duplicate timestamps
unless the newer TQV has a different quality. For example, if you store a TQV {T1, GOOD,
V1}, then storing {T1, GOOD, V2} replaces the existing TQV.  IoT SiteWise authorizes access
to each BatchPutAssetPropertyValue entry individually. For more information, see
BatchPutAssetPropertyValue authorization in the IoT SiteWise User Guide.

# Arguments
- `entries`: The list of asset property value entries for the batch put request. You can
  specify up to 10 entries per request.

"""
batch_put_asset_property_value(entries; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/properties", Dict{String, Any}("entries"=>entries); aws_config=aws_config)
batch_put_asset_property_value(entries, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/properties", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("entries"=>entries), params)); aws_config=aws_config)

"""
    create_access_policy(access_policy_identity, access_policy_permission, access_policy_resource)
    create_access_policy(access_policy_identity, access_policy_permission, access_policy_resource, params::Dict{String,<:Any})

Creates an access policy that grants the specified identity (Amazon Web Services SSO user,
Amazon Web Services SSO group, or IAM user) access to the specified IoT SiteWise Monitor
portal or project resource.

# Arguments
- `access_policy_identity`: The identity for this access policy. Choose an Amazon Web
  Services SSO user, an Amazon Web Services SSO group, or an IAM user.
- `access_policy_permission`: The permission level for this access policy. Note that a
  project ADMINISTRATOR is also known as a project owner.
- `access_policy_resource`: The IoT SiteWise Monitor resource for this access policy.
  Choose either a portal or a project.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
- `"tags"`: A list of key-value pairs that contain metadata for the access policy. For more
  information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.
"""
create_access_policy(accessPolicyIdentity, accessPolicyPermission, accessPolicyResource; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/access-policies", Dict{String, Any}("accessPolicyIdentity"=>accessPolicyIdentity, "accessPolicyPermission"=>accessPolicyPermission, "accessPolicyResource"=>accessPolicyResource, "clientToken"=>string(uuid4())); aws_config=aws_config)
create_access_policy(accessPolicyIdentity, accessPolicyPermission, accessPolicyResource, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/access-policies", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("accessPolicyIdentity"=>accessPolicyIdentity, "accessPolicyPermission"=>accessPolicyPermission, "accessPolicyResource"=>accessPolicyResource, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    create_asset(asset_model_id, asset_name)
    create_asset(asset_model_id, asset_name, params::Dict{String,<:Any})

Creates an asset from an existing asset model. For more information, see Creating assets in
the IoT SiteWise User Guide.

# Arguments
- `asset_model_id`: The ID of the asset model from which to create the asset.
- `asset_name`: A unique, friendly name for the asset.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
- `"tags"`: A list of key-value pairs that contain metadata for the asset. For more
  information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.
"""
create_asset(assetModelId, assetName; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/assets", Dict{String, Any}("assetModelId"=>assetModelId, "assetName"=>assetName, "clientToken"=>string(uuid4())); aws_config=aws_config)
create_asset(assetModelId, assetName, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/assets", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("assetModelId"=>assetModelId, "assetName"=>assetName, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

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

Creates an asset model from specified property and hierarchy definitions. You create assets
from asset models. With asset models, you can easily create assets of the same type that
have standardized definitions. Each asset created from a model inherits the asset model's
property and hierarchy definitions. For more information, see Defining asset models in the
IoT SiteWise User Guide.

# Arguments
- `asset_model_name`: A unique, friendly name for the asset model.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"assetModelCompositeModels"`: The composite asset models that are part of this asset
  model. Composite asset models are asset models that contain specific properties. Each
  composite model has a type that defines the properties that the composite model supports.
  Use composite asset models to define alarms on this asset model.
- `"assetModelDescription"`: A description for the asset model.
- `"assetModelHierarchies"`: The hierarchy definitions of the asset model. Each hierarchy
  specifies an asset model whose assets can be children of any other assets created from this
  asset model. For more information, see Asset hierarchies in the IoT SiteWise User Guide.
  You can specify up to 10 hierarchies per asset model. For more information, see Quotas in
  the IoT SiteWise User Guide.
- `"assetModelProperties"`: The property definitions of the asset model. For more
  information, see Asset properties in the IoT SiteWise User Guide. You can specify up to 200
  properties per asset model. For more information, see Quotas in the IoT SiteWise User Guide.
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
- `"tags"`: A list of key-value pairs that contain metadata for the asset model. For more
  information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.
"""
create_asset_model(assetModelName; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/asset-models", Dict{String, Any}("assetModelName"=>assetModelName, "clientToken"=>string(uuid4())); aws_config=aws_config)
create_asset_model(assetModelName, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/asset-models", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("assetModelName"=>assetModelName, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    create_dashboard(dashboard_definition, dashboard_name, project_id)
    create_dashboard(dashboard_definition, dashboard_name, project_id, params::Dict{String,<:Any})

Creates a dashboard in an IoT SiteWise Monitor project.

# Arguments
- `dashboard_definition`: The dashboard definition specified in a JSON literal. For
  detailed information, see Creating dashboards (CLI) in the IoT SiteWise User Guide.
- `dashboard_name`: A friendly name for the dashboard.
- `project_id`: The ID of the project in which to create the dashboard.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
- `"dashboardDescription"`: A description for the dashboard.
- `"tags"`: A list of key-value pairs that contain metadata for the dashboard. For more
  information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.
"""
create_dashboard(dashboardDefinition, dashboardName, projectId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/dashboards", Dict{String, Any}("dashboardDefinition"=>dashboardDefinition, "dashboardName"=>dashboardName, "projectId"=>projectId, "clientToken"=>string(uuid4())); aws_config=aws_config)
create_dashboard(dashboardDefinition, dashboardName, projectId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/dashboards", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("dashboardDefinition"=>dashboardDefinition, "dashboardName"=>dashboardName, "projectId"=>projectId, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    create_gateway(gateway_name, gateway_platform)
    create_gateway(gateway_name, gateway_platform, params::Dict{String,<:Any})

Creates a gateway, which is a virtual or edge device that delivers industrial data streams
from local servers to IoT SiteWise. For more information, see Ingesting data using a
gateway in the IoT SiteWise User Guide.

# Arguments
- `gateway_name`: A unique, friendly name for the gateway.
- `gateway_platform`: The gateway's platform. You can only specify one platform in a
  gateway.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"tags"`: A list of key-value pairs that contain metadata for the gateway. For more
  information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.
"""
create_gateway(gatewayName, gatewayPlatform; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/20200301/gateways", Dict{String, Any}("gatewayName"=>gatewayName, "gatewayPlatform"=>gatewayPlatform); aws_config=aws_config)
create_gateway(gatewayName, gatewayPlatform, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/20200301/gateways", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("gatewayName"=>gatewayName, "gatewayPlatform"=>gatewayPlatform), params)); aws_config=aws_config)

"""
    create_portal(portal_contact_email, portal_name, role_arn)
    create_portal(portal_contact_email, portal_name, role_arn, params::Dict{String,<:Any})

Creates a portal, which can contain projects and dashboards. IoT SiteWise Monitor uses
Amazon Web Services SSO or IAM to authenticate portal users and manage user permissions.
Before you can sign in to a new portal, you must add at least one identity to that portal.
For more information, see Adding or removing portal administrators in the IoT SiteWise User
Guide.

# Arguments
- `portal_contact_email`: The Amazon Web Services administrator's contact email address.
- `portal_name`: A friendly name for the portal.
- `role_arn`: The ARN of a service role that allows the portal's users to access your IoT
  SiteWise resources on your behalf. For more information, see Using service roles for IoT
  SiteWise Monitor in the IoT SiteWise User Guide.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"alarms"`: Contains the configuration information of an alarm created in an IoT SiteWise
  Monitor portal. You can use the alarm to monitor an asset property and get notified when
  the asset property value is outside a specified range. For more information, see Monitoring
  with alarms in the IoT SiteWise Application Guide.
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
- `"notificationSenderEmail"`: The email address that sends alarm notifications.  If you
  use the IoT Events managed Lambda function to manage your emails, you must verify the
  sender email address in Amazon SES.
- `"portalAuthMode"`: The service to use to authenticate users to the portal. Choose from
  the following options:    SSO – The portal uses Amazon Web Services Single Sign On to
  authenticate users and manage user permissions. Before you can create a portal that uses
  Amazon Web Services SSO, you must enable Amazon Web Services SSO. For more information, see
  Enabling Amazon Web Services SSO in the IoT SiteWise User Guide. This option is only
  available in Amazon Web Services Regions other than the China Regions.    IAM – The
  portal uses Identity and Access Management to authenticate users and manage user
  permissions. This option is only available in the China Regions.   You can't change this
  value after you create a portal. Default: SSO
- `"portalDescription"`: A description for the portal.
- `"portalLogoImageFile"`: A logo image to display in the portal. Upload a square,
  high-resolution image. The image is displayed on a dark background.
- `"tags"`: A list of key-value pairs that contain metadata for the portal. For more
  information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.
"""
create_portal(portalContactEmail, portalName, roleArn; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/portals", Dict{String, Any}("portalContactEmail"=>portalContactEmail, "portalName"=>portalName, "roleArn"=>roleArn, "clientToken"=>string(uuid4())); aws_config=aws_config)
create_portal(portalContactEmail, portalName, roleArn, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/portals", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("portalContactEmail"=>portalContactEmail, "portalName"=>portalName, "roleArn"=>roleArn, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    create_project(portal_id, project_name)
    create_project(portal_id, project_name, params::Dict{String,<:Any})

Creates a project in the specified portal.

# Arguments
- `portal_id`: The ID of the portal in which to create the project.
- `project_name`: A friendly name for the project.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
- `"projectDescription"`: A description for the project.
- `"tags"`: A list of key-value pairs that contain metadata for the project. For more
  information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.
"""
create_project(portalId, projectName; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/projects", Dict{String, Any}("portalId"=>portalId, "projectName"=>projectName, "clientToken"=>string(uuid4())); aws_config=aws_config)
create_project(portalId, projectName, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/projects", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("portalId"=>portalId, "projectName"=>projectName, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

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

Deletes an access policy that grants the specified identity access to the specified IoT
SiteWise Monitor resource. You can use this operation to revoke access to an IoT SiteWise
Monitor resource.

# Arguments
- `access_policy_id`: The ID of the access policy to be deleted.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
delete_access_policy(accessPolicyId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/access-policies/$(accessPolicyId)", Dict{String, Any}("clientToken"=>string(uuid4())); aws_config=aws_config)
delete_access_policy(accessPolicyId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/access-policies/$(accessPolicyId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientToken"=>string(uuid4())), params)); aws_config=aws_config)

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

Deletes an asset. This action can't be undone. For more information, see Deleting assets
and models in the IoT SiteWise User Guide.   You can't delete an asset that's associated to
another asset. For more information, see DisassociateAssets.

# Arguments
- `asset_id`: The ID of the asset to delete.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
delete_asset(assetId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/assets/$(assetId)", Dict{String, Any}("clientToken"=>string(uuid4())); aws_config=aws_config)
delete_asset(assetId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/assets/$(assetId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientToken"=>string(uuid4())), params)); aws_config=aws_config)

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

Deletes an asset model. This action can't be undone. You must delete all assets created
from an asset model before you can delete the model. Also, you can't delete an asset model
if a parent asset model exists that contains a property formula expression that depends on
the asset model that you want to delete. For more information, see Deleting assets and
models in the IoT SiteWise User Guide.

# Arguments
- `asset_model_id`: The ID of the asset model to delete.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
delete_asset_model(assetModelId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/asset-models/$(assetModelId)", Dict{String, Any}("clientToken"=>string(uuid4())); aws_config=aws_config)
delete_asset_model(assetModelId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/asset-models/$(assetModelId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientToken"=>string(uuid4())), params)); aws_config=aws_config)

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

Deletes a dashboard from IoT SiteWise Monitor.

# Arguments
- `dashboard_id`: The ID of the dashboard to delete.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
delete_dashboard(dashboardId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/dashboards/$(dashboardId)", Dict{String, Any}("clientToken"=>string(uuid4())); aws_config=aws_config)
delete_dashboard(dashboardId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/dashboards/$(dashboardId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientToken"=>string(uuid4())), params)); aws_config=aws_config)

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

Deletes a gateway from IoT SiteWise. When you delete a gateway, some of the gateway's files
remain in your gateway's file system.

# Arguments
- `gateway_id`: The ID of the gateway to delete.

"""
delete_gateway(gatewayId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/20200301/gateways/$(gatewayId)"; aws_config=aws_config)
delete_gateway(gatewayId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/20200301/gateways/$(gatewayId)", params; aws_config=aws_config)

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

Deletes a portal from IoT SiteWise Monitor.

# Arguments
- `portal_id`: The ID of the portal to delete.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
delete_portal(portalId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/portals/$(portalId)", Dict{String, Any}("clientToken"=>string(uuid4())); aws_config=aws_config)
delete_portal(portalId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/portals/$(portalId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientToken"=>string(uuid4())), params)); aws_config=aws_config)

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

Deletes a project from IoT SiteWise Monitor.

# Arguments
- `project_id`: The ID of the project.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
delete_project(projectId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/projects/$(projectId)", Dict{String, Any}("clientToken"=>string(uuid4())); aws_config=aws_config)
delete_project(projectId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/projects/$(projectId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientToken"=>string(uuid4())), params)); aws_config=aws_config)

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

Describes an access policy, which specifies an identity's access to an IoT SiteWise Monitor
portal or project.

# Arguments
- `access_policy_id`: The ID of the access policy.

"""
describe_access_policy(accessPolicyId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/access-policies/$(accessPolicyId)"; aws_config=aws_config)
describe_access_policy(accessPolicyId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/access-policies/$(accessPolicyId)", params; aws_config=aws_config)

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

Retrieves information about an asset.

# Arguments
- `asset_id`: The ID of the asset.

"""
describe_asset(assetId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/assets/$(assetId)"; aws_config=aws_config)
describe_asset(assetId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/assets/$(assetId)", params; aws_config=aws_config)

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

Retrieves information about an asset model.

# Arguments
- `asset_model_id`: The ID of the asset model.

"""
describe_asset_model(assetModelId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/asset-models/$(assetModelId)"; aws_config=aws_config)
describe_asset_model(assetModelId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/asset-models/$(assetModelId)", params; aws_config=aws_config)

"""
    describe_asset_property(asset_id, property_id)
    describe_asset_property(asset_id, property_id, params::Dict{String,<:Any})

Retrieves information about an asset property.  When you call this operation for an
attribute property, this response includes the default attribute value that you define in
the asset model. If you update the default value in the model, this operation's response
includes the new default value.  This operation doesn't return the value of the asset
property. To get the value of an asset property, use GetAssetPropertyValue.

# Arguments
- `asset_id`: The ID of the asset.
- `property_id`: The ID of the asset property.

"""
describe_asset_property(assetId, propertyId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/assets/$(assetId)/properties/$(propertyId)"; aws_config=aws_config)
describe_asset_property(assetId, propertyId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/assets/$(assetId)/properties/$(propertyId)", params; aws_config=aws_config)

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

Retrieves information about a dashboard.

# Arguments
- `dashboard_id`: The ID of the dashboard.

"""
describe_dashboard(dashboardId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/dashboards/$(dashboardId)"; aws_config=aws_config)
describe_dashboard(dashboardId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/dashboards/$(dashboardId)", params; aws_config=aws_config)

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

Retrieves information about the default encryption configuration for the Amazon Web
Services account in the default or specified Region. For more information, see Key
management in the IoT SiteWise User Guide.

"""
describe_default_encryption_configuration(; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/configuration/account/encryption"; aws_config=aws_config)
describe_default_encryption_configuration(params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/configuration/account/encryption", params; aws_config=aws_config)

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

Retrieves information about a gateway.

# Arguments
- `gateway_id`: The ID of the gateway device.

"""
describe_gateway(gatewayId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/20200301/gateways/$(gatewayId)"; aws_config=aws_config)
describe_gateway(gatewayId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/20200301/gateways/$(gatewayId)", params; aws_config=aws_config)

"""
    describe_gateway_capability_configuration(capability_namespace, gateway_id)
    describe_gateway_capability_configuration(capability_namespace, gateway_id, params::Dict{String,<:Any})

Retrieves information about a gateway capability configuration. Each gateway capability
defines data sources for a gateway. A capability configuration can contain multiple data
source configurations. If you define OPC-UA sources for a gateway in the IoT SiteWise
console, all of your OPC-UA sources are stored in one capability configuration. To list all
capability configurations for a gateway, use DescribeGateway.

# Arguments
- `capability_namespace`: The namespace of the capability configuration. For example, if
  you configure OPC-UA sources from the IoT SiteWise console, your OPC-UA capability
  configuration has the namespace iotsitewise:opcuacollector:version, where version is a
  number such as 1.
- `gateway_id`: The ID of the gateway that defines the capability configuration.

"""
describe_gateway_capability_configuration(capabilityNamespace, gatewayId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/20200301/gateways/$(gatewayId)/capability/$(capabilityNamespace)"; aws_config=aws_config)
describe_gateway_capability_configuration(capabilityNamespace, gatewayId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/20200301/gateways/$(gatewayId)/capability/$(capabilityNamespace)", params; aws_config=aws_config)

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

Retrieves the current IoT SiteWise logging options.

"""
describe_logging_options(; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/logging"; aws_config=aws_config)
describe_logging_options(params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/logging", params; aws_config=aws_config)

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

Retrieves information about a portal.

# Arguments
- `portal_id`: The ID of the portal.

"""
describe_portal(portalId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/portals/$(portalId)"; aws_config=aws_config)
describe_portal(portalId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/portals/$(portalId)", params; aws_config=aws_config)

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

Retrieves information about a project.

# Arguments
- `project_id`: The ID of the project.

"""
describe_project(projectId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/projects/$(projectId)"; aws_config=aws_config)
describe_project(projectId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/projects/$(projectId)", params; aws_config=aws_config)

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

Retrieves information about the storage configuration for IoT SiteWise.

"""
describe_storage_configuration(; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/configuration/account/storage"; aws_config=aws_config)
describe_storage_configuration(params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/configuration/account/storage", params; aws_config=aws_config)

"""
    disassociate_assets(asset_id, child_asset_id, hierarchy_id)
    disassociate_assets(asset_id, child_asset_id, hierarchy_id, params::Dict{String,<:Any})

Disassociates a child asset from the given parent asset through a hierarchy defined in the
parent asset's model.

# Arguments
- `asset_id`: The ID of the parent asset from which to disassociate the child asset.
- `child_asset_id`: The ID of the child asset to disassociate.
- `hierarchy_id`: The ID of a hierarchy in the parent asset's model. Hierarchies allow
  different groupings of assets to be formed that all come from the same asset model. You can
  use the hierarchy ID to identify the correct asset to disassociate. For more information,
  see Asset hierarchies in the IoT SiteWise User Guide.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
disassociate_assets(assetId, childAssetId, hierarchyId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/assets/$(assetId)/disassociate", Dict{String, Any}("childAssetId"=>childAssetId, "hierarchyId"=>hierarchyId, "clientToken"=>string(uuid4())); aws_config=aws_config)
disassociate_assets(assetId, childAssetId, hierarchyId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/assets/$(assetId)/disassociate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("childAssetId"=>childAssetId, "hierarchyId"=>hierarchyId, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    get_asset_property_aggregates(aggregate_types, end_date, resolution, start_date)
    get_asset_property_aggregates(aggregate_types, end_date, resolution, start_date, params::Dict{String,<:Any})

Gets aggregated values for an asset property. For more information, see Querying aggregates
in the IoT SiteWise User Guide. To identify an asset property, you must specify one of the
following:   The assetId and propertyId of an asset property.   A propertyAlias, which is a
data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an
asset property's alias, see UpdateAssetProperty.

# Arguments
- `aggregate_types`: The data aggregating function.
- `end_date`: The inclusive end of the range from which to query historical data, expressed
  in seconds in Unix epoch time.
- `resolution`: The time interval over which to aggregate data.
- `start_date`: The exclusive start of the range from which to query historical data,
  expressed in seconds in Unix epoch time.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"assetId"`: The ID of the asset.
- `"maxResults"`: The maximum number of results to return for each paginated request.
  Default: 100
- `"nextToken"`: The token to be used for the next set of paginated results.
- `"propertyAlias"`: The alias that identifies the property, such as an OPC-UA server data
  stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information,
  see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide.
- `"propertyId"`: The ID of the asset property.
- `"qualities"`: The quality by which to filter asset data.
- `"timeOrdering"`: The chronological sorting order of the requested information. Default:
  ASCENDING
"""
get_asset_property_aggregates(aggregateTypes, endDate, resolution, startDate; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/properties/aggregates", Dict{String, Any}("aggregateTypes"=>aggregateTypes, "endDate"=>endDate, "resolution"=>resolution, "startDate"=>startDate); aws_config=aws_config)
get_asset_property_aggregates(aggregateTypes, endDate, resolution, startDate, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/properties/aggregates", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("aggregateTypes"=>aggregateTypes, "endDate"=>endDate, "resolution"=>resolution, "startDate"=>startDate), params)); aws_config=aws_config)

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

Gets an asset property's current value. For more information, see Querying current values
in the IoT SiteWise User Guide. To identify an asset property, you must specify one of the
following:   The assetId and propertyId of an asset property.   A propertyAlias, which is a
data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an
asset property's alias, see UpdateAssetProperty.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"assetId"`: The ID of the asset.
- `"propertyAlias"`: The alias that identifies the property, such as an OPC-UA server data
  stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information,
  see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide.
- `"propertyId"`: The ID of the asset property.
"""
get_asset_property_value(; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/properties/latest"; aws_config=aws_config)
get_asset_property_value(params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/properties/latest", params; aws_config=aws_config)

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

Gets the history of an asset property's values. For more information, see Querying
historical values in the IoT SiteWise User Guide. To identify an asset property, you must
specify one of the following:   The assetId and propertyId of an asset property.   A
propertyAlias, which is a data stream alias (for example,
/company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see
UpdateAssetProperty.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"assetId"`: The ID of the asset.
- `"endDate"`: The inclusive end of the range from which to query historical data,
  expressed in seconds in Unix epoch time.
- `"maxResults"`: The maximum number of results to return for each paginated request.
  Default: 100
- `"nextToken"`: The token to be used for the next set of paginated results.
- `"propertyAlias"`: The alias that identifies the property, such as an OPC-UA server data
  stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information,
  see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide.
- `"propertyId"`: The ID of the asset property.
- `"qualities"`: The quality by which to filter asset data.
- `"startDate"`: The exclusive start of the range from which to query historical data,
  expressed in seconds in Unix epoch time.
- `"timeOrdering"`: The chronological sorting order of the requested information. Default:
  ASCENDING
"""
get_asset_property_value_history(; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/properties/history"; aws_config=aws_config)
get_asset_property_value_history(params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/properties/history", params; aws_config=aws_config)

"""
    get_interpolated_asset_property_values(end_time_in_seconds, interval_in_seconds, quality, start_time_in_seconds, type)
    get_interpolated_asset_property_values(end_time_in_seconds, interval_in_seconds, quality, start_time_in_seconds, type, params::Dict{String,<:Any})

Get interpolated values for an asset property for a specified time interval, during a
period of time. For example, you can use the this operation to return the interpolated
temperature values for a wind turbine every 24 hours over a duration of 7 days. To identify
an asset property, you must specify one of the following:   The assetId and propertyId of
an asset property.   A propertyAlias, which is a data stream alias (for example,
/company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see
UpdateAssetProperty.

# Arguments
- `end_time_in_seconds`: The inclusive end of the range from which to interpolate data,
  expressed in seconds in Unix epoch time.
- `interval_in_seconds`: The time interval in seconds over which to interpolate data. Each
  interval starts when the previous one ends.
- `quality`: The quality of the asset property value. You can use this parameter as a
  filter to choose only the asset property values that have a specific quality.
- `start_time_in_seconds`: The exclusive start of the range from which to interpolate data,
  expressed in seconds in Unix epoch time.
- `type`: The interpolation type. Valid values: LINEAR_INTERPOLATION

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"assetId"`: The ID of the asset.
- `"endTimeOffsetInNanos"`: The nanosecond offset converted from endTimeInSeconds.
- `"maxResults"`: The maximum number of results to return for each paginated request. If
  not specified, the default value is 10.
- `"nextToken"`: The token to be used for the next set of paginated results.
- `"propertyAlias"`: The alias that identifies the property, such as an OPC-UA server data
  stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information,
  see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide.
- `"propertyId"`: The ID of the asset property.
- `"startTimeOffsetInNanos"`: The nanosecond offset converted from startTimeInSeconds.
"""
get_interpolated_asset_property_values(endTimeInSeconds, intervalInSeconds, quality, startTimeInSeconds, type; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/properties/interpolated", Dict{String, Any}("endTimeInSeconds"=>endTimeInSeconds, "intervalInSeconds"=>intervalInSeconds, "quality"=>quality, "startTimeInSeconds"=>startTimeInSeconds, "type"=>type); aws_config=aws_config)
get_interpolated_asset_property_values(endTimeInSeconds, intervalInSeconds, quality, startTimeInSeconds, type, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/properties/interpolated", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("endTimeInSeconds"=>endTimeInSeconds, "intervalInSeconds"=>intervalInSeconds, "quality"=>quality, "startTimeInSeconds"=>startTimeInSeconds, "type"=>type), params)); aws_config=aws_config)

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

Retrieves a paginated list of access policies for an identity (an Amazon Web Services SSO
user, an Amazon Web Services SSO group, or an IAM user) or an IoT SiteWise Monitor resource
(a portal or project).

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"iamArn"`: The ARN of the IAM user. For more information, see IAM ARNs in the IAM User
  Guide. This parameter is required if you specify IAM for identityType.
- `"identityId"`: The ID of the identity. This parameter is required if you specify USER or
  GROUP for identityType.
- `"identityType"`: The type of identity (Amazon Web Services SSO user, Amazon Web Services
  SSO group, or IAM user). This parameter is required if you specify identityId.
- `"maxResults"`: The maximum number of results to return for each paginated request.
  Default: 50
- `"nextToken"`: The token to be used for the next set of paginated results.
- `"resourceId"`: The ID of the resource. This parameter is required if you specify
  resourceType.
- `"resourceType"`: The type of resource (portal or project). This parameter is required if
  you specify resourceId.
"""
list_access_policies(; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/access-policies"; aws_config=aws_config)
list_access_policies(params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/access-policies", params; aws_config=aws_config)

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

Retrieves a paginated list of summaries of all asset models.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of results to return for each paginated request.
  Default: 50
- `"nextToken"`: The token to be used for the next set of paginated results.
"""
list_asset_models(; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/asset-models"; aws_config=aws_config)
list_asset_models(params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/asset-models", params; aws_config=aws_config)

"""
    list_asset_relationships(asset_id, traversal_type)
    list_asset_relationships(asset_id, traversal_type, params::Dict{String,<:Any})

Retrieves a paginated list of asset relationships for an asset. You can use this operation
to identify an asset's root asset and all associated assets between that asset and its root.

# Arguments
- `asset_id`: The ID of the asset.
- `traversal_type`: The type of traversal to use to identify asset relationships. Choose
  the following option:    PATH_TO_ROOT – Identify the asset's parent assets up to the root
  asset. The asset that you specify in assetId is the first result in the list of
  assetRelationshipSummaries, and the root asset is the last result.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of results to return for each paginated request.
- `"nextToken"`: The token to be used for the next set of paginated results.
"""
list_asset_relationships(assetId, traversalType; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/assets/$(assetId)/assetRelationships", Dict{String, Any}("traversalType"=>traversalType); aws_config=aws_config)
list_asset_relationships(assetId, traversalType, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/assets/$(assetId)/assetRelationships", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("traversalType"=>traversalType), params)); aws_config=aws_config)

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

Retrieves a paginated list of asset summaries. You can use this operation to do the
following:   List assets based on a specific asset model.   List top-level assets.   You
can't use this operation to list all assets. To retrieve summaries for all of your assets,
use ListAssetModels to get all of your asset model IDs. Then, use ListAssets to get all
assets for each asset model.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"assetModelId"`: The ID of the asset model by which to filter the list of assets. This
  parameter is required if you choose ALL for filter.
- `"filter"`: The filter for the requested list of assets. Choose one of the following
  options:    ALL – The list includes all assets for a given asset model ID. The
  assetModelId parameter is required if you filter by ALL.    TOP_LEVEL – The list includes
  only top-level assets in the asset hierarchy tree.   Default: ALL
- `"maxResults"`: The maximum number of results to return for each paginated request.
  Default: 50
- `"nextToken"`: The token to be used for the next set of paginated results.
"""
list_assets(; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/assets"; aws_config=aws_config)
list_assets(params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/assets", params; aws_config=aws_config)

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

Retrieves a paginated list of associated assets. You can use this operation to do the
following:   List child assets associated to a parent asset by a hierarchy that you
specify.   List an asset's parent asset.

# Arguments
- `asset_id`: The ID of the asset to query.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"hierarchyId"`: The ID of the hierarchy by which child assets are associated to the
  asset. To find a hierarchy ID, use the DescribeAsset or DescribeAssetModel operations. This
  parameter is required if you choose CHILD for traversalDirection. For more information, see
  Asset hierarchies in the IoT SiteWise User Guide.
- `"maxResults"`: The maximum number of results to return for each paginated request.
  Default: 50
- `"nextToken"`: The token to be used for the next set of paginated results.
- `"traversalDirection"`: The direction to list associated assets. Choose one of the
  following options:    CHILD – The list includes all child assets associated to the asset.
  The hierarchyId parameter is required if you choose CHILD.    PARENT – The list includes
  the asset's parent asset.   Default: CHILD
"""
list_associated_assets(assetId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/assets/$(assetId)/hierarchies"; aws_config=aws_config)
list_associated_assets(assetId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/assets/$(assetId)/hierarchies", params; aws_config=aws_config)

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

Retrieves a paginated list of dashboards for an IoT SiteWise Monitor project.

# Arguments
- `project_id`: The ID of the project.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of results to return for each paginated request.
  Default: 50
- `"nextToken"`: The token to be used for the next set of paginated results.
"""
list_dashboards(projectId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/dashboards", Dict{String, Any}("projectId"=>projectId); aws_config=aws_config)
list_dashboards(projectId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/dashboards", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("projectId"=>projectId), params)); aws_config=aws_config)

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

Retrieves a paginated list of gateways.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of results to return for each paginated request.
  Default: 50
- `"nextToken"`: The token to be used for the next set of paginated results.
"""
list_gateways(; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/20200301/gateways"; aws_config=aws_config)
list_gateways(params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/20200301/gateways", params; aws_config=aws_config)

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

Retrieves a paginated list of IoT SiteWise Monitor portals.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of results to return for each paginated request.
  Default: 50
- `"nextToken"`: The token to be used for the next set of paginated results.
"""
list_portals(; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/portals"; aws_config=aws_config)
list_portals(params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/portals", params; aws_config=aws_config)

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

Retrieves a paginated list of assets associated with an IoT SiteWise Monitor project.

# Arguments
- `project_id`: The ID of the project.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of results to return for each paginated request.
  Default: 50
- `"nextToken"`: The token to be used for the next set of paginated results.
"""
list_project_assets(projectId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/projects/$(projectId)/assets"; aws_config=aws_config)
list_project_assets(projectId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/projects/$(projectId)/assets", params; aws_config=aws_config)

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

Retrieves a paginated list of projects for an IoT SiteWise Monitor portal.

# Arguments
- `portal_id`: The ID of the portal.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of results to return for each paginated request.
  Default: 50
- `"nextToken"`: The token to be used for the next set of paginated results.
"""
list_projects(portalId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/projects", Dict{String, Any}("portalId"=>portalId); aws_config=aws_config)
list_projects(portalId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/projects", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("portalId"=>portalId), params)); aws_config=aws_config)

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

Retrieves the list of tags for an IoT SiteWise resource.

# Arguments
- `resource_arn`: The ARN of the resource.

"""
list_tags_for_resource(resourceArn; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/tags", Dict{String, Any}("resourceArn"=>resourceArn); aws_config=aws_config)
list_tags_for_resource(resourceArn, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("GET", "/tags", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("resourceArn"=>resourceArn), params)); aws_config=aws_config)

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

Sets the default encryption configuration for the Amazon Web Services account. For more
information, see Key management in the IoT SiteWise User Guide.

# Arguments
- `encryption_type`: The type of encryption used for the encryption configuration.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"kmsKeyId"`: The Key ID of the customer managed customer master key (CMK) used for KMS
  encryption. This is required if you use KMS_BASED_ENCRYPTION.
"""
put_default_encryption_configuration(encryptionType; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/configuration/account/encryption", Dict{String, Any}("encryptionType"=>encryptionType); aws_config=aws_config)
put_default_encryption_configuration(encryptionType, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/configuration/account/encryption", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("encryptionType"=>encryptionType), params)); aws_config=aws_config)

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

Sets logging options for IoT SiteWise.

# Arguments
- `logging_options`: The logging options to set.

"""
put_logging_options(loggingOptions; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/logging", Dict{String, Any}("loggingOptions"=>loggingOptions); aws_config=aws_config)
put_logging_options(loggingOptions, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/logging", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("loggingOptions"=>loggingOptions), params)); aws_config=aws_config)

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

Configures storage settings for IoT SiteWise.

# Arguments
- `storage_type`: The type of storage that you specified for your data. The storage type
  can be one of the following values:    SITEWISE_DEFAULT_STORAGE – IoT SiteWise replicates
  your data into a service managed database.    MULTI_LAYER_STORAGE – IoT SiteWise
  replicates your data into a service managed database and saves a copy of your raw data and
  metadata in an Amazon S3 object that you specified.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"multiLayerStorage"`: Identifies a storage destination. If you specified
  MULTI_LAYER_STORAGE for the storage type, you must specify a MultiLayerStorage object.
"""
put_storage_configuration(storageType; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/configuration/account/storage", Dict{String, Any}("storageType"=>storageType); aws_config=aws_config)
put_storage_configuration(storageType, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/configuration/account/storage", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("storageType"=>storageType), params)); aws_config=aws_config)

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

Adds tags to an IoT SiteWise resource. If a tag already exists for the resource, this
operation updates the tag's value.

# Arguments
- `resource_arn`: The ARN of the resource to tag.
- `tags`: A list of key-value pairs that contain metadata for the resource. For more
  information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.

"""
tag_resource(resourceArn, tags; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/tags", Dict{String, Any}("resourceArn"=>resourceArn, "tags"=>tags); aws_config=aws_config)
tag_resource(resourceArn, tags, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/tags", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("resourceArn"=>resourceArn, "tags"=>tags), params)); aws_config=aws_config)

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

Removes a tag from an IoT SiteWise resource.

# Arguments
- `resource_arn`: The ARN of the resource to untag.
- `tag_keys`: A list of keys for tags to remove from the resource.

"""
untag_resource(resourceArn, tagKeys; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/tags", Dict{String, Any}("resourceArn"=>resourceArn, "tagKeys"=>tagKeys); aws_config=aws_config)
untag_resource(resourceArn, tagKeys, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("DELETE", "/tags", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("resourceArn"=>resourceArn, "tagKeys"=>tagKeys), params)); aws_config=aws_config)

"""
    update_access_policy(access_policy_id, access_policy_identity, access_policy_permission, access_policy_resource)
    update_access_policy(access_policy_id, access_policy_identity, access_policy_permission, access_policy_resource, params::Dict{String,<:Any})

Updates an existing access policy that specifies an identity's access to an IoT SiteWise
Monitor portal or project resource.

# Arguments
- `access_policy_id`: The ID of the access policy.
- `access_policy_identity`: The identity for this access policy. Choose an Amazon Web
  Services SSO user, an Amazon Web Services SSO group, or an IAM user.
- `access_policy_permission`: The permission level for this access policy. Note that a
  project ADMINISTRATOR is also known as a project owner.
- `access_policy_resource`: The IoT SiteWise Monitor resource for this access policy.
  Choose either a portal or a project.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
update_access_policy(accessPolicyId, accessPolicyIdentity, accessPolicyPermission, accessPolicyResource; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/access-policies/$(accessPolicyId)", Dict{String, Any}("accessPolicyIdentity"=>accessPolicyIdentity, "accessPolicyPermission"=>accessPolicyPermission, "accessPolicyResource"=>accessPolicyResource, "clientToken"=>string(uuid4())); aws_config=aws_config)
update_access_policy(accessPolicyId, accessPolicyIdentity, accessPolicyPermission, accessPolicyResource, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/access-policies/$(accessPolicyId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("accessPolicyIdentity"=>accessPolicyIdentity, "accessPolicyPermission"=>accessPolicyPermission, "accessPolicyResource"=>accessPolicyResource, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    update_asset(asset_id, asset_name)
    update_asset(asset_id, asset_name, params::Dict{String,<:Any})

Updates an asset's name. For more information, see Updating assets and models in the IoT
SiteWise User Guide.

# Arguments
- `asset_id`: The ID of the asset to update.
- `asset_name`: A unique, friendly name for the asset.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
update_asset(assetId, assetName; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/assets/$(assetId)", Dict{String, Any}("assetName"=>assetName, "clientToken"=>string(uuid4())); aws_config=aws_config)
update_asset(assetId, assetName, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/assets/$(assetId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("assetName"=>assetName, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    update_asset_model(asset_model_id, asset_model_name)
    update_asset_model(asset_model_id, asset_model_name, params::Dict{String,<:Any})

Updates an asset model and all of the assets that were created from the model. Each asset
created from the model inherits the updated asset model's property and hierarchy
definitions. For more information, see Updating assets and models in the IoT SiteWise User
Guide.  This operation overwrites the existing model with the provided model. To avoid
deleting your asset model's properties or hierarchies, you must include their IDs and
definitions in the updated asset model payload. For more information, see
DescribeAssetModel. If you remove a property from an asset model, IoT SiteWise deletes all
previous data for that property. If you remove a hierarchy definition from an asset model,
IoT SiteWise disassociates every asset associated with that hierarchy. You can't change the
type or data type of an existing property.

# Arguments
- `asset_model_id`: The ID of the asset model to update.
- `asset_model_name`: A unique, friendly name for the asset model.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"assetModelCompositeModels"`: The composite asset models that are part of this asset
  model. Composite asset models are asset models that contain specific properties. Each
  composite model has a type that defines the properties that the composite model supports.
  Use composite asset models to define alarms on this asset model.
- `"assetModelDescription"`: A description for the asset model.
- `"assetModelHierarchies"`: The updated hierarchy definitions of the asset model. Each
  hierarchy specifies an asset model whose assets can be children of any other assets created
  from this asset model. For more information, see Asset hierarchies in the IoT SiteWise User
  Guide. You can specify up to 10 hierarchies per asset model. For more information, see
  Quotas in the IoT SiteWise User Guide.
- `"assetModelProperties"`: The updated property definitions of the asset model. For more
  information, see Asset properties in the IoT SiteWise User Guide. You can specify up to 200
  properties per asset model. For more information, see Quotas in the IoT SiteWise User Guide.
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
"""
update_asset_model(assetModelId, assetModelName; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/asset-models/$(assetModelId)", Dict{String, Any}("assetModelName"=>assetModelName, "clientToken"=>string(uuid4())); aws_config=aws_config)
update_asset_model(assetModelId, assetModelName, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/asset-models/$(assetModelId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("assetModelName"=>assetModelName, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    update_asset_property(asset_id, property_id)
    update_asset_property(asset_id, property_id, params::Dict{String,<:Any})

Updates an asset property's alias and notification state.  This operation overwrites the
property's existing alias and notification state. To keep your existing property's alias or
notification state, you must include the existing values in the UpdateAssetProperty
request. For more information, see DescribeAssetProperty.

# Arguments
- `asset_id`: The ID of the asset to be updated.
- `property_id`: The ID of the asset property to be updated.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
- `"propertyAlias"`: The alias that identifies the property, such as an OPC-UA server data
  stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information,
  see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide. If
  you omit this parameter, the alias is removed from the property.
- `"propertyNotificationState"`: The MQTT notification state (enabled or disabled) for this
  asset property. When the notification state is enabled, IoT SiteWise publishes property
  value updates to a unique MQTT topic. For more information, see Interacting with other
  services in the IoT SiteWise User Guide. If you omit this parameter, the notification state
  is set to DISABLED.
"""
update_asset_property(assetId, propertyId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/assets/$(assetId)/properties/$(propertyId)", Dict{String, Any}("clientToken"=>string(uuid4())); aws_config=aws_config)
update_asset_property(assetId, propertyId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/assets/$(assetId)/properties/$(propertyId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    update_dashboard(dashboard_definition, dashboard_id, dashboard_name)
    update_dashboard(dashboard_definition, dashboard_id, dashboard_name, params::Dict{String,<:Any})

Updates an IoT SiteWise Monitor dashboard.

# Arguments
- `dashboard_definition`: The new dashboard definition, as specified in a JSON literal. For
  detailed information, see Creating dashboards (CLI) in the IoT SiteWise User Guide.
- `dashboard_id`: The ID of the dashboard to update.
- `dashboard_name`: A new friendly name for the dashboard.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
- `"dashboardDescription"`: A new description for the dashboard.
"""
update_dashboard(dashboardDefinition, dashboardId, dashboardName; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/dashboards/$(dashboardId)", Dict{String, Any}("dashboardDefinition"=>dashboardDefinition, "dashboardName"=>dashboardName, "clientToken"=>string(uuid4())); aws_config=aws_config)
update_dashboard(dashboardDefinition, dashboardId, dashboardName, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/dashboards/$(dashboardId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("dashboardDefinition"=>dashboardDefinition, "dashboardName"=>dashboardName, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    update_gateway(gateway_id, gateway_name)
    update_gateway(gateway_id, gateway_name, params::Dict{String,<:Any})

Updates a gateway's name.

# Arguments
- `gateway_id`: The ID of the gateway to update.
- `gateway_name`: A unique, friendly name for the gateway.

"""
update_gateway(gatewayId, gatewayName; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/20200301/gateways/$(gatewayId)", Dict{String, Any}("gatewayName"=>gatewayName); aws_config=aws_config)
update_gateway(gatewayId, gatewayName, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/20200301/gateways/$(gatewayId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("gatewayName"=>gatewayName), params)); aws_config=aws_config)

"""
    update_gateway_capability_configuration(capability_configuration, capability_namespace, gateway_id)
    update_gateway_capability_configuration(capability_configuration, capability_namespace, gateway_id, params::Dict{String,<:Any})

Updates a gateway capability configuration or defines a new capability configuration. Each
gateway capability defines data sources for a gateway. A capability configuration can
contain multiple data source configurations. If you define OPC-UA sources for a gateway in
the IoT SiteWise console, all of your OPC-UA sources are stored in one capability
configuration. To list all capability configurations for a gateway, use DescribeGateway.

# Arguments
- `capability_configuration`: The JSON document that defines the configuration for the
  gateway capability. For more information, see Configuring data sources (CLI) in the IoT
  SiteWise User Guide.
- `capability_namespace`: The namespace of the gateway capability configuration to be
  updated. For example, if you configure OPC-UA sources from the IoT SiteWise console, your
  OPC-UA capability configuration has the namespace iotsitewise:opcuacollector:version, where
  version is a number such as 1.
- `gateway_id`: The ID of the gateway to be updated.

"""
update_gateway_capability_configuration(capabilityConfiguration, capabilityNamespace, gatewayId; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/20200301/gateways/$(gatewayId)/capability", Dict{String, Any}("capabilityConfiguration"=>capabilityConfiguration, "capabilityNamespace"=>capabilityNamespace); aws_config=aws_config)
update_gateway_capability_configuration(capabilityConfiguration, capabilityNamespace, gatewayId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("POST", "/20200301/gateways/$(gatewayId)/capability", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("capabilityConfiguration"=>capabilityConfiguration, "capabilityNamespace"=>capabilityNamespace), params)); aws_config=aws_config)

"""
    update_portal(portal_contact_email, portal_id, portal_name, role_arn)
    update_portal(portal_contact_email, portal_id, portal_name, role_arn, params::Dict{String,<:Any})

Updates an IoT SiteWise Monitor portal.

# Arguments
- `portal_contact_email`: The Amazon Web Services administrator's contact email address.
- `portal_id`: The ID of the portal to update.
- `portal_name`: A new friendly name for the portal.
- `role_arn`: The ARN of a service role that allows the portal's users to access your IoT
  SiteWise resources on your behalf. For more information, see Using service roles for IoT
  SiteWise Monitor in the IoT SiteWise User Guide.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"alarms"`: Contains the configuration information of an alarm created in an IoT SiteWise
  Monitor portal. You can use the alarm to monitor an asset property and get notified when
  the asset property value is outside a specified range. For more information, see Monitoring
  with alarms in the IoT SiteWise Application Guide.
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
- `"notificationSenderEmail"`: The email address that sends alarm notifications.
- `"portalDescription"`: A new description for the portal.
- `"portalLogoImage"`:
"""
update_portal(portalContactEmail, portalId, portalName, roleArn; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/portals/$(portalId)", Dict{String, Any}("portalContactEmail"=>portalContactEmail, "portalName"=>portalName, "roleArn"=>roleArn, "clientToken"=>string(uuid4())); aws_config=aws_config)
update_portal(portalContactEmail, portalId, portalName, roleArn, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/portals/$(portalId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("portalContactEmail"=>portalContactEmail, "portalName"=>portalName, "roleArn"=>roleArn, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    update_project(project_id, project_name)
    update_project(project_id, project_name, params::Dict{String,<:Any})

Updates an IoT SiteWise Monitor project.

# Arguments
- `project_id`: The ID of the project to update.
- `project_name`: A new friendly name for the project.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientToken"`: A unique case-sensitive identifier that you can provide to ensure the
  idempotency of the request. Don't reuse this client token if a new idempotent request is
  required.
- `"projectDescription"`: A new description for the project.
"""
update_project(projectId, projectName; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/projects/$(projectId)", Dict{String, Any}("projectName"=>projectName, "clientToken"=>string(uuid4())); aws_config=aws_config)
update_project(projectId, projectName, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = iotsitewise("PUT", "/projects/$(projectId)", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("projectName"=>projectName, "clientToken"=>string(uuid4())), params)); aws_config=aws_config)


text:
"""
Created on Thu Apr 23 2020

@author: Yoann Pradat

Multiplicative update algorithms other than that of Fevotte & Idier.
"""

abstract type AbstractMUParams <: AbstractNMFParams end

"""
    MUParams([, α, β, ϵ, δ, σ, scale_W_iter, scale_W_last, alg])

Parameters passed to `nmf_MM`, `nmf_H` and `nmf_ME`.

# Arguments
- `α::Real`             : parameter of the α-divergence
- `β::Real`             : parameter of the β-divergence
- `ϵ::Real`             : threshold for replacing 0 values.
- `δ::Real`             : parameter in :mu_mod algorithm.
- `scale_W_iter::Bool`  : scale the components of W to have unit l₁ norm during iterations
- `scale_W_last::Bool`  : scale the components of W to have unit l₁ norm after last iteration
- `σ::Real`             : parameter in :mu_mod algorithm.
- `div::Symbol`         : symbol to choose the divergence. Either :α or :β
- `alg::Symbol`         : symbol to choose the algorithm. One of :mu, :mu_mod
    + mu: Multiplicative updates (MU)
        Reference for Amari alpha divergence:
            A.Cichocki, S.Amari, R.Zdunek, R.Kompass, G.Hori, and Z.He,
            "Extended SMART algorithms for non-negative matrix factorization,"
            Artificial Intelligence and Soft Computing, 2006.

            min D(V||W*H)

            where d(x|y) = | (x^α y^(1-α) - αx + (α-1)y) ÷ (α(α-1))  (α ∉ {0, 1})
                           |
                           | xlog(x÷y) - x + y                       (α = 1)
                           |
                           | ylog(y÷x) - y + x                       (α = 0)

            - Pearson's distance (α=2)
            - Hellinger's distance (α=0.5)
            - Neyman's chi-square distance (α=-1)
            - Kullback-Leibler (α = 1)
            - dual Kullback-Leibler (α = 0)

        Reference for beta divergence:
            A.Cichocki, S.Amari, R.Zdunek, R.Kompass, G.Hori, and Z.He,
            "Extended SMART algorithms for non-negative matrix factorization,"
            Artificial Intelligence and Soft Computing, 2006.

            C.Fevotte, J.Idier,
            "Algorithms for nonnegative matrix factorization with the beta-divergence",
            Neural Computation, 2011.

                min D(V||W*H)

                where d(x|y) = | (x^β + (β-1)y^β - βxy^(β-1)) ÷ (β(β-1)) (β ∉ {0 1})
                               |
                               | xlog(x÷y) - x + y                       (β = 1)
                               |
                               | x÷y - log(x÷y) - x + y                  (β = 0)

    + mu_mod: Modified multiplicative upates (MU)
        Reference:
            C.-J. Lin,
            "On the convergence of multiplicative update algorithms for nonnegative matrix factorization,"
            IEEE Trans. Neural Netw. vol.18, no.6, pp.1589?1596, 2007.

    + mu_acc: Accelerated multiplicative updates (Accelerated MU)
        Reference:
            N. Gillis and F. Glineur,
            "Accelerated Multiplicative Updates and hierarchical ALS Algorithms for Nonnegative
            Matrix Factorization,",
            Neural Computation 24 (4), pp. 1085-1105, 2012.
            See http://sites.google.com/site/nicolasgillis/.
            The corresponding code is originally created by the authors,
            Then, it is modifided by H.Kasai.
"""
mutable struct MUParams <: AbstractMUParams
    α::Real
    β::Real
    ϵ::Real
    δ::Real
    σ::Real
    scale_W_iter::Bool
    scale_W_last::Bool
    div::Symbol
    alg::Symbol

    function MUParams(;
        α::Real            = 1,
        β::Real            = 2,
        ϵ::Real            = 1e-16,
        δ::Real            = 1e-1,
        σ::Real            = 1e-10,
        scale_W_iter::Bool = true,
        scale_W_last::Bool = true,
        div::Symbol        = :β,
        alg::Symbol        = :mu)

        valid_div = [:α, :β]
        valid_alg = [:mu, :mu_mod]

        ϵ > 0 || throw(ArgumentError("ϵ must be > 0 "))
        div in valid_div || throw(ArgumentError(string("div must be one of ",  valid_div)))
        alg in valid_alg || throw(ArgumentError(string("alg must be one of ",  valid_alg)))

        new(α, β, ϵ, δ, σ, scale_W_iter, scale_W_last, div, alg)
    end
end

"""
    _mu_cost(V, W, H, local_params)

Cost function minimized by MU NMF algorithms
"""
function _mu_cost(V::Matrix{T}, W::Matrix{T}, H::Matrix{T}, local_params::AbstractMUParams) where T <: Real
    if local_params.div == :β
        β_divergence(V, W * H, local_params.β)
    elseif local_params.div == :α
        α_divergence(V, W * H, local_params.α)
    end
end

function _update_nmf_mu_mod!(V::Matrix{T}, V_a::Matrix{T}, W::Matrix{T}, H::Matrix{T}, params::AbstractMUParams) where T <: Real
    ##### this update is limited to euclidean cost function

    # update H
    WtW = transpose(W) * W
    WtV = transpose(W) * V
    gradH = WtW * H - WtV
    Hb = max.(H, (gradH .< 0) .* params.σ)
    H .= H - Hb ./ (WtW * Hb .+ params.δ) .* gradH

    # update W
    HHt = H * transpose(H)
    VHt = V * transpose(H)
    gradW = W * HHt - VHt
    Wb = max.(W, (gradW .< 0) .* params.σ)
    W .= W - Wb ./ (Wb * HHt .+ params.δ) .* gradW
end

function _update_nmf_mu_α!(V::Matrix{T}, V_a::Matrix{T}, W::Matrix{T}, H::Matrix{T}, params::AbstractMUParams) where T <: Real
    if params.α == 0
        #### dual Kullback-Leibler

        #### update H
        #### NOTE: if W has columns normalized to sum to 1, the normalization matrix
        #### (transpose(W) * ones(size(V))) .^ (-1) is just ones(K, N)
        H .= H .* exp.((transpose(W) * ones(size(V))) .^ (-1)  .* (transpose(W) * log.(V ./ (V_a .+ params.ϵ))))
        V_a .= W * H

        #### update W
        #### NOTE: if H has columns normalized to sum to 1, the normalization matrix
        #### (transpose(H) * ones(size(V))) .^ (-1) is just ones(K, N)
        W .= W .* exp.((ones(size(V)) * transpose(H)) .^ (-1) .* (log.(V ./ (V_a .+ params.ϵ)) * transpose(H)))
        V_a .= W * H

    else
        #### general α divergence updates for α != 0

        #### A.Cichocki, S.Amari, R.Zdunek, R.Kompass, G.Hori, and Z.He,
        #### "Extended SMART algorithms for non-negative matrix factorization,"
        #### Artificial Intelligence and Soft Computing, 2006.
        #### Equation (44)

        #### note: it is not clear in eqs (45) and (46) how the normalization
        #### made the denominators disappear in (44).

        # #### case of eqs (45), (46)
        #
        # # update W
        # W .= W .* (((V .+ params.ϵ) ./ (V_a .+ params.ϵ)) .^ params.α * transpose(H)) .^ (1/params.α)

        # #### normalize to unit sums the columns of W if specified
        # #### note: order not as in (45-46)
        # cs_W = sum(W, dims=1)
        # W .= W .* repeat(cs_W .^ -1, size(W, 1), 1)

        # V_a .= W * H

        # # update H
        # H .= H .* ((transpose(W) * ((V .+ params.ϵ)./(V_a .+ params.ϵ)) .^ params.α)) .^ (1/params.α)
        # V_a .= W * H

        #### eqs (44)

        # update W
        W .= W .* ((((V .+ params.ϵ) ./ (V_a .+ params.ϵ)) .^ params.α * transpose(H)) ./ (ones(size(V)) * transpose(H)) .+ params.ϵ) .^ (1/params.α)
        V_a .= W * H

        # update H
        H .= H .* (((transpose(W) * ((V .+ params.ϵ) ./ (V_a .+ params.ϵ)) .^ params.α)) ./ (transpose(W) * ones(size(V))) .+ params.ϵ) .^ (1/params.α)
        V_a .= W * H

    end
end

function _update_nmf_mu!(V::Matrix{T}, V_a::Matrix{T}, W::Matrix{T}, H::Matrix{T}, params::AbstractMUParams) where T <: Real

    if params.alg == :mu
        if params.div == :α
            if params.α == 0
                #### dual Kullback-Leibler

                #### update H
                #### NOTE: if W has columns normalized to sum to 1, the normalization matrix
                #### (transpose(W) * ones(size(V))) .^ (-1) is just ones(K, N)
                H .= H .* exp.((transpose(W) * ones(size(V))) .^ (-1)  .* (transpose(W) * log.(V ./ (V_a .+ params.ϵ))))
                V_a .= W * H

                #### update W
                #### NOTE: if H has columns normalized to sum to 1, the normalization matrix
                #### (transpose(H) * ones(size(V))) .^ (-1) is just ones(K, N)
                W .= W .* exp.((ones(size(V)) * transpose(H)) .^ (-1) .* (log.(V ./ (V_a .+ params.ϵ)) * transpose(H)))
                V_a .= W * H

            else
                #### general α divergence updates for α != 0

                #### A.Cichocki, S.Amari, R.Zdunek, R.Kompass, G.Hori, and Z.He,
                #### "Extended SMART algorithms for non-negative matrix factorization,"
                #### Artificial Intelligence and Soft Computing, 2006.
                #### Equation (44)

                #### note: it is not clear in eqs (45) and (46) how the normalization
                #### made the denominators disappear in (44).

                # #### case of eqs (45), (46)
                #
                # # update W
                # W .= W .* (((V .+ params.ϵ) ./ (V_a .+ params.ϵ)) .^ params.α * transpose(H)) .^ (1/params.α)

                # #### normalize to unit sums the columns of W if specified
                # #### note: order not as in (45-46)
                # cs_W = sum(W, dims=1)
                # W .= W .* repeat(cs_W .^ -1, size(W, 1), 1)

                # V_a .= W * H

                # # update H
                # H .= H .* ((transpose(W) * ((V .+ params.ϵ)./(V_a .+ params.ϵ)) .^ params.α)) .^ (1/params.α)
                # V_a .= W * H

                #### eqs (44)

                # update W
                W .= W .* ((((V .+ params.ϵ) ./ (V_a .+ params.ϵ)) .^ params.α * transpose(H)) ./ (ones(size(V)) * transpose(H)) .+ params.ϵ) .^ (1/params.α)
                V_a .= W * H

                # update H
                H .= H .* (((transpose(W) * ((V .+ params.ϵ) ./ (V_a .+ params.ϵ)) .^ params.α)) ./ (transpose(W) * ones(size(V))) .+ params.ϵ) .^ (1/params.α)
                V_a .= W * H

            end
        elseif params.div == :β
            if params.β == 2
                #### update rules for β = 2 can be written more efficiently

                # update H
                H .= H .* ((transpose(W) * V) ./ ((transpose(W) * W) * H))

                # update W
                W .= W .* ((V * transpose(H)) ./ (W * (H * transpose(H))))

                # update product
                V_a .= W * H
            else
                #### general β divergence updates for β != 2

                # update W
                W .= W .* (((V .* V_a .^ (params.β-2)) * transpose(H)) ./ max.(V_a .^ (params.β-1) * transpose(H), params.ϵ))
                V_a .= W * H

                # update H
                H .= H .* ((transpose(W) * (V .* V_a .^ (params.β-2))) ./ max.(transpose(W) * V_a .^ (params.β-1), params.ϵ))
                V_a .= W * H
            end
        end

    elseif params.alg == :mu_mod
        ##### this update is limited to euclidean cost function

        # update H
        WtW = transpose(W) * W
        WtV = transpose(W) * V
        gradH = WtW * H - WtV
        Hb = max.(H, (gradH .< 0) .* params.σ)
        H .= H - Hb ./ (WtW * Hb .+ params.δ) .* gradH

        # update W
        HHt = H * transpose(H)
        VHt = V * transpose(H)
        gradW = W * HHt - VHt
        Wb = max.(W, (gradW .< 0) .* params.σ)
        W .= W - Wb ./ (Wb * HHt .+ params.δ) .* gradW
    end

    #### replace values below given threshold
    W .= max.(W, 1e6 * params.ϵ)
    H .= max.(H, 1e6 * params.ϵ)

    if params.scale_W_iter
        scale_col_W!(W, H, 1)
    end
end

"""
    _nmf_MU(V, W_init, H_init, global_params, local_params)

Helper function for `nmf_MU`. Runs the Multiplicative Updates with given intial matrices W and H.
"""
function _nmf_MU(V::Matrix{T}, W_init::Matrix{T}, H_init::Matrix{T}, global_params::AbstractNMFParams, local_params::AbstractNMFParams) where T <: Real
    W    = W_init[:,:]
    H    = H_init[:,:]
    V_a  = W * H

    #### metrics and stopping_crit
    func_cost          = (V, W, H) -> _mu_cost(V, W, H, local_params)

    if local_params.div == :α
        func_divg          = (V, W, H) -> α_divergence(V, W * H, local_params.α)
    elseif local_params.div == :β
        func_divg          = (V, W, H) -> β_divergence(V, W * H, local_params.β)
    end

    metrics           = NMFMetrics(V, W_init, H_init, func_cost, func_divg)
    stopping_crit_met = false
    iteration_is_sane = true

    #### scale W before first iter if specified
    if local_params.scale_W_iter
        scale_col_W!(W, H, 1)
    end

    while !stopping_crit_met && iteration_is_sane
        #### update V_a, W, H
        _update_nmf_mu!(V, V_a, W, H, local_params)

        #### update metrics
        _update_metrics!(metrics, V, W, H, global_params.stopping_crit)

        #### check sanity of iteration looking for potential divisions by zeros
        iteration_is_sane = _check_sanity_iter(W, H)

        #### check the stopping criterion
        stopping_crit_met = _check_stopping_crit(metrics, global_params)

        #### print intermediate if verbose
        if global_params.verbose && global_params.max_iter < 10
            @printf("iter %d/%d | cost: %.5g\n", metrics.cur_iter, global_params.max_iter, metrics.cur_cost)
        elseif global_params.verbose && (metrics.cur_iter % (global_params.max_iter ÷ 10) == 0)
            @printf("iter %d/%d | cost: %.5g\n", metrics.cur_iter, global_params.max_iter, metrics.cur_cost)
        end
    end

    if local_params.scale_W_last
        scale_col_W!(W, H, 1)
    end

    #### convergence information
    if !iteration_is_sane
        @warn "Stopped nmf because sanity check not passed at iteration" metrics.cur_iter
    else
        if metrics.cur_iter == global_params.max_iter && global_params.stopping_crit != :none
            @warn "Maximum number of iterations reached"
        end
        if global_params.verbose && metrics.cur_iter < global_params.max_iter
            @info "Stopping criterion $(global_params.stopping_crit) met at iter $(metrics.cur_iter)"
        end
    end

    NMFResults{T}(W, H, metrics, global_params, local_params, stopping_crit_met)
end

"""
    nmf_MU(V, global_params, local_params)

Multiplicative upates (MU) for non-negative matrix factorization (NMF).
The problem of interest is defined as
        min D(V || W * H),
        where
        {V, W, H} >= 0.
Given a non-negative matrix V, factorized non-negative matrices W, H are calculated.

# Arguments
- `V::Matrix{T}`           : (F x N) non-negative matrix to factorize
- `global_params::Params`  : see [`Params`](@ref)
- `local_params::MUParams` : see [`MUParams`](@ref)

# References
Code largely borrowed from H. Kasai matlab NMFLibrary solver/base/nmf_mu.m at https://github.com/hiroyuki-kasai/NMFLibrary.
"""
function nmf_MU(V::Matrix{T}, global_params::AbstractNMFParams, local_params::AbstractMUParams) where T <: Real
    # initalization
    W_init, H_init = initialize_nmf(
        V,
        rank = global_params.rank,
        init = global_params.init,
        dist = global_params.dist,
        seed = global_params.seed
    )

    # algorithm
    _nmf_MU(V, W_init, H_init, global_params, local_params)
end

ext: jl