// SetProtocol sets the Protocol field's value.
328700
func (s *Redirect) SetProtocol(v string) *Redirect {
	s.Protocol = &v
	return s
}
1213026
func ConnectUsingProtocol(protocol string, target string) (*OvsdbClient, error) {
	conn, err := net.Dial(protocol, target)

	if err != nil {
		return nil, err
	}

	c := rpc2.NewClientWithCodec(jsonrpc.NewJSONCodec(conn))
	c.Handle("echo", echo)
	c.Handle("update", update)
	go c.Run()
	go handleDisconnectNotification(c)

	ovs := newOvsdbClient(c)

	// Process Async Notifications
	dbs, err := ovs.ListDbs()
	if err == nil {
		for _, db := range dbs {
			schema, err := ovs.GetSchema(db)
			if err == nil {
				ovs.Schema[db] = *schema
			} else {
				return nil, err
			}
		}
	}
	return ovs, nil
}
276127
func (s *CustomOriginConfig) SetOriginProtocolPolicy(v string) *CustomOriginConfig {
	s.OriginProtocolPolicy = &v
	return s
}
258410
func (s *OriginationRoute) SetProtocol(v string) *OriginationRoute {
	s.Protocol = &v
	return s
}
1057852
func toRuntimeProtocol(protocol v1.Protocol) runtimeapi.Protocol {
	switch protocol {
	case v1.ProtocolTCP:
		return runtimeapi.Protocol_TCP
	case v1.ProtocolUDP:
		return runtimeapi.Protocol_UDP
	case v1.ProtocolSCTP:
		return runtimeapi.Protocol_SCTP
	}

	klog.Warningf("Unknown protocol %q: defaulting to TCP", protocol)
	return runtimeapi.Protocol_TCP
}
258280
func (s *UpdateListenerInput) SetProtocol(v string) *UpdateListenerInput {
	s.Protocol = &v
	return s
}
94201
func setupProtocol(msg *transport.Message) codec.NewCodec {
	service := getHeader("Micro-Service", msg.Header)
	method := getHeader("Micro-Method", msg.Header)
	endpoint := getHeader("Micro-Endpoint", msg.Header)
	protocol := getHeader("Micro-Protocol", msg.Header)
	target := getHeader("Micro-Target", msg.Header)

	// if the protocol exists (mucp) do nothing
	if len(protocol) > 0 {
		return nil
	}

	// if no service/method/endpoint then it's the old protocol
	if len(service) == 0 && len(method) == 0 && len(endpoint) == 0 {
		return defaultCodecs[msg.Header["Content-Type"]]
	}

	// old target method specified
	if len(target) > 0 {
		return defaultCodecs[msg.Header["Content-Type"]]
	}

	// no method then set to endpoint
	if len(method) == 0 {
		msg.Header["Micro-Method"] = endpoint
	}

	// no endpoint then set to method
	if len(endpoint) == 0 {
		msg.Header["Micro-Endpoint"] = method
	}

	return nil
}
431689
func (s *M2tsSettings) SetPcrControl(v string) *M2tsSettings {
	s.PcrControl = &v
	return s
}
116866
func NewProtocol() *Protocol {
	p := &Protocol{
		Hostname:          "mailhog.example",
		Ident:             "ESMTP MailHog",
		State:             INVALID,
		MaximumLineLength: -1,
		MaximumRecipients: -1,
	}
	p.resetState()
	return p
}
1264626
func (s *NeighborConnectionDetail) SetTransportProtocol(v string) *NeighborConnectionDetail {
	s.TransportProtocol = &v
	return s
}
1039952
func (p *PortDefinition) SetProtocol(protocol string) *PortDefinition {
	p.Protocol = protocol
	return p
}
442547
func (s *Subscription) SetProtocol(v string) *Subscription {
	s.Protocol = &v
	return s
}
790049
func (c *Conn) SetPromiscuous(b bool) error {
	return c.p.SetPromiscuous(b)
}
871840
func (s *RedirectActionConfig) SetProtocol(v string) *RedirectActionConfig {
	s.Protocol = &v
	return s
}
285343
func NewWithProtocol(proto Protocol) (*IPTables, error) {
	path, err := exec.LookPath(getIptablesCommand(proto))
	if err != nil {
		return nil, err
	}
	vstring, err := getIptablesVersionString(path)
	v1, v2, v3, mode, err := extractIptablesVersion(vstring)

	checkPresent, waitPresent, randomFullyPresent := getIptablesCommandSupport(v1, v2, v3)

	ipt := IPTables{
		path:           path,
		proto:          proto,
		hasCheck:       checkPresent,
		hasWait:        waitPresent,
		hasRandomFully: randomFullyPresent,
		v1:             v1,
		v2:             v2,
		v3:             v3,
		mode:           mode,
	}
	return &ipt, nil
}
346173
func (sub *Subscription) ensureProtocol() error {
	if sub.resp == nil {
		p, err := sub.database.pool.pull(forcedPull)
		if err != nil {
			return err
		}
		sub.resp = p
	}
	return nil
}
882919
func NewProtocolPort(protocol string, port int32) *ProtocolPort {
	pp := &ProtocolPort{
		Protocol: protocol,
		Port:     port,
	}

	if len(pp.Protocol) == 0 {
		pp.Protocol = string(v1.ProtocolTCP)
	}

	return pp
}