func (m Thresholds) MutateTransaction(t *TransactionBuilder) error {
	return mutateTransactionBuilder(t, m)
}
MutateTransaction for Thresholds allows creating an operation using a single mutator
package build
import (
	"github.com/stellar/go/support/errors"
	"github.com/stellar/go/xdr"
)
func SetOptions(muts ...interface{}) (result SetOptionsBuilder) {
	result.Mutate(muts...)
	return
}
type SetOptionsMutator interface {
	MutateSetOptions(*xdr.SetOptionsOp) error
}
type SetOptionsBuilder struct {
	O   xdr.Operation
	SO  xdr.SetOptionsOp
	Err error
}
func (b *SetOptionsBuilder) Mutate(muts ...interface{}) {
	for _, m := range muts {
		var err error
		switch mut := m.(type) {
		case SetOptionsMutator:
			err = mut.MutateSetOptions(&b.SO)
		case OperationMutator:
			err = mut.MutateOperation(&b.O)
		default:
			err = errors.New("Mutator type not allowed")
		}
		if err != nil {
			b.Err = errors.Wrap(err, "SetOptionsBuilder error")
			return
		}
	}
}
func (m HomeDomain) MutateSetOptions(o *xdr.SetOptionsOp) (err error) {
	if len(m) > 32 {
		return errors.New("HomeDomain is too long")
	}
	value := xdr.String32(m)
	o.HomeDomain = &value
	return
}
func (m HomeDomain) MutateTransaction(t *TransactionBuilder) error {
	return mutateTransactionBuilder(t, m)
}
func (m InflationDest) MutateSetOptions(o *xdr.SetOptionsOp) (err error) {
	o.InflationDest = &xdr.AccountId{}
	err = setAccountId(string(m), o.InflationDest)
	return
}
func (m InflationDest) MutateTransaction(t *TransactionBuilder) error {
	return mutateTransactionBuilder(t, m)
}
func (m MasterWeight) MutateSetOptions(o *xdr.SetOptionsOp) (err error) {
	val := xdr.Uint32(m)
	o.MasterWeight = &val
	return
}
func (m MasterWeight) MutateTransaction(t *TransactionBuilder) error {
	return mutateTransactionBuilder(t, m)
}
func AddSigner(address string, weight uint32) Signer {
	return Signer{address, weight}
}
func RemoveSigner(address string) Signer {
	return Signer{address, 0}
}
func (m Signer) MutateSetOptions(o *xdr.SetOptionsOp) error {
	var signer xdr.Signer
	signer.Weight = xdr.Uint32(m.Weight)
	err := signer.Key.SetAddress(m.Address)
	if err != nil {
		return errors.Wrap(err, "failed to set address")
	}
	o.Signer = &signer
	return nil
}
func (m Signer) MutateTransaction(t *TransactionBuilder) error {
	return mutateTransactionBuilder(t, m)
}
func SetThresholds(low, medium, high uint32) Thresholds {
	return Thresholds{
		Low:    &low,
		Medium: &medium,
		High:   &high,
	}
}
func SetLowThreshold(value uint32) Thresholds {
	return Thresholds{Low: &value}
}
func SetMediumThreshold(value uint32) Thresholds {
	return Thresholds{Medium: &value}
}
func SetHighThreshold(value uint32) Thresholds {
	return Thresholds{High: &value}
}
func (m Thresholds) MutateSetOptions(o *xdr.SetOptionsOp) (err error) {
	if m.Low != nil {
		val := xdr.Uint32(*m.Low)
		o.LowThreshold = &val
	}
	if m.Medium != nil {
		val := xdr.Uint32(*m.Medium)
		o.MedThreshold = &val
	}
	if m.High != nil {
		val := xdr.Uint32(*m.High)
		o.HighThreshold = &val
	}
	return
}