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

package atproto

// schema: com.atproto.repo.listMissingBlobs

import (
	"context"

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

// RepoListMissingBlobs_Output is the output of a com.atproto.repo.listMissingBlobs call.
type RepoListMissingBlobs_Output struct {
	Blobs  []*RepoListMissingBlobs_RecordBlob `json:"blobs" cborgen:"blobs"`
	Cursor *string                            `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
}

// RepoListMissingBlobs_RecordBlob is a "recordBlob" in the com.atproto.repo.listMissingBlobs schema.
type RepoListMissingBlobs_RecordBlob struct {
	Cid       string `json:"cid" cborgen:"cid"`
	RecordUri string `json:"recordUri" cborgen:"recordUri"`
}

// RepoListMissingBlobs calls the XRPC method "com.atproto.repo.listMissingBlobs".
func RepoListMissingBlobs(ctx context.Context, c util.LexClient, cursor string, limit int64) (*RepoListMissingBlobs_Output, error) {
	var out RepoListMissingBlobs_Output

	params := map[string]interface{}{}
	if cursor != "" {
		params["cursor"] = cursor
	}
	if limit != 0 {
		params["limit"] = limit
	}
	if err := c.LexDo(ctx, util.Query, "", "com.atproto.repo.listMissingBlobs", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
