private static String getServiceIdIfNotProvided(ServiceMetadata metadata, String interfaceName) {
        if (INTERFACE_NAME_TO_SERVICE_ID.containsKey(interfaceName)) {
            return INTERFACE_NAME_TO_SERVICE_ID.get(interfaceName);
        }

        String serviceId = metadata.getServiceId();

        if (serviceId != null) {
            return serviceId;
        }

        return Utils.deriveServiceId(interfaceName);
    }
If any operation requires an API key we generate a setter on the builder.

@return True if any operation requires an API key. False otherwise.
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddMetadata.java