{
    "testCases": [
        {
            "documentation": "For region aws-global with FIPS disabled and DualStack disabled",
            "expect": {
                "endpoint": {
                    "properties": {
                        "authSchemes": [
                            {
                                "name": "sigv4",
                                "signingName": "savingsplans",
                                "signingRegion": "us-east-1"
                            }
                        ]
                    },
                    "url": "https://savingsplans.amazonaws.com"
                }
            },
            "params": {
                "Region": "aws-global",
                "UseFIPS": false,
                "UseDualStack": false
            }
        },
        {
            "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans-fips.us-east-1.api.aws"
                }
            },
            "params": {
                "Region": "us-east-1",
                "UseFIPS": true,
                "UseDualStack": true
            }
        },
        {
            "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans-fips.us-east-1.amazonaws.com"
                }
            },
            "params": {
                "Region": "us-east-1",
                "UseFIPS": true,
                "UseDualStack": false
            }
        },
        {
            "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled",
            "expect": {
                "endpoint": {
                    "properties": {
                        "authSchemes": [
                            {
                                "name": "sigv4",
                                "signingName": "savingsplans",
                                "signingRegion": "us-east-1"
                            }
                        ]
                    },
                    "url": "https://savingsplans.amazonaws.com"
                }
            },
            "params": {
                "Region": "us-east-1",
                "UseFIPS": false,
                "UseDualStack": false
            }
        },
        {
            "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans-fips.cn-north-1.api.amazonwebservices.com.cn"
                }
            },
            "params": {
                "Region": "cn-north-1",
                "UseFIPS": true,
                "UseDualStack": true
            }
        },
        {
            "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans-fips.cn-north-1.amazonaws.com.cn"
                }
            },
            "params": {
                "Region": "cn-north-1",
                "UseFIPS": true,
                "UseDualStack": false
            }
        },
        {
            "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans.cn-north-1.api.amazonwebservices.com.cn"
                }
            },
            "params": {
                "Region": "cn-north-1",
                "UseFIPS": false,
                "UseDualStack": true
            }
        },
        {
            "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans.cn-north-1.amazonaws.com.cn"
                }
            },
            "params": {
                "Region": "cn-north-1",
                "UseFIPS": false,
                "UseDualStack": false
            }
        },
        {
            "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans-fips.us-gov-east-1.api.aws"
                }
            },
            "params": {
                "Region": "us-gov-east-1",
                "UseFIPS": true,
                "UseDualStack": true
            }
        },
        {
            "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans-fips.us-gov-east-1.amazonaws.com"
                }
            },
            "params": {
                "Region": "us-gov-east-1",
                "UseFIPS": true,
                "UseDualStack": false
            }
        },
        {
            "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans.us-gov-east-1.api.aws"
                }
            },
            "params": {
                "Region": "us-gov-east-1",
                "UseFIPS": false,
                "UseDualStack": true
            }
        },
        {
            "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans.us-gov-east-1.amazonaws.com"
                }
            },
            "params": {
                "Region": "us-gov-east-1",
                "UseFIPS": false,
                "UseDualStack": false
            }
        },
        {
            "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans-fips.us-iso-east-1.c2s.ic.gov"
                }
            },
            "params": {
                "Region": "us-iso-east-1",
                "UseFIPS": true,
                "UseDualStack": false
            }
        },
        {
            "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans.us-iso-east-1.c2s.ic.gov"
                }
            },
            "params": {
                "Region": "us-iso-east-1",
                "UseFIPS": false,
                "UseDualStack": false
            }
        },
        {
            "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans-fips.us-isob-east-1.sc2s.sgov.gov"
                }
            },
            "params": {
                "Region": "us-isob-east-1",
                "UseFIPS": true,
                "UseDualStack": false
            }
        },
        {
            "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled",
            "expect": {
                "endpoint": {
                    "url": "https://savingsplans.us-isob-east-1.sc2s.sgov.gov"
                }
            },
            "params": {
                "Region": "us-isob-east-1",
                "UseFIPS": false,
                "UseDualStack": false
            }
        },
        {
            "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled",
            "expect": {
                "endpoint": {
                    "url": "https://example.com"
                }
            },
            "params": {
                "Region": "us-east-1",
                "UseFIPS": false,
                "UseDualStack": false,
                "Endpoint": "https://example.com"
            }
        },
        {
            "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled",
            "expect": {
                "endpoint": {
                    "url": "https://example.com"
                }
            },
            "params": {
                "UseFIPS": false,
                "UseDualStack": false,
                "Endpoint": "https://example.com"
            }
        },
        {
            "documentation": "For custom endpoint with fips enabled and dualstack disabled",
            "expect": {
                "error": "Invalid Configuration: FIPS and custom endpoint are not supported"
            },
            "params": {
                "Region": "us-east-1",
                "UseFIPS": true,
                "UseDualStack": false,
                "Endpoint": "https://example.com"
            }
        },
        {
            "documentation": "Missing region",
            "expect": {
                "error": "Invalid Configuration: Missing Region"
            }
        },
        {
            "documentation": "For region not set with FIPS disabled and DualStack enabled",
            "expect": {
                "endpoint": {
                    "properties": {
                        "authSchemes": [
                            {
                                "name": "sigv4",
                                "signingName": "savingsplans",
                                "signingRegion": "us-east-1"
                            }
                        ]
                    },
                    "url": "https://savingsplans.global.api.aws"
                }
            },
            "params": {
                "UseDualStack": true,
                "UseFIPS": false
            }
        },
        {
            "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled",
            "expect": {
                "endpoint": {
                    "properties": {
                        "authSchemes": [
                            {
                                "name": "sigv4",
                                "signingName": "savingsplans",
                                "signingRegion": "us-east-1"
                            }
                        ]
                    },
                    "url": "https://savingsplans.global.api.aws"
                }
            },
            "params": {
                "Region": "us-east-1",
                "UseDualStack": true,
                "UseFIPS": false
            }
        },
        {
            "documentation": "For region us-west-1 with FIPS disabled and DualStack enabled",
            "expect": {
                "endpoint": {
                    "properties": {
                        "authSchemes": [
                            {
                                "name": "sigv4",
                                "signingName": "savingsplans",
                                "signingRegion": "us-east-1"
                            }
                        ]
                    },
                    "url": "https://savingsplans.global.api.aws"
                }
            },
            "params": {
                "Region": "us-west-1",
                "UseDualStack": true,
                "UseFIPS": false
            }
        },
        {
            "documentation": "Commercial region with custom SDK endpoint",
            "expect": {
                "endpoint": {
                    "url": "https://custom.example.com"
                }
            },
            "params": {
                "Region": "us-east-1",
                "UseDualStack": false,
                "UseFIPS": false,
                "Endpoint": "https://custom.example.com"
            }
        }
    ],
    "version": "1.0"
}