// setFixedHeader sets the fixed header to the Packet.
960068
func (p *PUBCOMP) setFixedHeader() {
	// Append the first byte to the fixed header.
	p.fixedHeader = append(p.fixedHeader, TypePUBCOMP<<4)

	// Append the Remaining Length to the fixed header.
	p.appendRemainingLength()
}
391198
func (r *Response) AddHeader(key, value string) *Response {
	r.Header.Add(key, value)
	return r
}
921373
func SetResponseHeaderValues(resp *http.Response, h string, values []string) {
	if resp.Header == nil {
		resp.Header = make(http.Header)
	}
	for _, v := range values {
		resp.Header.Add(h, v)
	}
}
721349
func (c *Client) SetHeader(key, value string) {
	c.headers[key] = value
}
830380
func (s *ReservedCacheNodesOffering) SetFixedPrice(v float64) *ReservedCacheNodesOffering {
	s.FixedPrice = &v
	return s
}
333308
func (s *ReservedDBInstancesOffering) SetFixedPrice(v float64) *ReservedDBInstancesOffering {
	s.FixedPrice = &v
	return s
}
289316
func (s *DescribeReservationOutput) SetFixedPrice(v float64) *DescribeReservationOutput {
	s.FixedPrice = &v
	return s
}
366875
func (c *APIContext) SetLinkHeader(total, pageSize int) {
	page := paginater.New(total, pageSize, c.QueryInt("page"), 0)
	links := make([]string, 0, 4)
	if page.HasNext() {
		links = append(links, fmt.Sprintf("<%s%s?page=%d>; rel=\"next\"", setting.AppURL, c.Req.URL.Path[1:], page.Next()))
	}
	if !page.IsLast() {
		links = append(links, fmt.Sprintf("<%s%s?page=%d>; rel=\"last\"", setting.AppURL, c.Req.URL.Path[1:], page.TotalPages()))
	}
	if !page.IsFirst() {
		links = append(links, fmt.Sprintf("<%s%s?page=1>; rel=\"first\"", setting.AppURL, c.Req.URL.Path[1:]))
	}
	if page.HasPrevious() {
		links = append(links, fmt.Sprintf("<%s%s?page=%d>; rel=\"prev\"", setting.AppURL, c.Req.URL.Path[1:], page.Previous()))
	}

	if len(links) > 0 {
		c.Header().Set("Link", strings.Join(links, ","))
	}
}
228241
func NewControlPacketWithHeader(fh FixedHeader) (cp ControlPacket) {
	switch fh.MessageType {
	case Connect:
		cp = &ConnectPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Connack:
		cp = &ConnackPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Disconnect:
		cp = &DisconnectPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Publish:
		cp = &PublishPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Puback:
		cp = &PubackPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Pubrec:
		cp = &PubrecPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Pubrel:
		cp = &PubrelPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Pubcomp:
		cp = &PubcompPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Subscribe:
		cp = &SubscribePacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Suback:
		cp = &SubackPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Unsubscribe:
		cp = &UnsubscribePacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Unsuback:
		cp = &UnsubackPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Pingreq:
		cp = &PingreqPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	case Pingresp:
		cp = &PingrespPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
	default:
		return nil
	}
	return cp
}
834893
func (p *PUBLISH) setFixedHeader() {
	// Define the first byte of the fixed header.
	b := TypePUBLISH << 4

	// Set 1 to the Bit 3 if the DUP flag is true.
	if p.DUP {
		b |= 0x08
	}

	// Set the value of the Will QoS to the Bit 2 and 1.
	b |= p.QoS << 1

	// Set 1 to the Bit 0 if the Retain is true.
	if p.retain {
		b |= 0x01
	}

	// Append the first byte to the fixed header.
	p.fixedHeader = append(p.fixedHeader, b)

	// Append the Remaining Length to the fixed header.
	p.appendRemainingLength()
}
785799
func (p *Personalization) SetHeader(key string, value string) {
	p.Headers[key] = value
}
625960
func (t *Token) SetAuthHeader(r *http.Request) {
	r.Header.Set("Authorization", t.Type()+" "+t.AccessToken)
}
516488
func NewControlPacketWithHeader(fh FixedHeader) (cp ControlPacket) {
	switch fh.MessageType {
	case Connect:
		cp = &ConnectPacket{FixedHeader: fh}
	case Connack:
		cp = &ConnackPacket{FixedHeader: fh}
	case Disconnect:
		cp = &DisconnectPacket{FixedHeader: fh}
	case Publish:
		cp = &PublishPacket{FixedHeader: fh}
	case Puback:
		cp = &PubackPacket{FixedHeader: fh}
	case Pubrec:
		cp = &PubrecPacket{FixedHeader: fh}
	case Pubrel:
		cp = &PubrelPacket{FixedHeader: fh}
	case Pubcomp:
		cp = &PubcompPacket{FixedHeader: fh}
	case Subscribe:
		cp = &SubscribePacket{FixedHeader: fh}
	case Suback:
		cp = &SubackPacket{FixedHeader: fh}
	case Unsubscribe:
		cp = &UnsubscribePacket{FixedHeader: fh}
	case Unsuback:
		cp = &UnsubackPacket{FixedHeader: fh}
	case Pingreq:
		cp = &PingreqPacket{FixedHeader: fh}
	case Pingresp:
		cp = &PingrespPacket{FixedHeader: fh}
	default:
		return nil
	}
	return cp
}
467397
func (p *PUBACK) setFixedHeader() {
	// Append the first byte to the fixed header.
	p.fixedHeader = append(p.fixedHeader, TypePUBACK<<4)

	// Append the Remaining Length to the fixed header.
	p.appendRemainingLength()
}
507790
func (p *THttpClient) SetHeader(key string, value string) {
	p.header.Add(key, value)
}
1046300
func (c *GroupPercentSetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
800190
func (h *Header) SetContentType(t string, params map[string]string) {
	h.Set("Content-Type", formatHeaderWithParams(t, params))
}