// SetDigest sets a custom hash
320330
func (ky *Key) SetDigest(digest []byte) error {
	if len(digest) != 20 {
		return NewAerospikeError(PARAMETER_ERROR, "Invalid digest: Digest is required to be exactly 20 bytes.")
	}
	copy(ky.digest[:], digest)
	return nil
}
1160629
func (s *GetPartitionOutput) SetPartition(v *Partition) *GetPartitionOutput {
	s.Partition = v
	return s
}
1085717
func (r *Request) GetDigest() (result common.Hash, err error) {
	hasher := hashPool.Get().(hash.Hash)
	defer hashPool.Put(hasher)
	hasher.Reset()
	dataLength := r.Update.binaryLength()
	if r.binaryData == nil {
		r.binaryData = make([]byte, dataLength+signatureLength)
		if err := r.Update.binaryPut(r.binaryData[:dataLength]); err != nil {
			return result, err
		}
	}
	hasher.Write(r.binaryData[:dataLength]) //everything except the signature.

	return common.BytesToHash(hasher.Sum(nil)), nil
}
878199
func (s *EndpointMessageResult) SetAddress(v string) *EndpointMessageResult {
	s.Address = &v
	return s
}
494972
func (f *FakeRNG) HexDigest(bytes int) (string, error) {
	return hexDigest(f, bytes)
}
1372576
func (s *InitiateMultipartUploadInput) SetPartSize(v string) *InitiateMultipartUploadInput {
	s.PartSize = &v
	return s
}
1218562
func (s *Subscriber) SetAddress(v string) *Subscriber {
	s.Address = &v
	return s
}
176378
func (w *walletAPIHandler) setInflation(ctx context.Context, c Call, wr io.Writer) error {
	var opts inflationOptions
	if err := unmarshalOptions(c, &opts); err != nil {
		return w.encodeErr(c, err, wr)
	}

	destination, err := getInflationDestinationAddrFromString(w.cli, opts.AccountIDConvert(), opts.Destination)
	if err != nil {
		return w.encodeErr(c, err, wr)
	}

	arg := stellar1.SetInflationDestinationLocalArg{
		AccountID:   opts.AccountIDConvert(),
		Destination: destination,
	}
	if err := w.cli.SetInflationDestinationLocal(ctx, arg); err != nil {
		return w.encodeErr(c, err, wr)
	}

	// get it for display
	inflation, err := w.getInflationLocal(ctx, opts.AccountIDConvert())
	if err != nil {
		return w.encodeErr(c, err, wr)
	}

	return w.encodeResult(c, inflation, wr)
}
415388
func (s *GetPartitionsOutput) SetPartitions(v []*Partition) *GetPartitionsOutput {
	s.Partitions = v
	return s
}
704388
func (c *Client) SetAddress(addr string) error {
	c.modifyLock.Lock()
	defer c.modifyLock.Unlock()

	parsedAddr, err := url.Parse(addr)
	if err != nil {
		return errwrap.Wrapf("failed to set address: {{err}}", err)
	}

	c.addr = parsedAddr
	return nil
}
355033
func (s *CreateClusterInput) SetAddressId(v string) *CreateClusterInput {
	s.AddressId = &v
	return s
}
529154
func (s *JobWatermark) SetEncryption(v *Encryption) *JobWatermark {
	s.Encryption = v
	return s
}
491428
func (s *CreateAddressOutput) SetAddressId(v string) *CreateAddressOutput {
	s.AddressId = &v
	return s
}
115725
func (s *JobMetadata) SetAddressId(v string) *JobMetadata {
	s.AddressId = &v
	return s
}
449987
func (s *UsageRecord) SetDimension(v string) *UsageRecord {
	s.Dimension = &v
	return s
}
1086449
func (d *AddressCacheItem) setBlock(block BlockID) {
	if block.Hash == d.hash {
		return
	}
	d.hash = block.Hash
	d.height = block.Height
	d.utxos = nil
	d.history.Clear()
	d.balance = nil
	d.rows = nil
}
1312465
func (s *LayerFailure) SetLayerDigest(v string) *LayerFailure {
	s.LayerDigest = &v
	return s
}