// SetPrivValidator sets the private validator account for signing votes.
492365
func (cs *ConsensusState) SetPrivValidator(priv types.PrivValidator) {
	cs.mtx.Lock()
	cs.privValidator = priv
	cs.mtx.Unlock()
}
708616
func (vl *Validator) SetValidationFunc(name string, vf ValidationFunc) {
	if vl.funcs == nil {
		vl.funcs = make(map[string]ValidationFunc)
	}
	vl.funcs[name] = vf
}
793413
func (b *Base) SetPriority(l level.Priority) error {
	if !level.IsValidPriority(l) {
		return fmt.Errorf("%s (%d) is not a valid priority", l, l)
	}

	b.Level = l

	return nil
}
736625
func (s *CreateInvalidationOutput) SetInvalidation(v *Invalidation) *CreateInvalidationOutput {
	s.Invalidation = v
	return s
}
954547
func (s *CreateModelPackageInput) SetValidationSpecification(v *ModelPackageValidationSpecification) *CreateModelPackageInput {
	s.ValidationSpecification = v
	return s
}
1070228
func (app *PersistentKVStoreApplication) updateValidator(v types.Validator) types.ResponseDeliverTx {
	key := []byte("val:" + string(v.PubKey.Data))
	if v.Power == 0 {
		// remove validator
		if !app.app.state.db.Has(key) {
			return types.ResponseDeliverTx{
				Code: code.CodeTypeUnauthorized,
				Log:  fmt.Sprintf("Cannot remove non-existent validator %X", key)}
		}
		app.app.state.db.Delete(key)
	} else {
		// add or update validator
		value := bytes.NewBuffer(make([]byte, 0))
		if err := types.WriteMessage(&v, value); err != nil {
			return types.ResponseDeliverTx{
				Code: code.CodeTypeEncodingError,
				Log:  fmt.Sprintf("Error encoding validator: %v", err)}
		}
		app.app.state.db.Set(key, value.Bytes())
	}

	// we only update the changes array if we successfully updated the tree
	app.ValUpdates = append(app.ValUpdates, v)

	return types.ResponseDeliverTx{Code: code.CodeTypeOK}
}
871471
func (s *Build) SetInitiator(v string) *Build {
	s.Initiator = &v
	return s
}
96085
func DefaultValidator(param string, v reflect.Value) (ValidationResult, error) {
	switch v.Kind() {
	case reflect.String:
		if !v.CanAddr() {
			return ValidationNG, nil
		}
		if v.String() == "" {
			v.SetString(param)
		}
	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
		if !v.CanAddr() {
			return ValidationNG, nil
		}
		pInt, err := strconv.ParseInt(param, 0, 64)
		if err != nil {
			return ValidationNG, nil
		}
		if v.Int() == 0 {
			v.SetInt(pInt)
		}
	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
		if !v.CanAddr() {
			return ValidationNG, nil
		}
		pUint, err := strconv.ParseUint(param, 0, 64)
		if err != nil {
			return ValidationNG, nil
		}
		if v.Uint() == 0 {
			v.SetUint(pUint)
		}
	case reflect.Float32, reflect.Float64:
		if !v.CanAddr() {
			return ValidationNG, nil
		}
		pFloat, err := strconv.ParseFloat(param, 64)
		if err != nil {
			return ValidationNG, nil
		}
		if v.Float() == 0 {
			v.SetFloat(pFloat)
		}
	default:
		return 0, ErrValidateUnsupportedType
	}

	return ValidationOK, nil
}
647958
func (s *GrantListEntry) SetGranteePrincipal(v string) *GrantListEntry {
	s.GranteePrincipal = &v
	return s
}
583428
func (p *ProxyLBCertificates) SetPrimaryCert(cert *ProxyLBCertificate) {
	p.ServerCertificate = cert.ServerCertificate
	p.IntermediateCertificate = cert.IntermediateCertificate
	p.PrivateKey = cert.PrivateKey
	p.CertificateEndDate = cert.CertificateEndDate
	p.CertificateCommonName = cert.CertificateCommonName
}
534167
func (s *ListRobotApplicationsInput) SetVersionQualifier(v string) *ListRobotApplicationsInput {
	s.VersionQualifier = &v
	return s
}
1160329
func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
	s.Initiator = v
	return s
}
397656
func (s *DescribeModelPackageOutput) SetValidationSpecification(v *ModelPackageValidationSpecification) *DescribeModelPackageOutput {
	s.ValidationSpecification = v
	return s
}
470093
func NewPrivValidatorMemory(addressable crypto.Addressable, signer crypto.Signer) *privValidatorMemory {
	return &privValidatorMemory{
		Addressable:    addressable,
		signer:         asTendermintSigner(signer),
		lastSignedInfo: NewLastSignedInfo(),
	}
}
1158846
func (s *ResourceRecordSet) SetSetIdentifier(v string) *ResourceRecordSet {
	s.SetIdentifier = &v
	return s
}
885065
func (p *ParsedCertBundle) SetParsedPrivateKey(privateKey crypto.Signer, privateKeyType PrivateKeyType, privateKeyBytes []byte) {
	p.PrivateKey = privateKey
	p.PrivateKeyType = privateKeyType
	p.PrivateKeyBytes = privateKeyBytes
}
1309653
func (s *DeviceSecretVerifierConfigType) SetPasswordVerifier(v string) *DeviceSecretVerifierConfigType {
	s.PasswordVerifier = &v
	return s
}