// UpdateIdentities propagates identity updates to selectors
173635
func (sc *SelectorCache) UpdateIdentities(added, deleted cache.IdentityCache) {
	sc.mutex.Lock()
	defer sc.mutex.Unlock()

	// Update idCache so that newly added selectors get
	// prepopulated with all matching numeric identities.
	for numericID := range deleted {
		if _, exists := sc.idCache[numericID]; exists {
			delete(sc.idCache, numericID)
		} else {
			log.WithFields(logrus.Fields{logfields.Identity: numericID}).Warning("UpdateIdentities: Deleting a non-existing identity")
		}
	}
	for numericID, lbls := range added {
		if _, exists := sc.idCache[numericID]; exists {
			log.WithFields(logrus.Fields{logfields.Identity: numericID}).Warning("UpdateIdentities: Adding an existing identity")
		}
		sc.idCache[numericID] = lbls
	}

	// Iterate through all locally used identity selectors and
	// update the cached numeric identities as required.
	for _, sel := range sc.selectors {
		var adds, dels []identity.NumericIdentity
		switch idSel := sel.(type) {
		case *labelIdentitySelector:
			for numericID := range deleted {
				if _, exists := idSel.cachedSelections[numericID]; exists {
					dels = append(dels, numericID)
					delete(idSel.cachedSelections, numericID)
				}
			}
			for numericID, lbls := range added {
				if _, exists := idSel.cachedSelections[numericID]; !exists {
					if idSel.selector.Matches(lbls) {
						adds = append(adds, numericID)
						idSel.cachedSelections[numericID] = struct{}{}
					}
				}
			}
			if len(dels)+len(adds) > 0 {
				idSel.updateSelections()
				idSel.notifyUsers(adds, dels)
			}
		case *fqdnSelector:
			// TODO
		}
	}
}
479392
func (s *EmailChannelResponse) SetIdentity(v string) *EmailChannelResponse {
	s.Identity = &v
	return s
}
624552
func (s *IdentityInfo) SetIdentityType(v string) *IdentityInfo {
	s.IdentityType = &v
	return s
}
245552
func (s *GetIdentityDkimAttributesInput) SetIdentities(v []*string) *GetIdentityDkimAttributesInput {
	s.Identities = v
	return s
}
441551
func (s *DescribePatchBaselinesOutput) SetBaselineIdentities(v []*PatchBaselineIdentity) *DescribePatchBaselinesOutput {
	s.BaselineIdentities = v
	return s
}
1227533
func (s *UpdateAuthorizerInput) SetIdentitySource(v []*string) *UpdateAuthorizerInput {
	s.IdentitySource = v
	return s
}
536423
func (s *DeleteIdentityPolicyInput) SetIdentity(v string) *DeleteIdentityPolicyInput {
	s.Identity = &v
	return s
}
750273
func (s *IdentityDescription) SetIdentityId(v string) *IdentityDescription {
	s.IdentityId = &v
	return s
}
288712
func (s *GetEmailIdentityOutput) SetIdentityType(v string) *GetEmailIdentityOutput {
	s.IdentityType = &v
	return s
}
425295
func (s *GetIdentityMailFromDomainAttributesInput) SetIdentities(v []*string) *GetIdentityMailFromDomainAttributesInput {
	s.Identities = v
	return s
}
261369
func (is *identityMapperImpl) validateIdentities(isSuspected api.PeerSuspector) []*storedIdentity {
	now := time.Now()
	usageTh := GetIdentityUsageThreshold()
	is.RLock()
	defer is.RUnlock()
	var revokedIdentities []*storedIdentity
	for pkiID, storedIdentity := range is.pkiID2Cert {
		if pkiID != is.selfPKIID && storedIdentity.fetchLastAccessTime().Add(usageTh).Before(now) {
			revokedIdentities = append(revokedIdentities, storedIdentity)
			continue
		}
		if !isSuspected(storedIdentity.peerIdentity) {
			continue
		}
		if err := is.mcs.ValidateIdentity(storedIdentity.fetchIdentity()); err != nil {
			revokedIdentities = append(revokedIdentities, storedIdentity)
		}
	}
	return revokedIdentities
}
307379
func (s *UnsubscribeFromDatasetInput) SetIdentityId(v string) *UnsubscribeFromDatasetInput {
	s.IdentityId = &v
	return s
}
6261
func (s *Set) AddIdentity(id identity.Identity) {
	if !s.All {
		if s.IDs == nil {
			s.IDs = make(identSet, 1)
		}
		s.IDs[id] = struct{}{}
	}
}
1368065
func (c *Client) GetAllIdentities(options ...RequestOption) ([]*IdentityResponse, error) {

	// Read request options
	opts, err := c.prepareOptsFromOptions(c.ctx, options...)
	if err != nil {
		return nil, err
	}

	ca, err := newCAClient(c.ctx, c.orgName)
	if err != nil {
		return nil, err
	}

	responses, err := ca.GetAllIdentities(opts.CA)
	if err != nil {
		return nil, err
	}

	return getIdentityResponses(responses), nil

}
119138
func (s *SetIdentityDkimEnabledInput) SetIdentity(v string) *SetIdentityDkimEnabledInput {
	s.Identity = &v
	return s
}
116094
func (s *UnlinkIdentityInput) SetIdentityId(v string) *UnlinkIdentityInput {
	s.IdentityId = &v
	return s
}
235836
func (s *IdentityUsage) SetIdentityId(v string) *IdentityUsage {
	s.IdentityId = &v
	return s
}