// SetPartFirstByte sets the PartFirstByte field's value.
496360
func (s *UploadLayerPartInput) SetPartFirstByte(v int64) *UploadLayerPartInput {
	s.PartFirstByte = &v
	return s
}
944288
func (client *Client) SetImageFromBytes(data []byte) error {

	if client.api == nil {
		return fmt.Errorf("TessBaseAPI is not constructed, please use `gosseract.NewClient`")
	}
	if len(data) == 0 {
		return fmt.Errorf("image data cannot be empty")
	}

	if client.pixImage != nil {
		C.DestroyPixImage(client.pixImage)
		client.pixImage = nil
	}

	img := C.CreatePixImageFromBytes((*C.uchar)(unsafe.Pointer(&data[0])), C.int(len(data)))
	client.pixImage = img

	return nil
}
1307251
func (u *uploader) putPart(p *part) error {
	v := url.Values{}
	v.Set("partNumber", strconv.Itoa(p.PartNumber))
	v.Set("uploadId", u.UploadId)
	req, err := http.NewRequest("PUT", u.url+"?"+v.Encode(), p.r)
	if err != nil {
		return err
	}
	req.ContentLength = p.len
	req.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat))
	u.s3.Sign(req, u.keys)
	resp, err := u.client.Do(req)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	if resp.StatusCode != 200 {
		return newRespError(resp)
	}
	s := resp.Header.Get("etag") // includes quote chars for some reason
	p.ETag = s[1 : len(s)-1]
	return nil
}
813907
func (s *Template) SetTextPart(v string) *Template {
	s.TextPart = &v
	return s
}
945200
func (s *AwsSecurityFindingFilters) SetResourcePartition(v []*StringFilter) *AwsSecurityFindingFilters {
	s.ResourcePartition = v
	return s
}
1160629
func (s *GetPartitionOutput) SetPartition(v *Partition) *GetPartitionOutput {
	s.Partition = v
	return s
}
748460
func (s *ByteMatchSetSummary) SetByteMatchSetId(v string) *ByteMatchSetSummary {
	s.ByteMatchSetId = &v
	return s
}
733358
func (s *DescribeHapgOutput) SetPartitionSerialList(v []*string) *DescribeHapgOutput {
	s.PartitionSerialList = v
	return s
}
619036
func (s *TraceSummary) SetIsPartial(v bool) *TraceSummary {
	s.IsPartial = &v
	return s
}
895837
func (s *DimensionKeyDescription) SetPartitions(v []*float64) *DimensionKeyDescription {
	s.Partitions = v
	return s
}
649638
func (s *BatchGetPartitionOutput) SetPartitions(v []*Partition) *BatchGetPartitionOutput {
	s.Partitions = v
	return s
}
1189729
func (s *TerminologyProperties) SetSizeBytes(v int64) *TerminologyProperties {
	s.SizeBytes = &v
	return s
}
1234486
func (t *fileTracker) SetBytes(bytes map[int]uint64) {
	total := uint64(0)
	labels := t.Labels()
	for k, v := range bytes {
		labels["level"] = fmt.Sprintf("%d", k)
		t.metrics.DiskSize.With(labels).Set(float64(v))
	}
	atomic.StoreUint64(&t.diskBytes, total)
}
209565
func (s *Finding) SetPartition(v string) *Finding {
	s.Partition = &v
	return s
}
97270
func (d *Datum) SetBytes(b []byte) {
	d.k = KindBytes
	d.b = b
}
1220487
func (s *CreateResourceInput) SetPathPart(v string) *CreateResourceInput {
	s.PathPart = &v
	return s
}
1328332
func (it *FloatDecoder) SetBytes(b []byte) error {
	var v uint64
	if len(b) == 0 {
		v = uvnan
	} else {
		// first byte is the compression type.
		// we currently just have gorilla compression.
		it.br.Reset(b[1:])

		var err error
		v, err = it.br.ReadBits(64)
		if err != nil {
			return err
		}
	}

	// Reset all fields.
	it.val = v
	it.leading = 0
	it.trailing = 0
	it.b = b
	it.first = true
	it.finished = false
	it.err = nil

	return nil
}