// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

package config

import (
	"context"
	"github.com/censys/censys-sdk-go/internal/globals"
	"github.com/censys/censys-sdk-go/retry"
	"net/http"
	"time"
)

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type SDKConfiguration struct {
	Client      HTTPClient
	Security    func(context.Context) (interface{}, error)
	ServerURL   string
	ServerIndex int
	ServerList  []string
	UserAgent   string
	Globals     globals.Globals
	RetryConfig *retry.Config
	Timeout     *time.Duration
}

func (c *SDKConfiguration) GetServerDetails() (string, map[string]string) {
	if c.ServerURL != "" {
		return c.ServerURL, nil
	}

	return c.ServerList[c.ServerIndex], nil
}
