// SetIsRequired sets the IsRequired field's value.
969933
func (s *HyperParameterSpecification) SetIsRequired(v bool) *HyperParameterSpecification {
	s.IsRequired = &v
	return s
}
211082
func (lk *consulLock) IsAcquired() bool {
	lk.mutex.Lock()
	defer lk.mutex.Unlock()
	return lk.isAcquired
}
1373925
func (s *CreateApplicationVersionOutput) SetRequiredCapabilities(v []*string) *CreateApplicationVersionOutput {
	s.RequiredCapabilities = v
	return s
}
1253397
func (s *MeetingSetting) SetRequirePin(v string) *MeetingSetting {
	s.RequirePin = &v
	return s
}
870845
func (s *ListSigningJobsInput) SetRequestedBy(v string) *ListSigningJobsInput {
	s.RequestedBy = &v
	return s
}
8327
func (s *CreateLoginProfileInput) SetPasswordResetRequired(v bool) *CreateLoginProfileInput {
	s.PasswordResetRequired = &v
	return s
}
845472
func (s *PasswordPolicyType) SetRequireNumbers(v bool) *PasswordPolicyType {
	s.RequireNumbers = &v
	return s
}
963975
func (s *UpdateRequestValidatorInput) SetRequestValidatorId(v string) *UpdateRequestValidatorInput {
	s.RequestValidatorId = &v
	return s
}
1041072
func (s *TaskDefinition) SetRequiresCompatibilities(v []*string) *TaskDefinition {
	s.RequiresCompatibilities = v
	return s
}
361606
func (lk *consulLock) setAcquired(isAcquired bool) {
	lk.mutex.Lock()
	lk.isAcquired = isAcquired
	lk.mutex.Unlock()
}
1373464
func (s *UpdateLoginProfileInput) SetPasswordResetRequired(v bool) *UpdateLoginProfileInput {
	s.PasswordResetRequired = &v
	return s
}
1275625
func (s *OptionGroupOption) SetPortRequired(v bool) *OptionGroupOption {
	s.PortRequired = &v
	return s
}
1373446
func ValidateRequired(ch *Changeset, fields []string, opts ...Option) {
	options := Options{
		message: ValidateRequiredErrorMessage,
	}
	options.apply(opts)

	for _, f := range fields {
		val, exist := ch.changes[f]

		// check values if it's not exist in changeset when changeOnly is false and changeset values are all zero value
		if !exist && !options.changeOnly && !ch.zero {
			val, exist = ch.values[f]
		}

		str, isStr := val.(string)
		if exist && (isStr && strings.TrimSpace(str) != "") || (!isStr && val != nil) {
			continue
		}

		msg := strings.Replace(options.message, "{field}", f, 1)
		AddError(ch, f, msg)
	}
}
434034
func (s *QualificationRequirement) SetRequiredToPreview(v bool) *QualificationRequirement {
	s.RequiredToPreview = &v
	return s
}
795894
func (s *Route) SetApiKeyRequired(v bool) *Route {
	s.ApiKeyRequired = &v
	return s
}
245353
func (b *Block) NoneRequired() *Block {
	ret := &Block{}

	if b.Attributes != nil {
		ret.Attributes = make(map[string]*Attribute, len(b.Attributes))
	}
	for name, attrS := range b.Attributes {
		ret.Attributes[name] = attrS.forceOptional()
	}

	if b.BlockTypes != nil {
		ret.BlockTypes = make(map[string]*NestedBlock, len(b.BlockTypes))
	}
	for name, blockS := range b.BlockTypes {
		ret.BlockTypes[name] = blockS.noneRequired()
	}

	return ret
}
358641
func (s *ResourceTargetDefinition) SetRequiresRecreation(v string) *ResourceTargetDefinition {
	s.RequiresRecreation = &v
	return s
}