// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package ozone

// schema: tools.ozone.server.getConfig

import (
	"context"

	"github.com/bluesky-social/indigo/xrpc"
)

// ServerGetConfig_Output is the output of a tools.ozone.server.getConfig call.
type ServerGetConfig_Output struct {
	Appview    *ServerGetConfig_ServiceConfig `json:"appview,omitempty" cborgen:"appview,omitempty"`
	BlobDivert *ServerGetConfig_ServiceConfig `json:"blobDivert,omitempty" cborgen:"blobDivert,omitempty"`
	Chat       *ServerGetConfig_ServiceConfig `json:"chat,omitempty" cborgen:"chat,omitempty"`
	Pds        *ServerGetConfig_ServiceConfig `json:"pds,omitempty" cborgen:"pds,omitempty"`
	Viewer     *ServerGetConfig_ViewerConfig  `json:"viewer,omitempty" cborgen:"viewer,omitempty"`
}

// ServerGetConfig_ServiceConfig is a "serviceConfig" in the tools.ozone.server.getConfig schema.
type ServerGetConfig_ServiceConfig struct {
	Url *string `json:"url,omitempty" cborgen:"url,omitempty"`
}

// ServerGetConfig_ViewerConfig is a "viewerConfig" in the tools.ozone.server.getConfig schema.
type ServerGetConfig_ViewerConfig struct {
	Role *string `json:"role,omitempty" cborgen:"role,omitempty"`
}

// ServerGetConfig calls the XRPC method "tools.ozone.server.getConfig".
func ServerGetConfig(ctx context.Context, c *xrpc.Client) (*ServerGetConfig_Output, error) {
	var out ServerGetConfig_Output
	if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.server.getConfig", nil, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
