// Configure the identity field of a collection in a single function call.
11621
func (self *Collection) SetIdentity(name string, idtype Type, formatter FieldFormatterFunc, validator FieldValidatorFunc) *Collection {
	if name != `` {
		self.IdentityField = name
	}

	self.IdentityFieldType = idtype

	if formatter != nil {
		self.IdentityFieldFormatter = formatter
	}

	if validator != nil {
		self.IdentityFieldValidator = validator
	}

	return self
}
668424
func (chain *chainImpl) Configure(config *cb.Envelope, configSeq uint64) error {
	return chain.configure(config, configSeq, int64(0))
}
436619
func (format *Identifier) Configure(conf core.PluginConfigReader) {
	idType := strings.ToLower(conf.GetString("Generator", "time"))
	format.seq = new(uint64)

	switch idType {
	case "hash":
		format.hash = format.idHash
	case "seq":
		format.hash = format.idSeq
	case "seqhex":
		format.hash = format.idSeqHex
	case "time":
		format.hash = format.idTime
	default:
		format.hash = func(msg *core.Message) []byte {
			return []byte(idType)
		}
	}
}
578837
func (self *Collection) KeyFields() []Field {
	keys := []Field{
		Field{
			Name:     self.GetIdentityFieldName(),
			Type:     self.IdentityFieldType,
			Identity: true,
			Key:      true,
			Required: true,
		},
	}

	// append additional key fields
	for _, field := range self.Fields {
		if field.Key {
			keys = append(keys, field)
		}
	}

	return keys
}
710743
func (format *CollectdToInflux10) Configure(conf core.PluginConfigReader) {
	format.tagString = strings.NewReplacer(",", "\\,", " ", "\\ ")
}
3819
func BuildIdentityConfigFromOptions(opts ...interface{}) (msp.IdentityConfig, error) {
	// build a new IdentityConfig with overridden function implementations
	c := &IdentityConfigOptions{}
	for _, option := range opts {
		err := setIdentityConfigWithOptionInterface(c, option)
		if err != nil {
			return nil, err
		}
	}

	return c, nil

}
802435
func (s *ListIdentitiesInput) SetIdentityType(v string) *ListIdentitiesInput {
	s.IdentityType = &v
	return s
}
1211928
func identityRoleFilterByIdentityID(identityID uuid.UUID) func(db *gorm.DB) *gorm.DB {
	return func(db *gorm.DB) *gorm.DB {
		return db.Where("identity_id = ?", identityID)
	}
}
750100
func (s *RegisterUserInput) SetIdentityType(v string) *RegisterUserInput {
	s.IdentityType = &v
	return s
}
536423
func (s *DeleteIdentityPolicyInput) SetIdentity(v string) *DeleteIdentityPolicyInput {
	s.Identity = &v
	return s
}
436660
func (r *Record) IdentityScheme() string {
	var id ID
	r.Load(&id)
	return string(id)
}
772880
func (s *DecisionTaskStartedEventAttributes) SetIdentity(v string) *DecisionTaskStartedEventAttributes {
	s.Identity = &v
	return s
}
298799
func (c *FakeIdentities) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
	action := testing.NewRootDeleteCollectionAction(identitiesResource, listOptions)

	_, err := c.Fake.Invokes(action, &user.IdentityList{})
	return err
}
887958
func WithIdentityConfig(identityConfig msp.IdentityConfig) SDKContextParams {
	return func(ctx *Provider) {
		ctx.identityConfig = identityConfig
	}
}
1005809
func identity(N int) []float64 {
	var results []float64
	for i := 0; i < N; i++ {
		for j := 0; j < N; j++ {
			if j == i {
				results = append(results, 1)
			} else {
				results = append(results, 0)
			}
		}
	}
	return results
}
451677
func (s *ListIdentitiesOutput) SetIdentities(v []*string) *ListIdentitiesOutput {
	s.Identities = v
	return s
}
51669
func (s *ListIdentityPoliciesInput) SetIdentity(v string) *ListIdentityPoliciesInput {
	s.Identity = &v
	return s
}