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

package config

import (
	"context"
	"github.com/LukeHagar/plexgo/internal/globals"
	"github.com/LukeHagar/plexgo/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
	ServerVariables []map[string]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], c.ServerVariables[c.ServerIndex]
}
