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

"""
    add_custom_routing_endpoints(endpoint_configurations, endpoint_group_arn)
    add_custom_routing_endpoints(endpoint_configurations, endpoint_group_arn, params::Dict{String,<:Any})

Associate a virtual private cloud (VPC) subnet endpoint with your custom routing
accelerator. The listener port range must be large enough to support the number of IP
addresses that can be specified in your subnet. The number of ports required is: subnet
size times the number of ports per destination EC2 instances. For example, a subnet defined
as /24 requires a listener port range of at least 255 ports.  Note: You must have enough
remaining listener ports available to map to the subnet ports, or the call will fail with a
LimitExceededException. By default, all destinations in a subnet in a custom routing
accelerator cannot receive traffic. To enable all destinations to receive traffic, or to
specify individual port mappings that can receive traffic, see the
AllowCustomRoutingTraffic operation.

# Arguments
- `endpoint_configurations`: The list of endpoint objects to add to a custom routing
  accelerator.
- `endpoint_group_arn`: The Amazon Resource Name (ARN) of the endpoint group for the custom
  routing endpoint.

"""
add_custom_routing_endpoints(EndpointConfigurations, EndpointGroupArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("AddCustomRoutingEndpoints", Dict{String, Any}("EndpointConfigurations"=>EndpointConfigurations, "EndpointGroupArn"=>EndpointGroupArn); aws_config=aws_config)
add_custom_routing_endpoints(EndpointConfigurations, EndpointGroupArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("AddCustomRoutingEndpoints", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("EndpointConfigurations"=>EndpointConfigurations, "EndpointGroupArn"=>EndpointGroupArn), params)); aws_config=aws_config)

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

Advertises an IPv4 address range that is provisioned for use with your AWS resources
through bring your own IP addresses (BYOIP). It can take a few minutes before traffic to
the specified addresses starts routing to AWS because of propagation delays.  To stop
advertising the BYOIP address range, use  WithdrawByoipCidr. For more information, see
Bring Your Own IP Addresses (BYOIP) in the AWS Global Accelerator Developer Guide.

# Arguments
- `cidr`: The address range, in CIDR notation. This must be the exact range that you
  provisioned. You can't advertise only a portion of the provisioned range.

"""
advertise_byoip_cidr(Cidr; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("AdvertiseByoipCidr", Dict{String, Any}("Cidr"=>Cidr); aws_config=aws_config)
advertise_byoip_cidr(Cidr, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("AdvertiseByoipCidr", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Cidr"=>Cidr), params)); aws_config=aws_config)

"""
    allow_custom_routing_traffic(endpoint_group_arn, endpoint_id)
    allow_custom_routing_traffic(endpoint_group_arn, endpoint_id, params::Dict{String,<:Any})

Specify the Amazon EC2 instance (destination) IP addresses and ports for a VPC subnet
endpoint that can receive traffic for a custom routing accelerator. You can allow traffic
to all destinations in the subnet endpoint, or allow traffic to a specified list of
destination IP addresses and ports in the subnet. Note that you cannot specify IP addresses
or ports outside of the range that you configured for the endpoint group. After you make
changes, you can verify that the updates are complete by checking the status of your
accelerator: the status changes from IN_PROGRESS to DEPLOYED.

# Arguments
- `endpoint_group_arn`: The Amazon Resource Name (ARN) of the endpoint group.
- `endpoint_id`: An ID for the endpoint. For custom routing accelerators, this is the
  virtual private cloud (VPC) subnet ID.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"AllowAllTrafficToEndpoint"`: Indicates whether all destination IP addresses and ports
  for a specified VPC subnet endpoint can receive traffic from a custom routing accelerator.
  The value is TRUE or FALSE.  When set to TRUE, all destinations in the custom routing VPC
  subnet can receive traffic. Note that you cannot specify destination IP addresses and ports
  when the value is set to TRUE. When set to FALSE (or not specified), you must specify a
  list of destination IP addresses that are allowed to receive traffic. A list of ports is
  optional. If you don't specify a list of ports, the ports that can accept traffic is the
  same as the ports configured for the endpoint group. The default value is FALSE.
- `"DestinationAddresses"`: A list of specific Amazon EC2 instance IP addresses
  (destination addresses) in a subnet that you want to allow to receive traffic. The IP
  addresses must be a subset of the IP addresses that you specified for the endpoint group.
  DestinationAddresses is required if AllowAllTrafficToEndpoint is FALSE or is not specified.
- `"DestinationPorts"`: A list of specific Amazon EC2 instance ports (destination ports)
  that you want to allow to receive traffic.
"""
allow_custom_routing_traffic(EndpointGroupArn, EndpointId; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("AllowCustomRoutingTraffic", Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn, "EndpointId"=>EndpointId); aws_config=aws_config)
allow_custom_routing_traffic(EndpointGroupArn, EndpointId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("AllowCustomRoutingTraffic", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn, "EndpointId"=>EndpointId), params)); aws_config=aws_config)

"""
    create_accelerator(idempotency_token, name)
    create_accelerator(idempotency_token, name, params::Dict{String,<:Any})

Create an accelerator. An accelerator includes one or more listeners that process inbound
connections and direct traffic to one or more endpoint groups, each of which includes
endpoints, such as Network Load Balancers.   Global Accelerator is a global service that
supports endpoints in multiple AWS Regions but you must specify the US West (Oregon) Region
to create or update accelerators.

# Arguments
- `idempotency_token`: A unique, case-sensitive identifier that you provide to ensure the
  idempotency—that is, the uniqueness—of an accelerator.
- `name`: The name of an accelerator. The name 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
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Enabled"`: Indicates whether an accelerator is enabled. The value is true or false. The
  default value is true.  If the value is set to true, an accelerator cannot be deleted. If
  set to false, the accelerator can be deleted.
- `"IpAddressType"`: The value for the address type must be IPv4.
- `"IpAddresses"`: Optionally, if you've added your own IP address pool to Global
  Accelerator (BYOIP), you can choose IP addresses from your own pool to use for the
  accelerator's static IP addresses when you create an accelerator. You can specify one or
  two addresses, separated by a space. Do not include the /32 suffix. Only one IP address
  from each of your IP address ranges can be used for each accelerator. If you specify only
  one IP address from your IP address range, Global Accelerator assigns a second static IP
  address for the accelerator from the AWS IP address pool. Note that you can't update IP
  addresses for an existing accelerator. To change them, you must create a new accelerator
  with the new addresses. For more information, see Bring Your Own IP Addresses (BYOIP) in
  the AWS Global Accelerator Developer Guide.
- `"Tags"`: Create tags for an accelerator. For more information, see Tagging in AWS Global
  Accelerator in the AWS Global Accelerator Developer Guide.
"""
create_accelerator(IdempotencyToken, Name; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("CreateAccelerator", Dict{String, Any}("IdempotencyToken"=>IdempotencyToken, "Name"=>Name); aws_config=aws_config)
create_accelerator(IdempotencyToken, Name, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("CreateAccelerator", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("IdempotencyToken"=>IdempotencyToken, "Name"=>Name), params)); aws_config=aws_config)

"""
    create_custom_routing_accelerator(idempotency_token, name)
    create_custom_routing_accelerator(idempotency_token, name, params::Dict{String,<:Any})

Create a custom routing accelerator. A custom routing accelerator directs traffic to one of
possibly thousands of Amazon EC2 instance destinations running in a single or multiple
virtual private clouds (VPC) subnet endpoints. Be aware that, by default, all destination
EC2 instances in a VPC subnet endpoint cannot receive traffic. To enable all destinations
to receive traffic, or to specify individual port mappings that can receive traffic, see
the  AllowCustomRoutingTraffic operation.  Global Accelerator is a global service that
supports endpoints in multiple AWS Regions but you must specify the US West (Oregon) Region
to create or update accelerators.

# Arguments
- `idempotency_token`: A unique, case-sensitive identifier that you provide to ensure the
  idempotency—that is, the uniqueness—of the request.
- `name`: The name of a custom routing accelerator. The name can have a maximum of 64
  characters, must contain only alphanumeric characters or hyphens (-), and must not begin or
  end with a hyphen.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Enabled"`: Indicates whether an accelerator is enabled. The value is true or false. The
  default value is true.  If the value is set to true, an accelerator cannot be deleted. If
  set to false, the accelerator can be deleted.
- `"IpAddressType"`: The value for the address type must be IPv4.
- `"IpAddresses"`: Optionally, if you've added your own IP address pool to Global
  Accelerator (BYOIP), you can choose IP addresses from your own pool to use for the
  accelerator's static IP addresses when you create an accelerator. You can specify one or
  two addresses, separated by a space. Do not include the /32 suffix. Only one IP address
  from each of your IP address ranges can be used for each accelerator. If you specify only
  one IP address from your IP address range, Global Accelerator assigns a second static IP
  address for the accelerator from the AWS IP address pool. Note that you can't update IP
  addresses for an existing accelerator. To change them, you must create a new accelerator
  with the new addresses. For more information, see Bring your own IP addresses (BYOIP) in
  the AWS Global Accelerator Developer Guide.
- `"Tags"`: Create tags for an accelerator. For more information, see Tagging in AWS Global
  Accelerator in the AWS Global Accelerator Developer Guide.
"""
create_custom_routing_accelerator(IdempotencyToken, Name; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("CreateCustomRoutingAccelerator", Dict{String, Any}("IdempotencyToken"=>IdempotencyToken, "Name"=>Name); aws_config=aws_config)
create_custom_routing_accelerator(IdempotencyToken, Name, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("CreateCustomRoutingAccelerator", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("IdempotencyToken"=>IdempotencyToken, "Name"=>Name), params)); aws_config=aws_config)

"""
    create_custom_routing_endpoint_group(destination_configurations, endpoint_group_region, idempotency_token, listener_arn)
    create_custom_routing_endpoint_group(destination_configurations, endpoint_group_region, idempotency_token, listener_arn, params::Dict{String,<:Any})

Create an endpoint group for the specified listener for a custom routing accelerator. An
endpoint group is a collection of endpoints in one AWS Region.

# Arguments
- `destination_configurations`: Sets the port range and protocol for all endpoints (virtual
  private cloud subnets) in a custom routing endpoint group to accept client traffic on.
- `endpoint_group_region`: The AWS Region where the endpoint group is located. A listener
  can have only one endpoint group in a specific Region.
- `idempotency_token`: A unique, case-sensitive identifier that you provide to ensure the
  idempotency—that is, the uniqueness—of the request.
- `listener_arn`: The Amazon Resource Name (ARN) of the listener for a custom routing
  endpoint.

"""
create_custom_routing_endpoint_group(DestinationConfigurations, EndpointGroupRegion, IdempotencyToken, ListenerArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("CreateCustomRoutingEndpointGroup", Dict{String, Any}("DestinationConfigurations"=>DestinationConfigurations, "EndpointGroupRegion"=>EndpointGroupRegion, "IdempotencyToken"=>IdempotencyToken, "ListenerArn"=>ListenerArn); aws_config=aws_config)
create_custom_routing_endpoint_group(DestinationConfigurations, EndpointGroupRegion, IdempotencyToken, ListenerArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("CreateCustomRoutingEndpointGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DestinationConfigurations"=>DestinationConfigurations, "EndpointGroupRegion"=>EndpointGroupRegion, "IdempotencyToken"=>IdempotencyToken, "ListenerArn"=>ListenerArn), params)); aws_config=aws_config)

"""
    create_custom_routing_listener(accelerator_arn, idempotency_token, port_ranges)
    create_custom_routing_listener(accelerator_arn, idempotency_token, port_ranges, params::Dict{String,<:Any})

Create a listener to process inbound connections from clients to a custom routing
accelerator. Connections arrive to assigned static IP addresses on the port range that you
specify.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the accelerator for a custom routing
  listener.
- `idempotency_token`: A unique, case-sensitive identifier that you provide to ensure the
  idempotency—that is, the uniqueness—of the request.
- `port_ranges`: The port range to support for connections from clients to your
  accelerator. Separately, you set port ranges for endpoints. For more information, see About
  endpoints for custom routing accelerators.

"""
create_custom_routing_listener(AcceleratorArn, IdempotencyToken, PortRanges; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("CreateCustomRoutingListener", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn, "IdempotencyToken"=>IdempotencyToken, "PortRanges"=>PortRanges); aws_config=aws_config)
create_custom_routing_listener(AcceleratorArn, IdempotencyToken, PortRanges, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("CreateCustomRoutingListener", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn, "IdempotencyToken"=>IdempotencyToken, "PortRanges"=>PortRanges), params)); aws_config=aws_config)

"""
    create_endpoint_group(endpoint_group_region, idempotency_token, listener_arn)
    create_endpoint_group(endpoint_group_region, idempotency_token, listener_arn, params::Dict{String,<:Any})

Create an endpoint group for the specified listener. An endpoint group is a collection of
endpoints in one AWS Region. A resource must be valid and active when you add it as an
endpoint.

# Arguments
- `endpoint_group_region`: The AWS Region where the endpoint group is located. A listener
  can have only one endpoint group in a specific Region.
- `idempotency_token`: A unique, case-sensitive identifier that you provide to ensure the
  idempotency—that is, the uniqueness—of the request.
- `listener_arn`: The Amazon Resource Name (ARN) of the listener.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"EndpointConfigurations"`: The list of endpoint objects.
- `"HealthCheckIntervalSeconds"`: The time—10 seconds or 30 seconds—between each health
  check for an endpoint. The default value is 30.
- `"HealthCheckPath"`: If the protocol is HTTP/S, then this specifies the path that is the
  destination for health check targets. The default value is slash (/).
- `"HealthCheckPort"`: The port that AWS Global Accelerator uses to check the health of
  endpoints that are part of this endpoint group. The default port is the listener port that
  this endpoint group is associated with. If listener port is a list of ports, Global
  Accelerator uses the first port in the list.
- `"HealthCheckProtocol"`: The protocol that AWS Global Accelerator uses to check the
  health of endpoints that are part of this endpoint group. The default value is TCP.
- `"PortOverrides"`: Override specific listener ports used to route traffic to endpoints
  that are part of this endpoint group. For example, you can create a port override in which
  the listener receives user traffic on ports 80 and 443, but your accelerator routes that
  traffic to ports 1080 and 1443, respectively, on the endpoints. For more information, see
  Port overrides in the AWS Global Accelerator Developer Guide.
- `"ThresholdCount"`: The number of consecutive health checks required to set the state of
  a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default
  value is 3.
- `"TrafficDialPercentage"`: The percentage of traffic to send to an AWS Region. Additional
  traffic is distributed to other endpoint groups for this listener.  Use this action to
  increase (dial up) or decrease (dial down) traffic to a specific Region. The percentage is
  applied to the traffic that would otherwise have been routed to the Region based on optimal
  routing. The default value is 100.
"""
create_endpoint_group(EndpointGroupRegion, IdempotencyToken, ListenerArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("CreateEndpointGroup", Dict{String, Any}("EndpointGroupRegion"=>EndpointGroupRegion, "IdempotencyToken"=>IdempotencyToken, "ListenerArn"=>ListenerArn); aws_config=aws_config)
create_endpoint_group(EndpointGroupRegion, IdempotencyToken, ListenerArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("CreateEndpointGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("EndpointGroupRegion"=>EndpointGroupRegion, "IdempotencyToken"=>IdempotencyToken, "ListenerArn"=>ListenerArn), params)); aws_config=aws_config)

"""
    create_listener(accelerator_arn, idempotency_token, port_ranges, protocol)
    create_listener(accelerator_arn, idempotency_token, port_ranges, protocol, params::Dict{String,<:Any})

Create a listener to process inbound connections from clients to an accelerator.
Connections arrive to assigned static IP addresses on a port, port range, or list of port
ranges that you specify.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of your accelerator.
- `idempotency_token`: A unique, case-sensitive identifier that you provide to ensure the
  idempotency—that is, the uniqueness—of the request.
- `port_ranges`: The list of port ranges to support for connections from clients to your
  accelerator.
- `protocol`: The protocol for connections from clients to your accelerator.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"ClientAffinity"`: Client affinity lets you direct all requests from a user to the same
  endpoint, if you have stateful applications, regardless of the port and protocol of the
  client request. Client affinity gives you control over whether to always route each client
  to the same specific endpoint. AWS Global Accelerator uses a consistent-flow hashing
  algorithm to choose the optimal endpoint for a connection. If client affinity is NONE,
  Global Accelerator uses the \"five-tuple\" (5-tuple) properties—source IP address, source
  port, destination IP address, destination port, and protocol—to select the hash value,
  and then chooses the best endpoint. However, with this setting, if someone uses different
  ports to connect to Global Accelerator, their connections might not be always routed to the
  same endpoint because the hash value changes.  If you want a given client to always be
  routed to the same endpoint, set client affinity to SOURCE_IP instead. When you use the
  SOURCE_IP setting, Global Accelerator uses the \"two-tuple\" (2-tuple) properties— source
  (client) IP address and destination IP address—to select the hash value. The default
  value is NONE.
"""
create_listener(AcceleratorArn, IdempotencyToken, PortRanges, Protocol; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("CreateListener", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn, "IdempotencyToken"=>IdempotencyToken, "PortRanges"=>PortRanges, "Protocol"=>Protocol); aws_config=aws_config)
create_listener(AcceleratorArn, IdempotencyToken, PortRanges, Protocol, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("CreateListener", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn, "IdempotencyToken"=>IdempotencyToken, "PortRanges"=>PortRanges, "Protocol"=>Protocol), params)); aws_config=aws_config)

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

Delete an accelerator. Before you can delete an accelerator, you must disable it and remove
all dependent resources (listeners and endpoint groups). To disable the accelerator, update
the accelerator to set Enabled to false.  When you create an accelerator, by default,
Global Accelerator provides you with a set of two static IP addresses. Alternatively, you
can bring your own IP address ranges to Global Accelerator and assign IP addresses from
those ranges.  The IP addresses are assigned to your accelerator for as long as it exists,
even if you disable the accelerator and it no longer accepts or routes traffic. However,
when you delete an accelerator, you lose the static IP addresses that are assigned to the
accelerator, so you can no longer route traffic by using them. As a best practice, ensure
that you have permissions in place to avoid inadvertently deleting accelerators. You can
use IAM policies with Global Accelerator to limit the users who have permissions to delete
an accelerator. For more information, see Authentication and Access Control in the AWS
Global Accelerator Developer Guide.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of an accelerator.

"""
delete_accelerator(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeleteAccelerator", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
delete_accelerator(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeleteAccelerator", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

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

Delete a custom routing accelerator. Before you can delete an accelerator, you must disable
it and remove all dependent resources (listeners and endpoint groups). To disable the
accelerator, update the accelerator to set Enabled to false.  When you create a custom
routing accelerator, by default, Global Accelerator provides you with a set of two static
IP addresses.  The IP addresses are assigned to your accelerator for as long as it exists,
even if you disable the accelerator and it no longer accepts or routes traffic. However,
when you delete an accelerator, you lose the static IP addresses that are assigned to the
accelerator, so you can no longer route traffic by using them. As a best practice, ensure
that you have permissions in place to avoid inadvertently deleting accelerators. You can
use IAM policies with Global Accelerator to limit the users who have permissions to delete
an accelerator. For more information, see Authentication and Access Control in the AWS
Global Accelerator Developer Guide.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the custom routing accelerator to
  delete.

"""
delete_custom_routing_accelerator(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeleteCustomRoutingAccelerator", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
delete_custom_routing_accelerator(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeleteCustomRoutingAccelerator", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

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

Delete an endpoint group from a listener for a custom routing accelerator.

# Arguments
- `endpoint_group_arn`: The Amazon Resource Name (ARN) of the endpoint group to delete.

"""
delete_custom_routing_endpoint_group(EndpointGroupArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeleteCustomRoutingEndpointGroup", Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn); aws_config=aws_config)
delete_custom_routing_endpoint_group(EndpointGroupArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeleteCustomRoutingEndpointGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn), params)); aws_config=aws_config)

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

Delete a listener for a custom routing accelerator.

# Arguments
- `listener_arn`: The Amazon Resource Name (ARN) of the listener to delete.

"""
delete_custom_routing_listener(ListenerArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeleteCustomRoutingListener", Dict{String, Any}("ListenerArn"=>ListenerArn); aws_config=aws_config)
delete_custom_routing_listener(ListenerArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeleteCustomRoutingListener", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ListenerArn"=>ListenerArn), params)); aws_config=aws_config)

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

Delete an endpoint group from a listener.

# Arguments
- `endpoint_group_arn`: The Amazon Resource Name (ARN) of the endpoint group to delete.

"""
delete_endpoint_group(EndpointGroupArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeleteEndpointGroup", Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn); aws_config=aws_config)
delete_endpoint_group(EndpointGroupArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeleteEndpointGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn), params)); aws_config=aws_config)

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

Delete a listener from an accelerator.

# Arguments
- `listener_arn`: The Amazon Resource Name (ARN) of the listener.

"""
delete_listener(ListenerArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeleteListener", Dict{String, Any}("ListenerArn"=>ListenerArn); aws_config=aws_config)
delete_listener(ListenerArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeleteListener", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ListenerArn"=>ListenerArn), params)); aws_config=aws_config)

"""
    deny_custom_routing_traffic(endpoint_group_arn, endpoint_id)
    deny_custom_routing_traffic(endpoint_group_arn, endpoint_id, params::Dict{String,<:Any})

Specify the Amazon EC2 instance (destination) IP addresses and ports for a VPC subnet
endpoint that cannot receive traffic for a custom routing accelerator. You can deny traffic
to all destinations in the VPC endpoint, or deny traffic to a specified list of destination
IP addresses and ports. Note that you cannot specify IP addresses or ports outside of the
range that you configured for the endpoint group. After you make changes, you can verify
that the updates are complete by checking the status of your accelerator: the status
changes from IN_PROGRESS to DEPLOYED.

# Arguments
- `endpoint_group_arn`: The Amazon Resource Name (ARN) of the endpoint group.
- `endpoint_id`: An ID for the endpoint. For custom routing accelerators, this is the
  virtual private cloud (VPC) subnet ID.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"DenyAllTrafficToEndpoint"`: Indicates whether all destination IP addresses and ports
  for a specified VPC subnet endpoint cannot receive traffic from a custom routing
  accelerator. The value is TRUE or FALSE.  When set to TRUE, no destinations in the custom
  routing VPC subnet can receive traffic. Note that you cannot specify destination IP
  addresses and ports when the value is set to TRUE. When set to FALSE (or not specified),
  you must specify a list of destination IP addresses that cannot receive traffic. A list of
  ports is optional. If you don't specify a list of ports, the ports that can accept traffic
  is the same as the ports configured for the endpoint group. The default value is FALSE.
- `"DestinationAddresses"`: A list of specific Amazon EC2 instance IP addresses
  (destination addresses) in a subnet that you want to prevent from receiving traffic. The IP
  addresses must be a subset of the IP addresses allowed for the VPC subnet associated with
  the endpoint group.
- `"DestinationPorts"`: A list of specific Amazon EC2 instance ports (destination ports) in
  a subnet endpoint that you want to prevent from receiving traffic.
"""
deny_custom_routing_traffic(EndpointGroupArn, EndpointId; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DenyCustomRoutingTraffic", Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn, "EndpointId"=>EndpointId); aws_config=aws_config)
deny_custom_routing_traffic(EndpointGroupArn, EndpointId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DenyCustomRoutingTraffic", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn, "EndpointId"=>EndpointId), params)); aws_config=aws_config)

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

Releases the specified address range that you provisioned to use with your AWS resources
through bring your own IP addresses (BYOIP) and deletes the corresponding address pool.
Before you can release an address range, you must stop advertising it by using
WithdrawByoipCidr and you must not have any accelerators that are using static IP addresses
allocated from its address range.  For more information, see Bring Your Own IP Addresses
(BYOIP) in the AWS Global Accelerator Developer Guide.

# Arguments
- `cidr`: The address range, in CIDR notation. The prefix must be the same prefix that you
  specified when you provisioned the address range.

"""
deprovision_byoip_cidr(Cidr; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeprovisionByoipCidr", Dict{String, Any}("Cidr"=>Cidr); aws_config=aws_config)
deprovision_byoip_cidr(Cidr, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DeprovisionByoipCidr", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Cidr"=>Cidr), params)); aws_config=aws_config)

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

Describe an accelerator.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the accelerator to describe.

"""
describe_accelerator(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeAccelerator", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
describe_accelerator(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeAccelerator", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

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

Describe the attributes of an accelerator.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the accelerator with the attributes
  that you want to describe.

"""
describe_accelerator_attributes(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeAcceleratorAttributes", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
describe_accelerator_attributes(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeAcceleratorAttributes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

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

Describe a custom routing accelerator.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the accelerator to describe.

"""
describe_custom_routing_accelerator(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeCustomRoutingAccelerator", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
describe_custom_routing_accelerator(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeCustomRoutingAccelerator", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

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

Describe the attributes of a custom routing accelerator.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the custom routing accelerator to
  describe the attributes for.

"""
describe_custom_routing_accelerator_attributes(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeCustomRoutingAcceleratorAttributes", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
describe_custom_routing_accelerator_attributes(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeCustomRoutingAcceleratorAttributes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

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

Describe an endpoint group for a custom routing accelerator.

# Arguments
- `endpoint_group_arn`: The Amazon Resource Name (ARN) of the endpoint group to describe.

"""
describe_custom_routing_endpoint_group(EndpointGroupArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeCustomRoutingEndpointGroup", Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn); aws_config=aws_config)
describe_custom_routing_endpoint_group(EndpointGroupArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeCustomRoutingEndpointGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn), params)); aws_config=aws_config)

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

The description of a listener for a custom routing accelerator.

# Arguments
- `listener_arn`: The Amazon Resource Name (ARN) of the listener to describe.

"""
describe_custom_routing_listener(ListenerArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeCustomRoutingListener", Dict{String, Any}("ListenerArn"=>ListenerArn); aws_config=aws_config)
describe_custom_routing_listener(ListenerArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeCustomRoutingListener", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ListenerArn"=>ListenerArn), params)); aws_config=aws_config)

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

Describe an endpoint group.

# Arguments
- `endpoint_group_arn`: The Amazon Resource Name (ARN) of the endpoint group to describe.

"""
describe_endpoint_group(EndpointGroupArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeEndpointGroup", Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn); aws_config=aws_config)
describe_endpoint_group(EndpointGroupArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeEndpointGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn), params)); aws_config=aws_config)

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

Describe a listener.

# Arguments
- `listener_arn`: The Amazon Resource Name (ARN) of the listener to describe.

"""
describe_listener(ListenerArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeListener", Dict{String, Any}("ListenerArn"=>ListenerArn); aws_config=aws_config)
describe_listener(ListenerArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("DescribeListener", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ListenerArn"=>ListenerArn), params)); aws_config=aws_config)

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

List the accelerators for an AWS account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxResults"`: The number of Global Accelerator objects that you want to return with
  this call. The default value is 10.
- `"NextToken"`: The token for the next set of results. You receive this token from a
  previous call.
"""
list_accelerators(; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListAccelerators"; aws_config=aws_config)
list_accelerators(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListAccelerators", params; aws_config=aws_config)

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

Lists the IP address ranges that were specified in calls to ProvisionByoipCidr, including
the current state and a history of state changes.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxResults"`: The maximum number of results to return with a single call. To retrieve
  the remaining results, make another call with the returned nextToken value.
- `"NextToken"`: The token for the next page of results.
"""
list_byoip_cidrs(; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListByoipCidrs"; aws_config=aws_config)
list_byoip_cidrs(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListByoipCidrs", params; aws_config=aws_config)

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

List the custom routing accelerators for an AWS account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxResults"`: The number of custom routing Global Accelerator objects that you want to
  return with this call. The default value is 10.
- `"NextToken"`: The token for the next set of results. You receive this token from a
  previous call.
"""
list_custom_routing_accelerators(; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListCustomRoutingAccelerators"; aws_config=aws_config)
list_custom_routing_accelerators(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListCustomRoutingAccelerators", params; aws_config=aws_config)

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

List the endpoint groups that are associated with a listener for a custom routing
accelerator.

# Arguments
- `listener_arn`: The Amazon Resource Name (ARN) of the listener to list endpoint groups
  for.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxResults"`: The number of endpoint group objects that you want to return with this
  call. The default value is 10.
- `"NextToken"`: The token for the next set of results. You receive this token from a
  previous call.
"""
list_custom_routing_endpoint_groups(ListenerArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListCustomRoutingEndpointGroups", Dict{String, Any}("ListenerArn"=>ListenerArn); aws_config=aws_config)
list_custom_routing_endpoint_groups(ListenerArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListCustomRoutingEndpointGroups", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ListenerArn"=>ListenerArn), params)); aws_config=aws_config)

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

List the listeners for a custom routing accelerator.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the accelerator to list listeners
  for.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxResults"`: The number of listener objects that you want to return with this call.
  The default value is 10.
- `"NextToken"`: The token for the next set of results. You receive this token from a
  previous call.
"""
list_custom_routing_listeners(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListCustomRoutingListeners", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
list_custom_routing_listeners(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListCustomRoutingListeners", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

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

Provides a complete mapping from the public accelerator IP address and port to destination
EC2 instance IP addresses and ports in the virtual public cloud (VPC) subnet endpoint for a
custom routing accelerator. For each subnet endpoint that you add, Global Accelerator
creates a new static port mapping for the accelerator. The port mappings don't change after
Global Accelerator generates them, so you can retrieve and cache the full mapping on your
servers.  If you remove a subnet from your accelerator, Global Accelerator removes
(reclaims) the port mappings. If you add a subnet to your accelerator, Global Accelerator
creates new port mappings (the existing ones don't change). If you add or remove EC2
instances in your subnet, the port mappings don't change, because the mappings are created
when you add the subnet to Global Accelerator. The mappings also include a flag for each
destination denoting which destination IP addresses and ports are allowed or denied traffic.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the accelerator to list the custom
  routing port mappings for.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"EndpointGroupArn"`: The Amazon Resource Name (ARN) of the endpoint group to list the
  custom routing port mappings for.
- `"MaxResults"`: The number of destination port mappings that you want to return with this
  call. The default value is 10.
- `"NextToken"`: The token for the next set of results. You receive this token from a
  previous call.
"""
list_custom_routing_port_mappings(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListCustomRoutingPortMappings", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
list_custom_routing_port_mappings(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListCustomRoutingPortMappings", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

"""
    list_custom_routing_port_mappings_by_destination(destination_address, endpoint_id)
    list_custom_routing_port_mappings_by_destination(destination_address, endpoint_id, params::Dict{String,<:Any})

List the port mappings for a specific EC2 instance (destination) in a VPC subnet endpoint.
The response is the mappings for one destination IP address. This is useful when your
subnet endpoint has mappings that span multiple custom routing accelerators in your
account, or for scenarios where you only want to list the port mappings for a specific
destination instance.

# Arguments
- `destination_address`: The endpoint IP address in a virtual private cloud (VPC) subnet
  for which you want to receive back port mappings.
- `endpoint_id`: The ID for the virtual private cloud (VPC) subnet.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxResults"`: The number of destination port mappings that you want to return with this
  call. The default value is 10.
- `"NextToken"`: The token for the next set of results. You receive this token from a
  previous call.
"""
list_custom_routing_port_mappings_by_destination(DestinationAddress, EndpointId; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListCustomRoutingPortMappingsByDestination", Dict{String, Any}("DestinationAddress"=>DestinationAddress, "EndpointId"=>EndpointId); aws_config=aws_config)
list_custom_routing_port_mappings_by_destination(DestinationAddress, EndpointId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListCustomRoutingPortMappingsByDestination", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DestinationAddress"=>DestinationAddress, "EndpointId"=>EndpointId), params)); aws_config=aws_config)

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

List the endpoint groups that are associated with a listener.

# Arguments
- `listener_arn`: The Amazon Resource Name (ARN) of the listener.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxResults"`: The number of endpoint group objects that you want to return with this
  call. The default value is 10.
- `"NextToken"`: The token for the next set of results. You receive this token from a
  previous call.
"""
list_endpoint_groups(ListenerArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListEndpointGroups", Dict{String, Any}("ListenerArn"=>ListenerArn); aws_config=aws_config)
list_endpoint_groups(ListenerArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListEndpointGroups", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ListenerArn"=>ListenerArn), params)); aws_config=aws_config)

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

List the listeners for an accelerator.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the accelerator for which you want
  to list listener objects.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxResults"`: The number of listener objects that you want to return with this call.
  The default value is 10.
- `"NextToken"`: The token for the next set of results. You receive this token from a
  previous call.
"""
list_listeners(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListListeners", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
list_listeners(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListListeners", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

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

List all tags for an accelerator.  For more information, see Tagging in AWS Global
Accelerator in the AWS Global Accelerator Developer Guide.

# Arguments
- `resource_arn`: The Amazon Resource Name (ARN) of the accelerator to list tags for. An
  ARN uniquely identifies an accelerator.

"""
list_tags_for_resource(ResourceArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListTagsForResource", Dict{String, Any}("ResourceArn"=>ResourceArn); aws_config=aws_config)
list_tags_for_resource(ResourceArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ListTagsForResource", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ResourceArn"=>ResourceArn), params)); aws_config=aws_config)

"""
    provision_byoip_cidr(cidr, cidr_authorization_context)
    provision_byoip_cidr(cidr, cidr_authorization_context, params::Dict{String,<:Any})

Provisions an IP address range to use with your AWS resources through bring your own IP
addresses (BYOIP) and creates a corresponding address pool. After the address range is
provisioned, it is ready to be advertised using  AdvertiseByoipCidr. For more information,
see Bring Your Own IP Addresses (BYOIP) in the AWS Global Accelerator Developer Guide.

# Arguments
- `cidr`: The public IPv4 address range, in CIDR notation. The most specific IP prefix that
  you can specify is /24. The address range cannot overlap with another address range that
  you've brought to this or another Region.
- `cidr_authorization_context`: A signed document that proves that you are authorized to
  bring the specified IP address range to Amazon using BYOIP.

"""
provision_byoip_cidr(Cidr, CidrAuthorizationContext; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ProvisionByoipCidr", Dict{String, Any}("Cidr"=>Cidr, "CidrAuthorizationContext"=>CidrAuthorizationContext); aws_config=aws_config)
provision_byoip_cidr(Cidr, CidrAuthorizationContext, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("ProvisionByoipCidr", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Cidr"=>Cidr, "CidrAuthorizationContext"=>CidrAuthorizationContext), params)); aws_config=aws_config)

"""
    remove_custom_routing_endpoints(endpoint_group_arn, endpoint_ids)
    remove_custom_routing_endpoints(endpoint_group_arn, endpoint_ids, params::Dict{String,<:Any})

Remove endpoints from a custom routing accelerator.

# Arguments
- `endpoint_group_arn`: The Amazon Resource Name (ARN) of the endpoint group to remove
  endpoints from.
- `endpoint_ids`: The IDs for the endpoints. For custom routing accelerators, endpoint IDs
  are the virtual private cloud (VPC) subnet IDs.

"""
remove_custom_routing_endpoints(EndpointGroupArn, EndpointIds; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("RemoveCustomRoutingEndpoints", Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn, "EndpointIds"=>EndpointIds); aws_config=aws_config)
remove_custom_routing_endpoints(EndpointGroupArn, EndpointIds, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("RemoveCustomRoutingEndpoints", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn, "EndpointIds"=>EndpointIds), params)); aws_config=aws_config)

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

Add tags to an accelerator resource.  For more information, see Tagging in AWS Global
Accelerator in the AWS Global Accelerator Developer Guide.

# Arguments
- `resource_arn`: The Amazon Resource Name (ARN) of the Global Accelerator resource to add
  tags to. An ARN uniquely identifies a resource.
- `tags`: The tags to add to a resource. A tag consists of a key and a value that you
  define.

"""
tag_resource(ResourceArn, Tags; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("TagResource", Dict{String, Any}("ResourceArn"=>ResourceArn, "Tags"=>Tags); aws_config=aws_config)
tag_resource(ResourceArn, Tags, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("TagResource", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ResourceArn"=>ResourceArn, "Tags"=>Tags), params)); aws_config=aws_config)

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

Remove tags from a Global Accelerator resource. When you specify a tag key, the action
removes both that key and its associated value. The operation succeeds even if you attempt
to remove tags from an accelerator that was already removed. For more information, see
Tagging in AWS Global Accelerator in the AWS Global Accelerator Developer Guide.

# Arguments
- `resource_arn`: The Amazon Resource Name (ARN) of the Global Accelerator resource to
  remove tags from. An ARN uniquely identifies a resource.
- `tag_keys`: The tag key pairs that you want to remove from the specified resources.

"""
untag_resource(ResourceArn, TagKeys; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UntagResource", Dict{String, Any}("ResourceArn"=>ResourceArn, "TagKeys"=>TagKeys); aws_config=aws_config)
untag_resource(ResourceArn, TagKeys, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UntagResource", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ResourceArn"=>ResourceArn, "TagKeys"=>TagKeys), params)); aws_config=aws_config)

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

Update an accelerator.   Global Accelerator is a global service that supports endpoints in
multiple AWS Regions but you must specify the US West (Oregon) Region to create or update
accelerators.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the accelerator to update.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Enabled"`: Indicates whether an accelerator is enabled. The value is true or false. The
  default value is true.  If the value is set to true, the accelerator cannot be deleted. If
  set to false, the accelerator can be deleted.
- `"IpAddressType"`: The IP address type, which must be IPv4.
- `"Name"`: The name of the accelerator. The name can have a maximum of 32 characters, must
  contain only alphanumeric characters or hyphens (-), and must not begin or end with a
  hyphen.
"""
update_accelerator(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateAccelerator", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
update_accelerator(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateAccelerator", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

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

Update the attributes for an accelerator.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the accelerator that you want to
  update.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"FlowLogsEnabled"`: Update whether flow logs are enabled. The default value is false. If
  the value is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified. For more
  information, see Flow Logs in the AWS Global Accelerator Developer Guide.
- `"FlowLogsS3Bucket"`: The name of the Amazon S3 bucket for the flow logs. Attribute is
  required if FlowLogsEnabled is true. The bucket must exist and have a bucket policy that
  grants AWS Global Accelerator permission to write to the bucket.
- `"FlowLogsS3Prefix"`: Update the prefix for the location in the Amazon S3 bucket for the
  flow logs. Attribute is required if FlowLogsEnabled is true.  If you don’t specify a
  prefix, the flow logs are stored in the root of the bucket. If you specify slash (/) for
  the S3 bucket prefix, the log file bucket folder structure will include a double slash
  (//), like the following: s3-bucket_name//AWSLogs/aws_account_id
"""
update_accelerator_attributes(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateAcceleratorAttributes", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
update_accelerator_attributes(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateAcceleratorAttributes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

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

Update a custom routing accelerator.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the accelerator to update.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Enabled"`: Indicates whether an accelerator is enabled. The value is true or false. The
  default value is true.  If the value is set to true, the accelerator cannot be deleted. If
  set to false, the accelerator can be deleted.
- `"IpAddressType"`: The value for the address type must be IPv4.
- `"Name"`: The name of the accelerator. The name can have a maximum of 32 characters, must
  contain only alphanumeric characters or hyphens (-), and must not begin or end with a
  hyphen.
"""
update_custom_routing_accelerator(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateCustomRoutingAccelerator", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
update_custom_routing_accelerator(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateCustomRoutingAccelerator", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

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

Update the attributes for a custom routing accelerator.

# Arguments
- `accelerator_arn`: The Amazon Resource Name (ARN) of the custom routing accelerator to
  update attributes for.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"FlowLogsEnabled"`: Update whether flow logs are enabled. The default value is false. If
  the value is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified. For more
  information, see Flow Logs in the AWS Global Accelerator Developer Guide.
- `"FlowLogsS3Bucket"`: The name of the Amazon S3 bucket for the flow logs. Attribute is
  required if FlowLogsEnabled is true. The bucket must exist and have a bucket policy that
  grants AWS Global Accelerator permission to write to the bucket.
- `"FlowLogsS3Prefix"`: Update the prefix for the location in the Amazon S3 bucket for the
  flow logs. Attribute is required if FlowLogsEnabled is true.  If you don’t specify a
  prefix, the flow logs are stored in the root of the bucket. If you specify slash (/) for
  the S3 bucket prefix, the log file bucket folder structure will include a double slash
  (//), like the following: DOC-EXAMPLE-BUCKET//AWSLogs/aws_account_id
"""
update_custom_routing_accelerator_attributes(AcceleratorArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateCustomRoutingAcceleratorAttributes", Dict{String, Any}("AcceleratorArn"=>AcceleratorArn); aws_config=aws_config)
update_custom_routing_accelerator_attributes(AcceleratorArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateCustomRoutingAcceleratorAttributes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("AcceleratorArn"=>AcceleratorArn), params)); aws_config=aws_config)

"""
    update_custom_routing_listener(listener_arn, port_ranges)
    update_custom_routing_listener(listener_arn, port_ranges, params::Dict{String,<:Any})

Update a listener for a custom routing accelerator.

# Arguments
- `listener_arn`: The Amazon Resource Name (ARN) of the listener to update.
- `port_ranges`: The updated port range to support for connections from clients to your
  accelerator. If you remove ports that are currently being used by a subnet endpoint, the
  call fails. Separately, you set port ranges for endpoints. For more information, see About
  endpoints for custom routing accelerators.

"""
update_custom_routing_listener(ListenerArn, PortRanges; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateCustomRoutingListener", Dict{String, Any}("ListenerArn"=>ListenerArn, "PortRanges"=>PortRanges); aws_config=aws_config)
update_custom_routing_listener(ListenerArn, PortRanges, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateCustomRoutingListener", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ListenerArn"=>ListenerArn, "PortRanges"=>PortRanges), params)); aws_config=aws_config)

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

Update an endpoint group. A resource must be valid and active when you add it as an
endpoint.

# Arguments
- `endpoint_group_arn`: The Amazon Resource Name (ARN) of the endpoint group.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"EndpointConfigurations"`: The list of endpoint objects. A resource must be valid and
  active when you add it as an endpoint.
- `"HealthCheckIntervalSeconds"`: The time—10 seconds or 30 seconds—between each health
  check for an endpoint. The default value is 30.
- `"HealthCheckPath"`: If the protocol is HTTP/S, then this specifies the path that is the
  destination for health check targets. The default value is slash (/).
- `"HealthCheckPort"`: The port that AWS Global Accelerator uses to check the health of
  endpoints that are part of this endpoint group. The default port is the listener port that
  this endpoint group is associated with. If the listener port is a list of ports, Global
  Accelerator uses the first port in the list.
- `"HealthCheckProtocol"`: The protocol that AWS Global Accelerator uses to check the
  health of endpoints that are part of this endpoint group. The default value is TCP.
- `"PortOverrides"`: Override specific listener ports used to route traffic to endpoints
  that are part of this endpoint group. For example, you can create a port override in which
  the listener receives user traffic on ports 80 and 443, but your accelerator routes that
  traffic to ports 1080 and 1443, respectively, on the endpoints. For more information, see
  Port overrides in the AWS Global Accelerator Developer Guide.
- `"ThresholdCount"`: The number of consecutive health checks required to set the state of
  a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default
  value is 3.
- `"TrafficDialPercentage"`: The percentage of traffic to send to an AWS Region. Additional
  traffic is distributed to other endpoint groups for this listener.  Use this action to
  increase (dial up) or decrease (dial down) traffic to a specific Region. The percentage is
  applied to the traffic that would otherwise have been routed to the Region based on optimal
  routing. The default value is 100.
"""
update_endpoint_group(EndpointGroupArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateEndpointGroup", Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn); aws_config=aws_config)
update_endpoint_group(EndpointGroupArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateEndpointGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("EndpointGroupArn"=>EndpointGroupArn), params)); aws_config=aws_config)

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

Update a listener.

# Arguments
- `listener_arn`: The Amazon Resource Name (ARN) of the listener to update.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"ClientAffinity"`: Client affinity lets you direct all requests from a user to the same
  endpoint, if you have stateful applications, regardless of the port and protocol of the
  client request. Client affinity gives you control over whether to always route each client
  to the same specific endpoint. AWS Global Accelerator uses a consistent-flow hashing
  algorithm to choose the optimal endpoint for a connection. If client affinity is NONE,
  Global Accelerator uses the \"five-tuple\" (5-tuple) properties—source IP address, source
  port, destination IP address, destination port, and protocol—to select the hash value,
  and then chooses the best endpoint. However, with this setting, if someone uses different
  ports to connect to Global Accelerator, their connections might not be always routed to the
  same endpoint because the hash value changes.  If you want a given client to always be
  routed to the same endpoint, set client affinity to SOURCE_IP instead. When you use the
  SOURCE_IP setting, Global Accelerator uses the \"two-tuple\" (2-tuple) properties— source
  (client) IP address and destination IP address—to select the hash value. The default
  value is NONE.
- `"PortRanges"`: The updated list of port ranges for the connections from clients to the
  accelerator.
- `"Protocol"`: The updated protocol for the connections from clients to the accelerator.
"""
update_listener(ListenerArn; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateListener", Dict{String, Any}("ListenerArn"=>ListenerArn); aws_config=aws_config)
update_listener(ListenerArn, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("UpdateListener", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ListenerArn"=>ListenerArn), params)); aws_config=aws_config)

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

Stops advertising an address range that is provisioned as an address pool. You can perform
this operation at most once every 10 seconds, even if you specify different address ranges
each time. It can take a few minutes before traffic to the specified addresses stops
routing to AWS because of propagation delays. For more information, see Bring Your Own IP
Addresses (BYOIP) in the AWS Global Accelerator Developer Guide.

# Arguments
- `cidr`: The address range, in CIDR notation.

"""
withdraw_byoip_cidr(Cidr; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("WithdrawByoipCidr", Dict{String, Any}("Cidr"=>Cidr); aws_config=aws_config)
withdraw_byoip_cidr(Cidr, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = global_accelerator("WithdrawByoipCidr", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Cidr"=>Cidr), params)); aws_config=aws_config)


text:
# Borrowed code from GtkUtilities.jl/test/utils.jl

#=
let c = Canvas(), win = Window(c, "Canvas1")
    Gtk.draw(c) do widget
        fill!(widget, RGB(1,0,0))
    end
    showall(win)
end

let c = Canvas(), win = Window(c, "Canvas2")
    Gtk.draw(c) do widget
        w, h = Int(width(widget)), Int(height(widget))
        randcol = reshape(reinterpret(RGB{N0f8}, rand(0x00:0xff, 3, w*h)), w, h)
        copy!(widget, randcol)
    end
    showall(win)
end

let c = Canvas(), win = Window(c, "Canvas3")
    Gtk.draw(c) do widget
        w, h = Int(width(widget)), Int(height(widget))
        randnum = reshape(reinterpret(N0f8, rand(0x00:0xff, w*h)),w,h)
        copy!(widget, randnum)
    end
    showall(win)
end

=#

ext: jl


text:
module Util

mostSignificantBit(n) = UInt64(8 * sizeof(n) - leading_zeros(n))
RANK_MASKS = [
    UInt64(255),
    UInt64(65280),
    UInt64(16711680),
    UInt64(4278190080),
    UInt64(1095216660480),
    UInt64(280375465082880),
    UInt64(71776119061217280),
    UInt64(18374686479671623680)
    ]
FILE_MASKS = [
    UInt64(72340172838076673),
    UInt64(144680345676153346),
    UInt64(289360691352306692),
    UInt64(578721382704613384),
    UInt64(1157442765409226768),
    UInt64(2314885530818453536),
    UInt64(4629771061636907072),
    UInt64(9259542123273814144)
    ]

function leastSignificantBit(n)
    if(n == 0)
        return 0
    end
    return UInt64(log2(n & (-n)))
end

function getBit(N, m)
    return (N >> (m - 1)) & 1
end

global letter_to_num = Dict('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5,'f'=>6,'g'=>7,'h'=>8)
function UCIToBB(move)
    start_index = letter_to_num[move[1]] + ((parse(Int,move[2]) - 1) * 8)
    end_index = letter_to_num[move[3]] + ((parse(Int,move[4]) - 1) * 8)
    return UInt64(start_index),UInt64(end_index)
end

function setBitRange(num, start_index,end_index)
    n = UInt64(num)
    for i in start_index:end_index
        n = n | (1 << (i - 1))
    end
    return n
end

function setBit(N,index,value)
    N = UInt64(N)
    if(value == 1)
    return  N | (1 << (index - 1))
    else
    return N & ~(1 << (index - 1))
    end
end

global  m = Dict(1=>'a',2=>'b',3=>'c',4=>'d',5=>'e',6=>'f',7=>'g',8=>'h')
function BBToUCI(start_index, end_index)
    start_file = (start_index % 8 == 0) ? 8 : start_index % 8
    end_file = (end_index % 8 == 0) ? 8 : end_index % 8
    start_file = m[start_file]
    start_rank = ceil(UInt64,start_index / 8)
    end_file = m[end_file]
    end_rank = ceil(UInt64,end_index / 8)
    return start_file * string(start_rank) * end_file * string(end_rank)
end

function printBB(board)
    for i in 1:64
        if((i-1) % 8 === 0 && i > 1)
            print(' ', i-1 ,  '\n')
        end
        print(getBit(board,i))
    end
    print('\n')
end

function prettyPrintBoard(board::Dict)
    #piece_map = Dict("BP"=>"♙", "BN"=>"♘", "BB"=>"♗", "BR"=>"♖", "BQ"=>"♕", "BK"=>"♔", "WP"=>"♟", "WN"=>"♞", "WB"=>"♝", "WR"=>"♜", "WQ"=>"♛", "WK"=>"♚")
    output = Array{String}(undef,64)
    files = [1,2,3,4,5,6,7,8]
    ranks = ["A  ", "B  ", "C  ", "D  ", "E  ", "F  ", "G  ", "H  \n"]
    for index in 1:64
        output[index] = "-- "
    end
    file_count = 0
    for key in keys(board)
        bit_board = Int128(board[key])
        m = digits(bit_board,base=2,pad=64)
        for i in 1:64
            if(m[i] === 1)
                if(key[1] === 'W')
                    output[i] = "\x1b[93m" * key * "\x1b[39m "
                else
                    output[i] = "\x1b[91m" * key * "\x1b[39m "
                end
            end
        end
    end
    for i in ranks
        print(i)
    end
    for i in 1:64

        print(output[i])

        if(i % 8 === 0 && i !== 0)
            print(files[ceil(UInt64,i / 8)], '\n')

        end
    end
end

function emptyPositions()
    board = Dict()
    board["WP"] = 0
    board["WR"] = 0
    board["WN"] = 0
    board["WB"] = 0
    board["WQ"] = 0
    board["WK"] = 0
    board["BP"] = 0
    board["BB"] = 0
    board["BN"] = 0
    board["BR"] = 0
    board["BQ"] = 0
    board["BK"] = 0
    return board
end

function getWhitePieces(board)
    return board["WP"] | board["WB"] | board["WN"] | board["WR"] | board["WQ"] | board["WK"]
end

function getBlackPieces(board)
    return board["BP"] | board["BB"] | board["BN"] | board["BR"] | board["BQ"] | board["BK"]
end

function startPositions()
    board = Dict{String,UInt64}()
    board["WP"] = setBitRange(0,9,16)
    board["WR"] = setBit(0,1,1) | setBit(0,8,1)
    board["WN"] = setBit(0,2,1) | setBit(0,7,1)
    board["WB"] = setBit(0,3,1) | setBit(0,6,1)
    board["WQ"] = setBit(0,5,1)
    board["WK"] = setBit(0,4,1)
    board["BP"] = setBitRange(0,49,56)
    board["BB"] = setBit(0,62,1) | setBit(0,59,1)
    board["BN"] = setBit(0,63,1) | setBit(0,58,1)
    board["BR"] = setBit(0,64,1) | setBit(0,57,1)
    board["BQ"] = setBit(0,61,1)
    board["BK"] = setBit(0,60,1)
    return board
end

function randomPosition()
    board = startPositions()
    local count = 0
    colour = 'W'
    while(count < 20)
        colour = (colour == 'W') ? 'B' : 'W'
        moves = getMoves(board,colour,[])
        move = moves[rand(1:length(moves))]
        board = makeMoveUCI(move,board,colour)
        count = count + 1
    end
    return board
end

function popBit(board,sq)
    return board &= ~(1 << sq)
end

end

max_stars_repo_name: grahamclyne/chessEngine

max_issues_repo_name: grahamclyne/chessEngine

max_forks_repo_name: grahamclyne/chessEngine


text:
function circle(r=1,c=[0,0,0];color="blue",label="",npts=100)
    u = range(0,stop=2π,length=npts)
    x = r*cos.(u) .+ c[1]
    y = r*sin.(u) .+ c[2]
    return x,y
end

function sphere(r=1,c=[0,0,0],col='b',n=100)
    θ = range(0,stop=2π,length=n)
    ψ = range(0,stop=π,length=n)
    x = r*cos.(θ) * sin.(ψ)';
    y = r*sin.(θ) * sin.(ψ)';
    z = r*ones(n) * cos.(ψ)';
    # const_color = cgrad( [ RGB{Float64}(0.,0.,1.) for _ in 1:2 ] )
    # s = surface!(r*x,r*y,r*z,colorbar=false,color=const_color,width=1)
    return x,y,z
end

function trajectory(rv)
    if length(rv[1]) == 2 || length(rv[1]) == 4
        x = [rv[i][1] for i = 1:length(rv)]
        y = [rv[i][2] for i = 1:length(rv)]
        return x,y
    elseif length(rv[1]) == 3 || length(rv[1]) == 6
        x = [rv[i][1] for i = 1:length(rv)]
        y = [rv[i][2] for i = 1:length(rv)]
        z = [rv[i][3] for i = 1:length(rv)]
        return x,y,z
    else
        error("rv should be 2xN, 3xN, 4xN, or 6xN")
    end
end

@recipe function f(sys::System; prim=true, sec=true, Lpts=true, scaled=false)
    name1, name2 = split(sys.name, '/')
    color1 = sys.prim.color
    color2 = sys.sec.color
    L1,L2,L3,L4,L5 = computeLpts(sys.μ)

    legend := true
    legend := :topleft
    aspect_ratio --> :equal

    if Lpts
        @series begin
            markershape --> :x
            seriestype --> :scatter
            markercolor --> :black
            label := "Lagrange Points"
            x = [L1[1], L2[1], L3[1], L4[1], L5[1]]
            y = [L1[2], L2[2], L3[2], L4[2], L5[2]]
            x,y
        end
    end

    if prim
        @series begin
            label := name1
            seriescolor := color1
            seriestype --> :shape
            fillalpha --> 0.5
            if scaled
                x,y = circle(0.1, [-sys.μ,0,0])
            else
                x,y = circle(sys.R₁/sys.RUNIT, [-sys.μ,0,0])
            end
        end
    end

    if sec
        @series begin
            label := name2
            seriescolor := color2
            seriestype --> :shape
            fillalpha --> 0.5
            if scaled
                x,y = circle(0.025, [1-sys.μ,0,0])
            else
                x,y = circle(sys.R₂/sys.RUNIT, [1-sys.μ,0,0])
            end
        end
    end
end

# function plot_Lpts(sys::System)
#     plot(sys,prim=false,sec=false)
# end
#
# function plot_Lpts!(sys::System)
#     plot!(sys,prim=false,sec=false)
# end
#
# function plot_prim(sys::System)
#     plot(sys,Lpts=false,sec=false)
# end
#
# function plot_prim!(sys::System)
#     plot!(sys,Lpts=false,sec=false)
# end
#
# function plot_sec(sys::System)
#     plot(sys,Lpts=false,prim=false)
# end
#
# function plot_sec!(sys::System)
#     plot!(sys,Lpts=false,prim=false)
# end

@recipe function f(body::Body; legend=true, center=[0,0,0], scalar=1)
    legend := legend
    legend := :topleft
    aspect_ratio --> :equal

    @series begin
        label := body.name
        seriescolor := body.color
        seriestype --> :shape
        fillalpha --> 0.5
        x,y = circle(body.R*scalar, center)
    end
end

@recipe function f(rv::Vector{Vector{T}} where T<:Real; label="trajectory", color=:black, planar=false)

    @series begin
        label := label
        seriescolor := color
        if length(rv[1]) == 2 || length(rv[1]) == 4 || planar
            x,y = trajectory(rv)
        elseif length(rv[1]) == 3 || length(rv[1]) == 6
            x,y,z = trajectory(rv)
        end
    end
end

# function seczoom()
#     plot!(xlim=[0.995,1.005],ylim=[-0.005,0.005])
#     return nothing
# end

# @recipe function f(odevec::Vector{ODESolution}; label="trajectory", color=:black)
#
#     for i = 1:length(odevec)
#         @series begin
#             label := label
#             seriescolor := color
#             if length(odevec[i][1]) == 2 || length(odevec[i][1]) == 4
#                 x,y = trajectory(odevec[i])
#             elseif length(odevec[i][1]) == 3 || length(odevec[i][1]) == 6
#                 x,y,z = trajectory(odevec[i])
#             end
#         end
#     end
# end

# @recipe function f(ode::ODESolution; label="trajectory", color=:black)
#
#     @series begin
#         label := label
#         seriescolor := color
#         if length(ode[1]) == 2 || length(ode[1]) == 4
#             x,y = trajectory(ode)
#         elseif length(ode[1]) == 3 || length(ode[1]) == 6
#             x,y,z = trajectory(ode)
#         end
#     end
# end

#
# function plot_earth(;CR3BP=true,col='b',n=100)
#     CR3BP ? r = earth.r/moon.a      : r = earth.r
#     CR3BP ? c = [-earth_moon.μ,0,0] : c = [0,0,0]
#     plot_sphere(r,c,col,n)
# end
#
#
# function plot_rv(rv;dim=3)
#     r,v = rv[1:3], rv[4:6]
#     if dim == 2
#         p = plot!(r[1,:],r[2,:])
#     elseif dim == 3
#         p = plot!(r[1,:],r[2,:],r[3,:])
#     else
#         error("dim should be 2 or 3")
#     end
#     return p
# end


text:
@recipe function f( pss::PotentialSimulationSetup{T, 3, Cylindrical};
                    r = missing,
                    φ = missing,
                    z = missing,
                    n_points_in_φ = 36 ) where {T}
    grid::CylindricalGrid{T} = pss.grid
    layout --> (2, 2)

    cross_section::Symbol, idx::Int = if ismissing(φ) && ismissing(r) && ismissing(z)
        :φ, 1
    elseif !ismissing(φ) && ismissing(r) && ismissing(z)
        φ_rad::T = T(deg2rad(φ))
        while !(grid.φ.interval.left <= φ_rad <= grid.φ.interval.right)
            if φ_rad > grid.φ.interval.right
                φ_rad -= width(grid.φ.interval)
            elseif φ_rad < grid.φ.interval.left
                φ_rad += width(grid.φ.interval)
            end
        end
        :φ, searchsortednearest(grid.φ, φ_rad)
    elseif ismissing(φ) && !ismissing(r) && ismissing(z)
        :r, searchsortednearest(grid.r, T(r))
    elseif ismissing(φ) && ismissing(r) && !ismissing(z)
        :z, searchsortednearest(grid.z, T(z))
    else
        error(ArgumentError, ": Only one of the keywords `r, φ, z` is allowed.")
    end
    value::T = if cross_section == :φ
        grid.φ[idx]
    elseif cross_section == :r
        grid.r[idx]
    elseif cross_section == :z
        grid.z[idx]
    end

    if cross_section == :φ
        φ --> value
    elseif cross_section == :z
        z --> value
    elseif cross_section == :r
        r --> value
    end

    @series begin
        subplot := 1
        PointTypes(pss, n_points_in_φ=n_points_in_φ)
    end
    @series begin
        subplot := 2
        EffectiveChargeDensity(pss)
    end
    @series begin
        subplot := 3
        DielectricDistribution(pss)
    end
    @series begin
        subplot := 4
        ElectricPotential(pss, n_points_in_φ=n_points_in_φ)
    end
end

@recipe function f( pss::PotentialSimulationSetup{T, 3, Cartesian};
                    x = missing,
                    y = missing,
                    z = missing ) where {T}
    grid::CartesianGrid3D{T} = pss.grid
    layout --> (2, 2)

    size --> (1000, 1000)

    cross_section::Symbol, idx::Int = if ismissing(x) && ismissing(y) && ismissing(z)
        :x, searchsortednearest(grid[:x], T(0))
    elseif !ismissing(x) && ismissing(y) && ismissing(z)
        :x, searchsortednearest(grid[:x], T(x))
    elseif ismissing(x) && !ismissing(y) && ismissing(z)
        :y, searchsortednearest(grid[:y], T(y))
    elseif ismissing(x) && ismissing(y) && !ismissing(z)
        :z, searchsortednearest(grid.z, T(z))
    else
        error(ArgumentError, ": Only one of the keywords `x, y, z` is allowed.")
    end

    if cross_section == :x
        x --> grid[:x][idx]
    elseif cross_section == :y
        y --> grid[:y][idx]
    elseif cross_section == :z
        z --> grid.z[idx]
    end

    @series begin
        subplot := 1
        PointTypes(pss)
    end
    @series begin
        subplot := 2
        EffectiveChargeDensity(pss)
    end
    @series begin
        subplot := 3
        DielectricDistribution(pss)
    end
    @series begin
        subplot := 4
        ElectricPotential(pss)
    end
end


text:
## -----------  General functions

name(d :: AbstractDeviation) = d.name;
short_description(d :: AbstractDeviation) = d.shortStr;
long_description(d :: AbstractDeviation) = d.longStr;
norm_p(d :: AbstractDeviation) = d.normP;

"""
    $(SIGNATURES)

Retrieve data values
"""
get_data_values(d :: AbstractDeviation{F1}) where F1 = deepcopy(d.dataV);

"""
    $(SIGNATURES)

Retrieve model values
"""
get_model_values(d :: AbstractDeviation{F1}) where F1 = deepcopy(d.modelV);

"""
	$(SIGNATURES)

Retrieve std errors of data values. Not valid for all types of deviations.
Returns `nothing` if std errors are not set (are all 0).
"""
function get_std_errors(d :: AbstractDeviation{F1}) where F1
    if all(d.stdV .== zero(F1))
        return nothing
    else
        return deepcopy(d.stdV);
    end
end

"""
    $(SIGNATURES)

Set model values in an existing deviation.
"""
function set_model_values(d :: AbstractDeviation{F1}, modelV) where F1
    dataV = get_data_values(d);
    if typeof(modelV) != typeof(dataV)
        println(modelV);
        println(dataV);
        error("Type mismatch in $(d.name): $(typeof(modelV)) vs $(typeof(dataV))");
    end
    @assert size(modelV) == size(dataV)  "Size mismatch: $(size(modelV)) vs $(size(dataV))"
    d.modelV = deepcopy(modelV);
    return nothing
end

"""
	$(SIGNATURES)

Retrieve weights. Returns scalar 1 for scalar deviations.
"""
function get_weights(d :: AbstractDeviation{F1}) where F1
    return d.wtV
end

"""
    set_weights

Does nothing for Deviation types that do not have weights.
"""
function set_weights!(d :: AbstractDeviation{F1}, wtV) where F1
    if isa(d, Deviation)
        @assert typeof(wtV) == typeof(get_data_values(d))
        @assert size(wtV) == size(get_data_values(d))
        @assert all(wtV .> 0.0)
        d.wtV = deepcopy(wtV);
    end
    return nothing
end

"""
	$(SIGNATURES)

Validate a `Deviation`.
"""
validate_deviation(d :: AbstractDeviation) = true

## -------------  Computing the scalar deviation

"""
	$(SIGNATURES)

Compute the scalar deviation between model and data values.
Using a weighted sum of deviations to a power. By default: simply mean abs deviation.

Note: Using a weighted norm would not increase the overall deviation for a moment that fits poorly.
"""
function scalar_deviation(modelV :: AbstractArray{F1}, dataV :: AbstractArray{F1},
    wtV; p :: F1 = one(F1)) where F1 <: AbstractFloat

    totalWt = sum(wtV);
    @assert totalWt > 1e-8  "Total weight too small: $totalWt"
    # Scaling `wtV` so it sums to 1 partially undoes the `^(1/p)` scaling below.
    devV = (wtV ./ totalWt) .* (abs.(modelV .- dataV)) .^ p;
    scalarDev = totalWt * sum(devV);
    return scalarDev
end

scalar_deviation(model :: F1, data :: F1, wt :: F1;
    p :: F1 = one(F1)) where F1 <: AbstractFloat =
    wt * (abs(model - data) ^ p);

## ---------------  Display

# This is never called for concrete types (why?)
Base.show(io :: IO, d :: AbstractDeviation{F1}) where F1 =
    Base.print(io, "$(name(d)):  ", short_description(d));

## Formatted short deviation for display
function short_display(d :: AbstractDeviation{F1}; inclScalarWt :: Bool = true) where F1
    _, scalarStr = scalar_dev(d, inclScalarWt = inclScalarWt);
    return d.shortStr * ": " * scalarStr;
 end

 """
    $(SIGNATURES)

Show a deviation using the show function contained in its definition.

Optionally, a file path can be provided. If none is provided, the path inside the deviation is used.
"""
function show_deviation(d :: AbstractDeviation{F1}; showModel :: Bool = true, fPath :: String = "") where F1
    return d.showFct(d,  showModel = showModel, fPath = fPath)
end

function open_show_path(d :: AbstractDeviation{F1};
    fPath :: String = "", writeMode :: String = "w") where F1

    if isempty(fPath)
        showPath = d.showPath;
    else
        showPath = fPath;
    end
    if isempty(showPath)
        io = stdout;
    else
        io = open(showPath, "w");
    end
    return io
end

function close_show_path(d :: AbstractDeviation{F1}, io) where F1
    if io != stdout
        close(io);
    end
end

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


text:
using UnicodeSliders: @manipulate
using UnicodePlots

a = @manipulate for i in 1:10, j in 3:3:30
    x = i + j
    t = collect(0.0:0.1:10.0)
    f(t) = x*t^2
    lineplot(f, t)
end


text:
module ImagePhantoms

const RealU = Number # Union{Real, Unitful.Length}

# core:
include("shape.jl")
include("object.jl")
include("jinc.jl")

# shapes:
include("ellipse.jl")
include("gauss2.jl")
include("rect.jl")
include("triangle.jl")

# phantoms:
include("shepplogan.jl")
include("disk-phantom.jl")
include("focus-chart.jl")

# MRI SENSE:
include("mri-sense.jl")

end # module


text:
#   Unit examples of the FourierAnalysis Package for julia language
#   v 0.0.1 - last update 24th of September 2019
#
#   MIT License
#   Copyright (c) 2019, Marco Congedo, CNRS, Grenobe, France:
#   https://sites.google.com/site/marcocongedo/home

# ? CONTENTS :
#   This example show how to use Goertzel's algorithms.

#   ~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~  #
#                                                                             #
#   ~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~~¤~  #

########## Test goertzel algorithms #############
using FourierAnalysis
sr, t, f, a = 128, 128, 5, 10
v=sinusoidal(a, f, sr, t, 0)
c=goertzel(v, f, sr, t) # should be 0+aim
d=goertzel2(v, f, sr, t) # should be 0+aim
abs2(c) # power, should be a²
abs2(d) # power, should be a²

ftrue=f+0.15
v=sinusoidal(a, ftrue, sr, t, 0 )
c=goertzel(v, f, sr, t) # should be 0+aim
d=goertzel2(v, ftrue, sr, t) # should be 0+aim
abs2(c) # power, should be a²
abs2(d) # power, should be a²
#################################################