A fork of https://github.com/teal-fm/piper
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package ozone
4
5// schema: tools.ozone.setting.upsertOption
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11 "github.com/bluesky-social/indigo/xrpc"
12)
13
14// SettingUpsertOption_Input is the input argument to a tools.ozone.setting.upsertOption call.
15type SettingUpsertOption_Input struct {
16 Description *string `json:"description,omitempty" cborgen:"description,omitempty"`
17 Key string `json:"key" cborgen:"key"`
18 ManagerRole *string `json:"managerRole,omitempty" cborgen:"managerRole,omitempty"`
19 Scope string `json:"scope" cborgen:"scope"`
20 Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
21}
22
23// SettingUpsertOption_Output is the output of a tools.ozone.setting.upsertOption call.
24type SettingUpsertOption_Output struct {
25 Option *SettingDefs_Option `json:"option" cborgen:"option"`
26}
27
28// SettingUpsertOption calls the XRPC method "tools.ozone.setting.upsertOption".
29func SettingUpsertOption(ctx context.Context, c *xrpc.Client, input *SettingUpsertOption_Input) (*SettingUpsertOption_Output, error) {
30 var out SettingUpsertOption_Output
31 if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.setting.upsertOption", nil, input, &out); err != nil {
32 return nil, err
33 }
34
35 return &out, nil
36}