// setFully sets data for a path, creating any parents nodes as necessary.
// The stat returned will be the stat of the final created node.
13242
func (s *Store) setFully(item Item) (stat *zk.Stat, err error) {
	err = func() error {
		identPath, err := s.identPath(item.Ident)
		if err != nil {
			return err
		}
		current := "/"
		segments := strings.Split(identPath, "/")
		for i, segment := range segments {
			isLast := i == len(segments)-1
			current = path.Join(current, segment)
			exists, _, err := s.conn.Exists(current)
			switch {
			case err != nil:
				return errors.Wrapf(err, "could not check %v", current)
			case exists:
				continue
			case isLast && item.Ident.actualVersion() >= 0:
				// specifying a new version on a non-existent node
				// is not supported
				return ErrVersionConflict
			}
			// this node does not exist. try to create it.
			var nodeData []byte

			// if the item has a variant, and its parent node does
			// not yet exist, we set the content on the parent
			// node as well as the variant node.
			isParentOfVersion := item.Ident.Variant != "" && i == len(segments)-2
			if isLast || isParentOfVersion {
				nodeData = item.Data
			}
			_, err = s.conn.Create(current, nodeData, 0, s.acls)
			if err != nil && err != zk.ErrNodeExists {
				return err
			}
		}
		stat, err = s.mustExist(identPath)
		return errors.Wrapf(err, "%v was not created", identPath)
	}()
	return
}
259865
func (o *OpenTrackingSetting) SetEnable(enable bool) *OpenTrackingSetting {
	setEnable := enable
	o.Enable = &setEnable
	return o
}
809609
func (s *SMBFileShareInfo) SetReadOnly(v bool) *SMBFileShareInfo {
	s.ReadOnly = &v
	return s
}
773752
func (s *BrokerSummary) SetCreated(v time.Time) *BrokerSummary {
	s.Created = &v
	return s
}
376069
func (s *SchemaAttributeType) SetMutable(v bool) *SchemaAttributeType {
	s.Mutable = &v
	return s
}
728243
func (s *Upload) SetCreated(v time.Time) *Upload {
	s.Created = &v
	return s
}
1293529
func (s *CloudWatchLogsConfiguration) SetEnabled(v bool) *CloudWatchLogsConfiguration {
	s.Enabled = &v
	return s
}
790316
func (s *ElasticsearchDomainStatus) SetCreated(v bool) *ElasticsearchDomainStatus {
	s.Created = &v
	return s
}
190380
func (s *HyperParameterSpecification) SetIsTunable(v bool) *HyperParameterSpecification {
	s.IsTunable = &v
	return s
}
1186791
func (s *StreamingDistributionSummary) SetEnabled(v bool) *StreamingDistributionSummary {
	s.Enabled = &v
	return s
}
296862
func (s *ADMChannelResponse) SetEnabled(v bool) *ADMChannelResponse {
	s.Enabled = &v
	return s
}
1182911
func (s *Job) SetCreated(v time.Time) *Job {
	s.Created = &v
	return s
}
273604
func (s *BlobMetadata) SetPath(v string) *BlobMetadata {
	s.Path = &v
	return s
}
1132145
func (s *Service) SetCreatedBy(v string) *Service {
	s.CreatedBy = &v
	return s
}
937952
func (e *Entity) SetPath(path ...string) (*Entity, error) {
	var cur = e
	for i, prop := range path {
		val, ok := cur.Objects[Property(prop)]
		if !ok {
			cur.Objects[Property(prop)] = NewEntity()
			cur = cur.Objects[Property(prop)].(*Entity)
			continue
		}
		cur, ok = val.(*Entity)
		if !ok {
			return nil, errors.Wrapf(ErrPathNotFound, "depth %d property %v, not an entity %#v", i, prop, val)
		}
	}
	return cur, nil
}
1015737
func (s *Run) SetCreated(v time.Time) *Run {
	s.Created = &v
	return s
}
22444
func (g *Generator) SetRootReadonly(b bool) {
	g.initConfigRoot()
	g.Config.Root.Readonly = b
}