text:
# test_flux.jl: test flux calculation

# logarithmic mean used by IR flux
function logmean(aL, aR)
  xi = aL/aR
  f = (xi - 1)/(xi + 1)
  u = f*f
  eps = 1e-2
  if ( u < eps)
    F = 1.0 + u/3.0 + u*u/5.0 + u*u*u/7.0
  else
    F = log(xi)/2.0/f
  end

  return (aL + aR)/(2*F)
end

"""
  Test that a flux is symmetric.  This is not a test function itself, but it
  is called by test functions

  if test_symmetry = false, then only consistency is tested
  if test_antisymmetry = true, test that reversing qL and qR and the sign
  of the normal vector produces the negative flux
"""
function test_symmetric_flux(functor, params, qL, qR, aux_vars, nrm, F_num, F_num2, F_euler; test_symmetry=true, test_antisymmetry=true)

  # test symmetry
  if test_symmetry
    functor(params, qL, qR, aux_vars, nrm, F_num)
    functor(params, qR, qL, aux_vars, nrm, F_num2)
    for i=1:length(F_num)
      @test isapprox( F_num[i], F_num2[i]) atol=1e-12
    end
  end

  # test anti-symmetry
  if test_antisymmetry
    functor(params, qL, qR, aux_vars, nrm, F_num)
    functor(params, qR, qL, aux_vars, -nrm, F_num2)
    for i=1:length(F_num)
      @test isapprox( F_num[i], -F_num2[i]) atol=1e-12
    end
  end

  # test consistency
  functor(params, qL, qL, aux_vars, nrm, F_num)
  for i=1:length(F_num)
    @test isapprox( F_num[i], F_euler[i])
  end

end

"""
  Test the multi-directional version of a flux function

  F_num is a vector of flux values from the 1 direction  version, F_num2
  is an array numDofPerNode x Tdim for the multi-directional flux
"""
function test_multiD_flux(functor, params, qL, qR, aux_vars, F_num, F_num2)

  if length(qL) == 4
    nrm = rand(2, 2)
    dim = 2
  else
    nrm = rand(3, 3)
    dim = 3
  end

  functor(params, qL, qR, aux_vars, nrm, F_num2)

  for i=1:dim
    functor(params, qL, qR, aux_vars, nrm[:, i], F_num)
    @test isapprox( F_num, F_num2[:, i])
  end

  return nothing
end

"""
  An inefficient version of the IR flux, used for comparison to the efficient
  version.
"""
function ir_flux(params, qL, qR, nrm)

  pL = EulerEquationMod.calcPressure(params, qL)
  pR = EulerEquationMod.calcPressure(params, qR)
  z5_ln = logmean(sqrt(qL[1]*pL), sqrt(qR[1]*pR))
  rho_hat = 0.5*(sqrt(qL[1]/pL) + sqrt(qR[1]/pR))*z5_ln

  z1L = sqrt(qL[1]/pL); z1R = sqrt(qR[1]/pR)
  z1_avg = 0.5*( z1L + z1R )

  u_hat = 0.5*(z1L*qL[2]/qL[1] + z1R*qR[2]/qR[1])/z1_avg
  v_hat = 0.5*(z1L*qL[3]/qL[1] + z1R*qR[3]/qR[1])/z1_avg

  p1_hat = 0.5*( sqrt(qL[1]*pL) + sqrt(qR[1]*pR) )/z1_avg
  z1_ln = logmean(sqrt(qL[1]/pL), sqrt(qR[1]/pR))

  p2_hat = (params.gamma + 1)*z5_ln/(2*params.gamma*z1_ln) + params.gamma_1*0.5*(sqrt(qL[1]*pL) + sqrt(qR[1]*pR))/(2*params.gamma*z1_avg)
  h_hat = params.gamma*p2_hat/(rho_hat*params.gamma_1) + 0.5*(u_hat*u_hat + v_hat*v_hat)

  fx = [rho_hat*u_hat, rho_hat*u_hat*u_hat + p1_hat, rho_hat*u_hat*v_hat, rho_hat*u_hat*h_hat]
  fy = [rho_hat*v_hat, rho_hat*u_hat*v_hat, rho_hat*v_hat*v_hat + p1_hat, rho_hat*v_hat*h_hat]

  return fx*nrm[1] + fy*nrm[2]

end

"""
  Test calculation of numerical flux functions in 2D
"""
function test_flux_2d()
  fname = "input_vals_channel_dg.jl"
  mesh, sbp, eqn, opts = solvePDE(fname)

  @testset "----- Testing 2D Numerical Fluxes -----" begin

    qL = [1.0, 2.0, 3.0, 7.0]
    qR = qL + 1

    F_euler = zeros(qL)
    F_num = zeros(F_euler)
    F_num2 = zeros(F_euler)
    F_numD = zeros(4, 2)

    aux_vars = zeros(1)
    aux_vars[1] = EulerEquationMod.calcPressure(eqn.params, qL)

    nrm = [1.0, 1]

    # get the euler flux
    EulerEquationMod.calcEulerFlux(eqn.params, qL, aux_vars, nrm, F_euler)

    functor = EulerEquationMod.FluxDict["StandardFlux"]
    test_symmetric_flux(functor, eqn.params, qL, qR, aux_vars, nrm, F_num, F_num2, F_euler)
    test_multiD_flux(functor, eqn.params, qL, qR, aux_vars, F_num, F_numD)

    functor = EulerEquationMod.FluxDict["DucrosFlux"]
    test_symmetric_flux(functor, eqn.params, qL, qR, aux_vars, nrm, F_num, F_num2, F_euler)

    functor = EulerEquationMod.FluxDict["LFFlux"]
    test_symmetric_flux(functor, eqn.params, qL, qR, aux_vars, nrm, F_num, F_num2, F_euler, test_symmetry=false)

    functor = EulerEquationMod.FluxDict["IRFlux"]
    test_symmetric_flux(functor, eqn.params, qL, qR, aux_vars, nrm, F_num, F_num2, F_euler)
    test_multiD_flux(functor, eqn.params, qL, qR, aux_vars, F_num, F_numD)

    functor = EulerEquationMod.FluxDict["HLLFlux"]
    test_symmetric_flux(functor, eqn.params, qL, qR, aux_vars, nrm, F_num, F_num2, F_euler; test_symmetry=false)

    # test against calculated solution
    functor = EulerEquationMod.FluxDict["IRFlux"]
    nrm = [1., 2.0]
    flux_test = ir_flux(eqn.params, qL, qR, nrm)

    F_code = zeros(4)
    functor(eqn.params, qL, qR, aux_vars, nrm, F_code)
    @test isapprox( F_code, flux_test) atol=1e-12

    # test calculating -Q*f = -(2*S_ij f_star_ij + Eij*f_star_ij)
    # set eqn.q to something interesting
    ic_func = EulerEquationMod.ICDict["ICExp"]
    ic_func(mesh, sbp, eqn, opts, eqn.q_vec)

    array1DTo3D(mesh, sbp, eqn, opts, eqn.q_vec, eqn.q)
    fill!(eqn.res, 0.0)
    EulerEquationMod.calcVolumeIntegralsSplitForm(mesh, sbp, eqn, opts, eqn.volume_flux_func)
    res_split = copy(eqn.res)

    fill!(eqn.res, 0.0)

    # test that the curvilinear version is consistent with the regular one
    # for straight sided elements
    EulerEquationMod.calcVolumeIntegralsSplitFormCurvilinear(mesh, sbp, eqn, opts, eqn.volume_flux_func)

    for i=1:mesh.numEl
      for j=1:mesh.numNodesPerElement
        for p=1:mesh.numDofPerNode
          @test isapprox( eqn.res[p, j, i], res_split[p, j, i]) atol=1e-12
        end
      end
    end

    fill!(eqn.res, 0.0)

    # check that 1^T * volume integrals using S * F_Star * 1 == 0, because
    # S is skew symmetric and F_star is symmetric
    for i=1:mesh.numEl
      val = sum(res_split[:, :, i])
      @test isapprox( val, 0.0) atol=1e-13
    end

    opts["Q_transpose"] = false
    EulerEquationMod.getEulerFlux(mesh, sbp, eqn, opts)
    EulerEquationMod.evalVolumeIntegrals(mesh, sbp, eqn, opts)
    opts["Q_transpose"] = true

    @test ( eqn.volume_flux_func )== EulerEquationMod.FluxDict["StandardFlux"]
    E = zeros(sbp.Q)
    for dim=1:2
      E[:, :, dim] = sbp.Q[:, :, dim] + sbp.Q[:, :, dim].'
    end
    F_tmp = zeros(4)
    for i=1:mesh.numEl
      for j=1:mesh.numNodesPerElement
        q_j = sview(eqn.q, :, j, i)
        aux_vars = sview(eqn.aux_vars, :, j, i)
        for k=1:mesh.numNodesPerElement
          q_k = sview(eqn.q, :, k, i)
          for dim=1:2
            nrm = vec(mesh.dxidx[dim, :, j, i])
            EulerEquationMod.calcEulerFlux_standard(eqn.params, q_j, q_k, aux_vars, nrm, F_tmp)
            res_split[:, j, i] -= E[j, k, dim]*F_tmp
          end
        end
      end
    end

    for i=1:mesh.numEl
      for j=1:mesh.numNodesPerElement
        for k=1:size(res_split, 1)
          @test isapprox( res_split[k, j, i], eqn.res[k, j, i]) atol=1e-12
        end
      end
    end

    # test that constant field -> 0 residual
    ic_func = EulerEquationMod.ICDict[opts["IC_name"]]
    ic_func(mesh, sbp, eqn, opts, eqn.q_vec)
    array1DTo3D(mesh, sbp, eqn, opts, eqn.q_vec, eqn.q)

    fill!(eqn.res, 0.0)
    opts["volume_integral_type"] = 2
    opts["Volume_flux_name"] = "IRFlux"
    EulerEquationMod.init(mesh, sbp, eqn, opts)
    EulerEquationMod.evalResidual(mesh, sbp, eqn, opts)
    for i=1:mesh.numEl
      for j=1:mesh.numNodesPerElement
        for k=1:mesh.numDofPerNode
          @test isapprox( eqn.res[k, j, i], 0.0) atol=1e-12
        end
      end
    end

    # test non-precomputed flux version of functions
    ic_func = EulerEquationMod.ICDict["ICExp"]
    ic_func(mesh, sbp, eqn, opts, eqn.q_vec)
    array1DTo3D(mesh, sbp, eqn, opts, eqn.q_vec, eqn.q)

    # test volume integrals
    fill!(eqn.res, 0.0)
    EulerEquationMod.dataPrep(mesh, sbp, eqn, opts)
    EulerEquationMod.evalVolumeIntegrals(mesh, sbp, eqn, opts)
    res_orig = copy(eqn.res)

    fill!(eqn.res, 0.0)
    opts["precompute_volume_flux"] = false
    EulerEquationMod.evalVolumeIntegrals(mesh, sbp, eqn, opts)

    @test isapprox( norm(vec(eqn.res - res_orig)), 0.0) atol=1e-13

    # test face integrals
    opts["precompute_volume_flux"] = true # reset, to avoid failure cascade
    fill!(eqn.res, 0.0)
    EulerEquationMod.dataPrep(mesh, sbp, eqn, opts)
    EulerEquationMod.evalFaceIntegrals(mesh, sbp, eqn, opts)
    res_orig = copy(eqn.res)

    fill!(eqn.res, 0.0)
    opts["precompute_face_flux"] = false
    EulerEquationMod.evalFaceIntegrals(mesh, sbp, eqn, opts)

    @test isapprox( norm(vec(eqn.res - res_orig)), 0.0) atol=1e-13

    # test face integrals
    opts["precompute_face_flux"] = true # reset, to avoid failure cascade
    fill!(eqn.res, 0.0)
    EulerEquationMod.dataPrep(mesh, sbp, eqn, opts)
    EulerEquationMod.evalBoundaryIntegrals(mesh, sbp, eqn, opts)
    res_orig = copy(eqn.res)

    fill!(eqn.res, 0.0)
    opts["precompute_face_flux"] = false
    EulerEquationMod.evalBoundaryIntegrals(mesh, sbp, eqn, opts)

    @test isapprox( norm(vec(eqn.res - res_orig)), 0.0) atol=1e-13

    testRoe(mesh, sbp, eqn, opts, "RoeFlux")
    testRoe(mesh, sbp, eqn, opts, "HLLFlux")

  end  # end facts block

  return nothing
end  # end function

#test_flux_2d()
add_func1!(EulerTests, test_flux_2d, [TAG_VOLUMEINTEGRALS, TAG_FLUX, TAG_CURVILINEAR, TAG_SHORTTEST])

"""
  Test the Roe solver.  This function is called by test_flux_2d()
"""
function testRoe(mesh, sbp, eqn, opts, func_name)

  if mesh.numDofPerNode == 4
    qL = [1.0, 2.0, 3.0, 7.0]
    qR = qL + 1
    nrm = [1.0, 0.0]
  else
    qL =  [1., 2, 3, 4, 15]
    qR =  qL + 1
    nrm = [1.0, 0.0, 0.0]
  end

  aux_vars = [EulerEquationMod.calcPressure(eqn.params, qL)]
  flux = zeros(mesh.numDofPerNode)
  flux2 = zeros(flux)

  # qL and qR have all positive eigenvalues, so the Roe solver should use
  # the left state only

  functor = EulerEquationMod.FluxDict[func_name]

  functor(eqn.params, qL, qR, aux_vars, nrm, flux)
  EulerEquationMod.calcEulerFlux(eqn.params, qL, aux_vars, nrm, flux2)
  @test isapprox( norm(flux - flux2), 0.0) atol=1e-13

  # right state only
  functor(eqn.params, qR, qL, aux_vars, nrm, flux)
  EulerEquationMod.calcEulerFlux(eqn.params, qR, aux_vars, nrm, flux2)
  @test isapprox( norm(flux - flux2), 0.0) atol=1e-13

  # reverse states, reverse norm -> negative flux
  functor(eqn.params, qL, qR, aux_vars, -nrm, flux2)
  @test isapprox( norm(flux + flux2), 0.0) atol=1e-13

  # indefinite flux jacobian
  if mesh.numDofPerNode == 4
    qL = [1.0, 1.0, 1.0, 7.0]
    qR = qL + 1
    nrm = [1.0, 0.0]
  else
    qL =  [1., 1, 1, 1, 15]
    qR =  qL + 1
    nrm = [1.0, 0.0, 0.0]
  end

  functor(eqn.params, qL, qR, aux_vars, nrm, flux)
  functor(eqn.params, qR, qL, aux_vars, -nrm, flux2)
  @test isapprox( norm(flux + flux2), 0.0) atol=1e-13

  return nothing
end

function test_wave_speeds(params, qL, qR, nrm)

  sL, sR = EulerEquationMod.calc2RWaveSpeeds(params, qL, qR, nrm)
  lambdaL = EulerEquationMod.getLambdaMax(params, qL, nrm)

end

"""
  Test calculation of numerical flux functions in 3D
"""
function test_flux_3d()
  # test 3D
  fname = "input_vals_3d.jl"
  mesh, sbp, eqn, opts = solvePDE(fname)
  @testset "----- testing 3D  Numerical Fluxes -----" begin

    qL =  [1., 2, 3, 4, 15]
    qR =  qL + 1
    F_euler = zeros(qL)
    F_num = zeros(F_euler)
    F_num2 = zeros(F_euler)
    F_numD = zeros(eltype(F_euler), length(F_euler), 3)
    nrm = [1., 1, 1]

    aux_vars = zeros(1)
    aux_vars[1] = EulerEquationMod.calcPressure(eqn.params, qL)

    # get the euler flux
    EulerEquationMod.calcEulerFlux(eqn.params, qL, aux_vars, nrm, F_euler)
    aux_vars[1] = EulerEquationMod.calcPressure(eqn.params, qL)
    functor = EulerEquationMod.FluxDict["StandardFlux"]
    test_symmetric_flux(functor, eqn.params, qL, qR, aux_vars, nrm, F_num, F_num2, F_euler)
    test_multiD_flux(functor, eqn.params, qL, qR, aux_vars, F_num, F_numD)

    functor = EulerEquationMod.FluxDict["DucrosFlux"]
    test_symmetric_flux(functor, eqn.params, qL, qR, aux_vars, nrm, F_num, F_num2, F_euler)

    functor = EulerEquationMod.FluxDict["IRFlux"]
    test_symmetric_flux(functor, eqn.params, qL, qR, aux_vars, nrm, F_num, F_num2, F_euler)
    test_multiD_flux(functor, eqn.params, qL, qR, aux_vars, F_num, F_numD)

    # test calculating -Q*f = -(2*S_ij f_star_ij + Eij*f_star_ij)
    fill!(eqn.res, 0.0)
    EulerEquationMod.calcVolumeIntegralsSplitForm(mesh, sbp, eqn, opts, eqn.volume_flux_func)
    res_split = copy(eqn.res)
    fill!(eqn.res, 0.0)

    opts["Q_transpose"] = false
    EulerEquationMod.getEulerFlux(mesh, sbp, eqn, opts)
    EulerEquationMod.evalVolumeIntegrals(mesh, sbp, eqn, opts)
    opts["Q_transpose"] = true

    E = zeros(sbp.Q)
    for dim=1:3
      E[:, :, dim] = sbp.Q[:, :, dim] + sbp.Q[:, :, dim].'
    end
    F_tmp = zeros(5)
    for i=1:mesh.numEl
      for j=1:mesh.numNodesPerElement
        q_j = sview(eqn.q, :, j, i)
        aux_vars = sview(eqn.aux_vars, :, j, i)
        for k=1:mesh.numNodesPerElement
          q_k = sview(eqn.q, :, k, i)
          for dim=1:3
            nrm = vec(mesh.dxidx[dim, :, j, i])
            EulerEquationMod.calcEulerFlux_standard(eqn.params, q_j, q_k, aux_vars, nrm, F_tmp)
            res_split[:, j, i] -= E[j, k, dim]*F_tmp
          end
        end
      end
    end

    for i=1:mesh.numEl
      for j=1:mesh.numNodesPerElement
        for k=1:size(res_split, 1)
          @test isapprox( res_split[k, j, i], eqn.res[k, j, i]) atol=1e-12
        end
      end
    end

    testRoe(mesh, sbp, eqn, opts, "RoeFlux")
  end  # end facts block

  return nothing
end

#test_flux_3d()
add_func1!(EulerTests, test_flux_3d, [TAG_VOLUMEINTEGRALS, TAG_FLUX, TAG_SHORTTEST])


text:
# Some generic operators

"The generic identity operator does nothing to the function it is applied to."
struct GenericIdentityOperator <: AbstractOperator
    src_space   ::  FunctionSpace
end

src_space(op::GenericIdentityOperator) = op.src_space
dest_space(op::GenericIdentityOperator) = src_space(op)

apply(op::GenericIdentityOperator, fun; opts...) = fun

struct GenericScalingOperator <: AbstractOperator
    src_space   ::  FunctionSpace
    scalar      ::  Number
end

src_space(op::GenericScalingOperator) = op.src_space
dest_space(op::GenericScalingOperator) = src_space(op)

scalar(op::GenericScalingOperator) = op.scalar

apply(op::GenericScalingOperator, fun; opts...) = apply(scalar(op),fun)
apply(a::Number, f::Function) = (x->a*f(x))
apply(a::Number, f) = a*f

(*)(a::Number, op::AbstractOperator) = GenericScalingOperator(dest_space(op), a)*op
(*)(op::AbstractOperator, a::Number) = GenericScalingOperator(dest_space(op), a)*op
(*)(op::GenericScalingOperator, I::GenericIdentityOperator) = op
(*)(I::GenericIdentityOperator, op::GenericScalingOperator) = op
(-)(op::AbstractOperator) = (-1)*op

struct GenericSumOperator <: AbstractOperator
    op1   ::    AbstractOperator
    op2   ::    AbstractOperator
end

src_space(op::GenericSumOperator) = src_space(op.op1)
dest_space(op::GenericSumOperator) = dest_space(op.op1)

components(op::GenericSumOperator) = (op1,op2)

apply(op::GenericSumOperator, fun; opts...) = apply(op.op1,fun; opts...) + apply(op.op2,fun; opts...)

scalar(U::UniformScaling) = scalar(U,U.λ)
scalar(::UniformScaling, ::Bool) = 1
scalar(::UniformScaling, a) = a

(+)(op1::AbstractOperator, op2::AbstractOperator) = GenericSumOperator(op1,op2)
(-)(op1::AbstractOperator, op2::AbstractOperator) = GenericSumOperator(op1,-op2)
(+)(I1::UniformScaling, op2::AbstractOperator) = (+)(GenericScalingOperator(dest_space(op2),scalar(I1)), op2)
(-)(I1::UniformScaling, op2::AbstractOperator) = (-)(GenericScalingOperator(dest_space(op2),scalar(I1)), op2)
(+)(op1::BasisFunctions.AbstractOperator, I2::UniformScaling) = (+)(op1, GenericScalingOperator(dest_space(op1),scalar(I2)))
(-)(op1::BasisFunctions.AbstractOperator, I2::UniformScaling) = (-)(op1, GenericScalingOperator(dest_space(op1),scalar(I2)))

ext: jl


text:
#!/usr/bin/env julia
import Pkg;
println("Installing dependencies for the model.");
Pkg.add("Languages");
Pkg.add("TextAnalysis");
Pkg.add("BSON");
Pkg.add("Flux");
Pkg.add("PyPlot");
Pkg.add("Statistics");
Pkg.add("MLDataUtils");
Pkg.add("Embeddings")
Pkg.add("MLLabelUtils");
Pkg.add("Parameters");
println("Finished adding packages.");

max_stars_repo_name: akaysh/Rango

max_issues_repo_name: akaysh/Rango

max_forks_repo_name: akaysh/Rango


text:
using DataStructures

abstract type AbstractResourcePool{T} end

struct ResourcePool{T} <: AbstractResourcePool{T}
    pool::Queue{T}
    function ResourcePool{T}(size::Int, create_resource::Function) where T
        pool = Queue{T}()
        for i = 1:size
            enqueue!(pool, create_resource())
        end
        new{T}(pool)
    end
end

length(p::AbstractResourcePool) = length(p.pool)

function take!(p::AbstractResourcePool{T}) where T
    if length(p) < 1
        throw(ArgumentError("$p is empty!"))
    end
    function dispose(r)
        @debug "Returning $(resource(r)) to $(p)"
        enqueue!(p.pool, resource(r))
    end
    r = dequeue!(p.pool)
    if T <: DenseArray
        PooledArray(r, dispose)
    elseif T <: AbstractArray
        PooledAbstractArray(r, dispose)
    else
        PooledResource(r, dispose)
    end
end


text:
# for LogicoMagica.jl

##文法
const は=:は
const が=:が
const を=:を
const に=:に
const の=:の

const です=:です
const でない=:でない
const 持っている=:持っている
const 好き=:好き
const 望み=:望み
const 叶える=:叶える
const 作る=:作る
const なる=:なる
const 持つ=:持つ
const 話す=:話す
const 住む=:住む
const 食べる=:食べる
const 濁っている=:濁っている
const きれい=:きれい

const 誰=:誰
const 何=:何
const 何処=:何処

qvar=[誰 何 何処]

max_stars_repo_name: sazare/cheapViews

max_issues_repo_name: sazare/cheapViews

max_forks_repo_name: sazare/cheapViews


text:
# This file was generated by the Julia Swagger Code Generator
# Do not modify this file directly. Modify the swagger specification instead.

mutable struct ApplicationGatewayPropertiesFormat <: SwaggerModel
    sku::Any # spec type: Union{ Nothing, ApplicationGatewaySku } # spec name: sku
    sslPolicy::Any # spec type: Union{ Nothing, ApplicationGatewaySslPolicy } # spec name: sslPolicy
    operationalState::Any # spec type: Union{ Nothing, String } # spec name: operationalState
    gatewayIPConfigurations::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayIPConfiguration} } # spec name: gatewayIPConfigurations
    authenticationCertificates::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayAuthenticationCertificate} } # spec name: authenticationCertificates
    trustedRootCertificates::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayTrustedRootCertificate} } # spec name: trustedRootCertificates
    sslCertificates::Any # spec type: Union{ Nothing, Vector{ApplicationGatewaySslCertificate} } # spec name: sslCertificates
    frontendIPConfigurations::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayFrontendIPConfiguration} } # spec name: frontendIPConfigurations
    frontendPorts::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayFrontendPort} } # spec name: frontendPorts
    probes::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayProbe} } # spec name: probes
    backendAddressPools::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayBackendAddressPool} } # spec name: backendAddressPools
    backendHttpSettingsCollection::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayBackendHttpSettings} } # spec name: backendHttpSettingsCollection
    httpListeners::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayHttpListener} } # spec name: httpListeners
    urlPathMaps::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayUrlPathMap} } # spec name: urlPathMaps
    requestRoutingRules::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayRequestRoutingRule} } # spec name: requestRoutingRules
    rewriteRuleSets::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayRewriteRuleSet} } # spec name: rewriteRuleSets
    redirectConfigurations::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayRedirectConfiguration} } # spec name: redirectConfigurations
    webApplicationFirewallConfiguration::Any # spec type: Union{ Nothing, ApplicationGatewayWebApplicationFirewallConfiguration } # spec name: webApplicationFirewallConfiguration
    firewallPolicy::Any # spec type: Union{ Nothing, SubResource } # spec name: firewallPolicy
    enableHttp2::Any # spec type: Union{ Nothing, Bool } # spec name: enableHttp2
    enableFips::Any # spec type: Union{ Nothing, Bool } # spec name: enableFips
    autoscaleConfiguration::Any # spec type: Union{ Nothing, ApplicationGatewayAutoscaleConfiguration } # spec name: autoscaleConfiguration
    privateLinkConfigurations::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayPrivateLinkConfiguration} } # spec name: privateLinkConfigurations
    privateEndpointConnections::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayPrivateEndpointConnection} } # spec name: privateEndpointConnections
    resourceGuid::Any # spec type: Union{ Nothing, String } # spec name: resourceGuid
    provisioningState::Any # spec type: Union{ Nothing, ProvisioningState } # spec name: provisioningState
    customErrorConfigurations::Any # spec type: Union{ Nothing, Vector{ApplicationGatewayCustomError} } # spec name: customErrorConfigurations
    forceFirewallPolicyAssociation::Any # spec type: Union{ Nothing, Bool } # spec name: forceFirewallPolicyAssociation

    function ApplicationGatewayPropertiesFormat(;sku=nothing, sslPolicy=nothing, operationalState=nothing, gatewayIPConfigurations=nothing, authenticationCertificates=nothing, trustedRootCertificates=nothing, sslCertificates=nothing, frontendIPConfigurations=nothing, frontendPorts=nothing, probes=nothing, backendAddressPools=nothing, backendHttpSettingsCollection=nothing, httpListeners=nothing, urlPathMaps=nothing, requestRoutingRules=nothing, rewriteRuleSets=nothing, redirectConfigurations=nothing, webApplicationFirewallConfiguration=nothing, firewallPolicy=nothing, enableHttp2=nothing, enableFips=nothing, autoscaleConfiguration=nothing, privateLinkConfigurations=nothing, privateEndpointConnections=nothing, resourceGuid=nothing, provisioningState=nothing, customErrorConfigurations=nothing, forceFirewallPolicyAssociation=nothing)
        o = new()
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("sku"), sku)
        setfield!(o, Symbol("sku"), sku)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("sslPolicy"), sslPolicy)
        setfield!(o, Symbol("sslPolicy"), sslPolicy)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("operationalState"), operationalState)
        setfield!(o, Symbol("operationalState"), operationalState)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("gatewayIPConfigurations"), gatewayIPConfigurations)
        setfield!(o, Symbol("gatewayIPConfigurations"), gatewayIPConfigurations)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("authenticationCertificates"), authenticationCertificates)
        setfield!(o, Symbol("authenticationCertificates"), authenticationCertificates)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("trustedRootCertificates"), trustedRootCertificates)
        setfield!(o, Symbol("trustedRootCertificates"), trustedRootCertificates)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("sslCertificates"), sslCertificates)
        setfield!(o, Symbol("sslCertificates"), sslCertificates)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("frontendIPConfigurations"), frontendIPConfigurations)
        setfield!(o, Symbol("frontendIPConfigurations"), frontendIPConfigurations)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("frontendPorts"), frontendPorts)
        setfield!(o, Symbol("frontendPorts"), frontendPorts)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("probes"), probes)
        setfield!(o, Symbol("probes"), probes)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("backendAddressPools"), backendAddressPools)
        setfield!(o, Symbol("backendAddressPools"), backendAddressPools)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("backendHttpSettingsCollection"), backendHttpSettingsCollection)
        setfield!(o, Symbol("backendHttpSettingsCollection"), backendHttpSettingsCollection)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("httpListeners"), httpListeners)
        setfield!(o, Symbol("httpListeners"), httpListeners)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("urlPathMaps"), urlPathMaps)
        setfield!(o, Symbol("urlPathMaps"), urlPathMaps)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("requestRoutingRules"), requestRoutingRules)
        setfield!(o, Symbol("requestRoutingRules"), requestRoutingRules)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("rewriteRuleSets"), rewriteRuleSets)
        setfield!(o, Symbol("rewriteRuleSets"), rewriteRuleSets)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("redirectConfigurations"), redirectConfigurations)
        setfield!(o, Symbol("redirectConfigurations"), redirectConfigurations)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("webApplicationFirewallConfiguration"), webApplicationFirewallConfiguration)
        setfield!(o, Symbol("webApplicationFirewallConfiguration"), webApplicationFirewallConfiguration)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("firewallPolicy"), firewallPolicy)
        setfield!(o, Symbol("firewallPolicy"), firewallPolicy)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("enableHttp2"), enableHttp2)
        setfield!(o, Symbol("enableHttp2"), enableHttp2)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("enableFips"), enableFips)
        setfield!(o, Symbol("enableFips"), enableFips)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("autoscaleConfiguration"), autoscaleConfiguration)
        setfield!(o, Symbol("autoscaleConfiguration"), autoscaleConfiguration)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("privateLinkConfigurations"), privateLinkConfigurations)
        setfield!(o, Symbol("privateLinkConfigurations"), privateLinkConfigurations)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("privateEndpointConnections"), privateEndpointConnections)
        setfield!(o, Symbol("privateEndpointConnections"), privateEndpointConnections)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("resourceGuid"), resourceGuid)
        setfield!(o, Symbol("resourceGuid"), resourceGuid)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("provisioningState"), provisioningState)
        setfield!(o, Symbol("provisioningState"), provisioningState)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("customErrorConfigurations"), customErrorConfigurations)
        setfield!(o, Symbol("customErrorConfigurations"), customErrorConfigurations)
        validate_property(ApplicationGatewayPropertiesFormat, Symbol("forceFirewallPolicyAssociation"), forceFirewallPolicyAssociation)
        setfield!(o, Symbol("forceFirewallPolicyAssociation"), forceFirewallPolicyAssociation)
        o
    end
end # type ApplicationGatewayPropertiesFormat

const _property_map_ApplicationGatewayPropertiesFormat = Dict{Symbol,Symbol}(Symbol("sku")=>Symbol("sku"), Symbol("sslPolicy")=>Symbol("sslPolicy"), Symbol("operationalState")=>Symbol("operationalState"), Symbol("gatewayIPConfigurations")=>Symbol("gatewayIPConfigurations"), Symbol("authenticationCertificates")=>Symbol("authenticationCertificates"), Symbol("trustedRootCertificates")=>Symbol("trustedRootCertificates"), Symbol("sslCertificates")=>Symbol("sslCertificates"), Symbol("frontendIPConfigurations")=>Symbol("frontendIPConfigurations"), Symbol("frontendPorts")=>Symbol("frontendPorts"), Symbol("probes")=>Symbol("probes"), Symbol("backendAddressPools")=>Symbol("backendAddressPools"), Symbol("backendHttpSettingsCollection")=>Symbol("backendHttpSettingsCollection"), Symbol("httpListeners")=>Symbol("httpListeners"), Symbol("urlPathMaps")=>Symbol("urlPathMaps"), Symbol("requestRoutingRules")=>Symbol("requestRoutingRules"), Symbol("rewriteRuleSets")=>Symbol("rewriteRuleSets"), Symbol("redirectConfigurations")=>Symbol("redirectConfigurations"), Symbol("webApplicationFirewallConfiguration")=>Symbol("webApplicationFirewallConfiguration"), Symbol("firewallPolicy")=>Symbol("firewallPolicy"), Symbol("enableHttp2")=>Symbol("enableHttp2"), Symbol("enableFips")=>Symbol("enableFips"), Symbol("autoscaleConfiguration")=>Symbol("autoscaleConfiguration"), Symbol("privateLinkConfigurations")=>Symbol("privateLinkConfigurations"), Symbol("privateEndpointConnections")=>Symbol("privateEndpointConnections"), Symbol("resourceGuid")=>Symbol("resourceGuid"), Symbol("provisioningState")=>Symbol("provisioningState"), Symbol("customErrorConfigurations")=>Symbol("customErrorConfigurations"), Symbol("forceFirewallPolicyAssociation")=>Symbol("forceFirewallPolicyAssociation"))
const _property_types_ApplicationGatewayPropertiesFormat = Dict{Symbol,String}(Symbol("sku")=>"ApplicationGatewaySku", Symbol("sslPolicy")=>"ApplicationGatewaySslPolicy", Symbol("operationalState")=>"String", Symbol("gatewayIPConfigurations")=>"Vector{ApplicationGatewayIPConfiguration}", Symbol("authenticationCertificates")=>"Vector{ApplicationGatewayAuthenticationCertificate}", Symbol("trustedRootCertificates")=>"Vector{ApplicationGatewayTrustedRootCertificate}", Symbol("sslCertificates")=>"Vector{ApplicationGatewaySslCertificate}", Symbol("frontendIPConfigurations")=>"Vector{ApplicationGatewayFrontendIPConfiguration}", Symbol("frontendPorts")=>"Vector{ApplicationGatewayFrontendPort}", Symbol("probes")=>"Vector{ApplicationGatewayProbe}", Symbol("backendAddressPools")=>"Vector{ApplicationGatewayBackendAddressPool}", Symbol("backendHttpSettingsCollection")=>"Vector{ApplicationGatewayBackendHttpSettings}", Symbol("httpListeners")=>"Vector{ApplicationGatewayHttpListener}", Symbol("urlPathMaps")=>"Vector{ApplicationGatewayUrlPathMap}", Symbol("requestRoutingRules")=>"Vector{ApplicationGatewayRequestRoutingRule}", Symbol("rewriteRuleSets")=>"Vector{ApplicationGatewayRewriteRuleSet}", Symbol("redirectConfigurations")=>"Vector{ApplicationGatewayRedirectConfiguration}", Symbol("webApplicationFirewallConfiguration")=>"ApplicationGatewayWebApplicationFirewallConfiguration", Symbol("firewallPolicy")=>"SubResource", Symbol("enableHttp2")=>"Bool", Symbol("enableFips")=>"Bool", Symbol("autoscaleConfiguration")=>"ApplicationGatewayAutoscaleConfiguration", Symbol("privateLinkConfigurations")=>"Vector{ApplicationGatewayPrivateLinkConfiguration}", Symbol("privateEndpointConnections")=>"Vector{ApplicationGatewayPrivateEndpointConnection}", Symbol("resourceGuid")=>"String", Symbol("provisioningState")=>"ProvisioningState", Symbol("customErrorConfigurations")=>"Vector{ApplicationGatewayCustomError}", Symbol("forceFirewallPolicyAssociation")=>"Bool")
Base.propertynames(::Type{ ApplicationGatewayPropertiesFormat }) = collect(keys(_property_map_ApplicationGatewayPropertiesFormat))
Swagger.property_type(::Type{ ApplicationGatewayPropertiesFormat }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_ApplicationGatewayPropertiesFormat[name]))}
Swagger.field_name(::Type{ ApplicationGatewayPropertiesFormat }, property_name::Symbol) =  _property_map_ApplicationGatewayPropertiesFormat[property_name]

const _allowed_ApplicationGatewayPropertiesFormat_operationalState = ["Stopped", "Starting", "Running", "Stopping"]

function check_required(o::ApplicationGatewayPropertiesFormat)
    true
end

function validate_property(::Type{ ApplicationGatewayPropertiesFormat }, name::Symbol, val)
    if name === Symbol("operationalState")
        Swagger.validate_param(name, "ApplicationGatewayPropertiesFormat", :enum, val, _allowed_ApplicationGatewayPropertiesFormat_operationalState)
    end
end


text:
# Implementation of the instance-level CouchDB CouchDB.

"""
    type Client
      url
      cookies

      Client(username::AbstractString, password::AbstractString, urlstr::AbstractString; auth=true) =
        cookieauth!(new(URI(urlstr)), username, password, auth)
    end

The Client type represents an authenticated connection to a remote CouchDB/Cloudant instance.
"""
type Client
  url
  cookies

  Client(username::AbstractString, password::AbstractString, urlstr::AbstractString; auth=true) =
    cookieauth!(new(URI(urlstr)), username, password, auth)
end

"""
    cookieauth!(client::Client, username::AbstractString, password::AbstractString, auth::Bool=true)

Private. Hits the `_session` endpoint to obtain a session cookie
that is used to authenticate subsequent requests. If `auth` is set to
false, this does nothing.

[API reference](https://docs.cloudant.com/authentication.html#cookie-authentication)
"""
function cookieauth!(client::Client, username::AbstractString, password::AbstractString, auth::Bool=true)
  if auth
    response = post(endpoint(client.url, "_session");
      data=Dict("name" => username, "password" => password))
    client.cookies = cookies(response)
  else
    client.cookies = ""
  end
  client
end

"""
    db = connectdb(client::Client, database::AbstractString)

Return an immutable Database reference.

Subsequent database-level operations will operate on the chosen database.
If you need to operate on a different database, you need to create a new
Database reference. `connectdb(...)` does not check that the chosen remote
database exists.
"""
function connectdb(client::Client, database::AbstractString)
  Database(client, database)
end

"""
    db, created = createdb(client::Client, database::AbstractString)

Create a new database on the remote end called `dbname`. Return an immutable
Database reference to this newly created db, and a boolean which is true if
a database was created, false if it already existed.

[API reference](http://docs.couchdb.org/en/1.6.1/CouchDB/database/common.html#put--db)
"""
function createdb(client::Client, database::AbstractString)
  db = Database(client, database)
  created = false
  try
    response = relax(put, string(db.url); cookies=client.cookies)
    created = true
  catch err
    # A 412 (db already exists) isn't always a fatal error.
    # We bubble this up in the second returned value and leave
    # it to the user to decide.
    if !isa(err, HTTPException) || err.status != 412
      rethrow()
    end
  end
  return db, created
end

"""
    info = dbinfo(client::Client, name::AbstractString)

Return the meta data about the `dbname` database.

[API reference](http://docs.couchdb.org/en/1.6.1/CouchDB/database/common.html#get--db)
"""
function dbinfo(client::Client, name::AbstractString)
  relax(get, endpoint(client.url, name); cookies=client.cookies)
end

"""
    dblist = listdbs(client::Client)

Return a list of all databases under the authenticated user.

[API reference](http://docs.couchdb.org/en/1.6.1/CouchDB/server/common.html#all-dbs)
"""
function listdbs(client::Client)
  relax(get, endpoint(client.url, "_all_dbs"); cookies=client.cookies)
end

"""
    result = deletedb(client::Client, name::AbstractString)

Delete the named database.

[API reference](http://docs.couchdb.org/en/1.6.1/CouchDB/database/common.html?#delete--db)
"""
function deletedb(client::Client, name::AbstractString)
  relax(delete, endpoint(client.url, name); cookies=client.cookies)
end


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

Adds the specified SSL server certificate to the certificate list for the specified HTTPS or TLS listener. If the certificate in already in the certificate list, the call is successful but the certificate is not added again. To get the certificate list for a listener, use DescribeListenerCertificates. To remove certificates from the certificate list for a listener, use RemoveListenerCertificates. To replace the default certificate for a listener, use ModifyListener. For more information, see SSL Certificates in the Application Load Balancers Guide.

# Required Parameters
- `Certificates`: The certificate to add. You can specify one certificate per call. Set CertificateArn to the certificate ARN but do not set IsDefault.
- `ListenerArn`: The Amazon Resource Name (ARN) of the listener.

"""

add_listener_certificates(Certificates, ListenerArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("AddListenerCertificates", Dict{String, Any}("Certificates"=>Certificates, "ListenerArn"=>ListenerArn); aws_config=aws_config)
add_listener_certificates(Certificates, ListenerArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("AddListenerCertificates", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Certificates"=>Certificates, "ListenerArn"=>ListenerArn), args)); aws_config=aws_config)

"""
    AddTags()

Adds the specified tags to the specified Elastic Load Balancing resource. You can tag your Application Load Balancers, Network Load Balancers, target groups, listeners, and rules. Each tag consists of a key and an optional value. If a resource already has a tag with the same key, AddTags updates its value. To list the current tags for your resources, use DescribeTags. To remove tags from your resources, use RemoveTags.

# Required Parameters
- `ResourceArns`: The Amazon Resource Name (ARN) of the resource.
- `Tags`: The tags.

"""

add_tags(ResourceArns, Tags; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("AddTags", Dict{String, Any}("ResourceArns"=>ResourceArns, "Tags"=>Tags); aws_config=aws_config)
add_tags(ResourceArns, Tags, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("AddTags", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ResourceArns"=>ResourceArns, "Tags"=>Tags), args)); aws_config=aws_config)

"""
    CreateListener()

Creates a listener for the specified Application Load Balancer or Network Load Balancer. To update a listener, use ModifyListener. When you are finished with a listener, you can delete it using DeleteListener. If you are finished with both the listener and the load balancer, you can delete them both using DeleteLoadBalancer. This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple listeners with the same settings, each call succeeds. For more information, see Listeners for Your Application Load Balancers in the Application Load Balancers Guide and Listeners for Your Network Load Balancers in the Network Load Balancers Guide.

# Required Parameters
- `DefaultActions`: The actions for the default rule. The rule must include one forward action or one or more fixed-response actions. If the action type is forward, you specify one or more target groups. The protocol of the target group must be HTTP or HTTPS for an Application Load Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for a Network Load Balancer. [HTTPS listeners] If the action type is authenticate-oidc, you authenticate users through an identity provider that is OpenID Connect (OIDC) compliant. [HTTPS listeners] If the action type is authenticate-cognito, you authenticate users through the user pools supported by Amazon Cognito. [Application Load Balancer] If the action type is redirect, you redirect specified client requests from one URL to another. [Application Load Balancer] If the action type is fixed-response, you drop specified client requests and return a custom HTTP response.
- `LoadBalancerArn`: The Amazon Resource Name (ARN) of the load balancer.
- `Port`: The port on which the load balancer is listening.
- `Protocol`: The protocol for connections from clients to the load balancer. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, and TCP_UDP.

# Optional Parameters
- `AlpnPolicy`: [TLS listeners] The name of the Application-Layer Protocol Negotiation (ALPN) policy. You can specify one policy name. The following are the possible values:    HTTP1Only     HTTP2Only     HTTP2Optional     HTTP2Preferred     None    For more information, see ALPN Policies in the Network Load Balancers Guide.
- `Certificates`: [HTTPS and TLS listeners] The default certificate for the listener. You must provide exactly one certificate. Set CertificateArn to the certificate ARN but do not set IsDefault. To create a certificate list for the listener, use AddListenerCertificates.
- `SslPolicy`: [HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. The following are the possible values:    ELBSecurityPolicy-2016-08     ELBSecurityPolicy-TLS-1-0-2015-04     ELBSecurityPolicy-TLS-1-1-2017-01     ELBSecurityPolicy-TLS-1-2-2017-01     ELBSecurityPolicy-TLS-1-2-Ext-2018-06     ELBSecurityPolicy-FS-2018-06     ELBSecurityPolicy-FS-1-1-2019-08     ELBSecurityPolicy-FS-1-2-2019-08     ELBSecurityPolicy-FS-1-2-Res-2019-08    For more information, see Security Policies in the Application Load Balancers Guide and Security Policies in the Network Load Balancers Guide.
- `Tags`: The tags to assign to the listener.
"""

create_listener(DefaultActions, LoadBalancerArn, Port, Protocol; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("CreateListener", Dict{String, Any}("DefaultActions"=>DefaultActions, "LoadBalancerArn"=>LoadBalancerArn, "Port"=>Port, "Protocol"=>Protocol); aws_config=aws_config)
create_listener(DefaultActions, LoadBalancerArn, Port, Protocol, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("CreateListener", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DefaultActions"=>DefaultActions, "LoadBalancerArn"=>LoadBalancerArn, "Port"=>Port, "Protocol"=>Protocol), args)); aws_config=aws_config)

"""
    CreateLoadBalancer()

Creates an Application Load Balancer or a Network Load Balancer. When you create a load balancer, you can specify security groups, public subnets, IP address type, and tags. Otherwise, you could do so later using SetSecurityGroups, SetSubnets, SetIpAddressType, and AddTags. To create listeners for your load balancer, use CreateListener. To describe your current load balancers, see DescribeLoadBalancers. When you are finished with a load balancer, you can delete it using DeleteLoadBalancer. For limit information, see Limits for Your Application Load Balancer in the Application Load Balancers Guide and Limits for Your Network Load Balancer in the Network Load Balancers Guide. This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple load balancers with the same settings, each call succeeds. For more information, see Application Load Balancers in the Application Load Balancers Guide and Network Load Balancers in the Network Load Balancers Guide.

# Required Parameters
- `Name`: The name of the load balancer. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, must not begin or end with a hyphen, and must not begin with \"internal-\".

# Optional Parameters
- `CustomerOwnedIpv4Pool`: [Application Load Balancers on Outposts] The ID of the customer-owned address pool (CoIP pool).
- `IpAddressType`: [Application Load Balancers] The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). Internal load balancers must use ipv4.
- `Scheme`: The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the internet. The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can route requests only from clients with access to the VPC for the load balancer. The default is an Internet-facing load balancer.
- `SecurityGroups`: [Application Load Balancers] The IDs of the security groups for the load balancer.
- `SubnetMappings`: The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings. [Application Load Balancers] You must specify subnets from at least two Availability Zones. You cannot specify Elastic IP addresses for your subnets. [Application Load Balancers on Outposts] You must specify one Outpost subnet. [Application Load Balancers on Local Zones] You can specify subnets from one or more Local Zones. [Network Load Balancers] You can specify subnets from one or more Availability Zones. You can specify one Elastic IP address per subnet if you need static IP addresses for your internet-facing load balancer. For internal load balancers, you can specify one private IP address per subnet from the IPv4 range of the subnet.
- `Subnets`: The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings. [Application Load Balancers] You must specify subnets from at least two Availability Zones. [Application Load Balancers on Outposts] You must specify one Outpost subnet. [Application Load Balancers on Local Zones] You can specify subnets from one or more Local Zones. [Network Load Balancers] You can specify subnets from one or more Availability Zones.
- `Tags`: The tags to assign to the load balancer.
- `Type`: The type of load balancer. The default is application.
"""

create_load_balancer(Name; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("CreateLoadBalancer", Dict{String, Any}("Name"=>Name); aws_config=aws_config)
create_load_balancer(Name, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("CreateLoadBalancer", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Name"=>Name), args)); aws_config=aws_config)

"""
    CreateRule()

Creates a rule for the specified listener. The listener must be associated with an Application Load Balancer. Each rule consists of a priority, one or more actions, and one or more conditions. Rules are evaluated in priority order, from the lowest value to the highest value. When the conditions for a rule are met, its actions are performed. If the conditions for no rules are met, the actions for the default rule are performed. For more information, see Listener Rules in the Application Load Balancers Guide. To view your current rules, use DescribeRules. To update a rule, use ModifyRule. To set the priorities of your rules, use SetRulePriorities. To delete a rule, use DeleteRule.

# Required Parameters
- `Actions`: The actions. Each rule must include exactly one of the following types of actions: forward, fixed-response, or redirect, and it must be the last action to be performed. If the action type is forward, you specify one or more target groups. The protocol of the target group must be HTTP or HTTPS for an Application Load Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for a Network Load Balancer. [HTTPS listeners] If the action type is authenticate-oidc, you authenticate users through an identity provider that is OpenID Connect (OIDC) compliant. [HTTPS listeners] If the action type is authenticate-cognito, you authenticate users through the user pools supported by Amazon Cognito. [Application Load Balancer] If the action type is redirect, you redirect specified client requests from one URL to another. [Application Load Balancer] If the action type is fixed-response, you drop specified client requests and return a custom HTTP response.
- `Conditions`: The conditions. Each rule can optionally include up to one of each of the following conditions: http-request-method, host-header, path-pattern, and source-ip. Each rule can also optionally include one or more of each of the following conditions: http-header and query-string.
- `ListenerArn`: The Amazon Resource Name (ARN) of the listener.
- `Priority`: The rule priority. A listener can't have multiple rules with the same priority.

# Optional Parameters
- `Tags`: The tags to assign to the rule.
"""

create_rule(Actions, Conditions, ListenerArn, Priority; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("CreateRule", Dict{String, Any}("Actions"=>Actions, "Conditions"=>Conditions, "ListenerArn"=>ListenerArn, "Priority"=>Priority); aws_config=aws_config)
create_rule(Actions, Conditions, ListenerArn, Priority, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("CreateRule", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Actions"=>Actions, "Conditions"=>Conditions, "ListenerArn"=>ListenerArn, "Priority"=>Priority), args)); aws_config=aws_config)

"""
    CreateTargetGroup()

Creates a target group. To register targets with the target group, use RegisterTargets. To update the health check settings for the target group, use ModifyTargetGroup. To monitor the health of targets in the target group, use DescribeTargetHealth. To route traffic to the targets in a target group, specify the target group in an action using CreateListener or CreateRule. To delete a target group, use DeleteTargetGroup. This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple target groups with the same settings, each call succeeds. For more information, see Target Groups for Your Application Load Balancers in the Application Load Balancers Guide or Target Groups for Your Network Load Balancers in the Network Load Balancers Guide.

# Required Parameters
- `Name`: The name of the target group. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.

# Optional Parameters
- `HealthCheckEnabled`: Indicates whether health checks are enabled. If the target type is lambda, health checks are disabled by default but can be enabled. If the target type is instance or ip, health checks are always enabled and cannot be disabled.
- `HealthCheckIntervalSeconds`: The approximate amount of time, in seconds, between health checks of an individual target. For HTTP and HTTPS health checks, the range is 5–300 seconds. For TCP health checks, the supported values are 10 and 30 seconds. If the target type is instance or ip, the default is 30 seconds. If the target type is lambda, the default is 35 seconds.
- `HealthCheckPath`: [HTTP/HTTPS health checks] The ping path that is the destination on the targets for health checks. The default is /.
- `HealthCheckPort`: The port the load balancer uses when performing health checks on targets. The default is traffic-port, which is the port on which each target receives traffic from the load balancer.
- `HealthCheckProtocol`: The protocol the load balancer uses when performing health checks on targets. For Application Load Balancers, the default is HTTP. For Network Load Balancers, the default is TCP. The TCP protocol is supported for health checks only if the protocol of the target group is TCP, TLS, UDP, or TCP_UDP. The TLS, UDP, and TCP_UDP protocols are not supported for health checks.
- `HealthCheckTimeoutSeconds`: The amount of time, in seconds, during which no response from a target means a failed health check. For target groups with a protocol of HTTP or HTTPS, the default is 5 seconds. For target groups with a protocol of TCP or TLS, this value must be 6 seconds for HTTP health checks and 10 seconds for TCP and HTTPS health checks. If the target type is lambda, the default is 30 seconds.
- `HealthyThresholdCount`: The number of consecutive health checks successes required before considering an unhealthy target healthy. For target groups with a protocol of HTTP or HTTPS, the default is 5. For target groups with a protocol of TCP or TLS, the default is 3. If the target type is lambda, the default is 5.
- `Matcher`: [HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful response from a target.
- `Port`: The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target. If the target is a Lambda function, this parameter does not apply.
- `Protocol`: The protocol to use for routing traffic to the targets. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, or TCP_UDP. A TCP_UDP listener must be associated with a TCP_UDP target group. If the target is a Lambda function, this parameter does not apply.
- `Tags`: The tags to assign to the target group.
- `TargetType`: The type of target that you must specify when registering targets with this target group. You can't specify targets for a target group using more than one target type.    instance - Targets are specified by instance ID. This is the default value.    ip - Targets are specified by IP address. You can specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.    lambda - The target groups contains a single Lambda function.
- `UnhealthyThresholdCount`: The number of consecutive health check failures required before considering a target unhealthy. For target groups with a protocol of HTTP or HTTPS, the default is 2. For target groups with a protocol of TCP or TLS, this value must be the same as the healthy threshold count. If the target type is lambda, the default is 2.
- `VpcId`: The identifier of the virtual private cloud (VPC). If the target is a Lambda function, this parameter does not apply. Otherwise, this parameter is required.
"""

create_target_group(Name; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("CreateTargetGroup", Dict{String, Any}("Name"=>Name); aws_config=aws_config)
create_target_group(Name, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("CreateTargetGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Name"=>Name), args)); aws_config=aws_config)

"""
    DeleteListener()

Deletes the specified listener. Alternatively, your listener is deleted when you delete the load balancer to which it is attached, using DeleteLoadBalancer.

# Required Parameters
- `ListenerArn`: The Amazon Resource Name (ARN) of the listener.

"""

delete_listener(ListenerArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DeleteListener", Dict{String, Any}("ListenerArn"=>ListenerArn); aws_config=aws_config)
delete_listener(ListenerArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DeleteListener", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ListenerArn"=>ListenerArn), args)); aws_config=aws_config)

"""
    DeleteLoadBalancer()

Deletes the specified Application Load Balancer or Network Load Balancer and its attached listeners. You can't delete a load balancer if deletion protection is enabled. If the load balancer does not exist or has already been deleted, the call succeeds. Deleting a load balancer does not affect its registered targets. For example, your EC2 instances continue to run and are still registered to their target groups. If you no longer need these EC2 instances, you can stop or terminate them.

# Required Parameters
- `LoadBalancerArn`: The Amazon Resource Name (ARN) of the load balancer.

"""

delete_load_balancer(LoadBalancerArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DeleteLoadBalancer", Dict{String, Any}("LoadBalancerArn"=>LoadBalancerArn); aws_config=aws_config)
delete_load_balancer(LoadBalancerArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DeleteLoadBalancer", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("LoadBalancerArn"=>LoadBalancerArn), args)); aws_config=aws_config)

"""
    DeleteRule()

Deletes the specified rule. You can't delete the default rule.

# Required Parameters
- `RuleArn`: The Amazon Resource Name (ARN) of the rule.

"""

delete_rule(RuleArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DeleteRule", Dict{String, Any}("RuleArn"=>RuleArn); aws_config=aws_config)
delete_rule(RuleArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DeleteRule", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("RuleArn"=>RuleArn), args)); aws_config=aws_config)

"""
    DeleteTargetGroup()

Deletes the specified target group. You can delete a target group if it is not referenced by any actions. Deleting a target group also deletes any associated health checks.

# Required Parameters
- `TargetGroupArn`: The Amazon Resource Name (ARN) of the target group.

"""

delete_target_group(TargetGroupArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DeleteTargetGroup", Dict{String, Any}("TargetGroupArn"=>TargetGroupArn); aws_config=aws_config)
delete_target_group(TargetGroupArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DeleteTargetGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TargetGroupArn"=>TargetGroupArn), args)); aws_config=aws_config)

"""
    DeregisterTargets()

Deregisters the specified targets from the specified target group. After the targets are deregistered, they no longer receive traffic from the load balancer.

# Required Parameters
- `TargetGroupArn`: The Amazon Resource Name (ARN) of the target group.
- `Targets`: The targets. If you specified a port override when you registered a target, you must specify both the target ID and the port when you deregister it.

"""

deregister_targets(TargetGroupArn, Targets; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DeregisterTargets", Dict{String, Any}("TargetGroupArn"=>TargetGroupArn, "Targets"=>Targets); aws_config=aws_config)
deregister_targets(TargetGroupArn, Targets, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DeregisterTargets", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TargetGroupArn"=>TargetGroupArn, "Targets"=>Targets), args)); aws_config=aws_config)

"""
    DescribeAccountLimits()

Describes the current Elastic Load Balancing resource limits for your AWS account. For more information, see Limits for Your Application Load Balancers in the Application Load Balancer Guide or Limits for Your Network Load Balancers in the Network Load Balancers Guide.

# Optional Parameters
- `Marker`: The marker for the next set of results. (You received this marker from a previous call.)
- `PageSize`: The maximum number of results to return with this call.
"""

describe_account_limits(; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeAccountLimits"; aws_config=aws_config)
describe_account_limits(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeAccountLimits", args; aws_config=aws_config)

"""
    DescribeListenerCertificates()

Describes the default certificate and the certificate list for the specified HTTPS or TLS listener. If the default certificate is also in the certificate list, it appears twice in the results (once with IsDefault set to true and once with IsDefault set to false). For more information, see SSL Certificates in the Application Load Balancers Guide.

# Required Parameters
- `ListenerArn`: The Amazon Resource Names (ARN) of the listener.

# Optional Parameters
- `Marker`: The marker for the next set of results. (You received this marker from a previous call.)
- `PageSize`: The maximum number of results to return with this call.
"""

describe_listener_certificates(ListenerArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeListenerCertificates", Dict{String, Any}("ListenerArn"=>ListenerArn); aws_config=aws_config)
describe_listener_certificates(ListenerArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeListenerCertificates", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ListenerArn"=>ListenerArn), args)); aws_config=aws_config)

"""
    DescribeListeners()

Describes the specified listeners or the listeners for the specified Application Load Balancer or Network Load Balancer. You must specify either a load balancer or one or more listeners. For an HTTPS or TLS listener, the output includes the default certificate for the listener. To describe the certificate list for the listener, use DescribeListenerCertificates.

# Optional Parameters
- `ListenerArns`: The Amazon Resource Names (ARN) of the listeners.
- `LoadBalancerArn`: The Amazon Resource Name (ARN) of the load balancer.
- `Marker`: The marker for the next set of results. (You received this marker from a previous call.)
- `PageSize`: The maximum number of results to return with this call.
"""

describe_listeners(; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeListeners"; aws_config=aws_config)
describe_listeners(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeListeners", args; aws_config=aws_config)

"""
    DescribeLoadBalancerAttributes()

Describes the attributes for the specified Application Load Balancer or Network Load Balancer. For more information, see Load Balancer Attributes in the Application Load Balancers Guide or Load Balancer Attributes in the Network Load Balancers Guide.

# Required Parameters
- `LoadBalancerArn`: The Amazon Resource Name (ARN) of the load balancer.

"""

describe_load_balancer_attributes(LoadBalancerArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeLoadBalancerAttributes", Dict{String, Any}("LoadBalancerArn"=>LoadBalancerArn); aws_config=aws_config)
describe_load_balancer_attributes(LoadBalancerArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeLoadBalancerAttributes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("LoadBalancerArn"=>LoadBalancerArn), args)); aws_config=aws_config)

"""
    DescribeLoadBalancers()

Describes the specified load balancers or all of your load balancers. To describe the listeners for a load balancer, use DescribeListeners. To describe the attributes for a load balancer, use DescribeLoadBalancerAttributes.

# Optional Parameters
- `LoadBalancerArns`: The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call.
- `Marker`: The marker for the next set of results. (You received this marker from a previous call.)
- `Names`: The names of the load balancers.
- `PageSize`: The maximum number of results to return with this call.
"""

describe_load_balancers(; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeLoadBalancers"; aws_config=aws_config)
describe_load_balancers(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeLoadBalancers", args; aws_config=aws_config)

"""
    DescribeRules()

Describes the specified rules or the rules for the specified listener. You must specify either a listener or one or more rules.

# Optional Parameters
- `ListenerArn`: The Amazon Resource Name (ARN) of the listener.
- `Marker`: The marker for the next set of results. (You received this marker from a previous call.)
- `PageSize`: The maximum number of results to return with this call.
- `RuleArns`: The Amazon Resource Names (ARN) of the rules.
"""

describe_rules(; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeRules"; aws_config=aws_config)
describe_rules(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeRules", args; aws_config=aws_config)

"""
    DescribeSSLPolicies()

Describes the specified policies or all policies used for SSL negotiation. For more information, see Security Policies in the Application Load Balancers Guide.

# Optional Parameters
- `Marker`: The marker for the next set of results. (You received this marker from a previous call.)
- `Names`: The names of the policies.
- `PageSize`: The maximum number of results to return with this call.
"""

describe_sslpolicies(; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeSSLPolicies"; aws_config=aws_config)
describe_sslpolicies(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeSSLPolicies", args; aws_config=aws_config)

"""
    DescribeTags()

Describes the tags for the specified Elastic Load Balancing resources. You can describe the tags for one or more Application Load Balancers, Network Load Balancers, target groups, listeners, or rules.

# Required Parameters
- `ResourceArns`: The Amazon Resource Names (ARN) of the resources. You can specify up to 20 resources in a single call.

"""

describe_tags(ResourceArns; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeTags", Dict{String, Any}("ResourceArns"=>ResourceArns); aws_config=aws_config)
describe_tags(ResourceArns, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeTags", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ResourceArns"=>ResourceArns), args)); aws_config=aws_config)

"""
    DescribeTargetGroupAttributes()

Describes the attributes for the specified target group. For more information, see Target Group Attributes in the Application Load Balancers Guide or Target Group Attributes in the Network Load Balancers Guide.

# Required Parameters
- `TargetGroupArn`: The Amazon Resource Name (ARN) of the target group.

"""

describe_target_group_attributes(TargetGroupArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeTargetGroupAttributes", Dict{String, Any}("TargetGroupArn"=>TargetGroupArn); aws_config=aws_config)
describe_target_group_attributes(TargetGroupArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeTargetGroupAttributes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TargetGroupArn"=>TargetGroupArn), args)); aws_config=aws_config)

"""
    DescribeTargetGroups()

Describes the specified target groups or all of your target groups. By default, all target groups are described. Alternatively, you can specify one of the following to filter the results: the ARN of the load balancer, the names of one or more target groups, or the ARNs of one or more target groups. To describe the targets for a target group, use DescribeTargetHealth. To describe the attributes of a target group, use DescribeTargetGroupAttributes.

# Optional Parameters
- `LoadBalancerArn`: The Amazon Resource Name (ARN) of the load balancer.
- `Marker`: The marker for the next set of results. (You received this marker from a previous call.)
- `Names`: The names of the target groups.
- `PageSize`: The maximum number of results to return with this call.
- `TargetGroupArns`: The Amazon Resource Names (ARN) of the target groups.
"""

describe_target_groups(; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeTargetGroups"; aws_config=aws_config)
describe_target_groups(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeTargetGroups", args; aws_config=aws_config)

"""
    DescribeTargetHealth()

Describes the health of the specified targets or all of your targets.

# Required Parameters
- `TargetGroupArn`: The Amazon Resource Name (ARN) of the target group.

# Optional Parameters
- `Targets`: The targets.
"""

describe_target_health(TargetGroupArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeTargetHealth", Dict{String, Any}("TargetGroupArn"=>TargetGroupArn); aws_config=aws_config)
describe_target_health(TargetGroupArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("DescribeTargetHealth", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TargetGroupArn"=>TargetGroupArn), args)); aws_config=aws_config)

"""
    ModifyListener()

Replaces the specified properties of the specified listener. Any properties that you do not specify remain unchanged. Changing the protocol from HTTPS to HTTP, or from TLS to TCP, removes the security policy and default certificate properties. If you change the protocol from HTTP to HTTPS, or from TCP to TLS, you must add the security policy and default certificate properties. To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.

# Required Parameters
- `ListenerArn`: The Amazon Resource Name (ARN) of the listener.

# Optional Parameters
- `AlpnPolicy`: [TLS listeners] The name of the Application-Layer Protocol Negotiation (ALPN) policy. You can specify one policy name. The following are the possible values:    HTTP1Only     HTTP2Only     HTTP2Optional     HTTP2Preferred     None    For more information, see ALPN Policies in the Network Load Balancers Guide.
- `Certificates`: [HTTPS and TLS listeners] The default certificate for the listener. You must provide exactly one certificate. Set CertificateArn to the certificate ARN but do not set IsDefault. To create a certificate list, use AddListenerCertificates.
- `DefaultActions`: The actions for the default rule. The rule must include one forward action or one or more fixed-response actions. If the action type is forward, you specify one or more target groups. The protocol of the target group must be HTTP or HTTPS for an Application Load Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for a Network Load Balancer. [HTTPS listeners] If the action type is authenticate-oidc, you authenticate users through an identity provider that is OpenID Connect (OIDC) compliant. [HTTPS listeners] If the action type is authenticate-cognito, you authenticate users through the user pools supported by Amazon Cognito. [Application Load Balancer] If the action type is redirect, you redirect specified client requests from one URL to another. [Application Load Balancer] If the action type is fixed-response, you drop specified client requests and return a custom HTTP response.
- `Port`: The port for connections from clients to the load balancer.
- `Protocol`: The protocol for connections from clients to the load balancer. Application Load Balancers support the HTTP and HTTPS protocols. Network Load Balancers support the TCP, TLS, UDP, and TCP_UDP protocols.
- `SslPolicy`: [HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. The following are the possible values:    ELBSecurityPolicy-2016-08     ELBSecurityPolicy-TLS-1-0-2015-04     ELBSecurityPolicy-TLS-1-1-2017-01     ELBSecurityPolicy-TLS-1-2-2017-01     ELBSecurityPolicy-TLS-1-2-Ext-2018-06     ELBSecurityPolicy-FS-2018-06     ELBSecurityPolicy-FS-1-1-2019-08     ELBSecurityPolicy-FS-1-2-2019-08     ELBSecurityPolicy-FS-1-2-Res-2019-08    For more information, see Security Policies in the Application Load Balancers Guide and Security Policies in the Network Load Balancers Guide.
"""

modify_listener(ListenerArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("ModifyListener", Dict{String, Any}("ListenerArn"=>ListenerArn); aws_config=aws_config)
modify_listener(ListenerArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("ModifyListener", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ListenerArn"=>ListenerArn), args)); aws_config=aws_config)

"""
    ModifyLoadBalancerAttributes()

Modifies the specified attributes of the specified Application Load Balancer or Network Load Balancer. If any of the specified attributes can't be modified as requested, the call fails. Any existing attributes that you do not modify retain their current values.

# Required Parameters
- `Attributes`: The load balancer attributes.
- `LoadBalancerArn`: The Amazon Resource Name (ARN) of the load balancer.

"""

modify_load_balancer_attributes(Attributes, LoadBalancerArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("ModifyLoadBalancerAttributes", Dict{String, Any}("Attributes"=>Attributes, "LoadBalancerArn"=>LoadBalancerArn); aws_config=aws_config)
modify_load_balancer_attributes(Attributes, LoadBalancerArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("ModifyLoadBalancerAttributes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Attributes"=>Attributes, "LoadBalancerArn"=>LoadBalancerArn), args)); aws_config=aws_config)

"""
    ModifyRule()

Replaces the specified properties of the specified rule. Any properties that you do not specify are unchanged. To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action. To modify the actions for the default rule, use ModifyListener.

# Required Parameters
- `RuleArn`: The Amazon Resource Name (ARN) of the rule.

# Optional Parameters
- `Actions`: The actions. Each rule must include exactly one of the following types of actions: forward, fixed-response, or redirect, and it must be the last action to be performed. If the action type is forward, you specify one or more target groups. The protocol of the target group must be HTTP or HTTPS for an Application Load Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for a Network Load Balancer. [HTTPS listeners] If the action type is authenticate-oidc, you authenticate users through an identity provider that is OpenID Connect (OIDC) compliant. [HTTPS listeners] If the action type is authenticate-cognito, you authenticate users through the user pools supported by Amazon Cognito. [Application Load Balancer] If the action type is redirect, you redirect specified client requests from one URL to another. [Application Load Balancer] If the action type is fixed-response, you drop specified client requests and return a custom HTTP response.
- `Conditions`: The conditions. Each rule can include zero or one of the following conditions: http-request-method, host-header, path-pattern, and source-ip, and zero or more of the following conditions: http-header and query-string.
"""

modify_rule(RuleArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("ModifyRule", Dict{String, Any}("RuleArn"=>RuleArn); aws_config=aws_config)
modify_rule(RuleArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("ModifyRule", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("RuleArn"=>RuleArn), args)); aws_config=aws_config)

"""
    ModifyTargetGroup()

Modifies the health checks used when evaluating the health state of the targets in the specified target group. To monitor the health of the targets, use DescribeTargetHealth.

# Required Parameters
- `TargetGroupArn`: The Amazon Resource Name (ARN) of the target group.

# Optional Parameters
- `HealthCheckEnabled`: Indicates whether health checks are enabled.
- `HealthCheckIntervalSeconds`: The approximate amount of time, in seconds, between health checks of an individual target. For Application Load Balancers, the range is 5 to 300 seconds. For Network Load Balancers, the supported values are 10 or 30 seconds. With Network Load Balancers, you can't modify this setting.
- `HealthCheckPath`: [HTTP/HTTPS health checks] The ping path that is the destination for the health check request.
- `HealthCheckPort`: The port the load balancer uses when performing health checks on targets.
- `HealthCheckProtocol`: The protocol the load balancer uses when performing health checks on targets. The TCP protocol is supported for health checks only if the protocol of the target group is TCP, TLS, UDP, or TCP_UDP. The TLS, UDP, and TCP_UDP protocols are not supported for health checks. With Network Load Balancers, you can't modify this setting.
- `HealthCheckTimeoutSeconds`: [HTTP/HTTPS health checks] The amount of time, in seconds, during which no response means a failed health check. With Network Load Balancers, you can't modify this setting.
- `HealthyThresholdCount`: The number of consecutive health checks successes required before considering an unhealthy target healthy.
- `Matcher`: [HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful response from a target. The possible values are from 200 to 499. You can specify multiple values (for example, \"200,202\") or a range of values (for example, \"200-299\"). The default is 200. With Network Load Balancers, you can't modify this setting.
- `UnhealthyThresholdCount`: The number of consecutive health check failures required before considering the target unhealthy. For Network Load Balancers, this value must be the same as the healthy threshold count.
"""

modify_target_group(TargetGroupArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("ModifyTargetGroup", Dict{String, Any}("TargetGroupArn"=>TargetGroupArn); aws_config=aws_config)
modify_target_group(TargetGroupArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("ModifyTargetGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TargetGroupArn"=>TargetGroupArn), args)); aws_config=aws_config)

"""
    ModifyTargetGroupAttributes()

Modifies the specified attributes of the specified target group.

# Required Parameters
- `Attributes`: The attributes.
- `TargetGroupArn`: The Amazon Resource Name (ARN) of the target group.

"""

modify_target_group_attributes(Attributes, TargetGroupArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("ModifyTargetGroupAttributes", Dict{String, Any}("Attributes"=>Attributes, "TargetGroupArn"=>TargetGroupArn); aws_config=aws_config)
modify_target_group_attributes(Attributes, TargetGroupArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("ModifyTargetGroupAttributes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Attributes"=>Attributes, "TargetGroupArn"=>TargetGroupArn), args)); aws_config=aws_config)

"""
    RegisterTargets()

Registers the specified targets with the specified target group. If the target is an EC2 instance, it must be in the running state when you register it. By default, the load balancer routes requests to registered targets using the protocol and port for the target group. Alternatively, you can override the port for a target when you register it. You can register each EC2 instance or IP address with the same target group multiple times using different ports. With a Network Load Balancer, you cannot register instances by instance ID if they have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1. You can register instances of these types by IP address. To remove a target from a target group, use DeregisterTargets.

# Required Parameters
- `TargetGroupArn`: The Amazon Resource Name (ARN) of the target group.
- `Targets`: The targets. To register a target by instance ID, specify the instance ID. To register a target by IP address, specify the IP address. To register a Lambda function, specify the ARN of the Lambda function.

"""

register_targets(TargetGroupArn, Targets; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("RegisterTargets", Dict{String, Any}("TargetGroupArn"=>TargetGroupArn, "Targets"=>Targets); aws_config=aws_config)
register_targets(TargetGroupArn, Targets, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("RegisterTargets", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TargetGroupArn"=>TargetGroupArn, "Targets"=>Targets), args)); aws_config=aws_config)

"""
    RemoveListenerCertificates()

Removes the specified certificate from the certificate list for the specified HTTPS or TLS listener. You can't remove the default certificate for a listener. To replace the default certificate, call ModifyListener. To list the certificates for your listener, use DescribeListenerCertificates.

# Required Parameters
- `Certificates`: The certificate to remove. You can specify one certificate per call. Set CertificateArn to the certificate ARN but do not set IsDefault.
- `ListenerArn`: The Amazon Resource Name (ARN) of the listener.

"""

remove_listener_certificates(Certificates, ListenerArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("RemoveListenerCertificates", Dict{String, Any}("Certificates"=>Certificates, "ListenerArn"=>ListenerArn); aws_config=aws_config)
remove_listener_certificates(Certificates, ListenerArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("RemoveListenerCertificates", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Certificates"=>Certificates, "ListenerArn"=>ListenerArn), args)); aws_config=aws_config)

"""
    RemoveTags()

Removes the specified tags from the specified Elastic Load Balancing resources. You can remove the tags for one or more Application Load Balancers, Network Load Balancers, target groups, listeners, or rules. To list the current tags for your resources, use DescribeTags.

# Required Parameters
- `ResourceArns`: The Amazon Resource Name (ARN) of the resource.
- `TagKeys`: The tag keys for the tags to remove.

"""

remove_tags(ResourceArns, TagKeys; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("RemoveTags", Dict{String, Any}("ResourceArns"=>ResourceArns, "TagKeys"=>TagKeys); aws_config=aws_config)
remove_tags(ResourceArns, TagKeys, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("RemoveTags", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ResourceArns"=>ResourceArns, "TagKeys"=>TagKeys), args)); aws_config=aws_config)

"""
    SetIpAddressType()

Sets the type of IP addresses used by the subnets of the specified Application Load Balancer or Network Load Balancer.

# Required Parameters
- `IpAddressType`: The IP address type. The possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). Internal load balancers must use ipv4. Network Load Balancers must use ipv4.
- `LoadBalancerArn`: The Amazon Resource Name (ARN) of the load balancer.

"""

set_ip_address_type(IpAddressType, LoadBalancerArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("SetIpAddressType", Dict{String, Any}("IpAddressType"=>IpAddressType, "LoadBalancerArn"=>LoadBalancerArn); aws_config=aws_config)
set_ip_address_type(IpAddressType, LoadBalancerArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("SetIpAddressType", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("IpAddressType"=>IpAddressType, "LoadBalancerArn"=>LoadBalancerArn), args)); aws_config=aws_config)

"""
    SetRulePriorities()

Sets the priorities of the specified rules. You can reorder the rules as long as there are no priority conflicts in the new order. Any existing rules that you do not specify retain their current priority.

# Required Parameters
- `RulePriorities`: The rule priorities.

"""

set_rule_priorities(RulePriorities; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("SetRulePriorities", Dict{String, Any}("RulePriorities"=>RulePriorities); aws_config=aws_config)
set_rule_priorities(RulePriorities, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("SetRulePriorities", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("RulePriorities"=>RulePriorities), args)); aws_config=aws_config)

"""
    SetSecurityGroups()

Associates the specified security groups with the specified Application Load Balancer. The specified security groups override the previously associated security groups. You can't specify a security group for a Network Load Balancer.

# Required Parameters
- `LoadBalancerArn`: The Amazon Resource Name (ARN) of the load balancer.
- `SecurityGroups`: The IDs of the security groups.

"""

set_security_groups(LoadBalancerArn, SecurityGroups; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("SetSecurityGroups", Dict{String, Any}("LoadBalancerArn"=>LoadBalancerArn, "SecurityGroups"=>SecurityGroups); aws_config=aws_config)
set_security_groups(LoadBalancerArn, SecurityGroups, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("SetSecurityGroups", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("LoadBalancerArn"=>LoadBalancerArn, "SecurityGroups"=>SecurityGroups), args)); aws_config=aws_config)

"""
    SetSubnets()

Enables the Availability Zones for the specified public subnets for the specified load balancer. The specified subnets replace the previously enabled subnets. When you specify subnets for a Network Load Balancer, you must include all subnets that were enabled previously, with their existing configurations, plus any additional subnets.

# Required Parameters
- `LoadBalancerArn`: The Amazon Resource Name (ARN) of the load balancer.

# Optional Parameters
- `SubnetMappings`: The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings. [Application Load Balancers] You must specify subnets from at least two Availability Zones. You cannot specify Elastic IP addresses for your subnets. [Network Load Balancers] You can specify subnets from one or more Availability Zones. If you need static IP addresses for your internet-facing load balancer, you can specify one Elastic IP address per subnet. For internal load balancers, you can specify one private IP address per subnet from the IPv4 range of the subnet.
- `Subnets`: The IDs of the public subnets. You must specify subnets from at least two Availability Zones. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.
"""

set_subnets(LoadBalancerArn; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("SetSubnets", Dict{String, Any}("LoadBalancerArn"=>LoadBalancerArn); aws_config=aws_config)
set_subnets(LoadBalancerArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = elastic_load_balancing_v2("SetSubnets", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("LoadBalancerArn"=>LoadBalancerArn), args)); aws_config=aws_config)


text:
function derivative!(df::AbstractArray{<:Number}, f, x::Union{Number,AbstractArray{<:Number}}, fx::AbstractArray{<:Number}, integrator, grad_config)
    tmp = length(x) # We calculate derivtive for all elements in gradient
    if get_current_alg_autodiff(integrator.alg, integrator.cache)
        ForwardDiff.derivative!(df, f, fx, x, grad_config)
        integrator.destats.nf += 1
    else
        DiffEqDiffTools.finite_difference_gradient!(df, f, x, grad_config)
        fdtype = integrator.alg.diff_type
        if fdtype == Val{:forward} || fdtype == Val{:central}
            tmp *= 2
            if eltype(df)<:Complex
              tmp *= 2
            end
        end
        integrator.destats.nf += tmp
    end
    nothing
end

function derivative(f, x::Union{Number,AbstractArray{<:Number}},
                    integrator)
    local d
    tmp = length(x) # We calculate derivtive for all elements in gradient
    alg = unwrap_alg(integrator, true)
    if get_current_alg_autodiff(integrator.alg, integrator.cache)
      integrator.destats.nf += 1
      d = ForwardDiff.derivative(f, x)
    else
      d = DiffEqDiffTools.finite_difference_gradient(f, x, alg.diff_type, eltype(x), Val{false})
      if alg.diff_type == Val{:central} || alg.diff_type == Val{:forward}
          tmp *= 2
      end
      integrator.destats.nf += tmp
      d
    end
end

function jacobian(f, x, integrator)
    alg = unwrap_alg(integrator, true)
    local tmp
    if get_current_alg_autodiff(alg, integrator.cache)
      J = jacobian_autodiff(f, x)
      tmp = 1
    else
      J = jacobian_finitediff(f, x, alg.diff_type)
      if alg.diff_type==Val{:complex} && eltype(x)<:Real
        tmp = length(x)
      else
        tmp = 2*length(x)
      end
    end
    integrator.destats.nf += tmp
    J
end

jacobian_autodiff(f, x) = ForwardDiff.derivative(f,x)
jacobian_autodiff(f, x::AbstractArray) = ForwardDiff.jacobian(f, x)

jacobian_finitediff(f, x, diff_type) =
    DiffEqDiffTools.finite_difference_derivative(f, x, diff_type, eltype(x))
jacobian_finitediff(f, x::AbstractArray, diff_type) =
    DiffEqDiffTools.finite_difference_jacobian(f, x, diff_type, eltype(x), Val{false})

function jacobian!(J::AbstractMatrix{<:Number}, f, x::AbstractArray{<:Number}, fx::AbstractArray{<:Number}, integrator::DiffEqBase.DEIntegrator, jac_config)
    local tmp
    if get_current_alg_autodiff(integrator.alg, integrator.cache)
      ForwardDiff.jacobian!(J, f, fx, x, jac_config)
      tmp = 1
    else
      DiffEqDiffTools.finite_difference_jacobian!(J, f, x, jac_config)
      if integrator.alg.diff_type==Val{:complex} && eltype(x)<:Real
        tmp = length(x)
      else
        tmp = 2*length(x)
      end
    end
    integrator.destats.nf += tmp
    nothing
end

function build_jac_config(alg,f,uf,du1,uprev,u,tmp,du2)
  if !DiffEqBase.has_jac(f)
    if alg_autodiff(alg)
      jac_config = ForwardDiff.JacobianConfig(uf,du1,uprev,ForwardDiff.Chunk{determine_chunksize(u,alg)}())
    else
      if alg.diff_type != Val{:complex}
        jac_config = DiffEqDiffTools.JacobianCache(tmp,du1,du2,alg.diff_type)
      else
        jac_config = DiffEqDiffTools.JacobianCache(Complex{eltype(tmp)}.(tmp),Complex{eltype(du1)}.(du1),nothing,alg.diff_type,eltype(u))
      end
    end
  else
    jac_config = nothing
  end
  jac_config
end

function build_grad_config(alg,f,tf,du1,t)
  if !DiffEqBase.has_tgrad(f)
    if alg_autodiff(alg)
      grad_config = ForwardDiff.DerivativeConfig(tf,du1,t)
    else
      grad_config = DiffEqDiffTools.GradientCache(du1,t,alg.diff_type)
    end
  else
    grad_config = nothing
  end
  grad_config
end