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

        writer.write("// $T used to configure endpoint discovery", ENDPOINT_DISCOVERY_OPTION_TYPE);
        writer.openBlock("type $T struct {", "}", ENDPOINT_DISCOVERY_OPTION_TYPE, () -> {
            writer.writeDocs("Enables endpoint discovery");
            writer.write("$L $T", ENABLE_ENDPOINT_DISCOVERY_OPTION, ENDPOINT_DISCOVERY_ENABLE_STATE_TYPE);

            if (serviceSupportsCustomDiscoveryEndpoint(model, service)) {
                writer.write("");
                writer.writeDocs("Allows configuring an endpoint resolver to use when attempting an endpoint discovery "
                        + "api request.");
                writer.write("$L $T", ENDPOINT_RESOLVER_USED_FOR_DISCOVERY, ENDPOINT_RESOLVER_INTERFACE_NAME);
            }
        });
        writer.write("");
    }
/**
     * Generates endpoint discovery options struct that contains options used to configure endpoint discovery.
     *
     * @param model   is the generation model
     * @param writer  is the GoWriter
     * @param service is the service for which endpoint discovery is performed.
     */
Generates endpoint discovery options struct that contains options used to configure endpoint discovery.
@param model   is the generation model
@param writer  is the GoWriter
@param service is the service for which endpoint discovery is performed.
Generates endpoint discovery options struct that contains options used to configure endpoint discovery . @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 generateEndpointDiscoveryOptions(Model model, GoWriter writer, ServiceShape service) {
        if (!serviceSupportsEndpointDiscovery(model, service)) {
            return;
        }
        writer.write("// $T used to configure endpoint discovery", ENDPOINT_DISCOVERY_OPTION_TYPE);
        writer.openBlock("type $T struct {", "}", ENDPOINT_DISCOVERY_OPTION_TYPE, () -> {
            writer.writeDocs("Enables endpoint discovery");
            writer.write("$L $T", ENABLE_ENDPOINT_DISCOVERY_OPTION, ENDPOINT_DISCOVERY_ENABLE_STATE_TYPE);
            if (serviceSupportsCustomDiscoveryEndpoint(model, service)) {
                writer.write("");
                writer.writeDocs("Allows configuring an endpoint resolver to use when attempting an endpoint discovery "
                        + "api request.");
                writer.write("$L $T", ENDPOINT_RESOLVER_USED_FOR_DISCOVERY, ENDPOINT_RESOLVER_INTERFACE_NAME);
            }
        });
        writer.write("");
    }
private static void generateEndpointDiscoveryOptions ( Model model , GoWriter writer , ServiceShape service ) { if ( ! serviceSupportsEndpointDiscovery ( model , service ) ) { return ; } writer . write ( "// $T used to configure endpoint discovery" , ENDPOINT_DISCOVERY_OPTION_TYPE ) ; writer . openBlock ( "type $T struct {" , "}" , ENDPOINT_DISCOVERY_OPTION_TYPE , ( ) -> { writer . writeDocs ( "Enables endpoint discovery" ) ; writer . write ( "$L $T" , ENABLE_ENDPOINT_DISCOVERY_OPTION , ENDPOINT_DISCOVERY_ENABLE_STATE_TYPE ) ; if ( serviceSupportsCustomDiscoveryEndpoint ( model , service ) ) { writer . write ( "" ) ; writer . writeDocs ( "Allows configuring an endpoint resolver to use when attempting an endpoint discovery " + "api request." ) ; writer . write ( "$L $T" , ENDPOINT_RESOLVER_USED_FOR_DISCOVERY , ENDPOINT_RESOLVER_INTERFACE_NAME ) ; } } ) ; writer . write ( "" ) ; }
Generates endpoint discovery options struct that contains options used to configure endpoint discovery.
Generates endpoint discovery options struct that contains options used to configure endpoint discovery .