codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/EndpointDiscoveryGenerator.java
private static void generateEnableEndpointDiscoveryResolver(Model model, GoWriter writer, ServiceShape service) {
        if (!serviceSupportsEndpointDiscovery(model, service)) {
            return;
        }

        writer.openBlock("func $L(o *Options) {", "}",
                ENABLE_ENDPOINT_DISCOVERY_OPTION_RESOLVER, () -> {
                    writer.write("if o.$L.$L != $T { return }", ENDPOINT_DISCOVERY_OPTION,
                            ENABLE_ENDPOINT_DISCOVERY_OPTION, ENDPOINT_DISCOVERY_ENABLE_STATE_UNSET);
                    writer.write("o.$L.$L = $T", ENDPOINT_DISCOVERY_OPTION,
                            ENABLE_ENDPOINT_DISCOVERY_OPTION, ENDPOINT_DISCOVERY_ENABLE_STATE_AUTO);
                });
        writer.write("");
    }
/**
     * Generates resolver function to default EnableEndpointDiscovery to AUTO.
     *
     * @param model   is the generation model
     * @param writer  is the GoWriter
     * @param service is the service for which endpoint discovery is performed.
     */
Generates resolver function to default EnableEndpointDiscovery to AUTO.
@param model   is the generation model
@param writer  is the GoWriter
@param service is the service for which endpoint discovery is performed.
Generates resolver function to default EnableEndpointDiscovery to AUTO . @param model is the generation model @param writer is the GoWriter @param service is the service for which endpoint discovery is performed .
private static void generateEnableEndpointDiscoveryResolver(Model model, GoWriter writer, ServiceShape service) {
        if (!serviceSupportsEndpointDiscovery(model, service)) {
            return;
        }
        writer.openBlock("func $L(o *Options) {", "}",
                ENABLE_ENDPOINT_DISCOVERY_OPTION_RESOLVER, () -> {
                    writer.write("if o.$L.$L != $T { return }", ENDPOINT_DISCOVERY_OPTION,
                            ENABLE_ENDPOINT_DISCOVERY_OPTION, ENDPOINT_DISCOVERY_ENABLE_STATE_UNSET);
                    writer.write("o.$L.$L = $T", ENDPOINT_DISCOVERY_OPTION,
                            ENABLE_ENDPOINT_DISCOVERY_OPTION, ENDPOINT_DISCOVERY_ENABLE_STATE_AUTO);
                });
        writer.write("");
    }
private static void generateEnableEndpointDiscoveryResolver ( Model model , GoWriter writer , ServiceShape service ) { if ( ! serviceSupportsEndpointDiscovery ( model , service ) ) { return ; } writer . openBlock ( "func $L(o *Options) {" , "}" , ENABLE_ENDPOINT_DISCOVERY_OPTION_RESOLVER , ( ) -> { writer . write ( "if o.$L.$L != $T { return }" , ENDPOINT_DISCOVERY_OPTION , ENABLE_ENDPOINT_DISCOVERY_OPTION , ENDPOINT_DISCOVERY_ENABLE_STATE_UNSET ) ; writer . write ( "o.$L.$L = $T" , ENDPOINT_DISCOVERY_OPTION , ENABLE_ENDPOINT_DISCOVERY_OPTION , ENDPOINT_DISCOVERY_ENABLE_STATE_AUTO ) ; } ) ; writer . write ( "" ) ; }
Generates resolver function to default EnableEndpointDiscovery to AUTO.
Generates resolver function to default EnableEndpointDiscovery to AUTO .