// AddIdentity adds a single identity to the set.
//
// The receiver must not be nil.
6261
func (s *Set) AddIdentity(id identity.Identity) {
	if !s.All {
		if s.IDs == nil {
			s.IDs = make(identSet, 1)
		}
		s.IDs[id] = struct{}{}
	}
}
269300
func (n *Node) SetIdentity(identity string) error {
	return n.memberlist.SetLocalLabel(membership.IdentityLabelKey, identity)
}
88390
func (d *Daemon) UpdateIdentities(added, deleted cache.IdentityCache) {
	policy.UpdateIdentities(added, deleted)
	d.TriggerPolicyUpdates(true, "one or more identities created or deleted")
}
97881
func NewIdentity() *IdentityClient {
	c := &IdentityClient{}
	c.common.backend = DefaultBackend()

	c.Analytics = (*AnalyticsClient)(&c.common)
	c.Invites = (*InvitesClient)(&c.common)
	c.Memberships = (*MembershipsClient)(&c.common)
	c.Self = (*SelfClient)(&c.common)
	c.Teams = (*TeamsClient)(&c.common)
	c.Tokens = (*TokensClient)(&c.common)
	c.Users = (*UsersClient)(&c.common)

	return c
}
774209
func (s *GetOpenIdTokenOutput) SetIdentityId(v string) *GetOpenIdTokenOutput {
	s.IdentityId = &v
	return s
}
1345142
func (mgr *MockCAClient) GetIdentity(id, caname string) (*api.IdentityResponse, error) {
	return nil, errors.New("not implemented")
}
480738
func (s *UnlinkDeveloperIdentityInput) SetIdentityId(v string) *UnlinkDeveloperIdentityInput {
	s.IdentityId = &v
	return s
}
772880
func (s *DecisionTaskStartedEventAttributes) SetIdentity(v string) *DecisionTaskStartedEventAttributes {
	s.Identity = &v
	return s
}
462034
func (set IdentifierSet) Add(i Identifier) bool {
	_, found := set[i]
	set[i] = struct{}{}
	return !found //False if it existed already
}
451677
func (s *ListIdentitiesOutput) SetIdentities(v []*string) *ListIdentitiesOutput {
	s.Identities = v
	return s
}
967682
func (s *GetCredentialsForIdentityOutput) SetIdentityId(v string) *GetCredentialsForIdentityOutput {
	s.IdentityId = &v
	return s
}
1138833
func (s *GetIdentityNotificationAttributesInput) SetIdentities(v []*string) *GetIdentityNotificationAttributesInput {
	s.Identities = v
	return s
}
479392
func (s *EmailChannelResponse) SetIdentity(v string) *EmailChannelResponse {
	s.Identity = &v
	return s
}
535015
func (e *Entity) primaryIdentity() *Identity {
	var firstIdentity *Identity
	for _, ident := range e.Identities {
		if firstIdentity == nil {
			firstIdentity = ident
		}
		if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId {
			return ident
		}
	}
	return firstIdentity
}
750100
func (s *RegisterUserInput) SetIdentityType(v string) *RegisterUserInput {
	s.IdentityType = &v
	return s
}
63344
func (s *GetOpenIdTokenForDeveloperIdentityInput) SetIdentityId(v string) *GetOpenIdTokenForDeveloperIdentityInput {
	s.IdentityId = &v
	return s
}
425497
func (soc *Socket) SetIdentity(value string) error {
	return soc.setString(C.ZMQ_IDENTITY, value)
}