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

package atproto

// schema: com.atproto.admin.sendEmail

import (
	"context"

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

// AdminSendEmail_Input is the input argument to a com.atproto.admin.sendEmail call.
type AdminSendEmail_Input struct {
	// comment: Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers
	Comment      *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
	Content      string  `json:"content" cborgen:"content"`
	RecipientDid string  `json:"recipientDid" cborgen:"recipientDid"`
	SenderDid    string  `json:"senderDid" cborgen:"senderDid"`
	Subject      *string `json:"subject,omitempty" cborgen:"subject,omitempty"`
}

// AdminSendEmail_Output is the output of a com.atproto.admin.sendEmail call.
type AdminSendEmail_Output struct {
	Sent bool `json:"sent" cborgen:"sent"`
}

// AdminSendEmail calls the XRPC method "com.atproto.admin.sendEmail".
func AdminSendEmail(ctx context.Context, c *xrpc.Client, input *AdminSendEmail_Input) (*AdminSendEmail_Output, error) {
	var out AdminSendEmail_Output
	if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.sendEmail", nil, input, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
