// SetProtocolVersion sets the MQTT version to be used to connect to the
// broker. Legitimate values are currently 3 - MQTT 3.1 or 4 - MQTT 3.1.1
965088
func (o *ClientOptions) SetProtocolVersion(pv uint) *ClientOptions {
	if (pv >= 3 && pv <= 4) || (pv > 0x80) {
		o.ProtocolVersion = pv
		o.protocolVersionExplicit = true
	}
	return o
}
1177468
func (s *InstanceAccessDetails) SetProtocol(v string) *InstanceAccessDetails {
	s.Protocol = &v
	return s
}
164873
func (s *CreateTaskSetInput) SetPlatformVersion(v string) *CreateTaskSetInput {
	s.PlatformVersion = &v
	return s
}
335390
func (s *ViewerCertificate) SetMinimumProtocolVersion(v string) *ViewerCertificate {
	s.MinimumProtocolVersion = &v
	return s
}
258280
func (s *UpdateListenerInput) SetProtocol(v string) *UpdateListenerInput {
	s.Protocol = &v
	return s
}
1174673
func (s *CreateListenerInput) SetProtocol(v string) *CreateListenerInput {
	s.Protocol = &v
	return s
}
749662
func (s *Transport) SetProtocol(v string) *Transport {
	s.Protocol = &v
	return s
}
1030306
func (s *Listener) SetProtocol(v string) *Listener {
	s.Protocol = &v
	return s
}
305539
func (s *SearchIndexInput) SetQueryVersion(v string) *SearchIndexInput {
	s.QueryVersion = &v
	return s
}
1111021
func (u *Unit) SetAgentVersion(v version.Binary) (err error) {
	defer errors.DeferredAnnotatef(&err, "cannot set agent version for unit %q", u)
	if err = checkVersionValidity(v); err != nil {
		return err
	}
	versionedTool := &tools.Tools{Version: v}
	ops := []txn.Op{{
		C:      unitsC,
		Id:     u.doc.DocID,
		Assert: notDeadDoc,
		Update: bson.D{{"$set", bson.D{{"tools", versionedTool}}}},
	}}
	if err := u.st.db().RunTransaction(ops); err != nil {
		return onAbort(err, ErrDead)
	}
	u.doc.Tools = versionedTool
	return nil
}
328700
func (s *Redirect) SetProtocol(v string) *Redirect {
	s.Protocol = &v
	return s
}
1094145
func (b *HttpRequest) SetProtocolVersion(vers string) *HttpRequest {
	if len(vers) == 0 {
		vers = "HTTP/1.1"
	}

	major, minor, ok := http.ParseHTTPVersion(vers)
	if ok {
		b.req.Proto = vers
		b.req.ProtoMajor = major
		b.req.ProtoMinor = minor
	}

	return b
}
41071
func (s *UpdateTrafficPolicyInstanceInput) SetTrafficPolicyVersion(v int64) *UpdateTrafficPolicyInstanceInput {
	s.TrafficPolicyVersion = &v
	return s
}
970501
func (c *Client) SetModelAgentVersion(version version.Number, ignoreAgentVersions bool) error {
	args := params.SetModelAgentVersion{Version: version, IgnoreAgentVersions: ignoreAgentVersions}
	return c.facade.FacadeCall("SetModelAgentVersion", args, nil)
}
75265
func (s *CreateInstanceInput) SetAgentVersion(v string) *CreateInstanceInput {
	s.AgentVersion = &v
	return s
}
1094505
func (s *UpdateApiOutput) SetProtocolType(v string) *UpdateApiOutput {
	s.ProtocolType = &v
	return s
}
659139
func (s *NetworkBinding) SetProtocol(v string) *NetworkBinding {
	s.Protocol = &v
	return s
}