//
// -- set the protocol message
// 	these calls can be chained
//
420832
func (message Message) setContact(peer *Peer) Message {
	message.Contact = &Contact{
		External: peer.GetExternal(),
		Port:     peer.GetPort(),
		Address:  peer.GetPeerAddress(),
	}
	return message
}
1239875
func (s *DocumentServiceWarning) SetMessage(v string) *DocumentServiceWarning {
	s.Message = &v
	return s
}
81227
func (s *RemoteAccessSession) SetMessage(v string) *RemoteAccessSession {
	s.Message = &v
	return s
}
542952
func (s *IpPermission) SetProtocol(v string) *IpPermission {
	s.Protocol = &v
	return s
}
810447
func (s *QueryCompileError) SetMessage(v string) *QueryCompileError {
	s.Message = &v
	return s
}
1094505
func (s *UpdateApiOutput) SetProtocolType(v string) *UpdateApiOutput {
	s.ProtocolType = &v
	return s
}
671593
func (s *Diagnostics) SetMessage(v string) *Diagnostics {
	s.Message = &v
	return s
}
780313
func (m *multiaddr) Protocols() []Protocol {
	ps := make([]Protocol, 0, 8)
	b := m.bytes
	for len(b) > 0 {
		code, n, err := ReadVarintCode(b)
		if err != nil {
			panic(err)
		}

		p := ProtocolWithCode(code)
		if p.Code == 0 {
			// this is a panic (and not returning err) because this should've been
			// caught on constructing the Multiaddr
			panic(fmt.Errorf("no protocol with code %d", b[0]))
		}
		ps = append(ps, p)
		b = b[n:]

		n, size, err := sizeForAddr(p, b)
		if err != nil {
			panic(err)
		}

		b = b[n+size:]
	}
	return ps
}
381825
func (s *Test) SetMessage(v string) *Test {
	s.Message = &v
	return s
}
962442
func (s *ModifyListenerInput) SetProtocol(v string) *ModifyListenerInput {
	s.Protocol = &v
	return s
}
845845
func (s *UpdateFlowOutputInput) SetProtocol(v string) *UpdateFlowOutputInput {
	s.Protocol = &v
	return s
}
345294
func (self *ConnectionString) Protocol(defaults ...string) string {

	if _, protocol := self.Scheme(); protocol != `` {
		return protocol
	} else if len(defaults) > 0 {
		return defaults[0]
	} else {
		return ``
	}
}
167877
func ProtocolOption(p protocol.ID) Option {
	return func(o *options) {
		o.Protocol = p
	}
}
1085499
func (s *Prompt) SetMessages(v []*Message) *Prompt {
	s.Messages = v
	return s
}
1199543
func (s *RenderingError) SetMessage(v string) *RenderingError {
	s.Message = &v
	return s
}
152081
func (s *UpdateFlowSourceInput) SetProtocol(v string) *UpdateFlowSourceInput {
	s.Protocol = &v
	return s
}
999709
func (s *UpdateConnectivityInfoOutput) SetMessage(v string) *UpdateConnectivityInfoOutput {
	s.Message = &v
	return s
}