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

package tangled

// schema: sh.tangled.actor.getProfile

import (
	"context"

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

const (
	ActorGetProfileNSID = "sh.tangled.actor.getProfile"
)

// ActorGetProfile_Output is the output of a sh.tangled.actor.getProfile call.
type ActorGetProfile_Output struct {
	Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"`
	Uri string  `json:"uri" cborgen:"uri"`
	// value: Embedded sh.tangled.actor.profile record.
	Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
}

// ActorGetProfile calls the XRPC method "sh.tangled.actor.getProfile".
//
// actor: AT-URI of the sh.tangled.actor.profile record to fetch.
func ActorGetProfile(ctx context.Context, c util.LexClient, actor string) (*ActorGetProfile_Output, error) {
	var out ActorGetProfile_Output

	params := map[string]interface{}{}
	params["actor"] = actor
	if err := c.LexDo(ctx, util.Query, "", "sh.tangled.actor.getProfile", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
