// SetExpected sets the Expected field's value.
196886
func (s *PutItemInput) SetExpected(v map[string]*ExpectedAttributeValue) *PutItemInput {
	s.Expected = v
	return s
}
1095180
func (r *RemoteCmd) SetExited(status int) {
	r.initchan()

	r.Lock()
	r.exitStatus = status
	r.Unlock()

	close(r.exitCh)
}
1204757
func (a *StartPreciseCoverageArgs) SetDetailed(detailed bool) *StartPreciseCoverageArgs {
	a.Detailed = &detailed
	return a
}
735497
func (s *Project) SetCreated(v time.Time) *Project {
	s.Created = &v
	return s
}
858242
func (s *LifecyclePolicy) SetDateCreated(v time.Time) *LifecyclePolicy {
	s.DateCreated = &v
	return s
}
511309
func (s *CurrentRevision) SetCreated(v time.Time) *CurrentRevision {
	s.Created = &v
	return s
}
227110
func (s *PlatformDescription) SetDateCreated(v time.Time) *PlatformDescription {
	s.DateCreated = &v
	return s
}
1219881
func (s *Service) execThenExpect(commandArgs []string, expectation string) error {
	out, err := s.runCommand(commandArgs...)
	if err != nil {
		return errors.Trace(err)
	}
	if !strings.Contains(out, expectation) {
		return errors.Annotatef(err, `expected "%s", got "%s"`, expectation, out)
	}
	return nil
}
21816
func (s *DeleteDynamicThingGroupInput) SetExpectedVersion(v int64) *DeleteDynamicThingGroupInput {
	s.ExpectedVersion = &v
	return s
}
955104
func (s *PropertyDifference) SetExpectedValue(v string) *PropertyDifference {
	s.ExpectedValue = &v
	return s
}
330610
func (s *DeleteBillingGroupInput) SetExpectedVersion(v int64) *DeleteBillingGroupInput {
	s.ExpectedVersion = &v
	return s
}
506546
func (s *DescribeBrokerResponse) SetCreated(v time.Time) *DescribeBrokerResponse {
	s.Created = &v
	return s
}
435474
func (s *InvokeOutput) SetExecutedVersion(v string) *InvokeOutput {
	s.ExecutedVersion = &v
	return s
}
1178828
func (msg *Message) SetExpectedMsgID(id string) error {
	if msg.Type() != "reply" {
		return fmt.Errorf("can only store expected message ID for reply messages")
	}

	msg.expectedMessageID = id

	return nil
}
384720
func isExpected(t Type, s section, pos int) error {
	o := getOrdering(s)
	if len(o) > pos {
		for _, expected := range o[pos:] {
			if expected == t {
				return nil
			}
			if isOptional(expected) {
				continue
			}
		}
	}

	// Checking possible section transitions.
	switch s {
	case sectionSession:
		if pos < orderingAfterTime && isExpected(t, sectionTime, 0) == nil {
			return nil
		}
		if isExpected(t, sectionMedia, 0) == nil {
			return nil
		}
	case sectionTime:
		if isExpected(t, sectionSession, orderingAfterTime) == nil {
			return nil
		}
	case sectionMedia:
		if pos != 0 && isExpected(t, sectionMedia, 0) == nil {
			return nil
		}
	}
	if !isKnown(t) {
		return errUnknownType
	}
	// Attribute is known, but out of order.
	msg := fmt.Sprintf("no matches in ordering array at %s[%d] for %s",
		s, pos, t,
	)
	err := newSectionDecodeError(s, msg)
	return errors.Wrapf(err, "field %s is unexpected", t)
}
531523
func (s *UpdateDynamicThingGroupInput) SetExpectedVersion(v int64) *UpdateDynamicThingGroupInput {
	s.ExpectedVersion = &v
	return s
}
908325
func (r *ControllerExpectations) SetExpectations(controllerKey string, add, del int) error {
	exp := &ControlleeExpectations{add: int64(add), del: int64(del), key: controllerKey, timestamp: clock.RealClock{}.Now()}
	klog.V(4).Infof("Setting expectations %#v", exp)
	return r.Add(exp)
}