// ZMQ_IDENTITY: Set socket identity
//
// See: http://api.zeromq.org/4-1:zmq-setsockopt#toc16
425497
func (soc *Socket) SetIdentity(value string) error {
	return soc.setString(C.ZMQ_IDENTITY, value)
}
1143184
func (s *session) SetIdentity(sessionType apitypes.SessionType, identity, auth envelope.Envelope) error {
	s.mutex.Lock()
	defer s.mutex.Unlock()

	err := checkSessionType(sessionType, identity, auth)
	if err != nil {
		return err
	}

	s.identity = identity
	s.auth = auth

	return nil
}
1070399
func (s *DescribeIdentityUsageInput) SetIdentityId(v string) *DescribeIdentityUsageInput {
	s.IdentityId = &v
	return s
}
166236
func (s *SubscribeToDatasetInput) SetIdentityId(v string) *SubscribeToDatasetInput {
	s.IdentityId = &v
	return s
}
235836
func (s *IdentityUsage) SetIdentityId(v string) *IdentityUsage {
	s.IdentityId = &v
	return s
}
236392
func (s *UpdateRecordsInput) SetIdentityId(v string) *UpdateRecordsInput {
	s.IdentityId = &v
	return s
}
782061
func (soc *Socket) SetIpv4only(value bool) error {
	val := 0
	if value {
		val = 1
	}
	return soc.setInt(C.ZMQ_IPV4ONLY, val)
}
824575
func (ctx *Context) SetMaxSockets(n int) error {
	return setOption(ctx, C.ZMQ_MAX_SOCKETS, n)
}
1160411
func (soc *Socket) SetXpubNodrop(value bool) error {
	if minor < 1 {
		return ErrorNotImplemented41
	}
	val := 0
	if value {
		val = 1
	}
	return soc.setInt(C.ZMQ_XPUB_NODROP, val)
}
307379
func (s *UnsubscribeFromDatasetInput) SetIdentityId(v string) *UnsubscribeFromDatasetInput {
	s.IdentityId = &v
	return s
}
850636
func (s *ListIdentitiesOutput) SetIdentityPoolId(v string) *ListIdentitiesOutput {
	s.IdentityPoolId = &v
	return s
}
772880
func (s *DecisionTaskStartedEventAttributes) SetIdentity(v string) *DecisionTaskStartedEventAttributes {
	s.Identity = &v
	return s
}
566655
func (soc *Socket) SetTcpKeepalive(value int) error {
	return soc.setInt(C.ZMQ_TCP_KEEPALIVE, value)
}
1334831
func identity() string {
	hostname, err := os.Hostname()
	h := sha1.New()
	fmt.Fprint(h, hostname)
	fmt.Fprint(h, err)
	fmt.Fprint(h, os.Getpid())
	return fmt.Sprintf("%x", h.Sum(nil))
}
1284919
func (s *SetIdentityPoolConfigurationInput) SetIdentityPoolId(v string) *SetIdentityPoolConfigurationInput {
	s.IdentityPoolId = &v
	return s
}
1117760
func (s *GetIdentityPoolRolesOutput) SetIdentityPoolId(v string) *GetIdentityPoolRolesOutput {
	s.IdentityPoolId = &v
	return s
}
629392
func (s *PollForDecisionTaskInput) SetIdentity(v string) *PollForDecisionTaskInput {
	s.Identity = &v
	return s
}