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

"""
    associate_encryption_config(encryption_config, name)
    associate_encryption_config(encryption_config, name, params::Dict{String,<:Any})

Associate encryption configuration to an existing cluster. You can use this API to enable
encryption on existing clusters which do not have encryption already enabled. This allows
you to implement a defense-in-depth security strategy without migrating applications to new
EKS clusters.

# Arguments
- `encryption_config`: The configuration you are using for encryption.
- `name`: The name of the cluster that you are associating with encryption configuration.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientRequestToken"`: The client request token you are using with the encryption
  configuration.
"""
associate_encryption_config(encryptionConfig, name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/encryption-config/associate", Dict{String, Any}("encryptionConfig"=>encryptionConfig, "clientRequestToken"=>string(uuid4())); aws_config=aws_config)
associate_encryption_config(encryptionConfig, name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/encryption-config/associate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("encryptionConfig"=>encryptionConfig, "clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    associate_identity_provider_config(name, oidc)
    associate_identity_provider_config(name, oidc, params::Dict{String,<:Any})

Associate an identity provider configuration to a cluster. If you want to authenticate
identities using an identity provider, you can create an identity provider configuration
and associate it to your cluster. After configuring authentication to your cluster you can
create Kubernetes roles and clusterroles to assign permissions to the roles, and then bind
the roles to the identities using Kubernetes rolebindings and clusterrolebindings. For more
information see Using RBAC Authorization in the Kubernetes documentation.

# Arguments
- `name`: The name of the cluster to associate the configuration to.
- `oidc`: An object that represents an OpenID Connect (OIDC) identity provider
  configuration.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientRequestToken"`: Unique, case-sensitive identifier that you provide to ensure the
  idempotency of the request.
- `"tags"`: The metadata to apply to the configuration to assist with categorization and
  organization. Each tag consists of a key and an optional value, both of which you define.
"""
associate_identity_provider_config(name, oidc; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/identity-provider-configs/associate", Dict{String, Any}("oidc"=>oidc, "clientRequestToken"=>string(uuid4())); aws_config=aws_config)
associate_identity_provider_config(name, oidc, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/identity-provider-configs/associate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("oidc"=>oidc, "clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    create_addon(addon_name, name)
    create_addon(addon_name, name, params::Dict{String,<:Any})

Creates an Amazon EKS add-on. Amazon EKS add-ons help to automate the provisioning and
lifecycle management of common operational software for Amazon EKS clusters. Amazon EKS
add-ons can only be used with Amazon EKS clusters running version 1.18 with platform
version eks.3 or later because add-ons rely on the Server-side Apply Kubernetes feature,
which is only available in Kubernetes 1.18 and later.

# Arguments
- `addon_name`: The name of the add-on. The name must match one of the names returned by
  ListAddons .
- `name`: The name of the cluster to create the add-on for.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"addonVersion"`: The version of the add-on. The version must match one of the versions
  returned by  DescribeAddonVersions .
- `"clientRequestToken"`: A unique, case-sensitive identifier that you provide to ensure
  the idempotency of the request.
- `"resolveConflicts"`: How to resolve parameter value conflicts when migrating an existing
  add-on to an Amazon EKS add-on.
- `"serviceAccountRoleArn"`: The Amazon Resource Name (ARN) of an existing IAM role to bind
  to the add-on's service account. The role must be assigned the IAM permissions required by
  the add-on. If you don't specify an existing IAM role, then the add-on uses the permissions
  assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the
  Amazon EKS User Guide.  To specify an existing IAM role, you must have an IAM OpenID
  Connect (OIDC) provider created for your cluster. For more information, see Enabling IAM
  roles for service accounts on your cluster in the Amazon EKS User Guide.
- `"tags"`: The metadata to apply to the cluster to assist with categorization and
  organization. Each tag consists of a key and an optional value, both of which you define.
"""
create_addon(addonName, name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/addons", Dict{String, Any}("addonName"=>addonName, "clientRequestToken"=>string(uuid4())); aws_config=aws_config)
create_addon(addonName, name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/addons", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("addonName"=>addonName, "clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    create_cluster(name, resources_vpc_config, role_arn)
    create_cluster(name, resources_vpc_config, role_arn, params::Dict{String,<:Any})

Creates an Amazon EKS control plane.  The Amazon EKS control plane consists of control
plane instances that run the Kubernetes software, such as etcd and the API server. The
control plane runs in an account managed by AWS, and the Kubernetes API is exposed via the
Amazon EKS API server endpoint. Each Amazon EKS cluster control plane is single-tenant and
unique and runs on its own set of Amazon EC2 instances. The cluster control plane is
provisioned across multiple Availability Zones and fronted by an Elastic Load Balancing
Network Load Balancer. Amazon EKS also provisions elastic network interfaces in your VPC
subnets to provide connectivity from the control plane instances to the nodes (for example,
to support kubectl exec, logs, and proxy data flows). Amazon EKS nodes run in your AWS
account and connect to your cluster's control plane via the Kubernetes API server endpoint
and a certificate file that is created for your cluster. Cluster creation typically takes
several minutes. After you create an Amazon EKS cluster, you must configure your Kubernetes
tooling to communicate with the API server and launch nodes into your cluster. For more
information, see Managing Cluster Authentication and Launching Amazon EKS nodes in the
Amazon EKS User Guide.

# Arguments
- `name`: The unique name to give to your cluster.
- `resources_vpc_config`: The VPC configuration used by the cluster control plane. Amazon
  EKS VPC resources have specific requirements to work properly with Kubernetes. For more
  information, see Cluster VPC Considerations and Cluster Security Group Considerations in
  the Amazon EKS User Guide. You must specify at least two subnets. You can specify up to
  five security groups, but we recommend that you use a dedicated security group for your
  cluster control plane.
- `role_arn`: The Amazon Resource Name (ARN) of the IAM role that provides permissions for
  the Kubernetes control plane to make calls to AWS API operations on your behalf. For more
  information, see Amazon EKS Service IAM Role in the  Amazon EKS User Guide .

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientRequestToken"`: Unique, case-sensitive identifier that you provide to ensure the
  idempotency of the request.
- `"encryptionConfig"`: The encryption configuration for the cluster.
- `"kubernetesNetworkConfig"`: The Kubernetes network configuration for the cluster.
- `"logging"`: Enable or disable exporting the Kubernetes control plane logs for your
  cluster to CloudWatch Logs. By default, cluster control plane logs aren't exported to
  CloudWatch Logs. For more information, see Amazon EKS Cluster Control Plane Logs in the
  Amazon EKS User Guide .  CloudWatch Logs ingestion, archive storage, and data scanning
  rates apply to exported control plane logs. For more information, see Amazon CloudWatch
  Pricing.
- `"tags"`: The metadata to apply to the cluster to assist with categorization and
  organization. Each tag consists of a key and an optional value, both of which you define.
- `"version"`: The desired Kubernetes version for your cluster. If you don't specify a
  value here, the latest version available in Amazon EKS is used.
"""
create_cluster(name, resourcesVpcConfig, roleArn; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters", Dict{String, Any}("name"=>name, "resourcesVpcConfig"=>resourcesVpcConfig, "roleArn"=>roleArn, "clientRequestToken"=>string(uuid4())); aws_config=aws_config)
create_cluster(name, resourcesVpcConfig, roleArn, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("name"=>name, "resourcesVpcConfig"=>resourcesVpcConfig, "roleArn"=>roleArn, "clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    create_fargate_profile(fargate_profile_name, name, pod_execution_role_arn)
    create_fargate_profile(fargate_profile_name, name, pod_execution_role_arn, params::Dict{String,<:Any})

Creates an AWS Fargate profile for your Amazon EKS cluster. You must have at least one
Fargate profile in a cluster to be able to run pods on Fargate. The Fargate profile allows
an administrator to declare which pods run on Fargate and specify which pods run on which
Fargate profile. This declaration is done through the profile’s selectors. Each profile
can have up to five selectors that contain a namespace and labels. A namespace is required
for every selector. The label field consists of multiple optional key-value pairs. Pods
that match the selectors are scheduled on Fargate. If a to-be-scheduled pod matches any of
the selectors in the Fargate profile, then that pod is run on Fargate. When you create a
Fargate profile, you must specify a pod execution role to use with the pods that are
scheduled with the profile. This role is added to the cluster's Kubernetes Role Based
Access Control (RBAC) for authorization so that the kubelet that is running on the Fargate
infrastructure can register with your Amazon EKS cluster so that it can appear in your
cluster as a node. The pod execution role also provides IAM permissions to the Fargate
infrastructure to allow read access to Amazon ECR image repositories. For more information,
see Pod Execution Role in the Amazon EKS User Guide. Fargate profiles are immutable.
However, you can create a new updated profile to replace an existing profile and then
delete the original after the updated profile has finished creating. If any Fargate
profiles in a cluster are in the DELETING status, you must wait for that Fargate profile to
finish deleting before you can create any other profiles in that cluster. For more
information, see AWS Fargate Profile in the Amazon EKS User Guide.

# Arguments
- `fargate_profile_name`: The name of the Fargate profile.
- `name`: The name of the Amazon EKS cluster to apply the Fargate profile to.
- `pod_execution_role_arn`: The Amazon Resource Name (ARN) of the pod execution role to use
  for pods that match the selectors in the Fargate profile. The pod execution role allows
  Fargate infrastructure to register with your cluster as a node, and it provides read access
  to Amazon ECR image repositories. For more information, see Pod Execution Role in the
  Amazon EKS User Guide.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientRequestToken"`: Unique, case-sensitive identifier that you provide to ensure the
  idempotency of the request.
- `"selectors"`: The selectors to match for pods to use this Fargate profile. Each selector
  must have an associated namespace. Optionally, you can also specify labels for a namespace.
  You may specify up to five selectors in a Fargate profile.
- `"subnets"`: The IDs of subnets to launch your pods into. At this time, pods running on
  Fargate are not assigned public IP addresses, so only private subnets (with no direct route
  to an Internet Gateway) are accepted for this parameter.
- `"tags"`: The metadata to apply to the Fargate profile to assist with categorization and
  organization. Each tag consists of a key and an optional value, both of which you define.
  Fargate profile tags do not propagate to any other resources associated with the Fargate
  profile, such as the pods that are scheduled with it.
"""
create_fargate_profile(fargateProfileName, name, podExecutionRoleArn; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/fargate-profiles", Dict{String, Any}("fargateProfileName"=>fargateProfileName, "podExecutionRoleArn"=>podExecutionRoleArn, "clientRequestToken"=>string(uuid4())); aws_config=aws_config)
create_fargate_profile(fargateProfileName, name, podExecutionRoleArn, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/fargate-profiles", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("fargateProfileName"=>fargateProfileName, "podExecutionRoleArn"=>podExecutionRoleArn, "clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    create_nodegroup(name, node_role, nodegroup_name, subnets)
    create_nodegroup(name, node_role, nodegroup_name, subnets, params::Dict{String,<:Any})

Creates a managed node group for an Amazon EKS cluster. You can only create a node group
for your cluster that is equal to the current Kubernetes version for the cluster. All node
groups are created with the latest AMI release version for the respective minor Kubernetes
version of the cluster, unless you deploy a custom AMI using a launch template. For more
information about using launch templates, see Launch template support. An Amazon EKS
managed node group is an Amazon EC2 Auto Scaling group and associated Amazon EC2 instances
that are managed by AWS for an Amazon EKS cluster. Each node group uses a version of the
Amazon EKS optimized Amazon Linux 2 AMI. For more information, see Managed Node Groups in
the Amazon EKS User Guide.

# Arguments
- `name`: The name of the cluster to create the node group in.
- `node_role`: The Amazon Resource Name (ARN) of the IAM role to associate with your node
  group. The Amazon EKS worker node kubelet daemon makes calls to AWS APIs on your behalf.
  Nodes receive permissions for these API calls through an IAM instance profile and
  associated policies. Before you can launch nodes and register them into a cluster, you must
  create an IAM role for those nodes to use when they are launched. For more information, see
  Amazon EKS node IAM role in the  Amazon EKS User Guide . If you specify launchTemplate,
  then don't specify  IamInstanceProfile  in your launch template, or the node group
  deployment will fail. For more information about using launch templates with Amazon EKS,
  see Launch template support in the Amazon EKS User Guide.
- `nodegroup_name`: The unique name to give your node group.
- `subnets`: The subnets to use for the Auto Scaling group that is created for your node
  group. If you specify launchTemplate, then don't specify  SubnetId  in your launch
  template, or the node group deployment will fail. For more information about using launch
  templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"amiType"`: The AMI type for your node group. GPU instance types should use the
  AL2_x86_64_GPU AMI type. Non-GPU instances should use the AL2_x86_64 AMI type. Arm
  instances should use the AL2_ARM_64 AMI type. All types use the Amazon EKS optimized Amazon
  Linux 2 AMI. If you specify launchTemplate, and your launch template uses a custom AMI,
  then don't specify amiType, or the node group deployment will fail. For more information
  about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS
  User Guide.
- `"capacityType"`: The capacity type for your node group.
- `"clientRequestToken"`: Unique, case-sensitive identifier that you provide to ensure the
  idempotency of the request.
- `"diskSize"`: The root device disk size (in GiB) for your node group instances. The
  default disk size is 20 GiB. If you specify launchTemplate, then don't specify diskSize, or
  the node group deployment will fail. For more information about using launch templates with
  Amazon EKS, see Launch template support in the Amazon EKS User Guide.
- `"instanceTypes"`: Specify the instance types for a node group. If you specify a GPU
  instance type, be sure to specify AL2_x86_64_GPU with the amiType parameter. If you specify
  launchTemplate, then you can specify zero or one instance type in your launch template or
  you can specify 0-20 instance types for instanceTypes. If however, you specify an instance
  type in your launch template and specify any instanceTypes, the node group deployment will
  fail. If you don't specify an instance type in a launch template or for instanceTypes, then
  t3.medium is used, by default. If you specify Spot for capacityType, then we recommend
  specifying multiple values for instanceTypes. For more information, see Managed node group
  capacity types and Launch template support in the Amazon EKS User Guide.
- `"labels"`: The Kubernetes labels to be applied to the nodes in the node group when they
  are created.
- `"launchTemplate"`: An object representing a node group's launch template specification.
  If specified, then do not specify instanceTypes, diskSize, or remoteAccess and make sure
  that the launch template meets the requirements in launchTemplateSpecification.
- `"releaseVersion"`: The AMI version of the Amazon EKS optimized AMI to use with your node
  group. By default, the latest available AMI version for the node group's current Kubernetes
  version is used. For more information, see Amazon EKS optimized Amazon Linux 2 AMI versions
  in the Amazon EKS User Guide. If you specify launchTemplate, and your launch template uses
  a custom AMI, then don't specify releaseVersion, or the node group deployment will fail.
  For more information about using launch templates with Amazon EKS, see Launch template
  support in the Amazon EKS User Guide.
- `"remoteAccess"`: The remote access (SSH) configuration to use with your node group. If
  you specify launchTemplate, then don't specify remoteAccess, or the node group deployment
  will fail. For more information about using launch templates with Amazon EKS, see Launch
  template support in the Amazon EKS User Guide.
- `"scalingConfig"`: The scaling configuration details for the Auto Scaling group that is
  created for your node group.
- `"tags"`: The metadata to apply to the node group to assist with categorization and
  organization. Each tag consists of a key and an optional value, both of which you define.
  Node group tags do not propagate to any other resources associated with the node group,
  such as the Amazon EC2 instances or subnets.
- `"taints"`: The Kubernetes taints to be applied to the nodes in the node group.
- `"updateConfig"`:
- `"version"`: The Kubernetes version to use for your managed nodes. By default, the
  Kubernetes version of the cluster is used, and this is the only accepted specified value.
  If you specify launchTemplate, and your launch template uses a custom AMI, then don't
  specify version, or the node group deployment will fail. For more information about using
  launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide.
"""
create_nodegroup(name, nodeRole, nodegroupName, subnets; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/node-groups", Dict{String, Any}("nodeRole"=>nodeRole, "nodegroupName"=>nodegroupName, "subnets"=>subnets, "clientRequestToken"=>string(uuid4())); aws_config=aws_config)
create_nodegroup(name, nodeRole, nodegroupName, subnets, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/node-groups", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("nodeRole"=>nodeRole, "nodegroupName"=>nodegroupName, "subnets"=>subnets, "clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    delete_addon(addon_name, name)
    delete_addon(addon_name, name, params::Dict{String,<:Any})

Delete an Amazon EKS add-on. When you remove the add-on, it will also be deleted from the
cluster. You can always manually start an add-on on the cluster using the Kubernetes API.

# Arguments
- `addon_name`: The name of the add-on. The name must match one of the names returned by
  ListAddons .
- `name`: The name of the cluster to delete the add-on from.

"""
delete_addon(addonName, name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("DELETE", "/clusters/$(name)/addons/$(addonName)"; aws_config=aws_config)
delete_addon(addonName, name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("DELETE", "/clusters/$(name)/addons/$(addonName)", params; aws_config=aws_config)

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

Deletes the Amazon EKS cluster control plane. If you have active services in your cluster
that are associated with a load balancer, you must delete those services before deleting
the cluster so that the load balancers are deleted properly. Otherwise, you can have
orphaned resources in your VPC that prevent you from being able to delete the VPC. For more
information, see Deleting a Cluster in the Amazon EKS User Guide. If you have managed node
groups or Fargate profiles attached to the cluster, you must delete them first. For more
information, see DeleteNodegroup and DeleteFargateProfile.

# Arguments
- `name`: The name of the cluster to delete.

"""
delete_cluster(name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("DELETE", "/clusters/$(name)"; aws_config=aws_config)
delete_cluster(name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("DELETE", "/clusters/$(name)", params; aws_config=aws_config)

"""
    delete_fargate_profile(fargate_profile_name, name)
    delete_fargate_profile(fargate_profile_name, name, params::Dict{String,<:Any})

Deletes an AWS Fargate profile. When you delete a Fargate profile, any pods running on
Fargate that were created with the profile are deleted. If those pods match another Fargate
profile, then they are scheduled on Fargate with that profile. If they no longer match any
Fargate profiles, then they are not scheduled on Fargate and they may remain in a pending
state. Only one Fargate profile in a cluster can be in the DELETING status at a time. You
must wait for a Fargate profile to finish deleting before you can delete any other profiles
in that cluster.

# Arguments
- `fargate_profile_name`: The name of the Fargate profile to delete.
- `name`: The name of the Amazon EKS cluster associated with the Fargate profile to delete.

"""
delete_fargate_profile(fargateProfileName, name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("DELETE", "/clusters/$(name)/fargate-profiles/$(fargateProfileName)"; aws_config=aws_config)
delete_fargate_profile(fargateProfileName, name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("DELETE", "/clusters/$(name)/fargate-profiles/$(fargateProfileName)", params; aws_config=aws_config)

"""
    delete_nodegroup(name, nodegroup_name)
    delete_nodegroup(name, nodegroup_name, params::Dict{String,<:Any})

Deletes an Amazon EKS node group for a cluster.

# Arguments
- `name`: The name of the Amazon EKS cluster that is associated with your node group.
- `nodegroup_name`: The name of the node group to delete.

"""
delete_nodegroup(name, nodegroupName; aws_config::AbstractAWSConfig=global_aws_config()) = eks("DELETE", "/clusters/$(name)/node-groups/$(nodegroupName)"; aws_config=aws_config)
delete_nodegroup(name, nodegroupName, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("DELETE", "/clusters/$(name)/node-groups/$(nodegroupName)", params; aws_config=aws_config)

"""
    describe_addon(addon_name, name)
    describe_addon(addon_name, name, params::Dict{String,<:Any})

Describes an Amazon EKS add-on.

# Arguments
- `addon_name`: The name of the add-on. The name must match one of the names returned by
  ListAddons .
- `name`: The name of the cluster.

"""
describe_addon(addonName, name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/addons/$(addonName)"; aws_config=aws_config)
describe_addon(addonName, name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/addons/$(addonName)", params; aws_config=aws_config)

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

Describes the Kubernetes versions that the add-on can be used with.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"addonName"`: The name of the add-on. The name must match one of the names returned by
  ListAddons .
- `"kubernetesVersion"`: The Kubernetes versions that the add-on can be used with.
- `"maxResults"`: The maximum number of results to return.
- `"nextToken"`: The nextToken value returned from a previous paginated
  DescribeAddonVersionsRequest where maxResults was used and the results exceeded the value
  of that parameter. Pagination continues from the end of the previous results that returned
  the nextToken value.  This token should be treated as an opaque identifier that is used
  only to retrieve the next items in a list and not for other programmatic purposes.
"""
describe_addon_versions(; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/addons/supported-versions"; aws_config=aws_config)
describe_addon_versions(params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/addons/supported-versions", params; aws_config=aws_config)

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

Returns descriptive information about an Amazon EKS cluster. The API server endpoint and
certificate authority data returned by this operation are required for kubelet and kubectl
to communicate with your Kubernetes API server. For more information, see Create a
kubeconfig for Amazon EKS.  The API server endpoint and certificate authority data aren't
available until the cluster reaches the ACTIVE state.

# Arguments
- `name`: The name of the cluster to describe.

"""
describe_cluster(name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)"; aws_config=aws_config)
describe_cluster(name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)", params; aws_config=aws_config)

"""
    describe_fargate_profile(fargate_profile_name, name)
    describe_fargate_profile(fargate_profile_name, name, params::Dict{String,<:Any})

Returns descriptive information about an AWS Fargate profile.

# Arguments
- `fargate_profile_name`: The name of the Fargate profile to describe.
- `name`: The name of the Amazon EKS cluster associated with the Fargate profile.

"""
describe_fargate_profile(fargateProfileName, name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/fargate-profiles/$(fargateProfileName)"; aws_config=aws_config)
describe_fargate_profile(fargateProfileName, name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/fargate-profiles/$(fargateProfileName)", params; aws_config=aws_config)

"""
    describe_identity_provider_config(identity_provider_config, name)
    describe_identity_provider_config(identity_provider_config, name, params::Dict{String,<:Any})

Returns descriptive information about an identity provider configuration.

# Arguments
- `identity_provider_config`: An object that represents an identity provider configuration.
- `name`: The cluster name that the identity provider configuration is associated to.

"""
describe_identity_provider_config(identityProviderConfig, name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/identity-provider-configs/describe", Dict{String, Any}("identityProviderConfig"=>identityProviderConfig); aws_config=aws_config)
describe_identity_provider_config(identityProviderConfig, name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/identity-provider-configs/describe", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("identityProviderConfig"=>identityProviderConfig), params)); aws_config=aws_config)

"""
    describe_nodegroup(name, nodegroup_name)
    describe_nodegroup(name, nodegroup_name, params::Dict{String,<:Any})

Returns descriptive information about an Amazon EKS node group.

# Arguments
- `name`: The name of the Amazon EKS cluster associated with the node group.
- `nodegroup_name`: The name of the node group to describe.

"""
describe_nodegroup(name, nodegroupName; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/node-groups/$(nodegroupName)"; aws_config=aws_config)
describe_nodegroup(name, nodegroupName, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/node-groups/$(nodegroupName)", params; aws_config=aws_config)

"""
    describe_update(name, update_id)
    describe_update(name, update_id, params::Dict{String,<:Any})

Returns descriptive information about an update against your Amazon EKS cluster or
associated managed node group. When the status of the update is Succeeded, the update is
complete. If an update fails, the status is Failed, and an error detail explains the reason
for the failure.

# Arguments
- `name`: The name of the Amazon EKS cluster associated with the update.
- `update_id`: The ID of the update to describe.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"addonName"`: The name of the add-on. The name must match one of the names returned by
  ListAddons .
- `"nodegroupName"`: The name of the Amazon EKS node group associated with the update.
"""
describe_update(name, updateId; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/updates/$(updateId)"; aws_config=aws_config)
describe_update(name, updateId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/updates/$(updateId)", params; aws_config=aws_config)

"""
    disassociate_identity_provider_config(identity_provider_config, name)
    disassociate_identity_provider_config(identity_provider_config, name, params::Dict{String,<:Any})

Disassociates an identity provider configuration from a cluster. If you disassociate an
identity provider from your cluster, users included in the provider can no longer access
the cluster. However, you can still access the cluster with AWS IAM users.

# Arguments
- `identity_provider_config`: An object that represents an identity provider configuration.
- `name`: The name of the cluster to disassociate an identity provider from.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientRequestToken"`: A unique, case-sensitive identifier that you provide to ensure
  the idempotency of the request.
"""
disassociate_identity_provider_config(identityProviderConfig, name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/identity-provider-configs/disassociate", Dict{String, Any}("identityProviderConfig"=>identityProviderConfig, "clientRequestToken"=>string(uuid4())); aws_config=aws_config)
disassociate_identity_provider_config(identityProviderConfig, name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/identity-provider-configs/disassociate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("identityProviderConfig"=>identityProviderConfig, "clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)

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

Lists the available add-ons.

# Arguments
- `name`: The name of the cluster.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of add-on results returned by ListAddonsRequest in
  paginated output. When you use this parameter, ListAddonsRequest returns only maxResults
  results in a single page along with a nextToken response element. You can see the remaining
  results of the initial request by sending another ListAddonsRequest request with the
  returned nextToken value. This value can be between 1 and 100. If you don't use this
  parameter, ListAddonsRequest returns up to 100 results and a nextToken value, if applicable.
- `"nextToken"`: The nextToken value returned from a previous paginated ListAddonsRequest
  where maxResults was used and the results exceeded the value of that parameter. Pagination
  continues from the end of the previous results that returned the nextToken value.  This
  token should be treated as an opaque identifier that is used only to retrieve the next
  items in a list and not for other programmatic purposes.
"""
list_addons(name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/addons"; aws_config=aws_config)
list_addons(name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/addons", params; aws_config=aws_config)

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

Lists the Amazon EKS clusters in your AWS account in the specified Region.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of cluster results returned by ListClusters in
  paginated output. When you use this parameter, ListClusters returns only maxResults results
  in a single page along with a nextToken response element. You can see the remaining results
  of the initial request by sending another ListClusters request with the returned nextToken
  value. This value can be between 1 and 100. If you don't use this parameter, ListClusters
  returns up to 100 results and a nextToken value if applicable.
- `"nextToken"`: The nextToken value returned from a previous paginated ListClusters
  request where maxResults was used and the results exceeded the value of that parameter.
  Pagination continues from the end of the previous results that returned the nextToken
  value.  This token should be treated as an opaque identifier that is used only to retrieve
  the next items in a list and not for other programmatic purposes.
"""
list_clusters(; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters"; aws_config=aws_config)
list_clusters(params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters", params; aws_config=aws_config)

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

Lists the AWS Fargate profiles associated with the specified cluster in your AWS account in
the specified Region.

# Arguments
- `name`: The name of the Amazon EKS cluster that you would like to listFargate profiles in.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of Fargate profile results returned by
  ListFargateProfiles in paginated output. When you use this parameter, ListFargateProfiles
  returns only maxResults results in a single page along with a nextToken response element.
  You can see the remaining results of the initial request by sending another
  ListFargateProfiles request with the returned nextToken value. This value can be between 1
  and 100. If you don't use this parameter, ListFargateProfiles returns up to 100 results and
  a nextToken value if applicable.
- `"nextToken"`: The nextToken value returned from a previous paginated ListFargateProfiles
  request where maxResults was used and the results exceeded the value of that parameter.
  Pagination continues from the end of the previous results that returned the nextToken value.
"""
list_fargate_profiles(name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/fargate-profiles"; aws_config=aws_config)
list_fargate_profiles(name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/fargate-profiles", params; aws_config=aws_config)

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

A list of identity provider configurations.

# Arguments
- `name`: The cluster name that you want to list identity provider configurations for.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of identity provider configurations returned by
  ListIdentityProviderConfigs in paginated output. When you use this parameter,
  ListIdentityProviderConfigs returns only maxResults results in a single page along with a
  nextToken response element. You can see the remaining results of the initial request by
  sending another ListIdentityProviderConfigs request with the returned nextToken value. This
  value can be between 1 and 100. If you don't use this parameter,
  ListIdentityProviderConfigs returns up to 100 results and a nextToken value, if applicable.
- `"nextToken"`: The nextToken value returned from a previous paginated
  IdentityProviderConfigsRequest where maxResults was used and the results exceeded the value
  of that parameter. Pagination continues from the end of the previous results that returned
  the nextToken value.
"""
list_identity_provider_configs(name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/identity-provider-configs"; aws_config=aws_config)
list_identity_provider_configs(name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/identity-provider-configs", params; aws_config=aws_config)

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

Lists the Amazon EKS managed node groups associated with the specified cluster in your AWS
account in the specified Region. Self-managed node groups are not listed.

# Arguments
- `name`: The name of the Amazon EKS cluster that you would like to list node groups in.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of node group results returned by ListNodegroups in
  paginated output. When you use this parameter, ListNodegroups returns only maxResults
  results in a single page along with a nextToken response element. You can see the remaining
  results of the initial request by sending another ListNodegroups request with the returned
  nextToken value. This value can be between 1 and 100. If you don't use this parameter,
  ListNodegroups returns up to 100 results and a nextToken value if applicable.
- `"nextToken"`: The nextToken value returned from a previous paginated ListNodegroups
  request where maxResults was used and the results exceeded the value of that parameter.
  Pagination continues from the end of the previous results that returned the nextToken value.
"""
list_nodegroups(name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/node-groups"; aws_config=aws_config)
list_nodegroups(name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/node-groups", params; aws_config=aws_config)

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

List the tags for an Amazon EKS resource.

# Arguments
- `resource_arn`: The Amazon Resource Name (ARN) that identifies the resource for which to
  list the tags. Currently, the supported resources are Amazon EKS clusters and managed node
  groups.

"""
list_tags_for_resource(resourceArn; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/tags/$(resourceArn)"; aws_config=aws_config)
list_tags_for_resource(resourceArn, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/tags/$(resourceArn)", params; aws_config=aws_config)

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

Lists the updates associated with an Amazon EKS cluster or managed node group in your AWS
account, in the specified Region.

# Arguments
- `name`: The name of the Amazon EKS cluster to list updates for.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"addonName"`: The names of the installed add-ons that have available updates.
- `"maxResults"`: The maximum number of update results returned by ListUpdates in paginated
  output. When you use this parameter, ListUpdates returns only maxResults results in a
  single page along with a nextToken response element. You can see the remaining results of
  the initial request by sending another ListUpdates request with the returned nextToken
  value. This value can be between 1 and 100. If you don't use this parameter, ListUpdates
  returns up to 100 results and a nextToken value if applicable.
- `"nextToken"`: The nextToken value returned from a previous paginated ListUpdates request
  where maxResults was used and the results exceeded the value of that parameter. Pagination
  continues from the end of the previous results that returned the nextToken value.
- `"nodegroupName"`: The name of the Amazon EKS managed node group to list updates for.
"""
list_updates(name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/updates"; aws_config=aws_config)
list_updates(name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("GET", "/clusters/$(name)/updates", params; aws_config=aws_config)

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

Associates the specified tags to a resource with the specified resourceArn. If existing
tags on a resource are not specified in the request parameters, they are not changed. When
a resource is deleted, the tags associated with that resource are deleted as well. Tags
that you create for Amazon EKS resources do not propagate to any other resources associated
with the cluster. For example, if you tag a cluster with this operation, that tag does not
automatically propagate to the subnets and nodes associated with the cluster.

# Arguments
- `resource_arn`: The Amazon Resource Name (ARN) of the resource to which to add tags.
  Currently, the supported resources are Amazon EKS clusters and managed node groups.
- `tags`: The tags to add to the resource. A tag is an array of key-value pairs.

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

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

Deletes specified tags from a resource.

# Arguments
- `resource_arn`: The Amazon Resource Name (ARN) of the resource from which to delete tags.
  Currently, the supported resources are Amazon EKS clusters and managed node groups.
- `tag_keys`: The keys of the tags to be removed.

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

"""
    update_addon(addon_name, name)
    update_addon(addon_name, name, params::Dict{String,<:Any})

Updates an Amazon EKS add-on.

# Arguments
- `addon_name`: The name of the add-on. The name must match one of the names returned by
  ListAddons .
- `name`: The name of the cluster.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"addonVersion"`: The version of the add-on. The version must match one of the versions
  returned by  DescribeAddonVersions .
- `"clientRequestToken"`: Unique, case-sensitive identifier that you provide to ensure the
  idempotency of the request.
- `"resolveConflicts"`: How to resolve parameter value conflicts when applying the new
  version of the add-on to the cluster.
- `"serviceAccountRoleArn"`: The Amazon Resource Name (ARN) of an existing IAM role to bind
  to the add-on's service account. The role must be assigned the IAM permissions required by
  the add-on. If you don't specify an existing IAM role, then the add-on uses the permissions
  assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the
  Amazon EKS User Guide.  To specify an existing IAM role, you must have an IAM OpenID
  Connect (OIDC) provider created for your cluster. For more information, see Enabling IAM
  roles for service accounts on your cluster in the Amazon EKS User Guide.
"""
update_addon(addonName, name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/addons/$(addonName)/update", Dict{String, Any}("clientRequestToken"=>string(uuid4())); aws_config=aws_config)
update_addon(addonName, name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/addons/$(addonName)/update", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)

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

Updates an Amazon EKS cluster configuration. Your cluster continues to function during the
update. The response output includes an update ID that you can use to track the status of
your cluster update with the DescribeUpdate API operation. You can use this API operation
to enable or disable exporting the Kubernetes control plane logs for your cluster to
CloudWatch Logs. By default, cluster control plane logs aren't exported to CloudWatch Logs.
For more information, see Amazon EKS Cluster Control Plane Logs in the  Amazon EKS User
Guide .  CloudWatch Logs ingestion, archive storage, and data scanning rates apply to
exported control plane logs. For more information, see Amazon CloudWatch Pricing.  You can
also use this API operation to enable or disable public and private access to your
cluster's Kubernetes API server endpoint. By default, public access is enabled, and private
access is disabled. For more information, see Amazon EKS Cluster Endpoint Access Control in
the  Amazon EKS User Guide .   You can't update the subnets or security group IDs for an
existing cluster.  Cluster updates are asynchronous, and they should finish within a few
minutes. During an update, the cluster status moves to UPDATING (this status transition is
eventually consistent). When the update is complete (either Failed or Successful), the
cluster status moves to Active.

# Arguments
- `name`: The name of the Amazon EKS cluster to update.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientRequestToken"`: Unique, case-sensitive identifier that you provide to ensure the
  idempotency of the request.
- `"logging"`: Enable or disable exporting the Kubernetes control plane logs for your
  cluster to CloudWatch Logs. By default, cluster control plane logs aren't exported to
  CloudWatch Logs. For more information, see Amazon EKS Cluster Control Plane Logs in the
  Amazon EKS User Guide .  CloudWatch Logs ingestion, archive storage, and data scanning
  rates apply to exported control plane logs. For more information, see Amazon CloudWatch
  Pricing.
- `"resourcesVpcConfig"`:
"""
update_cluster_config(name; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/update-config", Dict{String, Any}("clientRequestToken"=>string(uuid4())); aws_config=aws_config)
update_cluster_config(name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/update-config", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    update_cluster_version(name, version)
    update_cluster_version(name, version, params::Dict{String,<:Any})

Updates an Amazon EKS cluster to the specified Kubernetes version. Your cluster continues
to function during the update. The response output includes an update ID that you can use
to track the status of your cluster update with the DescribeUpdate API operation. Cluster
updates are asynchronous, and they should finish within a few minutes. During an update,
the cluster status moves to UPDATING (this status transition is eventually consistent).
When the update is complete (either Failed or Successful), the cluster status moves to
Active. If your cluster has managed node groups attached to it, all of your node groups’
Kubernetes versions must match the cluster’s Kubernetes version in order to update the
cluster to a new Kubernetes version.

# Arguments
- `name`: The name of the Amazon EKS cluster to update.
- `version`: The desired Kubernetes version following a successful update.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientRequestToken"`: Unique, case-sensitive identifier that you provide to ensure the
  idempotency of the request.
"""
update_cluster_version(name, version; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/updates", Dict{String, Any}("version"=>version, "clientRequestToken"=>string(uuid4())); aws_config=aws_config)
update_cluster_version(name, version, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/updates", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("version"=>version, "clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    update_nodegroup_config(name, nodegroup_name)
    update_nodegroup_config(name, nodegroup_name, params::Dict{String,<:Any})

Updates an Amazon EKS managed node group configuration. Your node group continues to
function during the update. The response output includes an update ID that you can use to
track the status of your node group update with the DescribeUpdate API operation. Currently
you can update the Kubernetes labels for a node group or the scaling configuration.

# Arguments
- `name`: The name of the Amazon EKS cluster that the managed node group resides in.
- `nodegroup_name`: The name of the managed node group to update.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientRequestToken"`: Unique, case-sensitive identifier that you provide to ensure the
  idempotency of the request.
- `"labels"`: The Kubernetes labels to be applied to the nodes in the node group after the
  update.
- `"scalingConfig"`: The scaling configuration details for the Auto Scaling group after the
  update.
- `"taints"`: The Kubernetes taints to be applied to the nodes in the node group after the
  update.
- `"updateConfig"`:
"""
update_nodegroup_config(name, nodegroupName; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/node-groups/$(nodegroupName)/update-config", Dict{String, Any}("clientRequestToken"=>string(uuid4())); aws_config=aws_config)
update_nodegroup_config(name, nodegroupName, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/node-groups/$(nodegroupName)/update-config", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)

"""
    update_nodegroup_version(name, nodegroup_name)
    update_nodegroup_version(name, nodegroup_name, params::Dict{String,<:Any})

Updates the Kubernetes version or AMI version of an Amazon EKS managed node group. You can
update a node group using a launch template only if the node group was originally deployed
with a launch template. If you need to update a custom AMI in a node group that was
deployed with a launch template, then update your custom AMI, specify the new ID in a new
version of the launch template, and then update the node group to the new version of the
launch template. If you update without a launch template, then you can update to the latest
available AMI version of a node group's current Kubernetes version by not specifying a
Kubernetes version in the request. You can update to the latest AMI version of your
cluster's current Kubernetes version by specifying your cluster's Kubernetes version in the
request. For more information, see Amazon EKS optimized Amazon Linux 2 AMI versions in the
Amazon EKS User Guide. You cannot roll back a node group to an earlier Kubernetes version
or AMI version. When a node in a managed node group is terminated due to a scaling action
or update, the pods in that node are drained first. Amazon EKS attempts to drain the nodes
gracefully and will fail if it is unable to do so. You can force the update if Amazon EKS
is unable to drain the nodes as a result of a pod disruption budget issue.

# Arguments
- `name`: The name of the Amazon EKS cluster that is associated with the managed node group
  to update.
- `nodegroup_name`: The name of the managed node group to update.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"clientRequestToken"`: Unique, case-sensitive identifier that you provide to ensure the
  idempotency of the request.
- `"force"`: Force the update if the existing node group's pods are unable to be drained
  due to a pod disruption budget issue. If an update fails because pods could not be drained,
  you can force the update after it fails to terminate the old node whether or not any pods
  are running on the node.
- `"launchTemplate"`: An object representing a node group's launch template specification.
  You can only update a node group using a launch template if the node group was originally
  deployed with a launch template.
- `"releaseVersion"`: The AMI version of the Amazon EKS optimized AMI to use for the
  update. By default, the latest available AMI version for the node group's Kubernetes
  version is used. For more information, see Amazon EKS optimized Amazon Linux 2 AMI versions
   in the Amazon EKS User Guide. If you specify launchTemplate, and your launch template uses
  a custom AMI, then don't specify releaseVersion, or the node group update will fail. For
  more information about using launch templates with Amazon EKS, see Launch template support
  in the Amazon EKS User Guide.
- `"version"`: The Kubernetes version to update to. If no version is specified, then the
  Kubernetes version of the node group does not change. You can specify the Kubernetes
  version of the cluster to update the node group to the latest AMI version of the cluster's
  Kubernetes version. If you specify launchTemplate, and your launch template uses a custom
  AMI, then don't specify version, or the node group update will fail. For more information
  about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS
  User Guide.
"""
update_nodegroup_version(name, nodegroupName; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/node-groups/$(nodegroupName)/update-version", Dict{String, Any}("clientRequestToken"=>string(uuid4())); aws_config=aws_config)
update_nodegroup_version(name, nodegroupName, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()) = eks("POST", "/clusters/$(name)/node-groups/$(nodegroupName)/update-version", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("clientRequestToken"=>string(uuid4())), params)); aws_config=aws_config)


text:
"Inner module Luxor Backend"
module LuxorBE

import Luxor
import SDDGeometry: AbstractLine, AbstractRay, AbstractLineSegment,
    AbstractCircle, AbstractArc, basepointR2, initialpointR2, finalpointR2,
    angle, centerR2, radius
import ..SDDGraphics: colortype, _ColorType, _bgcolor, _fgcolor, _coloringfunction,
    _width, _height, _xmax, _xmin, _ymax, _ymin, pointtocanvas,
    _drawingkind, _axes
#_linewidth, _pointsize,

using Colors

_color = RGBA{Float64}(0,0,1,1) # Blue

function _init()
    colortype(Colors.RGBA{Float64}) # Luxor uses colors with alpha
    _bgcolor = _ColorType(1,1,1,0) # White completely transparent
    _fgcolor = _ColorType(0,0,0,1) # Black completely opaque
    _color = _ColorType(0,0,1,1)
end

function color(c::_ColorType)
    global _color = c
    Luxor.setcolor(c)
end

function color(x::Real, y::Real)
    global _color = _coloringfunction(x,y)
    Luxor.setcolor(_color)
end

function color(z::Number)
    global _color = _coloringfunction(z)
    Luxor.setcolor(_color)
end

color() = _color

_drawing = nothing
_scalex = 1.0
_scaley = -1.0

function newdrawing()
    global _drawing = Luxor.Drawing(_width, _height, _drawingkind)
    Luxor.background(_bgcolor)

    if _axes
        Luxor.setcolor(_fgcolor)
        #Luxor.rule(Luxor.O)
        #Luxor.rule(Luxor.O, π/2)
        w0, h0 = pointtocanvas(0,0)
        Luxor.arrow(Luxor.Point(0,h0), Luxor.Point(_width,h0), linewidth=2, arrowheadlength=8)
        Luxor.arrow(Luxor.Point(w0,_height), Luxor.Point(w0,0), linewidth=2, arrowheadlength=8)
    end

    global _scalex = _width/(_xmax - _xmin)
    global _scaley = -_height/(_ymax - _ymin)
    Luxor.origin()
    Luxor.scale(_scalex, _scaley)
    Luxor.translate(-(_xmin + _xmax)/2, -(_ymin + _ymax)/2)
    Luxor.setcolor(_color)
    Luxor.setline(_linewidth)
end # function

_pointsize = 1.0

pointsize(ps::Real) = global _pointsize = ps
pointsize() = _pointsize

_linewidth = 1.0

linewidth(lw::Real) = global _linewidth = lw
linewidth() = _linewidth

_style = :stroke

style(s::Symbol) = global _style = s
style() = _style

#drawpixel(i::Integer, j::Integer) = NOT SUPPORTED IN LUXOR

drawpoint(x::Real, y::Real) =
Luxor.circle(Luxor.Point(x,y),_pointsize/_scalex,:fill)
drawpoint(z::Number) =
Luxor.circle(Luxor.Point(real(z),imag(z)),_pointsize/_scalex,:fill)

drawline(x::Real, y::Real, θ::Real) = Luxor.rule(Luxor.Point(x,y),θ)
drawline(z::Number, θ::Real) = Luxor.rule(Luxor.Point(real(z),imag(z)),θ)
drawline(l::AbstractLine) = Luxor.rule(Luxor.Point(basepointR2(l)...),angle(l))

drawray(x::Real, y::Real, θ::Real) =
Luxor.line(Luxor.Point(x,y),Luxor.Point(2_width*cos(θ),2_width*sin(θ)),:stroke)
drawray(z::Number, θ::Real) =
Luxor.line(Luxor.Point(real(z),imag(z)),Luxor.Point(2_width*cos(θ),2_width*sin(θ)),:stroke)
drawray(l::AbstractRay) =
Luxor.line(Luxor.Point(basepointR2(l)...),Luxor.Point(2_width*cos(angle(l)),2_width*sin(angle(l))),:stroke)

drawlinesegment(x1::Real, y1::Real, x2::Real, y2::Real) =
Luxor.line(Luxor.Point(x1,y1),Luxor.Point(x2,y2),:stroke)
drawlinesegment(z1::Number, z2::Number) =
Luxor.line(Luxor.Point(real(z1),imag(z1)),Luxor.Point(real(z2),imag(z2)),:stroke)
drawlinesegment(l::AbstractLineSegment) =
Luxor.line(Luxor.Point(initialpointR2(l)...),Luxor.Point(finalpointR2(l)...),:stroke)

function _blend(x::Real, y::Real, r::Real)
    b = Luxor.blend(Luxor.Point(x,y), Luxor.Point(x+r,y))
    Luxor.addstop(b, 0.0, _bgcolor)
    Luxor.addstop(b, 0.5,   _color)
    Luxor.addstop(b, 1.0, _fgcolor)
    b
end

function drawcircle(x::Real, y::Real, r::Real)
    if _style == :fillgrad
        Luxor.setblend(_blend(x,y,r))
        return Luxor.circle(x,y,r,:fill)
    end
    Luxor.circle(x,y,r,_style)
end

function drawcircle(z::Number, r::Real)
    if _style == :fillgrad #
        Luxor.setblend(_blend(real(z),imag(z),r))
        return Luxor.circle(real(z),imag(z),r,:fill)
    end
    Luxor.circle(real(z),imag(z),r,_style)
end

function drawcircle(c::AbstractCircle)
    if _style == :fillgrad #
        Luxor.setblend(_blend(centerR2(c)...,radius(c)))
        return Luxor.circle(centerR2(c)...,radius(c),:fill)
    end
    Luxor.circle(centerR2(c)...,radius(c),_style)
end

#drawcirclegrad()?

drawarc(x1::Real, y1::Real, x2::Real, y2::Real, x3::Real, y3::Real) =
Luxor.arc2r(Luxor.Point(x1,y1),Luxor.Point(x2,y2),Luxor.Point(x3,y3),:stroke)
drawarc(z1::Number, z2::Number, z3::Number) =
Luxor.arc2r(Luxor.Point(real(z1),imag(z1)),Luxor.Point(real(z2),imag(z2)),Luxor.Point(real(z3),imag(z3)),:stroke)
drawarc(a::AbstractArc) =
Luxor.arc2r(Luxor.Point(centerR2(a)...),Luxor.Point(initialpointR2(a)...),Luxor.Point(finalpointR2(a)...),:stroke)

drawarc(x1::Real, y1::Real, x2::Real, y2::Real) =
Luxor.arc2sagitta(Luxor.Point(x1,y1),Luxor.Point(x2,y2),sqrt((x1-x2)^2+(y1-y2)^2)/2+0.001,:stroke)
drawarc(z1::Number, z2::Number) =
Luxor.arc2sagitta(Luxor.Point(real(z1),imag(z1)),Luxor.Point(real(z2),imag(z2)),abs(z1-z2)/2+0.001,:stroke)

function drawing()
    Luxor.finish()
    Luxor.preview()
    _drawing
end # function

end # module

ext: jl


text:
"""
    nearest_orthogonal_matrix(X::StridedMatrix)

Project `X` onto the closest orthogonal matrix in Frobenius norm.

Originally used in varz: https://github.com/wesselb/varz/blob/master/varz/vars.py#L446
"""
@inline function nearest_orthogonal_matrix(X::StridedMatrix{<:Union{Real,Complex}})
    # Inlining necessary for type inference for some reason.
    U, _, V = svd(X)
    return U * V'
end

"""
    orthogonal(X::StridedMatrix{<:Real})

Produce a parameter whose `value` is constrained to be an orthogonal matrix. The argument `X` need not
be orthogonal.

This functionality projects `X` onto the nearest element subspace of orthogonal matrices (in
Frobenius norm) and is overparametrised as a consequence.

Originally used in varz: https://github.com/wesselb/varz/blob/master/varz/vars.py#L446
"""
orthogonal(X::StridedMatrix{<:Real}) = Orthogonal(X)

struct Orthogonal{TX<:StridedMatrix{<:Real}} <: AbstractParameter
    X::TX
end

Base.:(==)(X::Orthogonal, Y::Orthogonal) = X.X == Y.X

value(X::Orthogonal) = nearest_orthogonal_matrix(X.X)

function flatten(::Type{T}, X::Orthogonal) where {T<:Real}
    v, unflatten_to_Array = flatten(T, X.X)
    unflatten_Orthogonal(v_new::Vector{T}) = Orthogonal(unflatten_to_Array(v_new))
    return v, unflatten_Orthogonal
end

"""
    positive_definite(X::StridedMatrix{<:Real})

Produce a parameter whose `value` is constrained to be a positive-definite matrix. The argument `X` needs to
be a positive-definite matrix (see https://en.wikipedia.org/wiki/Definite_matrix).

The unconstrained parameter is a `LowerTriangular` matrix, stored as a vector.
"""
function positive_definite(X::StridedMatrix{<:Real})
    isposdef(X) || throw(ArgumentError("X is not positive-definite"))
    return PositiveDefinite(tril_to_vec(cholesky(X).L))
end

struct PositiveDefinite{TL<:AbstractVector{<:Real}} <: AbstractParameter
    L::TL
end

Base.:(==)(X::PositiveDefinite, Y::PositiveDefinite) = X.L == Y.L

A_At(X) = X * X'

value(X::PositiveDefinite) = A_At(vec_to_tril(X.L))

function flatten(::Type{T}, X::PositiveDefinite) where {T<:Real}
    v, unflatten_v = flatten(T, X.L)
    unflatten_PositiveDefinite(v_new::Vector{T}) = PositiveDefinite(unflatten_v(v_new))
    return v, unflatten_PositiveDefinite
end

# Convert a vector to lower-triangular matrix
function vec_to_tril(v::AbstractVector{T}) where {T}
    n_vec = length(v)
    n_tril = Int((sqrt(1 + 8 * n_vec) - 1) / 2) # Infer the size of the matrix from the vector
    L = zeros(T, n_tril, n_tril)
    L[tril!(trues(size(L)))] = v
    return L
end

function ChainRulesCore.rrule(::typeof(vec_to_tril), v::AbstractVector{T}) where {T}
    L = vec_to_tril(v)
    pullback_vec_to_tril(Δ) = NoTangent(), tril_to_vec(unthunk(Δ))
    return L, pullback_vec_to_tril
end

# Convert a lower-triangular matrix to a vector (without the zeros)
# Adapted from https://stackoverflow.com/questions/50651781/extract-lower-triangle-portion-of-a-matrix
function tril_to_vec(X::AbstractMatrix{T}) where {T}
    n, m = size(X)
    n == m || error("Matrix needs to be square")
    return X[tril!(trues(size(X)))]
end


text:
@testset "Basic simulation run tests" begin
    mpSim = ManpowerSimulation( "sim" )
    setSimulationLength!( mpSim, 300 )

    node = BaseNode( "A junior" )
    setNodeRequirements!( node, ("level", "Junior"), ("branch", "A"),
        ("isCareer", "no") )
    addSimulationBaseNode!( mpSim, node )
    @test_throws ErrorException run( mpSim )
    removeSimulationBaseNode!( mpSim, "A junior" )
    run( mpSim )
    @test now( mpSim ) == mpSim.simLength

end  # @testset "Basic simulation run tests"


text:
module AzureBlob

import Base64
import Dates
import HTTP
import Nettle
import TimeZones

using Pipe

export
    get_blob,
	http_date,
    put_blob,
	storage_signature

include("constants.jl")
include("rest.jl")
include("signature.jl")

end # module

max_stars_repo_name: robertdj/AzureBlob

max_issues_repo_name: robertdj/AzureBlob

max_forks_repo_name: robertdj/AzureBlob


text:
################################################
struct VRPTW_Instance
    travel_time     ::Matrix{Float64}
    service_time    ::Vector{Float64}
    early_time      ::Vector{Float64}
    late_time       ::Vector{Float64}
    load            ::Vector{Float64}
    capacity        ::Float64
    max_travel_time ::Float64
end
################################################

################################################
# ESPPRC algorithm
################################################

mutable struct Label
    time        ::Float64
    load        ::Float64
    flag        ::Vector{Int}
    cost        ::Float64
    path        ::Vector{Int}
    function Label(time::Float64, load::Float64, flag::Vector{Int}, cost::Float64, path::Vector{Int})
        time = round(time, digits=DIGITS)
        load = round(load, digits=DIGITS)
        cost = round(cost, digits=DIGITS)
        new(time, load, flag, cost, path)
    end
end

mutable struct ESPPRC_Instance
    origin      :: Int64
    destination :: Int64
    capacity    :: Float64
    cost        :: Matrix{Float64}
    time        :: Matrix{Float64}
    load        :: Matrix{Float64}
    early_time  :: Vector{Float64}
    late_time   :: Vector{Float64}
    service_time:: Vector{Float64}
    forward_star    :: Vector{Vector{Int}}
    reverse_star    :: Vector{Vector{Int}}
    critical_nodes  :: Set{Int}
    max_T           :: Float64
    max_neg_routes  :: Int
end
function ESPPRC_Instance(origin, destination, capacity, cost, time, load, early_time, late_time, service_time)
    n_nodes = length(service_time)
    fs = save_forward_star(n_nodes, destination, cost; sorted=true)
    rs = save_reverse_star(n_nodes, origin, cost; sorted=true)
    critical_nodes = Set(1:n_nodes)
    max_T = calculate_max_T(destination, time, early_time, late_time, service_time)
    max_neg_routes = MAX_INT
    return ESPPRC_Instance(origin, destination, capacity, cost, time, load, early_time, late_time, service_time,
                            fs, rs, critical_nodes, max_T, max_neg_routes)
end
################################################

################################################
#  Branch and bounds
################################################
struct Branch
    history         :: OrderedDict
    vrptw_instance  :: VRPTW_Instance
    root_routes     :: Array
    branch_priority :: Array
    lower_bound     :: Float64
    veh_cond        :: Tuple{String, Int64}
end

mutable struct BestIncumbent
    y::Vector{Float64}
    routes::Vector{Vector{Int}}
    objective::Float64
end

################################################

################################################
# solomon datasets

struct Node
    id::Int
    # type::Int
    cx::Float64
    cy::Float64
end

struct Fleet
    # type::Int
    number::Int
    # departure_node::Int
    # arrival_node::Int
    capacity::Float64
    max_travel_time::Float64
end

struct Request
    id::Int
    start_time::Int
    end_time::Int
    quantity::Float64
    service_time::Float64
end

struct Solomon
    nodes::Vector{Node}
    fleet::Fleet
    requests::Vector{Request}
end
################################################


text:
function test_Zalg(alg::InducingPoints.OnIPSA, N::Int=30, D::Int=3; kwargs...)
    @testset "Test Vector{Real}" begin
        for T in [Float64, Float32]
            X = rand(T, N) * 10
            Z = initZ(alg, X; arraytype=Vector{T}, kwargs...)
            @test eltype(Z) == T
            X2 = rand(T, 2 * N) * 10
            Z = updateZ!(Z, alg, X2; kwargs...)
            @test eltype(Z) == T
            Z = updateZ(Z, alg, X2; kwargs...)
            @test eltype(Z) == T
        end
    end
    @testset "Test Vector{Vector}" begin
        for T in [Float64, Float32]
            X = [rand(T, D) * 10 for _ in 1:N]
            Z = initZ(alg, X; arraytype=Vector{T}, kwargs...)
            @test eltype(Z) == Vector{T}
            X2 = [rand(T, D) * 10 for _ in 1:N]
            Z = updateZ!(Z, alg, X2; kwargs...)
            @test eltype(Z) == Vector{T}
            Z = updateZ(Z, alg, X2; kwargs...)
            @test eltype(Z) == Vector{T}
        end
    end
    @testset "Test ColVecs" begin
        for T in [Float64, Float32]
            X = ColVecs(rand(T, D, N) * 10)
            Z = initZ(alg, X; arraytype=Vector{T}, kwargs...)
            @test eltype(Z) == Vector{T}
            X2 = ColVecs(rand(T, D, 2 * N) * 10)
            X3 = [rand(T, D) * 10 for _ in 1:N]
            Z = updateZ!(Z, alg, X2; kwargs...)
            @test eltype(Z) == Vector{T}
            Z = updateZ!(Z, alg, X3; kwargs...)
            @test eltype(Z) == Vector{T}
            Z = updateZ(Z, alg, X2; kwargs...)
            @test eltype(Z) == Vector{T}
        end
    end
end


text:
using Images

module C
using OpenEXR_jll
using Colors
const ImfHalf = Float16
const ImfRgba = RGBA{ImfHalf}
include("OpenEXR_common.jl")
include("OpenEXR_api.jl")
const IMF_WRITE_RGBA = IMF_WRITE_RGB + IMF_WRITE_A
end # module C

const MAGIC = Cint(C.IMF_MAGIC)

@enum Compression::Cint begin
    NO_COMPRESSION = C.IMF_NO_COMPRESSION
    RLE_COMPRESSION = C.IMF_RLE_COMPRESSION
    ZIPS_COMPRESSION = C.IMF_ZIPS_COMPRESSION
    ZIP_COMPRESSION = C.IMF_ZIP_COMPRESSION
    PIZ_COMPRESSION = C.IMF_PIZ_COMPRESSION
    PXR24_COMPRESSION = C.IMF_PXR24_COMPRESSION
    B44_COMPRESSION = C.IMF_B44_COMPRESSION
    B44A_COMPRESSION = C.IMF_B44A_COMPRESSION
    DWAA_COMPRESSION = C.IMF_DWAA_COMPRESSION
    DWAB_COMPRESSION = C.IMF_DWAB_COMPRESSION
end

@enum RgbaChannels::Cint begin
    WRITE_R = C.IMF_WRITE_R
    WRITE_G = C.IMF_WRITE_G
    WRITE_B = C.IMF_WRITE_B
    WRITE_A = C.IMF_WRITE_A
    WRITE_Y = C.IMF_WRITE_Y
    WRITE_C = C.IMF_WRITE_C
    WRITE_RGB = C.IMF_WRITE_RGB
    WRITE_RGBA = C.IMF_WRITE_RGBA
    WRITE_YC = C.IMF_WRITE_YC
    WRITE_YA = C.IMF_WRITE_YA
    WRITE_YCA = C.IMF_WRITE_YCA
end

function check(ret)
    ret == typeof(ret)(0) && error(unsafe_string(C.ImfErrorMessage()))
end

"""
    load_exr(filename)
If `filename` is a file in OpenEXR format, return a tuple containing the corresponding
RGBA{Float16} image along with in integer encoding the populated channels.
"""
function load_exr(filename)
    infile = C.ImfOpenInputFile(filename)  # open the file
    check(infile)
    try
        # get the header
        hdr = C.ImfInputHeader(infile)

        # read its data window
        xmin = Ref{Cint}()
        ymin = Ref{Cint}()
        xmax = Ref{Cint}()
        ymax = Ref{Cint}()
        C.ImfHeaderDataWindow(hdr, xmin, ymin, xmax, ymax)

        # compute the window size
        width = xmax[] - xmin[] + 1
        height = ymax[] - ymin[] + 1

        # allocate space for the result and get its strides
        data = Array{C.ImfRgba,2}(undef, height, width)
        (xstride, ystride) = strides(data)

        # get the pointer to the data, shifting it according to the expected window
        dataptr = Base.unsafe_convert(Ptr{C.ImfRgba}, data) - xmin[] * xstride - ymin[] * ystride

        # copy the data
        check(C.ImfInputSetFrameBuffer(infile, dataptr, ystride, xstride))
        check(C.ImfInputReadPixels(infile, ymin[], ymax[]))

        # return the loaded raster along with the channels
        return (data, C.ImfInputChannels(infile))
    finally
        check(C.ImfCloseInputFile(infile))
    end
end

"""
    save_exr(filename, image[, channels])
Save the channels of `image` indicated by `channels` (by default, all are saved) into a
file in OpenEXR format named `filename`.
"""
function save_exr(filename, image::AbstractArray{C.ImfRgba,2}, channels=WRITE_RGBA)
    # get the size of the data
    (height, width) = size(image)

    # create a new header
    hdr = C.ImfNewHeader()
    check(hdr)
    try
        # set the correct window sizes
        C.ImfHeaderSetDataWindow(hdr, 0, 0, width - 1, height - 1)
        C.ImfHeaderSetDisplayWindow(hdr, 0, 0, width - 1, height - 1)

        # set compression
        # header.compression() = DWAB_COMPRESSION;
        # addDwaCompressionLevel(header,quality);
        qualityKey = "dwaCompressionLevel"
        qualityValue = Ref{Cfloat}(10000.0)
        val = Cfloat[10000.0]
        C.ImfHeaderSetCompression(hdr, DWAB_COMPRESSION)
        C.ImfHeaderFloatAttribute(hdr, qualityKey, val)

        # open the output file
        outfile = C.ImfOpenOutputFile(filename, hdr, channels)
        check(outfile)
        try
            # get the strides and a pointer to the raster
            (xstride, ystride) = strides(image)
            dataptr = Base.unsafe_convert(Ptr{C.ImfRgba}, image)

            # copy the data
            check(C.ImfOutputSetFrameBuffer(outfile, dataptr, ystride, xstride))
            check(C.ImfOutputWritePixels(outfile, height))
        finally
            check(C.ImfCloseOutputFile(outfile))
        end
    finally
        C.ImfDeleteHeader(hdr)
    end
    nothing
end

function save_exr(f, image::AbstractArray{T,2}, channels=IMF_WRITE_RGBA) where T
    save_exr(f, (c -> convert(C.ImfRgba, c)).(image), channels)
end

width = 100
height = 67

pixels = 100.0 * randn(Float16, width, height)
mask = rand(Float16, width, height)

println("OpenEXR MAGIC: $MAGIC")

# image = RGBA{Float16}.(pixels, pixels, pixels, mask)
image = Gray{Float16}.(pixels)

filename = tempname() * ".exr"
channels = WRITE_R
save_exr(filename, image, channels)

println("EXR file: $filename")

data, channels = load_exr(filename)

display(data)
println(channels)


text:
using Documenter
using CapacityExpansionData

makedocs(sitename="CapacityExpansionData.jl",
    authors = "Elias Kuepper, and Holger Teichgraeber",
    pages = [
        "Data" => ["provided_data.md", "README_GER_18.md", "README_GER_1.md", "README_CA_14.md", "README_CA_1.md", "README_TX_1.md"]
        ],
    format = Documenter.HTML(assets = [
        "assets/clust_for_opt_text.svg",
        "assets/opt_cep.svg",
        "assets/workflow.svg",
        "assets/GER_1.svg",
        "assets/GER_18.svg",
        "assets/CA_1.svg",
        "assets/CA_14.svg",
        "assets/opt_cep_cap_plot",
        "assets/preparing_clust_data_load",
        "assets/preparing_clust_data_agg"])
        )

deploydocs(repo = "github.com/YoungFaithful/CapacityExpansionData.jl.git", devbranch="dev")


text:
# function to overwrite * and mul!

## with Base.threads
"""
    ThreadedSparseCSR.multithread_matmul()
    ThreadedSparseCSR.multithread_matmul(PolyesterThreads())

Overwrites `*` and `mul!` by their multithreaded versions, using Polyester.jl threading.

    ThreadedSparseCSR.multithread_matmul(BaseThreads())

Overwrites `*` and `mul!` by their multithreaded versions, using Threads.@spawn threading.
"""
function multithread_matmul(T::BaseThreads)

    @eval function  mul!(y::AbstractVector, A::SparseMatrixCSR, x::AbstractVector, alpha::Number, beta::Number)
        return tmul!(y, A, x, alpha, beta)
    end

    @eval function  mul!(y::AbstractVector, A::SparseMatrixCSR, x::AbstractVector)
        return tmul!(y, A, x)
    end

    @eval function  *(A::SparseMatrixCSR, x::AbstractVector)
        return tmul(A, x)
    end

end

## with Polyester
function multithread_matmul(T::PolyesterThreads)

    @eval function  mul!(y::AbstractVector, A::SparseMatrixCSR, x::AbstractVector, alpha::Number, beta::Number)
        return bmul!(y, A, x, alpha, beta)
    end

    @eval function  mul!(y::AbstractVector, A::SparseMatrixCSR, x::AbstractVector)
        return bmul!(y, A, x)
    end

    @eval function  *(A::SparseMatrixCSR, x::AbstractVector)
        return bmul(A, x)
    end

end

## with default threading backend
function  multithread_matmul()

    multithread_matmul(DefaultThreadingBackend())

end


text:
module LokiLogger

import HTTP, Logging, StructTypes, JSON3
using URIs: URI

"""
    LokiLogger.Logger(server::Union{String,URI}; labels::Dict)
    LokiLogger.Logger(fmt::Function, server::Union{String,URI}; labels::Dict)

Create a logger that send messages to a Loki server.

The log messages are attributed with the labels given in the `labels` dictionary.
If no labels are specified the default labels are:
 - `"host" => gethostname()`
 - `"app"  => "LokiLogger.jl"`

The `fmt` argument is used for formatting. There are two builtin formatting functions:
 - `LokiLogger.logfmt` (default): formats the log message in the
   [`logfmt`](https://brandur.org/logfmt) format,
 - `LokiLogger.json`: formats the log message as JSON.
Custom functions must take two arguments: an `io::IO` to write the message to,
and `args::NamedTuple` that contains all the logger arguments, see
help for `LoggingExtras.handle_message_args` for details.

## Examples
```julia
# Create a logger with a single label and default (logfmt) formatting
logger = LokiLogger.Logger("http://localhost:3100"; labels = Dict("app" => "myapp"))

# Create a logger with json output formatting
logger = LokiLogger.Logger(LokiLogger.json, "http://localhost:3100")

# Create a logger with custom formatting
logger = LokiLogger.Logger("http://localhost:3100") do io, args
    # Only output the level and the message
    print(io, args.level, ": ", args.message)
end
```
"""
struct Logger <: Logging.AbstractLogger
    server::URI
    labels::Dict{String,String}
    fmt::Function
end

function Logger(fmt::Function, server::Union{String,URI};
                labels::Dict = Dict("host" => gethostname(), "app" => "LokiLogger.jl"))
    return Logger(URI(URI(server); path="/loki/api/v1/push"), labels, fmt)
end
Logger(server::Union{String,URI}; kwargs...) = Logger(logfmt, server; kwargs...)

function Logging.handle_message(loki::Logger, args...; kwargs...)
    log_args = handle_message_args(args...; kwargs...)
    logline = strip(sprint(loki.fmt, log_args))
    json = Dict("streams" => [
        Dict{String,Any}(
            "stream" => loki.labels,
            "values" => [
                String[string(round(Int, time() * 1e9)), logline],
            ]
        )
    ])
    msg = sprint(JSON3.write, json)
    headers = ["Content-Type" => "application/json", "Content-Length" => string(sizeof(msg))]
    # TODO: Implement some kind of flushing timer instead of sending for every message
    HTTP.post(loki.server, headers, msg)
    return nothing
end
Logging.shouldlog(loki::Logger, args...) = true
Logging.min_enabled_level(loki::Logger) = Logging.BelowMinLevel
Logging.catch_exceptions(loki::Logger) = true

# Formats

lvlstr(lvl::Logging.LogLevel) = lvl >= Logging.Error ? "error" :
                                lvl >= Logging.Warn  ? "warn"  :
                                lvl >= Logging.Info  ? "info"  :
                                                       "debug"

## logfmt

"""
    logfmt(io::IO, args)

Format the log message in [`logfmt`](https://brandur.org/logfmt) key-value format
and print to `io`.

Example logline:
```
level=info msg="hello, world" module=Main file="/run.jl" line=2 group=run id=Main_6972c827
```
"""
function logfmt(io::IO, args)
    # TODO: Handle kwargs...
    println(io,
        "level=", lvlstr(args.level),
        " msg=", repr(args.message),
        " module=", string(args._module),
        " file=", repr(args.file),
        " line=", args.line,
        " group=", args.group,
        " id=", args.id
    )
end

## JSON
struct LogMessage
    level::String
    msg::String
    _module::Union{String,Nothing}
    file::Union{String,Nothing}
    line::Union{Int,Nothing}
    group::Union{String,Nothing}
    id::Union{String,Nothing}
end
function LogMessage(args)
    # TODO: Handle kwargs...
    LogMessage(
        lvlstr(args.level),
        args.message,
        args._module === nothing ? nothing : string(args._module),
        args.file,
        args.line,
        args.group === nothing ? nothing : string(args.group),
        # args.id is Tuple{Stackframe,Symbol} for e.g. @depwarn...
        args.id === nothing ? nothing : string(args.id),
    )
end
StructTypes.StructType(::Type{LogMessage}) = StructTypes.OrderedStruct()
StructTypes.names(::Type{LogMessage}) = ((:_module, :module),)
# StructTypes.omitempties(::Type{LogMessage}) = (:_module, :file, :line, :group, :id)

"""
    json(io::IO, args)

Format the log message as JSON and write to `io`.

Example logline:
```
{"level":"info","msg":"hello, world","module":"Main","file":"/run.jl","line":2,"group":"run","id":"Main_6972c827"}
```
"""
function json(io::IO, args)
    logmsg = LogMessage(args)
    JSON3.write(io, logmsg)
    println(io)
end

## Copied from LoggingExtras.jl
## MIT License (https://github.com/oxinabox/LoggingExtras.jl/blob/master/LICENSE.md)
function handle_message_args(args...; kwargs...)
    fieldnames = (:level, :message, :_module, :group, :id, :file, :line, :kwargs)
    fieldvals = (args..., kwargs)
    return NamedTuple{fieldnames, typeof(fieldvals)}(fieldvals)
end

end # module


text:
const libGRM_syms = [
:grm_open
:grm_send
:grm_send_ref
:grm_recv
:grm_plot
:grm_args_delete
:grm_close
]


text:
using Mimi

use_permafrost = true

@defcomp CO2Cycle begin
    # Permafrost outputs
    permte0_permafrostemissions0 = Parameter(unit="Mtonne")
    permte_permafrostemissions = Parameter(index=[time], unit="Mtonne")

    e_globalCO2emissions = Parameter(index=[time], unit="Mtonne/year")
    e0_globalCO2emissions = Parameter(unit="Mtonne/year", default=41223.85968577856)

    pic_preindustconcCO2=Parameter(unit="ppbv", default=278000.)
    exc_excessconcCO2=Variable(unit="ppbv")
    c0_CO2concbaseyr=Parameter(unit="ppbv", default=400859.5833333334)
    re_remainCO2=Variable(index=[time],unit="Mtonne")
    re_remainCO2base=Variable(unit="Mtonne")
    renoccf_remainCO2wocc=Variable(index=[time],unit="Mtonne")
    air_CO2fractioninatm=Parameter(unit="%", default=62.00)
    stay_fractionCO2emissionsinatm=Parameter(default=0.2341802168612297)#percent co2 stay but not in percent
    ccf_CO2feedback=Parameter(unit="%/degreeC", default=0.0)
    ccfmax_maxCO2feedback=Parameter(unit="%", default=20.0)
    ce_0_basecumCO2emissions=Parameter(unit="Mtonne", default=2040000.)
    conoccf_concentrationCO2wocc=Variable(index=[time], unit="ppbv")
    y_year=Parameter(index=[time],unit="year")
    y_year_0=Parameter(unit="year")
    res_CO2atmlifetime=Parameter(unit="year", default=73.3333333333333)
    den_CO2density=Parameter(unit="Mtonne/ppbv", default=7.8)
    rt_g0_baseglobaltemp=Parameter(unit="degreeC", default=0.9461666666666667)
    rt_g_globaltemperature=Parameter(index=[time],unit="degreeC")

    # Parameters for components of CO2
    thist_timescaleco2hist = Parameter( unit="year", default=49.59054463320648)
    corrf_correctionfactorco2_0 = Parameter(default=0.8177307839027955)
    a1_percentco2oceanlong=Parameter(unit="%", default=22.97348182941324)
    a2_percentco2oceanshort=Parameter(unit="%", default=26.64454562239661)
    a3_percentco2land=Parameter(unit="%", default=26.96395086206718)
    t1_timeco2oceanlong=Parameter(unit="year", default=312.54206687556456)
    t2_timeco2oceanshort=Parameter(unit="year", default=34.873449489671636)
    t3_timeco2land=Parameter(unit="year", default=4.257701532922862)

    # Projections for components of CO2
    asymptote_co2_hist =Variable(index=[time], unit="Mtonne")
    ocean_long_uptake_component_hist=Variable(index=[time], unit="Mtonne")
    ocean_short_uptake_component_hist=Variable(index=[time], unit="Mtonne")
    land_uptake_co2hist=Variable(index=[time], unit="Mtonne")

    asymptote_co2_proj=Variable(index=[time], unit="Mtonne")
    ocean_long_uptake_component_proj=Variable(index=[time], unit="Mtonne")
    ocean_short_uptake_component_proj=Variable(index=[time], unit="Mtonne")
    land_uptake_co2_proj=Variable(index=[time], unit="Mtonne")

    te_totalemissions = Variable(index=[time], unit="Mtonne/year")
    c_CO2concentration=Variable(index=[time],unit="ppbv")

    function run_timestep(p, v, d, t)

        te0_totalemissions0 = p.e0_globalCO2emissions + p.permte0_permafrostemissions0
        if is_first(t)
            #adapted from eq.1 in Hope(2006) - calculate excess concentration in base year
            v.exc_excessconcCO2=p.c0_CO2concbaseyr-p.pic_preindustconcCO2
            #Eq. 2 from Hope (2006) - base-year remaining emissions
            v.re_remainCO2base=v.exc_excessconcCO2*p.den_CO2density

            v.asymptote_co2_hist[t] = p.corrf_correctionfactorco2_0 * te0_totalemissions0 * p.thist_timescaleco2hist * p.stay_fractionCO2emissionsinatm
            v.ocean_long_uptake_component_hist[t]=p.corrf_correctionfactorco2_0 * te0_totalemissions0 * (p.thist_timescaleco2hist / (1 + p.thist_timescaleco2hist/p.t1_timeco2oceanlong)) * (p.a1_percentco2oceanlong/100) * exp(-(p.y_year[t]-p.y_year_0)/p.t1_timeco2oceanlong)
            v.ocean_short_uptake_component_hist[t]=p.corrf_correctionfactorco2_0 * te0_totalemissions0 * (p.thist_timescaleco2hist / (1 + p.thist_timescaleco2hist/p.t2_timeco2oceanshort)) * (p.a2_percentco2oceanshort/100) * exp(-(p.y_year[t]-p.y_year_0)/p.t2_timeco2oceanshort)
            v.land_uptake_co2hist[t]=p.corrf_correctionfactorco2_0 * te0_totalemissions0 * (p.thist_timescaleco2hist / (1 + p.thist_timescaleco2hist/p.t3_timeco2land)) * (p.a3_percentco2land/100) * exp(-(p.y_year[t]-p.y_year_0)/p.t3_timeco2land)

            v.te_totalemissions[t] = p.e_globalCO2emissions[t] + p.permte_permafrostemissions[t]
            v.asymptote_co2_proj[t] = 0.5*(te0_totalemissions0 + v.te_totalemissions[t]) * (p.y_year[t]-p.y_year_0) * p.stay_fractionCO2emissionsinatm
            v.ocean_long_uptake_component_proj[t] = 0.5*(te0_totalemissions0 + v.te_totalemissions[t]) * p.t1_timeco2oceanlong * (1 - exp(-(p.y_year[t]-p.y_year_0)/p.t1_timeco2oceanlong)) * (p.a1_percentco2oceanlong/100)
            v.ocean_short_uptake_component_proj[t] = 0.5*(te0_totalemissions0 + v.te_totalemissions[t]) * p.t2_timeco2oceanshort * (1 - exp(-(p.y_year[t]-p.y_year_0)/p.t2_timeco2oceanshort)) * (p.a2_percentco2oceanshort/100)
            v.land_uptake_co2_proj[t] = 0.5*(te0_totalemissions0 + v.te_totalemissions[t]) * p.t3_timeco2land * (1 - exp(-(p.y_year[t]-p.y_year_0)/p.t3_timeco2land)) * p.a3_percentco2land/100
        else
            v.te_totalemissions[t] = p.e_globalCO2emissions[t] + p.permte_permafrostemissions[t]

            v.asymptote_co2_hist[t] = p.corrf_correctionfactorco2_0 * te0_totalemissions0 * p.thist_timescaleco2hist * p.stay_fractionCO2emissionsinatm
            v.ocean_long_uptake_component_hist[t] = p.corrf_correctionfactorco2_0 * te0_totalemissions0 * (p.thist_timescaleco2hist / (1 + p.thist_timescaleco2hist/p.t1_timeco2oceanlong)) * (p.a1_percentco2oceanlong/100)*exp(-(p.y_year[t]-p.y_year_0)/p.t1_timeco2oceanlong)
            v.ocean_short_uptake_component_hist[t]=p.corrf_correctionfactorco2_0 * te0_totalemissions0 * (p.thist_timescaleco2hist / (1 + p.thist_timescaleco2hist/p.t2_timeco2oceanshort)) * (p.a2_percentco2oceanshort/100)*exp(-(p.y_year[t]-p.y_year_0)/p.t2_timeco2oceanshort)
            v.land_uptake_co2hist[t]=p.corrf_correctionfactorco2_0 * te0_totalemissions0 * (p.thist_timescaleco2hist / (1 + p.thist_timescaleco2hist/p.t3_timeco2land)) * (p.a3_percentco2land/100)*exp(-(p.y_year[t]-p.y_year_0)/p.t3_timeco2land)

            v.asymptote_co2_proj[t] = v.asymptote_co2_proj[t-1] + 0.5*(v.te_totalemissions[t-1] + v.te_totalemissions[t]) * (p.y_year[t]-p.y_year[t-1]) * p.stay_fractionCO2emissionsinatm
            v.ocean_long_uptake_component_proj[t]=v.ocean_long_uptake_component_proj[t-1]*exp(-(p.y_year[t]-p.y_year[t-1])/p.t1_timeco2oceanlong)+0.5 * (v.te_totalemissions[t-1] + v.te_totalemissions[t]) * p.t1_timeco2oceanlong * (1 - exp(-(p.y_year[t]-p.y_year[t-1])/p.t1_timeco2oceanlong)) * (p.a1_percentco2oceanlong/100)
            v.ocean_short_uptake_component_proj[t]=v.ocean_short_uptake_component_proj[t-1] * exp(-(p.y_year[t]-p.y_year[t-1])/p.t2_timeco2oceanshort)+ 0.5 * (v.te_totalemissions[t-1] + v.te_totalemissions[t]) * p.t2_timeco2oceanshort * (1 - exp(-(p.y_year[t]-p.y_year[t-1])/p.t2_timeco2oceanshort)) * (p.a2_percentco2oceanshort/100)
            v.land_uptake_co2_proj[t]=v.land_uptake_co2_proj[t-1]*exp(-(p.y_year[t]-p.y_year[t-1])/p.t3_timeco2land)+0.5 * (v.te_totalemissions[t-1] + v.te_totalemissions[t]) * p.t3_timeco2land * (1 - exp(-(p.y_year[t]-p.y_year[t-1])/p.t3_timeco2land)) * p.a3_percentco2land/100
        end

        #remaining emmissions C02 before ccf
        v.renoccf_remainCO2wocc[t]=v.asymptote_co2_hist[t]+v.ocean_long_uptake_component_hist[t]+v.ocean_short_uptake_component_hist[t]+v.land_uptake_co2hist[t]+v.asymptote_co2_proj[t]+v.ocean_long_uptake_component_proj[t]+v.ocean_short_uptake_component_proj[t]+v.land_uptake_co2_proj[t]
        #CO2 concentration CO2 before CCF
        v.conoccf_concentrationCO2wocc[t]=p.pic_preindustconcCO2+v.exc_excessconcCO2*(v.renoccf_remainCO2wocc[t]*v.re_remainCO2base)
        v.re_remainCO2[t]=v.renoccf_remainCO2wocc[t]

        #eq.11 from Hope(2006) - CO2 concentration
        v.c_CO2concentration[t]=p.pic_preindustconcCO2+v.exc_excessconcCO2 * v.re_remainCO2[t]/v.re_remainCO2base
    end
end

function addco2cycle(model::Model, use_permafrost::Bool)
    co2cycle = add_comp!(model, CO2Cycle)

    if use_permafrost
        co2cycle[:permte0_permafrostemissions0] = 692.2476420621228
        co2cycle[:corrf_correctionfactorco2_0] = 0.8177307839027955
        co2cycle[:thist_timescaleco2hist] = 49.59054463320648
    else
        co2cycle[:permte0_permafrostemissions0] = 0
        co2cycle[:permte_permafrostemissions] = zeros(10)
        co2cycle[:corrf_correctionfactorco2_0] = 0.834514918731254
        co2cycle[:thist_timescaleco2hist] = 49.36461591688456
    end

    co2cycle
end

max_stars_repo_name: lrennels/PAGE-ICE

max_issues_repo_name: lrennels/PAGE-ICE

max_forks_repo_name: lrennels/PAGE-ICE


text:
# Subspace iterations

function sub_iterations(X,
                        Y,
                        q::Int)

    for i = 1:q
          Y = X * qr(X' * qr(Y).Q).Q
    end

    return Y
end

function sub_iterations!(X,
                         Y,
                         q::Int)

    for i = 1:q
          Y = X * qr(X' * qr(Y).Q).Q
    end
end


text:
module M1
using ConcreteInterfaces

struct B
    x::Int
end

struct C
    x::Float64
end

@interface Foo{T}(self) begin
    foo(y::T)::Base.promote_op(+, T, Float64) = self.x + y
    bar(y::T)::T = self.x
end

@interface Ifc2(x, y) begin
    get_z()::Float64 = x + y
end

@interface Ifc3{T}(x, y) begin
    get_z()::T = x + y
end

@interface Ifc4{T <: Integer}(x::Integer) begin
    bar(y::T)::T = x - y
end

end

@testset "simple interface" begin
    b = M1.B(1)
    c = M1.C(2.0)
    @test isa(@inferred(M1.Foo{Float64}(b)), M1.Foo{Float64, Float64})
    F = M1.Foo{Float64}.([b, c])
    @test F[1].self === b
    @test F[2].self === c
    @test eltype(F) == M1.Foo{Float64, Float64}
    @test @inferred(M1.foo(F[1], 2.0)) == 3.0
    @test M1.foo.(F, 2.0) == [3.0, 4.0]
    y = zeros(2)
    @test @wrappedallocs(y .= M1.foo.(F, 2.0)) == 0
end

@testset "interface with no args" begin
    I = [M1.Ifc2(1, 2.0), M1.Ifc2(3, 4.0)]
    @test I[1].x === 1
    @test I[1].y === 2.0
    @test I[2].x === 3
    @test I[2].y === 4.0
    @test M1.get_z.(I) == [3.0, 7.0]
    @test @inferred(M1.get_z(I[1])) == 3.0
    y = zeros(2)
    @test @wrappedallocs(y .= M1.get_z.(I)) == 0
end

@testset "parametric interface with no args" begin
    I = [M1.Ifc3{Complex{Float64}}(1, 2.0), M1.Ifc3{Complex{Float64}}(3, 4.0)]
    @test M1.get_z.(I) == [3.0 + 0im, 7.0 + 0im]
end

@testset "parametric interface with restriction" begin
    i1 = M1.Ifc4{Int}(23)
    @test @inferred(M1.bar(i1, 5)) === 18
end


text:
using JLD
using SharedArrays
using Distributed
include("../examples/lorenz.jl")
function obj_fun(x,y,z)
    return (z-28.0)^2.0
end
function obj_fun_erg_avg(s)
    nSteps = 100000
    u = 2*pi*rand(3)
    J = 0.
    u_trj = step(u,s,nSteps)
    x, y, z = view(u_trj,1,:), view(u_trj,2,:), view(u_trj,3,:)
    J = sum(obj_fun.(x,y,z)/nSteps)
    return J
end
function get_Javg_vs_s()
    n_pts = 10
    n_rep = 16000
    s = [10.0, 28.0, 8/3]
    s_ind = LinRange(27.5,31.5,n_pts)
    J = zeros(n_pts)
    J_proc = SharedArray{Float64}(n_rep)
    for i = 1:n_pts
    	s[2] = s_ind[i]
    	J_proc .= 0.
    	t = @distributed for n=1:n_rep
    		J_proc[n] = obj_fun_erg_avg(s)/n_rep
    	end
    	wait(t)
    	J[i] = sum(J_proc)
    end
    save("../data/obj_erg_avg/lorenz/zm28sq_dJds.jld",
    	 "s2", s_ind,
    	"J", J)
end

max_stars_repo_name: nishaChandramoorthy/linearResponse

max_issues_repo_name: nishaChandramoorthy/linearResponse

max_forks_repo_name: nishaChandramoorthy/linearResponse


text:
using Test
using MPI

MPI.Init()

comm = MPI.COMM_WORLD
root = 0
rank = MPI.Comm_rank(comm)
sz   = MPI.Comm_size(comm)
isroot = MPI.Comm_rank(comm) == root

for typ in Base.uniontypes(MPI.MPIDatatype)

    # Allocating
    A = typ[MPI.Comm_rank(comm) + 1]
    C = MPI.Gather(A, root, comm)
    if MPI.Comm_rank(comm) == root
        @test typeof(C) === Vector{typ}
        @test C == map(typ, collect(1:MPI.Comm_size(comm)))
    end

    # Allocating, object
    A = convert(typ,MPI.Comm_rank(comm) + 1)
    C = MPI.Gather(A, root, comm)
    if MPI.Comm_rank(comm) == root
        @test typeof(C) === Vector{typ}
        @test C == map(typ, collect(1:MPI.Comm_size(comm)))
    end

    # Allocating, explicit length
    A = typ[MPI.Comm_rank(comm) + 1, 0]
    C = MPI.Gather(A, 1, root, comm)
    if MPI.Comm_rank(comm) == root
        @test typeof(C) === Vector{typ}
        @test C == map(typ, collect(1:MPI.Comm_size(comm)))
    end

    # Allocating, view
    A = typ[MPI.Comm_rank(comm) + 1, 0]
    C = MPI.Gather(view(A, 1:1), root, comm)
    if MPI.Comm_rank(comm) == root
        @test typeof(C) === Vector{typ}
        @test C == map(typ, collect(1:MPI.Comm_size(comm)))
    end

    # Non Allocating
    A = typ[MPI.Comm_rank(comm) + 1]
    C = Array{typ}(undef, sz)
    MPI.Gather!(A, C, length(A), root, comm)
    if MPI.Comm_rank(comm) == root
        @test C == map(typ, collect(1:MPI.Comm_size(comm)))
    end

    # In_place
    A = typ[rank + 1]
    B = Array{typ}(undef, sz);
    B[rank+1] = rank+1
    C = isroot ? B : A
    MPI.Gather_in_place!(C, 1, root, comm)
    if MPI.Comm_rank(comm) == root
        @test C == map(typ, collect(1:MPI.Comm_size(comm)))
    end

end

MPI.Finalize()
@test MPI.Finalized()