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

package ozone

// schema: tools.ozone.safelink.updateRule

import (
	"context"

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

// SafelinkUpdateRule_Input is the input argument to a tools.ozone.safelink.updateRule call.
type SafelinkUpdateRule_Input struct {
	Action *string `json:"action" cborgen:"action"`
	// comment: Optional comment about the update
	Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
	// createdBy: Optional DID to credit as the creator. Only respected for admin_token authentication.
	CreatedBy *string `json:"createdBy,omitempty" cborgen:"createdBy,omitempty"`
	Pattern   *string `json:"pattern" cborgen:"pattern"`
	Reason    *string `json:"reason" cborgen:"reason"`
	// url: The URL or domain to update the rule for
	Url string `json:"url" cborgen:"url"`
}

// SafelinkUpdateRule calls the XRPC method "tools.ozone.safelink.updateRule".
func SafelinkUpdateRule(ctx context.Context, c util.LexClient, input *SafelinkUpdateRule_Input) (*SafelinkDefs_Event, error) {
	var out SafelinkDefs_Event
	if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.safelink.updateRule", nil, input, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
