text:
module DashReactForceGraph
using Dash

const resources_path = realpath(joinpath( @__DIR__, "..", "deps"))
const version = "0.0.1"

include("jl/dash_graph2d.jl")
include("jl/dash_graph3d.jl")

function __init__()
    DashBase.register_package(
        DashBase.ResourcePkg(
            "dash_react_force_graph",
            resources_path,
            version = version,
            [
                DashBase.Resource(
    relative_package_path = "dash_react_force_graph.min.js",
    external_url = nothing,
    dynamic = nothing,
    async = nothing,
    type = :js
),
DashBase.Resource(
    relative_package_path = "dash_react_force_graph.min.js.map",
    external_url = nothing,
    dynamic = true,
    async = nothing,
    type = :js
)
            ]
        )

    )
end
end

ext: jl

max_stars_repo_name: nodelab-aps/dash-react-force-graph

max_issues_repo_name: nodelab-aps/dash-react-force-graph

max_forks_repo_name: nodelab-aps/dash-react-force-graph


text:
struct Goal <: AbstractObject
    x::Float64
    y::Float64
    radius::Float64
    value::Float64
    function Goal(x::Float64, y::Float64, radius = 0.3, value = 0.0)
        new(x, y, radius, value)
    end
end

function inside(g::Goal, pose::Vector{Float64})
    return g.radius > hypot(g.x - pose[1], g.y - pose[2])
end

function draw(g::Goal, p::Plot{T}) where {T}
    p = plot!([g.x, g.x], [g.y, g.y + 0.6], color = "black", linewidth = 2.0)
    p = plot!(
        [g.x + 0.08],
        [g.y + 0.5],
        markershape = :rtriangle,
        markersize = 9,
        color = "red",
    )
end

struct Puddle <: AbstractObject
    lowerleft::Vector{Float64}
    upperright::Vector{Float64}
    depth::Float64
    function Puddle(lowerleft::Vector{Float64}, upperright::Vector{Float64}, depth::Float64)
        new(lowerleft, upperright, depth)
    end
end

function inside(puddle::Puddle, pose::Vector{Float64})
    x = pose[1]
    y = pose[2]
    xl, xu = puddle.lowerleft[1], puddle.upperright[1]
    yl, yu = puddle.lowerleft[2], puddle.upperright[2]
    return (xl <= x <= xu) && (yl <= y <= yu)
end

function draw(puddle::Puddle, p::Plot{T}) where {T}
    w = puddle.upperright[1] - puddle.lowerleft[1]
    h = puddle.upperright[2] - puddle.lowerleft[2]
    x = puddle.lowerleft[1]
    y = puddle.lowerleft[2]
    shape_x, shape_y = [x, x + w, x + w, x], [y, y, y + h, y + h]
    shapes = [(shape_x[i], shape_y[i]) for i = 1:4]
    push!(shapes, (shape_x[1], shape_y[1]))
    p = plot!(shapes, seriestype = :shape, fillcolor = :blue, opacity = 0.15)
end

mutable struct PuddleWorld <: AbstractWorld
    objects_::Vector{AbstractObject}
    puddles_::Vector{Puddle}
    robots_::Vector{AbstractRobot}
    goals_::Vector{Goal}
    xlim_::Vector{Float64}
    ylim_::Vector{Float64}
    function PuddleWorld(xlim::Vector{Float64}, ylim::Vector{Float64})
        new(
            Vector{AbstractObject}(undef, 0),
            Vector{Puddle}(undef, 0),
            Vector{AbstractRobot}(undef, 0),
            Vector{Goal}(undef, 0),
            [xlim[1], xlim[2]],
            [ylim[1], ylim[2]],
        )
    end
end

function Base.push!(world::PuddleWorld, obj::AbstractObject)
    push!(world.objects_, obj)
    if obj isa AbstractRobot
        push!(world.robots_, obj)
    elseif obj isa Puddle
        push!(world.puddles_, obj)
    elseif obj isa Goal
        push!(world.goals_, obj)
    end
end

function puddle_depth(world::PuddleWorld, pose::Vector{Float64})
    return sum([p.depth * convert(Float64, inside(p, pose)) for p in world.puddles_])
end

function update_status(world::PuddleWorld)
    for iter = 1:lastindex(world.robots_)
        robot = world.robots_[iter]
        # use the ground truth position
        robot.agent_.puddle_depth_ = puddle_depth(world, robot.pose_)
        for g in world.goals_
            if inside(g, robot.pose_)
                robot.agent_.in_goal_ = true
                robot.agent_.final_value_ = g.value
            end
        end
    end
end

max_stars_repo_name: soblin/JuliaProbo

max_issues_repo_name: soblin/JuliaProbo

max_forks_repo_name: soblin/JuliaProbo


text:
@userplot PlotDiagnostics
@recipe function f(diagnostics::PlotDiagnostics)
    standard_residuals = get_standard_residuals(diagnostics.args)
    @assert size(standard_residuals, 2) == 1
    n = length(standard_residuals)
    layout := (2, 2)
    acf = autocor(standard_residuals)[2:end]
    @series begin
        seriestype := :path
        label := ""
        seriescolor := "black"
        subplot := 1
        standard_residuals
    end
    @series begin
        seriestype := :bar
        label := ""
        seriescolor := "black"
        subplot := 2
        acf
    end
    ub = ones(length(acf)) * 1.96 / sqrt(n)
    lb = ones(length(acf)) * -1.96 / sqrt(n)
    @series begin
        seriestype := :path
        linestyle := :dash
        seriescolor := "red"
        label := ""
        subplot := 2
        ub
    end
    @series begin
        seriestype := :path
        linestyle := :dash
        label := ""
        seriescolor := "red"
        subplot := 2
        lb
    end
    @series begin
        seriestype := :histogram
        label := ""
        seriescolor := "black"
        normalize := true
        subplot := 3
        standard_residuals
    end
    normal(x) = pdf(Normal(), x)
    @series begin
        seriestype := :path
        label := ""
        seriescolor := "red"
        subplot := 3
        normal
    end
    qqpair = qqbuild(Normal(), standard_residuals)
    @series begin
        seriestype := :scatter
        label := ""
        seriescolor := "black"
        subplot := 4
        qqpair.qx, qqpair.qy
    end
    @series begin
        seriestype := :path
        seriescolor := "red"
        label := ""
        subplot := 4
        collect(-3:0.01:3), collect(-3:0.01:3)
    end
end


text:
struct State
    position::Position
    attitude::Attitude
    velocity::Array{T, 1} where T<:Number  # body (u, v, w) in m/s
    angular_velocity::Array{T, 1} where T<:Number  # body (p, q, r) in rad/s
    acceleration::Array{T, 1} where T<:Number  # body (ax, ay, az) in m/s^2
    angular_acceleration::Array{T, 1} where T<:Number  # body (p_dot, q_dot, r_dot) in rad/s^2
end

show(io::IO, state::State) = print(
    io,
    """State:
    \t$(state.position),
    \t$(state.attitude),
    \tVelocity: u=$(state.velocity[1]) m/s, v=$(state.velocity[2]) m/s, w=$(state.velocity[3]) m/s",
    \tAngular velocity: p=$(rad2deg(state.angular_acceleration[1])) deg/s, q=$(rad2deg(state.angular_acceleration[2])) deg/s, r=$(rad2deg(state.angular_acceleration[3])) deg/s,
    \tAcceleration: ax=$(state.acceleration[1]) m/s², ay=$(state.acceleration[2]) m/s², az=$(state.acceleration[3]) m/s²,
    \tAngular Velocity: p_dot=$(rad2deg(state.angular_acceleration[1])) deg/s², q_dot=$(rad2deg(state.angular_acceleration[2])) deg/s², r_dot=$(rad2deg(state.angular_acceleration[3])) deg/s²
    """
    )

# Position getters
get_position(state::State) = state.position
get_llh(state::State) = get_llh(state.position)
get_xyz_earth(state::State) = get_xyz_earth(state.position)
get_xyz_ecef(state::State) = get_xyz_ecef(state.position)
get_height(state::State) = get_height(state.position)

# Attitude getters
get_attitude(state::State) = state.attitude
get_euler_angles(state::State) = get_euler_angles(state.attitude)
get_quaternions(state::State) = get_quaternions(state.attitude)

# Velocity getters
get_body_velocity(state::State) = state.velocity
get_horizon_velocity(state::State) = body2hor(
    get_body_velocity(state)...,
    get_quaternions(state)...,
)
get_ecef_velocity(state::State) = body2ecef(
    get_body_velocity(state)...,
    get_llh(state)[1:2]...,
    get_euler_angles(state)...,
)

function get_flight_path_angle(state::State)
    vn, ve, vz = get_horizon_velocity(state)
    atan(-vz, norm([vn, ve]))
end

# Angular velocity getters
get_body_ang_velocity(state::State) = state.angular_velocity
get_turn_rate(state::State) = body2hor(
    get_body_ang_velocity(state)...,
    get_quaternions(state)...,
)[3]
get_euler_angles_rates(state::State) = body_angular_velocity_to_euler_angles_rates(
    get_body_ang_velocity(state)...,
    get_euler_angles(state)[2:3]...,
)
get_quaternions_rate(state::State) = body_angular_velocity_to_quaternion_rates(
    get_body_ang_velocity(state)...,
    get_quaternions(state)...
)

# Acceleration getters
get_body_accel(state::State) = state.acceleration
get_horizon_accel(state::State) = body2hor(
    get_body_accel(state)...,
    get_quaternions(state)...,
)

# Angular acceleration getters
get_body_ang_accel(state::State) = state.angular_acceleration

function isapprox(x::State, y::State; rtol=1e-8, atol=0.0, nans=false)

    result = all([
        isapprox(x.position, y.position; rtol=rtol, atol=atol, nans=nans),
        isapprox(x.attitude, y.attitude; rtol=rtol, atol=atol, nans=nans),
        isapprox(x.velocity, y.velocity; rtol=rtol, atol=atol, nans=nans),
        isapprox(x.angular_velocity, y.angular_velocity, rtol=rtol, atol=atol, nans=nans),
        isapprox(x.acceleration, y.acceleration, rtol=rtol, atol=atol, nans=nans),
        isapprox(x.angular_acceleration, y.angular_acceleration, rtol=rtol, atol=atol, nans=nans),
    ])

    return result
end


text:
"""
The internal mechanics for handling API calls are to dispatch information to
`preprocess` and `postprocess` functions based on data types found in "av_types.jl".

    `preprocess` acts upon a Dict of query parameters.

    `postprocess` transforms a successful API result, beginning with a Vector{UInt8}.
"""

# Utilities
"Ensure 'datatype' parameter is json or csv"
function _params_datatype(d)
  dt = get(d, "datatype", "json")
  @argcheck dt in ["json", "csv"]
  d["datatype"] = dt
  d
end

"Overrides datatype to json"
function _params_force_json(d)
  d["datatype"] = "json"
  d
end

"Overrides datatype to csv"
function _params_force_csv(d)
  d["datatype"] = "csv"
  d
end

"Removes datatype parameter"
function _params_no_datatype(d)
  delete!(d, "datatype")
  d
end

"Converts response to a string"
function _resp_tostring(resp)
  String(resp)
end

"Converts a response to a dataframe"
function _resp_todataframe(resp)
  resp |> CSV.File |> DataFrame
end

"Converts a response to parsed JSON"
function _resp_tojson(resp)
  resp |> _resp_tostring |> JSON.parse
end

# General Handlers
"Preprocesses API query parameters"
function preprocess(f::A where A <: AVFunction, params)
  params = _params_datatype(params)
  params
end

"Postprocesses API response"
function postprocess(f::A where A <: AVFunction, resp)
  resp = _resp_tostring(resp)
  resp
end

# Time Series Handlers
function preprocess(f::A where A <: AVTimeSeries, params)
  _params_force_csv(params)
end

function postprocess(f::A where A <: AVTimeSeries, resp)
  _resp_todataframe(resp)
end

# Fundamentals Handlers
function preprocess(f::A where A <: AVFundamental, params)
  _params_force_json(params)
end

function postprocess(f::A where A <: AVFundamental, resp)
  r = _resp_tojson(resp)

  if !all(["symbol", "annualReports", "quarterlyReports"] in keys(r))
    @warn "unexpected key structure in JSON response"
    return r
  end

  rep_a = vcat(DataFrame.(r["annualReports"])...)
  rep_q = vcat(DataFrame.(r["quarterlyReports"])...)
  rep_a[:, :symbol] .= r["symbol"]
  rep_q[:, :symbol] .= r["symbol"]

  return Dict("annual" => rep_a, "quarterly" => rep_q)
end

function preprocess(f::OVERVIEW, params)
  _params_no_datatype(params)
end

function postprocess(f::OVERVIEW, resp)
  _resp_todataframe(resp)
end

function preprocess(f::LISTING_STATUS, params)
  params = _params_no_datatype(params)

  if "date" in keys(params)
    if typeof(params["date"]) == Dates.Date
      params["date"] = string(params["date"])
    end

    if typeof(params["date"]) == String
      @assert !isnothing(match(r"[0-9]{4}-[0-9]{2}-[0-9]{2}", params["date"]))
    else
      @warn "date parameter should be a string in YYYY-MM-DD format"
    end
  end

  if "state" in keys(params)
    @argcheck params["state"] in ["active", "delisted"]
  end

  params
end

function postprocess(f::LISTING_STATUS, resp)
  _resp_todataframe(resp)
end

function preprocess(f::EARNINGS_CALENDAR, params)
  params = _params_no_datatype(params)

  if "horizon" in keys(params)
    @argcheck params["horizon"] in ["3month", "6month", "12month"]
  end

  params
end

function postprocess(f::EARNINGS_CALENDAR, resp)
  _resp_todataframe(resp)
end

function preprocess(f::IPO_CALENDAR, params)
  _params_no_datatype(params)
end

function postprocess(f::IPO_CALENDAR, resp)
  _resp_todataframe(resp)
end

# Currency Handlers
function preprocess(f::A where A <: AVCurrency, params)
  if "interval" in keys(params)
    @argcheck params["interval"] in ["1min", "5min", "15min", "30min", "60min"]
  end

  if "outputsize" in keys(params)
    @argcheck params["outputsize"] in ["compact", "full"]
  end

  _params_force_csv(params)
end

function postprocess(f::A where A <: AVCurrency, resp)
  _resp_todataframe(resp)
end

function preprocess(f::CURRENCY_EXCHANGE_RATE, params)
  _params_no_datatype(params)
end

function postprocess(f::CURRENCY_EXCHANGE_RATE, resp)
  _resp_tojson(resp)
end

function preprocess(f::AVC_PRICE, params)
  _params_no_datatype(params)
end

function postprocess(f::AVC_PRICE, resp)
  _resp_tojson(resp)
end

function preprocess(f::DIGITAL_CURRENCY_DAILY, params)
  params |>
    _params_force_csv |>
    _params_no_datatype
end

# function postprocess(f::DIGITAL_CURRENCY_DAILY, resp)
#   r = _resp_tojson(resp)
#   data_key = sort(collect(keys(r)))[2]
#
#   function kdf(d, v, i)
#     ki = collect(keys(d[v]))[i]
#     df = DataFrame(d[v][ki])
#     df[:, :T] .= ki
#     df
#   end
#
#   ts = vcat([kdf(r, data_key, i) for i in 1:length(keys(r[data_key]))]...)
#   ts
# end

function postprocess(f::DIGITAL_CURRENCY_DAILY, resp)
  r = _resp_todataframe(resp)
  r
end

function preprocess(f::DIGITAL_CURRENCY_WEEKLY, params)
  preprocess(DIGITAL_CURRENCY_DAILY(), params)
end

function postprocess(f::DIGITAL_CURRENCY_WEEKLY, resp)
  postprocess(DIGITAL_CURRENCY_DAILY(), resp)
end

function preprocess(f::DIGITAL_CURRENCY_MONTHLY, params)
  preprocess(DIGITAL_CURRENCY_DAILY(), params)
end

function postprocess(f::DIGITAL_CURRENCY_MONTHLY, resp)
  postprocess(DIGITAL_CURRENCY_DAILY(), resp)
end

# Economic Indicator Handlers
function preprocess(f::A where A <: AVEconomicIndicator, params)
  if "interval" in keys(params)
    @argcheck params["interval"] in ["daily", "weekly", "monthly", "semiannual", "quarterly", "annual"]
  end

  if "maturity" in keys(params)
    @argcheck params["maturity"] in ["3month", "5year", "10year", "30year"]
  end

  _params_force_csv(params)
end

function postprocess(f::A where A <: AVEconomicIndicator, resp)
  _resp_todataframe(resp)
end

# Technical Indicator Handlers
function preprocess(f::A where A <: AVTechnicalIndicator, params)
  if "interval" in keys(params)
    @argcheck params["interval"] in ["1min", "5min", "15min", "30min", "60min", "daily", "weekly", "monthly"]
  end

  if "time_period" in keys(params)
    is_int = typeof(params["time_period"]) <: Int
    @assert is_int
    if is_int
      @assert sign(params["time_period"]) == 1
    end
  end

  _params_force_csv(params)
end

function postprocess(f::A where A <: AVTechnicalIndicator, resp)
  _resp_todataframe(resp)
end


text:
struct BamReadChunk
	e::CIGARElement
	readPos::Int
	refPos::Int
end

BamReadChunk() = BamReadChunk(0,0,0)

op(c::BamReadChunk) = op(c.e)
op_char(c::BamReadChunk) = op_char(c.e)
len(c::BamReadChunk) = len(c.e)

readpos(c::BamReadChunk) = c.readPos
refpos(c::BamReadChunk) = c.refPos

print(io::Main.Base.IO, c::BamReadChunk) = print(io, "Chunk: ", c.e, ", readPos: ", c.readPos, ", refPos: ", c.refPos)

struct BamReadChunkState
	cig::CIGAR
	cigState::Int
	readPos::Int
	refPos::Int
end
BamReadChunkState(cig::CIGAR) = BamReadChunkState(cig,1,1,pos(r))

# function Base.start(r::BamRead)
# 	cig = cigar(r)
# 	BamReadChunkState(cig,start(cig),1,pos(r))
# end
# function Base.next(::BamRead, s::BamReadChunkState)
# 	(e,cigIter) = next(s.cig,s.cigIter)
# 	readPos = s.readPos
# 	refPos = s.refPos

# 	o = op(e)
# 	l = len(e)
# 	if o==CIGAR_M || o==CIGAR_S || o==CIGAR_I || o==CIGAR_Eq || o==CIGAR_X
# 		readPos += l
# 	end

# 	if o==CIGAR_M || o == CIGAR_D || o==CIGAR_N || o==CIGAR_Eq || o==CIGAR_X
# 		refPos += l
# 	end
# 	# Do nothing for CIGAR_H and CIGAR_P

# 	# TODO: check for unsupported/unknown CIGAR ops

# 	(BamReadChunk(e,s.readPos,s.refPos),BamReadChunkState(s.cig,cigIter,readPos,refPos))
# end
# Base.done(::BamRead, s::BamReadChunkState) = done(s.cig,s.cigIter)

function iterate(r::BamRead, s::BamReadChunkState=BamReadChunkState(cigar(r)))
	cigIter = iterate(s.cig, s.cigState)
	cigIter == nothing && return nothing
	(e,cigState) = cigIter

	readPos = s.readPos
	refPos = s.refPos

	o = op(e)
	l = len(e)
	if o==CIGAR_M || o==CIGAR_S || o==CIGAR_I || o==CIGAR_Eq || o==CIGAR_X
		readPos += l
	end

	if o==CIGAR_M || o == CIGAR_D || o==CIGAR_N || o==CIGAR_Eq || o==CIGAR_X
		refPos += l
	end
	# Do nothing for CIGAR_H and CIGAR_P

	# TODO: check for unsupported/unknown CIGAR ops

	(BamReadChunk(e,s.readPos,s.refPos),BamReadChunkState(s.cig,cigState,readPos,refPos))
end

eltype(::Type{BamRead}) = BamReadChunk

function readrange(c::BamReadChunk)
	p = readpos(c)
	l = len(c)
	p:p+l-1
end

seq(r::BamRead,c::BamReadChunk) = view(seq(r),readrange(c))
qual(r::BamRead,c::BamReadChunk) = view(qual(r),readrange(c))


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

"""
    AcceptSharedDirectory()

Accepts a directory sharing request that was sent from the directory owner account.

# Required Parameters
- `SharedDirectoryId`: Identifier of the shared directory in the directory consumer account. This identifier is different for each directory owner account.

"""
accept_shared_directory(SharedDirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("AcceptSharedDirectory", Dict{String, Any}("SharedDirectoryId"=>SharedDirectoryId); aws_config=aws_config)
accept_shared_directory(SharedDirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("AcceptSharedDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("SharedDirectoryId"=>SharedDirectoryId), args)); aws_config=aws_config)

"""
    AddIpRoutes()

If the DNS server for your on-premises domain uses a publicly addressable IP address, you must add a CIDR address block to correctly route traffic to and from your Microsoft AD on Amazon Web Services. AddIpRoutes adds this address block. You can also use AddIpRoutes to facilitate routing traffic that uses public IP ranges from your Microsoft AD on AWS to a peer VPC.  Before you call AddIpRoutes, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the AddIpRoutes operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

# Required Parameters
- `DirectoryId`: Identifier (ID) of the directory to which to add the address block.
- `IpRoutes`: IP address blocks, using CIDR format, of the traffic to route. This is often the IP address block of the DNS server used for your on-premises domain.

# Optional Parameters
- `UpdateSecurityGroupForDirectoryControllers`: If set to true, updates the inbound and outbound rules of the security group that has the description: \"AWS created security group for directory ID directory controllers.\" Following are the new rules:  Inbound:   Type: Custom UDP Rule, Protocol: UDP, Range: 88, Source: 0.0.0.0/0   Type: Custom UDP Rule, Protocol: UDP, Range: 123, Source: 0.0.0.0/0   Type: Custom UDP Rule, Protocol: UDP, Range: 138, Source: 0.0.0.0/0   Type: Custom UDP Rule, Protocol: UDP, Range: 389, Source: 0.0.0.0/0   Type: Custom UDP Rule, Protocol: UDP, Range: 464, Source: 0.0.0.0/0   Type: Custom UDP Rule, Protocol: UDP, Range: 445, Source: 0.0.0.0/0   Type: Custom TCP Rule, Protocol: TCP, Range: 88, Source: 0.0.0.0/0   Type: Custom TCP Rule, Protocol: TCP, Range: 135, Source: 0.0.0.0/0   Type: Custom TCP Rule, Protocol: TCP, Range: 445, Source: 0.0.0.0/0   Type: Custom TCP Rule, Protocol: TCP, Range: 464, Source: 0.0.0.0/0   Type: Custom TCP Rule, Protocol: TCP, Range: 636, Source: 0.0.0.0/0   Type: Custom TCP Rule, Protocol: TCP, Range: 1024-65535, Source: 0.0.0.0/0   Type: Custom TCP Rule, Protocol: TCP, Range: 3268-33269, Source: 0.0.0.0/0   Type: DNS (UDP), Protocol: UDP, Range: 53, Source: 0.0.0.0/0   Type: DNS (TCP), Protocol: TCP, Range: 53, Source: 0.0.0.0/0   Type: LDAP, Protocol: TCP, Range: 389, Source: 0.0.0.0/0   Type: All ICMP, Protocol: All, Range: N/A, Source: 0.0.0.0/0    Outbound:   Type: All traffic, Protocol: All, Range: All, Destination: 0.0.0.0/0   These security rules impact an internal network interface that is not exposed publicly.
"""
add_ip_routes(DirectoryId, IpRoutes; aws_config::AWSConfig=global_aws_config()) = directory_service("AddIpRoutes", Dict{String, Any}("DirectoryId"=>DirectoryId, "IpRoutes"=>IpRoutes); aws_config=aws_config)
add_ip_routes(DirectoryId, IpRoutes, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("AddIpRoutes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "IpRoutes"=>IpRoutes), args)); aws_config=aws_config)

"""
    AddRegion()

Adds two domain controllers in the specified Region for the specified directory.

# Required Parameters
- `DirectoryId`: The identifier of the directory to which you want to add Region replication.
- `RegionName`: The name of the Region where you want to add domain controllers for replication. For example, us-east-1.
- `VPCSettings`:

"""
add_region(DirectoryId, RegionName, VPCSettings; aws_config::AWSConfig=global_aws_config()) = directory_service("AddRegion", Dict{String, Any}("DirectoryId"=>DirectoryId, "RegionName"=>RegionName, "VPCSettings"=>VPCSettings); aws_config=aws_config)
add_region(DirectoryId, RegionName, VPCSettings, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("AddRegion", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "RegionName"=>RegionName, "VPCSettings"=>VPCSettings), args)); aws_config=aws_config)

"""
    AddTagsToResource()

Adds or overwrites one or more tags for the specified directory. Each directory can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique to each resource.

# Required Parameters
- `ResourceId`: Identifier (ID) for the directory to which to add the tag.
- `Tags`: The tags to be assigned to the directory.

"""
add_tags_to_resource(ResourceId, Tags; aws_config::AWSConfig=global_aws_config()) = directory_service("AddTagsToResource", Dict{String, Any}("ResourceId"=>ResourceId, "Tags"=>Tags); aws_config=aws_config)
add_tags_to_resource(ResourceId, Tags, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("AddTagsToResource", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ResourceId"=>ResourceId, "Tags"=>Tags), args)); aws_config=aws_config)

"""
    CancelSchemaExtension()

Cancels an in-progress schema extension to a Microsoft AD directory. Once a schema extension has started replicating to all domain controllers, the task can no longer be canceled. A schema extension can be canceled during any of the following states; Initializing, CreatingSnapshot, and UpdatingSchema.

# Required Parameters
- `DirectoryId`: The identifier of the directory whose schema extension will be canceled.
- `SchemaExtensionId`: The identifier of the schema extension that will be canceled.

"""
cancel_schema_extension(DirectoryId, SchemaExtensionId; aws_config::AWSConfig=global_aws_config()) = directory_service("CancelSchemaExtension", Dict{String, Any}("DirectoryId"=>DirectoryId, "SchemaExtensionId"=>SchemaExtensionId); aws_config=aws_config)
cancel_schema_extension(DirectoryId, SchemaExtensionId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("CancelSchemaExtension", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "SchemaExtensionId"=>SchemaExtensionId), args)); aws_config=aws_config)

"""
    ConnectDirectory()

Creates an AD Connector to connect to an on-premises directory. Before you call ConnectDirectory, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the ConnectDirectory operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

# Required Parameters
- `ConnectSettings`: A DirectoryConnectSettings object that contains additional information for the operation.
- `Name`: The fully qualified name of the on-premises directory, such as corp.example.com.
- `Password`: The password for the on-premises user account.
- `Size`: The size of the directory.

# Optional Parameters
- `Description`: A description for the directory.
- `ShortName`: The NetBIOS name of the on-premises directory, such as CORP.
- `Tags`: The tags to be assigned to AD Connector.
"""
connect_directory(ConnectSettings, Name, Password, Size; aws_config::AWSConfig=global_aws_config()) = directory_service("ConnectDirectory", Dict{String, Any}("ConnectSettings"=>ConnectSettings, "Name"=>Name, "Password"=>Password, "Size"=>Size); aws_config=aws_config)
connect_directory(ConnectSettings, Name, Password, Size, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("ConnectDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ConnectSettings"=>ConnectSettings, "Name"=>Name, "Password"=>Password, "Size"=>Size), args)); aws_config=aws_config)

"""
    CreateAlias()

Creates an alias for a directory and assigns the alias to the directory. The alias is used to construct the access URL for the directory, such as http://<alias>.awsapps.com.  After an alias has been created, it cannot be deleted or reused, so this operation should only be used when absolutely necessary.

# Required Parameters
- `Alias`: The requested alias. The alias must be unique amongst all aliases in AWS. This operation throws an EntityAlreadyExistsException error if the alias already exists.
- `DirectoryId`: The identifier of the directory for which to create the alias.

"""
create_alias(Alias, DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateAlias", Dict{String, Any}("Alias"=>Alias, "DirectoryId"=>DirectoryId); aws_config=aws_config)
create_alias(Alias, DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateAlias", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Alias"=>Alias, "DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    CreateComputer()

Creates an Active Directory computer object in the specified directory.

# Required Parameters
- `ComputerName`: The name of the computer account.
- `DirectoryId`: The identifier of the directory in which to create the computer account.
- `Password`: A one-time password that is used to join the computer to the directory. You should generate a random, strong password to use for this parameter.

# Optional Parameters
- `ComputerAttributes`: An array of Attribute objects that contain any LDAP attributes to apply to the computer account.
- `OrganizationalUnitDistinguishedName`: The fully-qualified distinguished name of the organizational unit to place the computer account in.
"""
create_computer(ComputerName, DirectoryId, Password; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateComputer", Dict{String, Any}("ComputerName"=>ComputerName, "DirectoryId"=>DirectoryId, "Password"=>Password); aws_config=aws_config)
create_computer(ComputerName, DirectoryId, Password, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateComputer", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ComputerName"=>ComputerName, "DirectoryId"=>DirectoryId, "Password"=>Password), args)); aws_config=aws_config)

"""
    CreateConditionalForwarder()

Creates a conditional forwarder associated with your AWS directory. Conditional forwarders are required in order to set up a trust relationship with another domain. The conditional forwarder points to the trusted domain.

# Required Parameters
- `DirectoryId`: The directory ID of the AWS directory for which you are creating the conditional forwarder.
- `DnsIpAddrs`: The IP addresses of the remote DNS server associated with RemoteDomainName.
- `RemoteDomainName`: The fully qualified domain name (FQDN) of the remote domain with which you will set up a trust relationship.

"""
create_conditional_forwarder(DirectoryId, DnsIpAddrs, RemoteDomainName; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateConditionalForwarder", Dict{String, Any}("DirectoryId"=>DirectoryId, "DnsIpAddrs"=>DnsIpAddrs, "RemoteDomainName"=>RemoteDomainName); aws_config=aws_config)
create_conditional_forwarder(DirectoryId, DnsIpAddrs, RemoteDomainName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateConditionalForwarder", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "DnsIpAddrs"=>DnsIpAddrs, "RemoteDomainName"=>RemoteDomainName), args)); aws_config=aws_config)

"""
    CreateDirectory()

Creates a Simple AD directory. For more information, see Simple Active Directory in the AWS Directory Service Admin Guide. Before you call CreateDirectory, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the CreateDirectory operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

# Required Parameters
- `Name`: The fully qualified name for the directory, such as corp.example.com.
- `Password`: The password for the directory administrator. The directory creation process creates a directory administrator account with the user name Administrator and this password. If you need to change the password for the administrator account, you can use the ResetUserPassword API call. The regex pattern for this string is made up of the following conditions:   Length (?=^.{8,64}) – Must be between 8 and 64 characters   AND any 3 of the following password complexity rules required by Active Directory:   Numbers and upper case and lowercase (?=.*d)(?=.*[A-Z])(?=.*[a-z])   Numbers and special characters and lower case (?=.*d)(?=.*[^A-Za-z0-9s])(?=.*[a-z])   Special characters and upper case and lower case (?=.*[^A-Za-z0-9s])(?=.*[A-Z])(?=.*[a-z])   Numbers and upper case and special characters (?=.*d)(?=.*[A-Z])(?=.*[^A-Za-z0-9s])   For additional information about how Active Directory passwords are enforced, see Password must meet complexity requirements on the Microsoft website.
- `Size`: The size of the directory.

# Optional Parameters
- `Description`: A description for the directory.
- `ShortName`: The NetBIOS name of the directory, such as CORP.
- `Tags`: The tags to be assigned to the Simple AD directory.
- `VpcSettings`: A DirectoryVpcSettings object that contains additional information for the operation.
"""
create_directory(Name, Password, Size; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateDirectory", Dict{String, Any}("Name"=>Name, "Password"=>Password, "Size"=>Size); aws_config=aws_config)
create_directory(Name, Password, Size, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Name"=>Name, "Password"=>Password, "Size"=>Size), args)); aws_config=aws_config)

"""
    CreateLogSubscription()

Creates a subscription to forward real-time Directory Service domain controller security logs to the specified Amazon CloudWatch log group in your AWS account.

# Required Parameters
- `DirectoryId`: Identifier of the directory to which you want to subscribe and receive real-time logs to your specified CloudWatch log group.
- `LogGroupName`: The name of the CloudWatch log group where the real-time domain controller logs are forwarded.

"""
create_log_subscription(DirectoryId, LogGroupName; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateLogSubscription", Dict{String, Any}("DirectoryId"=>DirectoryId, "LogGroupName"=>LogGroupName); aws_config=aws_config)
create_log_subscription(DirectoryId, LogGroupName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateLogSubscription", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "LogGroupName"=>LogGroupName), args)); aws_config=aws_config)

"""
    CreateMicrosoftAD()

Creates a Microsoft AD directory in the AWS Cloud. For more information, see AWS Managed Microsoft AD in the AWS Directory Service Admin Guide. Before you call CreateMicrosoftAD, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the CreateMicrosoftAD operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

# Required Parameters
- `Name`: The fully qualified domain name for the AWS Managed Microsoft AD directory, such as corp.example.com. This name will resolve inside your VPC only. It does not need to be publicly resolvable.
- `Password`: The password for the default administrative user named Admin. If you need to change the password for the administrator account, you can use the ResetUserPassword API call.
- `VpcSettings`: Contains VPC information for the CreateDirectory or CreateMicrosoftAD operation.

# Optional Parameters
- `Description`: A description for the directory. This label will appear on the AWS console Directory Details page after the directory is created.
- `Edition`: AWS Managed Microsoft AD is available in two editions: Standard and Enterprise. Enterprise is the default.
- `ShortName`: The NetBIOS name for your domain, such as CORP. If you don't specify a NetBIOS name, it will default to the first part of your directory DNS. For example, CORP for the directory DNS corp.example.com.
- `Tags`: The tags to be assigned to the AWS Managed Microsoft AD directory.
"""
create_microsoft_ad(Name, Password, VpcSettings; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateMicrosoftAD", Dict{String, Any}("Name"=>Name, "Password"=>Password, "VpcSettings"=>VpcSettings); aws_config=aws_config)
create_microsoft_ad(Name, Password, VpcSettings, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateMicrosoftAD", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Name"=>Name, "Password"=>Password, "VpcSettings"=>VpcSettings), args)); aws_config=aws_config)

"""
    CreateSnapshot()

Creates a snapshot of a Simple AD or Microsoft AD directory in the AWS cloud.  You cannot take snapshots of AD Connector directories.

# Required Parameters
- `DirectoryId`: The identifier of the directory of which to take a snapshot.

# Optional Parameters
- `Name`: The descriptive name to apply to the snapshot.
"""
create_snapshot(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateSnapshot", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
create_snapshot(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateSnapshot", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    CreateTrust()

AWS Directory Service for Microsoft Active Directory allows you to configure trust relationships. For example, you can establish a trust between your AWS Managed Microsoft AD directory, and your existing on-premises Microsoft Active Directory. This would allow you to provide users and groups access to resources in either domain, with a single set of credentials. This action initiates the creation of the AWS side of a trust relationship between an AWS Managed Microsoft AD directory and an external domain. You can create either a forest trust or an external trust.

# Required Parameters
- `DirectoryId`: The Directory ID of the AWS Managed Microsoft AD directory for which to establish the trust relationship.
- `RemoteDomainName`: The Fully Qualified Domain Name (FQDN) of the external domain for which to create the trust relationship.
- `TrustDirection`: The direction of the trust relationship.
- `TrustPassword`: The trust password. The must be the same password that was used when creating the trust relationship on the external domain.

# Optional Parameters
- `ConditionalForwarderIpAddrs`: The IP addresses of the remote DNS server associated with RemoteDomainName.
- `SelectiveAuth`: Optional parameter to enable selective authentication for the trust.
- `TrustType`: The trust relationship type. Forest is the default.
"""
create_trust(DirectoryId, RemoteDomainName, TrustDirection, TrustPassword; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateTrust", Dict{String, Any}("DirectoryId"=>DirectoryId, "RemoteDomainName"=>RemoteDomainName, "TrustDirection"=>TrustDirection, "TrustPassword"=>TrustPassword); aws_config=aws_config)
create_trust(DirectoryId, RemoteDomainName, TrustDirection, TrustPassword, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("CreateTrust", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "RemoteDomainName"=>RemoteDomainName, "TrustDirection"=>TrustDirection, "TrustPassword"=>TrustPassword), args)); aws_config=aws_config)

"""
    DeleteConditionalForwarder()

Deletes a conditional forwarder that has been set up for your AWS directory.

# Required Parameters
- `DirectoryId`: The directory ID for which you are deleting the conditional forwarder.
- `RemoteDomainName`: The fully qualified domain name (FQDN) of the remote domain with which you are deleting the conditional forwarder.

"""
delete_conditional_forwarder(DirectoryId, RemoteDomainName; aws_config::AWSConfig=global_aws_config()) = directory_service("DeleteConditionalForwarder", Dict{String, Any}("DirectoryId"=>DirectoryId, "RemoteDomainName"=>RemoteDomainName); aws_config=aws_config)
delete_conditional_forwarder(DirectoryId, RemoteDomainName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DeleteConditionalForwarder", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "RemoteDomainName"=>RemoteDomainName), args)); aws_config=aws_config)

"""
    DeleteDirectory()

Deletes an AWS Directory Service directory. Before you call DeleteDirectory, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the DeleteDirectory operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

# Required Parameters
- `DirectoryId`: The identifier of the directory to delete.

"""
delete_directory(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("DeleteDirectory", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
delete_directory(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DeleteDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    DeleteLogSubscription()

Deletes the specified log subscription.

# Required Parameters
- `DirectoryId`: Identifier of the directory whose log subscription you want to delete.

"""
delete_log_subscription(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("DeleteLogSubscription", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
delete_log_subscription(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DeleteLogSubscription", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    DeleteSnapshot()

Deletes a directory snapshot.

# Required Parameters
- `SnapshotId`: The identifier of the directory snapshot to be deleted.

"""
delete_snapshot(SnapshotId; aws_config::AWSConfig=global_aws_config()) = directory_service("DeleteSnapshot", Dict{String, Any}("SnapshotId"=>SnapshotId); aws_config=aws_config)
delete_snapshot(SnapshotId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DeleteSnapshot", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("SnapshotId"=>SnapshotId), args)); aws_config=aws_config)

"""
    DeleteTrust()

Deletes an existing trust relationship between your AWS Managed Microsoft AD directory and an external domain.

# Required Parameters
- `TrustId`: The Trust ID of the trust relationship to be deleted.

# Optional Parameters
- `DeleteAssociatedConditionalForwarder`: Delete a conditional forwarder as part of a DeleteTrustRequest.
"""
delete_trust(TrustId; aws_config::AWSConfig=global_aws_config()) = directory_service("DeleteTrust", Dict{String, Any}("TrustId"=>TrustId); aws_config=aws_config)
delete_trust(TrustId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DeleteTrust", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TrustId"=>TrustId), args)); aws_config=aws_config)

"""
    DeregisterCertificate()

Deletes from the system the certificate that was registered for a secured LDAP connection.

# Required Parameters
- `CertificateId`: The identifier of the certificate.
- `DirectoryId`: The identifier of the directory.

"""
deregister_certificate(CertificateId, DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("DeregisterCertificate", Dict{String, Any}("CertificateId"=>CertificateId, "DirectoryId"=>DirectoryId); aws_config=aws_config)
deregister_certificate(CertificateId, DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DeregisterCertificate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("CertificateId"=>CertificateId, "DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    DeregisterEventTopic()

Removes the specified directory as a publisher to the specified SNS topic.

# Required Parameters
- `DirectoryId`: The Directory ID to remove as a publisher. This directory will no longer send messages to the specified SNS topic.
- `TopicName`: The name of the SNS topic from which to remove the directory as a publisher.

"""
deregister_event_topic(DirectoryId, TopicName; aws_config::AWSConfig=global_aws_config()) = directory_service("DeregisterEventTopic", Dict{String, Any}("DirectoryId"=>DirectoryId, "TopicName"=>TopicName); aws_config=aws_config)
deregister_event_topic(DirectoryId, TopicName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DeregisterEventTopic", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "TopicName"=>TopicName), args)); aws_config=aws_config)

"""
    DescribeCertificate()

Displays information about the certificate registered for a secured LDAP connection.

# Required Parameters
- `CertificateId`: The identifier of the certificate.
- `DirectoryId`: The identifier of the directory.

"""
describe_certificate(CertificateId, DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeCertificate", Dict{String, Any}("CertificateId"=>CertificateId, "DirectoryId"=>DirectoryId); aws_config=aws_config)
describe_certificate(CertificateId, DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeCertificate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("CertificateId"=>CertificateId, "DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    DescribeConditionalForwarders()

Obtains information about the conditional forwarders for this account. If no input parameters are provided for RemoteDomainNames, this request describes all conditional forwarders for the specified directory ID.

# Required Parameters
- `DirectoryId`: The directory ID for which to get the list of associated conditional forwarders.

# Optional Parameters
- `RemoteDomainNames`: The fully qualified domain names (FQDN) of the remote domains for which to get the list of associated conditional forwarders. If this member is null, all conditional forwarders are returned.
"""
describe_conditional_forwarders(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeConditionalForwarders", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
describe_conditional_forwarders(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeConditionalForwarders", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    DescribeDirectories()

Obtains information about the directories that belong to this account. You can retrieve information about specific directories by passing the directory identifiers in the DirectoryIds parameter. Otherwise, all directories that belong to the current account are returned. This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the DescribeDirectoriesResult.NextToken member contains a token that you pass in the next call to DescribeDirectories to retrieve the next set of items. You can also specify a maximum number of return results with the Limit parameter.

# Optional Parameters
- `DirectoryIds`: A list of identifiers of the directories for which to obtain the information. If this member is null, all directories that belong to the current account are returned. An empty list results in an InvalidParameterException being thrown.
- `Limit`: The maximum number of items to return. If this value is zero, the maximum number of items is specified by the limitations of the operation.
- `NextToken`: The DescribeDirectoriesResult.NextToken value from a previous call to DescribeDirectories. Pass null if this is the first call.
"""
describe_directories(; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeDirectories"; aws_config=aws_config)
describe_directories(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeDirectories", args; aws_config=aws_config)

"""
    DescribeDomainControllers()

Provides information about any domain controllers in your directory.

# Required Parameters
- `DirectoryId`: Identifier of the directory for which to retrieve the domain controller information.

# Optional Parameters
- `DomainControllerIds`: A list of identifiers for the domain controllers whose information will be provided.
- `Limit`: The maximum number of items to return.
- `NextToken`: The DescribeDomainControllers.NextToken value from a previous call to DescribeDomainControllers. Pass null if this is the first call.
"""
describe_domain_controllers(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeDomainControllers", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
describe_domain_controllers(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeDomainControllers", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    DescribeEventTopics()

Obtains information about which SNS topics receive status messages from the specified directory. If no input parameters are provided, such as DirectoryId or TopicName, this request describes all of the associations in the account.

# Optional Parameters
- `DirectoryId`: The Directory ID for which to get the list of associated SNS topics. If this member is null, associations for all Directory IDs are returned.
- `TopicNames`: A list of SNS topic names for which to obtain the information. If this member is null, all associations for the specified Directory ID are returned. An empty list results in an InvalidParameterException being thrown.
"""
describe_event_topics(; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeEventTopics"; aws_config=aws_config)
describe_event_topics(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeEventTopics", args; aws_config=aws_config)

"""
    DescribeLDAPSSettings()

Describes the status of LDAP security for the specified directory.

# Required Parameters
- `DirectoryId`: The identifier of the directory.

# Optional Parameters
- `Limit`: Specifies the number of items that should be displayed on one page.
- `NextToken`: The type of next token used for pagination.
- `Type`: The type of LDAP security to enable. Currently only the value Client is supported.
"""
describe_ldapssettings(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeLDAPSSettings", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
describe_ldapssettings(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeLDAPSSettings", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    DescribeRegions()

Provides information about the Regions that are configured for multi-Region replication.

# Required Parameters
- `DirectoryId`: The identifier of the directory.

# Optional Parameters
- `NextToken`: The DescribeRegionsResult.NextToken value from a previous call to DescribeRegions. Pass null if this is the first call.
- `RegionName`: The name of the Region. For example, us-east-1.
"""
describe_regions(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeRegions", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
describe_regions(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeRegions", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    DescribeSharedDirectories()

Returns the shared directories in your account.

# Required Parameters
- `OwnerDirectoryId`: Returns the identifier of the directory in the directory owner account.

# Optional Parameters
- `Limit`: The number of shared directories to return in the response object.
- `NextToken`: The DescribeSharedDirectoriesResult.NextToken value from a previous call to DescribeSharedDirectories. Pass null if this is the first call.
- `SharedDirectoryIds`: A list of identifiers of all shared directories in your account.
"""
describe_shared_directories(OwnerDirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeSharedDirectories", Dict{String, Any}("OwnerDirectoryId"=>OwnerDirectoryId); aws_config=aws_config)
describe_shared_directories(OwnerDirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeSharedDirectories", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("OwnerDirectoryId"=>OwnerDirectoryId), args)); aws_config=aws_config)

"""
    DescribeSnapshots()

Obtains information about the directory snapshots that belong to this account. This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the DescribeSnapshots.NextToken member contains a token that you pass in the next call to DescribeSnapshots to retrieve the next set of items. You can also specify a maximum number of return results with the Limit parameter.

# Optional Parameters
- `DirectoryId`: The identifier of the directory for which to retrieve snapshot information.
- `Limit`: The maximum number of objects to return.
- `NextToken`: The DescribeSnapshotsResult.NextToken value from a previous call to DescribeSnapshots. Pass null if this is the first call.
- `SnapshotIds`: A list of identifiers of the snapshots to obtain the information for. If this member is null or empty, all snapshots are returned using the Limit and NextToken members.
"""
describe_snapshots(; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeSnapshots"; aws_config=aws_config)
describe_snapshots(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeSnapshots", args; aws_config=aws_config)

"""
    DescribeTrusts()

Obtains information about the trust relationships for this account. If no input parameters are provided, such as DirectoryId or TrustIds, this request describes all the trust relationships belonging to the account.

# Optional Parameters
- `DirectoryId`: The Directory ID of the AWS directory that is a part of the requested trust relationship.
- `Limit`: The maximum number of objects to return.
- `NextToken`: The DescribeTrustsResult.NextToken value from a previous call to DescribeTrusts. Pass null if this is the first call.
- `TrustIds`: A list of identifiers of the trust relationships for which to obtain the information. If this member is null, all trust relationships that belong to the current account are returned. An empty list results in an InvalidParameterException being thrown.
"""
describe_trusts(; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeTrusts"; aws_config=aws_config)
describe_trusts(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DescribeTrusts", args; aws_config=aws_config)

"""
    DisableClientAuthentication()

Disable client authentication for smart cards.

# Required Parameters
- `DirectoryId`: Disable client authentication in a specified directory for smart cards.
- `Type`: Disable the type of client authentication request.

"""
disable_client_authentication(DirectoryId, Type; aws_config::AWSConfig=global_aws_config()) = directory_service("DisableClientAuthentication", Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type); aws_config=aws_config)
disable_client_authentication(DirectoryId, Type, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DisableClientAuthentication", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type), args)); aws_config=aws_config)

"""
    DisableLDAPS()

Deactivates LDAP secure calls for the specified directory.

# Required Parameters
- `DirectoryId`: The identifier of the directory.
- `Type`: The type of LDAP security to enable. Currently only the value Client is supported.

"""
disable_ldaps(DirectoryId, Type; aws_config::AWSConfig=global_aws_config()) = directory_service("DisableLDAPS", Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type); aws_config=aws_config)
disable_ldaps(DirectoryId, Type, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DisableLDAPS", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type), args)); aws_config=aws_config)

"""
    DisableRadius()

Disables multi-factor authentication (MFA) with the Remote Authentication Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD directory.

# Required Parameters
- `DirectoryId`: The identifier of the directory for which to disable MFA.

"""
disable_radius(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("DisableRadius", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
disable_radius(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DisableRadius", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    DisableSso()

Disables single-sign on for a directory.

# Required Parameters
- `DirectoryId`: The identifier of the directory for which to disable single-sign on.

# Optional Parameters
- `Password`: The password of an alternate account to use to disable single-sign on. This is only used for AD Connector directories. For more information, see the UserName parameter.
- `UserName`: The username of an alternate account to use to disable single-sign on. This is only used for AD Connector directories. This account must have privileges to remove a service principal name. If the AD Connector service account does not have privileges to remove a service principal name, you can specify an alternate account with the UserName and Password parameters. These credentials are only used to disable single sign-on and are not stored by the service. The AD Connector service account is not changed.
"""
disable_sso(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("DisableSso", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
disable_sso(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("DisableSso", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    EnableClientAuthentication()

Enable client authentication for smardtcards.

# Required Parameters
- `DirectoryId`: Enable client authentication in a specified directory for smart cards.
- `Type`: Enable the type of client authentication request.

"""
enable_client_authentication(DirectoryId, Type; aws_config::AWSConfig=global_aws_config()) = directory_service("EnableClientAuthentication", Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type); aws_config=aws_config)
enable_client_authentication(DirectoryId, Type, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("EnableClientAuthentication", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type), args)); aws_config=aws_config)

"""
    EnableLDAPS()

Activates the switch for the specific directory to always use LDAP secure calls.

# Required Parameters
- `DirectoryId`: The identifier of the directory.
- `Type`: The type of LDAP security to enable. Currently only the value Client is supported.

"""
enable_ldaps(DirectoryId, Type; aws_config::AWSConfig=global_aws_config()) = directory_service("EnableLDAPS", Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type); aws_config=aws_config)
enable_ldaps(DirectoryId, Type, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("EnableLDAPS", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type), args)); aws_config=aws_config)

"""
    EnableRadius()

Enables multi-factor authentication (MFA) with the Remote Authentication Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD directory.

# Required Parameters
- `DirectoryId`: The identifier of the directory for which to enable MFA.
- `RadiusSettings`: A RadiusSettings object that contains information about the RADIUS server.

"""
enable_radius(DirectoryId, RadiusSettings; aws_config::AWSConfig=global_aws_config()) = directory_service("EnableRadius", Dict{String, Any}("DirectoryId"=>DirectoryId, "RadiusSettings"=>RadiusSettings); aws_config=aws_config)
enable_radius(DirectoryId, RadiusSettings, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("EnableRadius", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "RadiusSettings"=>RadiusSettings), args)); aws_config=aws_config)

"""
    EnableSso()

Enables single sign-on for a directory. Single sign-on allows users in your directory to access certain AWS services from a computer joined to the directory without having to enter their credentials separately.

# Required Parameters
- `DirectoryId`: The identifier of the directory for which to enable single-sign on.

# Optional Parameters
- `Password`: The password of an alternate account to use to enable single-sign on. This is only used for AD Connector directories. For more information, see the UserName parameter.
- `UserName`: The username of an alternate account to use to enable single-sign on. This is only used for AD Connector directories. This account must have privileges to add a service principal name. If the AD Connector service account does not have privileges to add a service principal name, you can specify an alternate account with the UserName and Password parameters. These credentials are only used to enable single sign-on and are not stored by the service. The AD Connector service account is not changed.
"""
enable_sso(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("EnableSso", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
enable_sso(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("EnableSso", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    GetDirectoryLimits()

Obtains directory limit information for the current Region.

"""
get_directory_limits(; aws_config::AWSConfig=global_aws_config()) = directory_service("GetDirectoryLimits"; aws_config=aws_config)
get_directory_limits(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("GetDirectoryLimits", args; aws_config=aws_config)

"""
    GetSnapshotLimits()

Obtains the manual snapshot limits for a directory.

# Required Parameters
- `DirectoryId`: Contains the identifier of the directory to obtain the limits for.

"""
get_snapshot_limits(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("GetSnapshotLimits", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
get_snapshot_limits(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("GetSnapshotLimits", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    ListCertificates()

For the specified directory, lists all the certificates registered for a secured LDAP connection.

# Required Parameters
- `DirectoryId`: The identifier of the directory.

# Optional Parameters
- `Limit`: The number of items that should show up on one page
- `NextToken`: A token for requesting another page of certificates if the NextToken response element indicates that more certificates are available. Use the value of the returned NextToken element in your request until the token comes back as null. Pass null if this is the first call.
"""
list_certificates(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("ListCertificates", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
list_certificates(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("ListCertificates", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    ListIpRoutes()

Lists the address blocks that you have added to a directory.

# Required Parameters
- `DirectoryId`: Identifier (ID) of the directory for which you want to retrieve the IP addresses.

# Optional Parameters
- `Limit`: Maximum number of items to return. If this value is zero, the maximum number of items is specified by the limitations of the operation.
- `NextToken`: The ListIpRoutes.NextToken value from a previous call to ListIpRoutes. Pass null if this is the first call.
"""
list_ip_routes(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("ListIpRoutes", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
list_ip_routes(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("ListIpRoutes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    ListLogSubscriptions()

Lists the active log subscriptions for the AWS account.

# Optional Parameters
- `DirectoryId`: If a DirectoryID is provided, lists only the log subscription associated with that directory. If no DirectoryId is provided, lists all log subscriptions associated with your AWS account. If there are no log subscriptions for the AWS account or the directory, an empty list will be returned.
- `Limit`: The maximum number of items returned.
- `NextToken`: The token for the next set of items to return.
"""
list_log_subscriptions(; aws_config::AWSConfig=global_aws_config()) = directory_service("ListLogSubscriptions"; aws_config=aws_config)
list_log_subscriptions(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("ListLogSubscriptions", args; aws_config=aws_config)

"""
    ListSchemaExtensions()

Lists all schema extensions applied to a Microsoft AD Directory.

# Required Parameters
- `DirectoryId`: The identifier of the directory from which to retrieve the schema extension information.

# Optional Parameters
- `Limit`: The maximum number of items to return.
- `NextToken`: The ListSchemaExtensions.NextToken value from a previous call to ListSchemaExtensions. Pass null if this is the first call.
"""
list_schema_extensions(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("ListSchemaExtensions", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
list_schema_extensions(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("ListSchemaExtensions", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    ListTagsForResource()

Lists all tags on a directory.

# Required Parameters
- `ResourceId`: Identifier (ID) of the directory for which you want to retrieve tags.

# Optional Parameters
- `Limit`: Reserved for future use.
- `NextToken`: Reserved for future use.
"""
list_tags_for_resource(ResourceId; aws_config::AWSConfig=global_aws_config()) = directory_service("ListTagsForResource", Dict{String, Any}("ResourceId"=>ResourceId); aws_config=aws_config)
list_tags_for_resource(ResourceId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("ListTagsForResource", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ResourceId"=>ResourceId), args)); aws_config=aws_config)

"""
    RegisterCertificate()

Registers a certificate for secured LDAP connection.

# Required Parameters
- `CertificateData`: The certificate PEM string that needs to be registered.
- `DirectoryId`: The identifier of the directory.

# Optional Parameters
- `ClientCertAuthSettings`:
- `Type`: The certificate type to register for the request.
"""
register_certificate(CertificateData, DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("RegisterCertificate", Dict{String, Any}("CertificateData"=>CertificateData, "DirectoryId"=>DirectoryId); aws_config=aws_config)
register_certificate(CertificateData, DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("RegisterCertificate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("CertificateData"=>CertificateData, "DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    RegisterEventTopic()

Associates a directory with an SNS topic. This establishes the directory as a publisher to the specified SNS topic. You can then receive email or text (SMS) messages when the status of your directory changes. You get notified if your directory goes from an Active status to an Impaired or Inoperable status. You also receive a notification when the directory returns to an Active status.

# Required Parameters
- `DirectoryId`: The Directory ID that will publish status messages to the SNS topic.
- `TopicName`: The SNS topic name to which the directory will publish status messages. This SNS topic must be in the same region as the specified Directory ID.

"""
register_event_topic(DirectoryId, TopicName; aws_config::AWSConfig=global_aws_config()) = directory_service("RegisterEventTopic", Dict{String, Any}("DirectoryId"=>DirectoryId, "TopicName"=>TopicName); aws_config=aws_config)
register_event_topic(DirectoryId, TopicName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("RegisterEventTopic", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "TopicName"=>TopicName), args)); aws_config=aws_config)

"""
    RejectSharedDirectory()

Rejects a directory sharing request that was sent from the directory owner account.

# Required Parameters
- `SharedDirectoryId`: Identifier of the shared directory in the directory consumer account. This identifier is different for each directory owner account.

"""
reject_shared_directory(SharedDirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("RejectSharedDirectory", Dict{String, Any}("SharedDirectoryId"=>SharedDirectoryId); aws_config=aws_config)
reject_shared_directory(SharedDirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("RejectSharedDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("SharedDirectoryId"=>SharedDirectoryId), args)); aws_config=aws_config)

"""
    RemoveIpRoutes()

Removes IP address blocks from a directory.

# Required Parameters
- `CidrIps`: IP address blocks that you want to remove.
- `DirectoryId`: Identifier (ID) of the directory from which you want to remove the IP addresses.

"""
remove_ip_routes(CidrIps, DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("RemoveIpRoutes", Dict{String, Any}("CidrIps"=>CidrIps, "DirectoryId"=>DirectoryId); aws_config=aws_config)
remove_ip_routes(CidrIps, DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("RemoveIpRoutes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("CidrIps"=>CidrIps, "DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    RemoveRegion()

Stops all replication and removes the domain controllers from the specified Region. You cannot remove the primary Region with this operation. Instead, use the DeleteDirectory API.

# Required Parameters
- `DirectoryId`: The identifier of the directory for which you want to remove Region replication.

"""
remove_region(DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("RemoveRegion", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
remove_region(DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("RemoveRegion", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    RemoveTagsFromResource()

Removes tags from a directory.

# Required Parameters
- `ResourceId`: Identifier (ID) of the directory from which to remove the tag.
- `TagKeys`: The tag key (name) of the tag to be removed.

"""
remove_tags_from_resource(ResourceId, TagKeys; aws_config::AWSConfig=global_aws_config()) = directory_service("RemoveTagsFromResource", Dict{String, Any}("ResourceId"=>ResourceId, "TagKeys"=>TagKeys); aws_config=aws_config)
remove_tags_from_resource(ResourceId, TagKeys, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("RemoveTagsFromResource", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ResourceId"=>ResourceId, "TagKeys"=>TagKeys), args)); aws_config=aws_config)

"""
    ResetUserPassword()

Resets the password for any user in your AWS Managed Microsoft AD or Simple AD directory. You can reset the password for any user in your directory with the following exceptions:   For Simple AD, you cannot reset the password for any user that is a member of either the Domain Admins or Enterprise Admins group except for the administrator user.   For AWS Managed Microsoft AD, you can only reset the password for a user that is in an OU based off of the NetBIOS name that you typed when you created your directory. For example, you cannot reset the password for a user in the AWS Reserved OU. For more information about the OU structure for an AWS Managed Microsoft AD directory, see What Gets Created in the AWS Directory Service Administration Guide.

# Required Parameters
- `DirectoryId`: Identifier of the AWS Managed Microsoft AD or Simple AD directory in which the user resides.
- `NewPassword`: The new password that will be reset.
- `UserName`: The user name of the user whose password will be reset.

"""
reset_user_password(DirectoryId, NewPassword, UserName; aws_config::AWSConfig=global_aws_config()) = directory_service("ResetUserPassword", Dict{String, Any}("DirectoryId"=>DirectoryId, "NewPassword"=>NewPassword, "UserName"=>UserName); aws_config=aws_config)
reset_user_password(DirectoryId, NewPassword, UserName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("ResetUserPassword", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "NewPassword"=>NewPassword, "UserName"=>UserName), args)); aws_config=aws_config)

"""
    RestoreFromSnapshot()

Restores a directory using an existing directory snapshot. When you restore a directory from a snapshot, any changes made to the directory after the snapshot date are overwritten. This action returns as soon as the restore operation is initiated. You can monitor the progress of the restore operation by calling the DescribeDirectories operation with the directory identifier. When the DirectoryDescription.Stage value changes to Active, the restore operation is complete.

# Required Parameters
- `SnapshotId`: The identifier of the snapshot to restore from.

"""
restore_from_snapshot(SnapshotId; aws_config::AWSConfig=global_aws_config()) = directory_service("RestoreFromSnapshot", Dict{String, Any}("SnapshotId"=>SnapshotId); aws_config=aws_config)
restore_from_snapshot(SnapshotId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("RestoreFromSnapshot", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("SnapshotId"=>SnapshotId), args)); aws_config=aws_config)

"""
    ShareDirectory()

Shares a specified directory (DirectoryId) in your AWS account (directory owner) with another AWS account (directory consumer). With this operation you can use your directory from any AWS account and from any Amazon VPC within an AWS Region. When you share your AWS Managed Microsoft AD directory, AWS Directory Service creates a shared directory in the directory consumer account. This shared directory contains the metadata to provide access to the directory within the directory owner account. The shared directory is visible in all VPCs in the directory consumer account. The ShareMethod parameter determines whether the specified directory can be shared between AWS accounts inside the same AWS organization (ORGANIZATIONS). It also determines whether you can share the directory with any other AWS account either inside or outside of the organization (HANDSHAKE). The ShareNotes parameter is only used when HANDSHAKE is called, which sends a directory sharing request to the directory consumer.

# Required Parameters
- `DirectoryId`: Identifier of the AWS Managed Microsoft AD directory that you want to share with other AWS accounts.
- `ShareMethod`: The method used when sharing a directory to determine whether the directory should be shared within your AWS organization (ORGANIZATIONS) or with any AWS account by sending a directory sharing request (HANDSHAKE).
- `ShareTarget`: Identifier for the directory consumer account with whom the directory is to be shared.

# Optional Parameters
- `ShareNotes`: A directory share request that is sent by the directory owner to the directory consumer. The request includes a typed message to help the directory consumer administrator determine whether to approve or reject the share invitation.
"""
share_directory(DirectoryId, ShareMethod, ShareTarget; aws_config::AWSConfig=global_aws_config()) = directory_service("ShareDirectory", Dict{String, Any}("DirectoryId"=>DirectoryId, "ShareMethod"=>ShareMethod, "ShareTarget"=>ShareTarget); aws_config=aws_config)
share_directory(DirectoryId, ShareMethod, ShareTarget, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("ShareDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "ShareMethod"=>ShareMethod, "ShareTarget"=>ShareTarget), args)); aws_config=aws_config)

"""
    StartSchemaExtension()

Applies a schema extension to a Microsoft AD directory.

# Required Parameters
- `CreateSnapshotBeforeSchemaExtension`: If true, creates a snapshot of the directory before applying the schema extension.
- `Description`: A description of the schema extension.
- `DirectoryId`: The identifier of the directory for which the schema extension will be applied to.
- `LdifContent`: The LDIF file represented as a string. To construct the LdifContent string, precede each line as it would be formatted in an ldif file with n. See the example request below for more details. The file size can be no larger than 1MB.

"""
start_schema_extension(CreateSnapshotBeforeSchemaExtension, Description, DirectoryId, LdifContent; aws_config::AWSConfig=global_aws_config()) = directory_service("StartSchemaExtension", Dict{String, Any}("CreateSnapshotBeforeSchemaExtension"=>CreateSnapshotBeforeSchemaExtension, "Description"=>Description, "DirectoryId"=>DirectoryId, "LdifContent"=>LdifContent); aws_config=aws_config)
start_schema_extension(CreateSnapshotBeforeSchemaExtension, Description, DirectoryId, LdifContent, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("StartSchemaExtension", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("CreateSnapshotBeforeSchemaExtension"=>CreateSnapshotBeforeSchemaExtension, "Description"=>Description, "DirectoryId"=>DirectoryId, "LdifContent"=>LdifContent), args)); aws_config=aws_config)

"""
    UnshareDirectory()

Stops the directory sharing between the directory owner and consumer accounts.

# Required Parameters
- `DirectoryId`: The identifier of the AWS Managed Microsoft AD directory that you want to stop sharing.
- `UnshareTarget`: Identifier for the directory consumer account with whom the directory has to be unshared.

"""
unshare_directory(DirectoryId, UnshareTarget; aws_config::AWSConfig=global_aws_config()) = directory_service("UnshareDirectory", Dict{String, Any}("DirectoryId"=>DirectoryId, "UnshareTarget"=>UnshareTarget); aws_config=aws_config)
unshare_directory(DirectoryId, UnshareTarget, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("UnshareDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "UnshareTarget"=>UnshareTarget), args)); aws_config=aws_config)

"""
    UpdateConditionalForwarder()

Updates a conditional forwarder that has been set up for your AWS directory.

# Required Parameters
- `DirectoryId`: The directory ID of the AWS directory for which to update the conditional forwarder.
- `DnsIpAddrs`: The updated IP addresses of the remote DNS server associated with the conditional forwarder.
- `RemoteDomainName`: The fully qualified domain name (FQDN) of the remote domain with which you will set up a trust relationship.

"""
update_conditional_forwarder(DirectoryId, DnsIpAddrs, RemoteDomainName; aws_config::AWSConfig=global_aws_config()) = directory_service("UpdateConditionalForwarder", Dict{String, Any}("DirectoryId"=>DirectoryId, "DnsIpAddrs"=>DnsIpAddrs, "RemoteDomainName"=>RemoteDomainName); aws_config=aws_config)
update_conditional_forwarder(DirectoryId, DnsIpAddrs, RemoteDomainName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("UpdateConditionalForwarder", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "DnsIpAddrs"=>DnsIpAddrs, "RemoteDomainName"=>RemoteDomainName), args)); aws_config=aws_config)

"""
    UpdateNumberOfDomainControllers()

Adds or removes domain controllers to or from the directory. Based on the difference between current value and new value (provided through this API call), domain controllers will be added or removed. It may take up to 45 minutes for any new domain controllers to become fully active once the requested number of domain controllers is updated. During this time, you cannot make another update request.

# Required Parameters
- `DesiredNumber`: The number of domain controllers desired in the directory.
- `DirectoryId`: Identifier of the directory to which the domain controllers will be added or removed.

"""
update_number_of_domain_controllers(DesiredNumber, DirectoryId; aws_config::AWSConfig=global_aws_config()) = directory_service("UpdateNumberOfDomainControllers", Dict{String, Any}("DesiredNumber"=>DesiredNumber, "DirectoryId"=>DirectoryId); aws_config=aws_config)
update_number_of_domain_controllers(DesiredNumber, DirectoryId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("UpdateNumberOfDomainControllers", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DesiredNumber"=>DesiredNumber, "DirectoryId"=>DirectoryId), args)); aws_config=aws_config)

"""
    UpdateRadius()

Updates the Remote Authentication Dial In User Service (RADIUS) server information for an AD Connector or Microsoft AD directory.

# Required Parameters
- `DirectoryId`: The identifier of the directory for which to update the RADIUS server information.
- `RadiusSettings`: A RadiusSettings object that contains information about the RADIUS server.

"""
update_radius(DirectoryId, RadiusSettings; aws_config::AWSConfig=global_aws_config()) = directory_service("UpdateRadius", Dict{String, Any}("DirectoryId"=>DirectoryId, "RadiusSettings"=>RadiusSettings); aws_config=aws_config)
update_radius(DirectoryId, RadiusSettings, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("UpdateRadius", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "RadiusSettings"=>RadiusSettings), args)); aws_config=aws_config)

"""
    UpdateTrust()

Updates the trust that has been set up between your AWS Managed Microsoft AD directory and an on-premises Active Directory.

# Required Parameters
- `TrustId`: Identifier of the trust relationship.

# Optional Parameters
- `SelectiveAuth`: Updates selective authentication for the trust.
"""
update_trust(TrustId; aws_config::AWSConfig=global_aws_config()) = directory_service("UpdateTrust", Dict{String, Any}("TrustId"=>TrustId); aws_config=aws_config)
update_trust(TrustId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("UpdateTrust", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TrustId"=>TrustId), args)); aws_config=aws_config)

"""
    VerifyTrust()

AWS Directory Service for Microsoft Active Directory allows you to configure and verify trust relationships. This action verifies a trust relationship between your AWS Managed Microsoft AD directory and an external domain.

# Required Parameters
- `TrustId`: The unique Trust ID of the trust relationship to verify.

"""
verify_trust(TrustId; aws_config::AWSConfig=global_aws_config()) = directory_service("VerifyTrust", Dict{String, Any}("TrustId"=>TrustId); aws_config=aws_config)
verify_trust(TrustId, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = directory_service("VerifyTrust", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TrustId"=>TrustId), args)); aws_config=aws_config)


text:
module CellListMap

using DocStringExtensions
using ProgressMeter
using Parameters
using StaticArrays
using Setfield
using Base.Threads
using LinearAlgebra: dot, norm, norm_sqr, cross

export Box
export CellList, UpdateCellList!
export map_pairwise!
export TriclinicCell
export OrthorhombicCell

include("./StructTypes.jl")
include("./CellOperations.jl")
include("./CoreComputing.jl")

"""

```
map_pairwise!(
  f::Function,
  output,
  box::Box,
  cl::CellList
  ;parallel::Bool=true,
  show_progress::Bool=false
)
```

This function will run over every pair of particles which are closer than
`box.cutoff` and compute the Euclidean distance between the particles,
considering the periodic boundary conditions given in the `Box` structure.
If the distance is smaller than the cutoff, a function `f` of the
coordinates of the two particles will be computed.

The function `f` receives six arguments as input:
```
f(x,y,i,j,d2,output)
```
Which are the coordinates of one particle, the coordinates of the
second particle, the index of the first particle, the index of the second
particle, the squared distance between them, and the `output` variable.
It has also to return the same `output` variable. Thus, `f` may or not
mutate `output`, but in either case it must return it. With that, it is
possible to compute an average property of the distance of the particles
or, for example, build a histogram. The squared distance `d2` is computed
internally for comparison with the
`cutoff`, and is passed to the `f` because many times it is used for the
desired computation.

## Example

Computing the mean absolute difference in `x` position between random particles, remembering the number of pairs of `n` particles is `n(n-1)/2`. The function does not use the indices or the distance, such that we remove them from the parameters by using a closure.

```julia-repl
julia> n = 100_000;

julia> box = Box([250,250,250],10);

julia> x = [ SVector{3,Float64}(sides .* rand(3)) for i in 1:n ];

julia> cl = CellList(x,box);

julia> f(x,y,sum_dx) = sum_dx + abs(x[1] - y[1])

julia> normalization = N / (N*(N-1)/2) # (number of particles) / (number of pairs)

julia> avg_dx = normalization * map_parwise!((x,y,i,j,d2,sum_dx) -> f(x,y,sum_dx), 0.0, box, cl)

```

"""
function map_pairwise!(f::F, output, box::Box, cl::CellList;
  # Parallelization options
  parallel::Bool=true,
  output_threaded=(parallel ? [ deepcopy(output) for i in 1:nthreads() ] : nothing),
  reduce::Function=reduce,
  show_progress::Bool=false,
) where {F} # Needed for specialization for this function (avoids some allocations)
  if parallel && nthreads() > 1
    output = map_pairwise_parallel!(f,output,box,cl;
      output_threaded=output_threaded,
      reduce=reduce,
      show_progress=show_progress
    )
  else
    output = map_pairwise_serial!(f,output,box,cl,show_progress=show_progress)
  end
  return output
end

"""

```
map_pairwise!(f::Function,output,box::Box,cl::CellListPair)
```

The same but to evaluate some function between pairs of the particles of the vectors.

"""
function map_pairwise!(f::F1, output, box::Box, cl::CellListPair;
  # Parallelization options
  parallel::Bool=true,
  output_threaded=(parallel ? [ deepcopy(output) for i in 1:nthreads() ] : nothing),
  reduce::F2=reduce,
  show_progress::Bool=false
) where {F1,F2} # Needed for specialization for this function (avoids some allocations)
  if cl.swap
    fswap(x,y,i,j,d2,output) = f(y,x,j,i,d2,output)
  else
    fswap = f
  end
  if parallel && nthreads() > 1
    output = map_pairwise_parallel!(fswap,output,box,cl;
      output_threaded=output_threaded,
      reduce=reduce,
      show_progress=show_progress
    )
  else
    output = map_pairwise_serial!(fswap,output,box,cl,show_progress=show_progress)
  end
  return output
end

#
# Test and example functions
#
include("./examples.jl")
include("./testing.jl")

end # module