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

package ozone

// schema: tools.ozone.safelink.removeRule

import (
	"context"

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

// SafelinkRemoveRule_Input is the input argument to a tools.ozone.safelink.removeRule call.
type SafelinkRemoveRule_Input struct {
	// comment: Optional comment about why the rule is being removed
	Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
	// createdBy: Optional DID of the user. Only respected when using admin auth.
	CreatedBy *string `json:"createdBy,omitempty" cborgen:"createdBy,omitempty"`
	Pattern   *string `json:"pattern" cborgen:"pattern"`
	// url: The URL or domain to remove the rule for
	Url string `json:"url" cborgen:"url"`
}

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

	return &out, nil
}
