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

package ozone

// schema: tools.ozone.setting.listOptions

import (
	"context"

	"github.com/bluesky-social/indigo/lex/util"
)

// SettingListOptions_Output is the output of a tools.ozone.setting.listOptions call.
type SettingListOptions_Output struct {
	Cursor  *string               `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
	Options []*SettingDefs_Option `json:"options" cborgen:"options"`
}

// SettingListOptions calls the XRPC method "tools.ozone.setting.listOptions".
//
// keys: Filter for only the specified keys. Ignored if prefix is provided
// prefix: Filter keys by prefix
func SettingListOptions(ctx context.Context, c util.LexClient, cursor string, keys []string, limit int64, prefix string, scope string) (*SettingListOptions_Output, error) {
	var out SettingListOptions_Output

	params := map[string]interface{}{}
	if cursor != "" {
		params["cursor"] = cursor
	}
	if len(keys) != 0 {
		params["keys"] = keys
	}
	if limit != 0 {
		params["limit"] = limit
	}
	if prefix != "" {
		params["prefix"] = prefix
	}
	if scope != "" {
		params["scope"] = scope
	}
	if err := c.LexDo(ctx, util.Query, "", "tools.ozone.setting.listOptions", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
