// SetPathWithOptions is the same as SetPath, but allows you to provide
// formatting instructions to the key, that will be reused by Marshal().
326873
func (t *Tree) SetPathWithOptions(keys []string, opts SetOptions, value interface{}) {
	subtree := t
	for i, intermediateKey := range keys[:len(keys)-1] {
		nextTree, exists := subtree.values[intermediateKey]
		if !exists {
			nextTree = newTreeWithPosition(Position{Line: t.position.Line + i, Col: t.position.Col})
			subtree.values[intermediateKey] = nextTree // add new element here
		}
		switch node := nextTree.(type) {
		case *Tree:
			subtree = node
		case []*Tree:
			// go to most recent element
			if len(node) == 0 {
				// create element if it does not exist
				subtree.values[intermediateKey] = append(node, newTreeWithPosition(Position{Line: t.position.Line + i, Col: t.position.Col}))
			}
			subtree = node[len(node)-1]
		}
	}

	var toInsert interface{}

	switch v := value.(type) {
	case *Tree:
		v.comment = opts.Comment
		toInsert = value
	case []*Tree:
		toInsert = value
	case *tomlValue:
		v.comment = opts.Comment
		toInsert = v
	default:
		toInsert = &tomlValue{value: value,
			comment:   opts.Comment,
			commented: opts.Commented,
			multiline: opts.Multiline,
			position:  Position{Line: subtree.position.Line + len(subtree.values) + 1, Col: subtree.position.Col}}
	}

	subtree.values[keys[len(keys)-1]] = toInsert
}
1309146
func (s *Disk) SetPath(v string) *Disk {
	s.Path = &v
	return s
}
389044
func (s *DocumentationPartLocation) SetPath(v string) *DocumentationPartLocation {
	s.Path = &v
	return s
}
555584
func (s *WebhookFilterRule) SetJsonPath(v string) *WebhookFilterRule {
	s.JsonPath = &v
	return s
}
273604
func (s *BlobMetadata) SetPath(v string) *BlobMetadata {
	s.Path = &v
	return s
}
496677
func WithConfigPath(s string) source.Option {
	return func(o *source.Options) {
		if o.Context == nil {
			o.Context = context.Background()
		}
		o.Context = context.WithValue(o.Context, configPathKey{}, s)
	}
}
1296145
func (s *DiskInfo) SetPath(v string) *DiskInfo {
	s.Path = &v
	return s
}
274703
func (s *ProjectArtifacts) SetPath(v string) *ProjectArtifacts {
	s.Path = &v
	return s
}
176098
func (c *Cmd) WithOptions(options ...string) *Cmd {
	c.options = options
	return c
}
310567
func (r *Request) SetPath(path string) {
	if r.URL == nil {
		r.URL = &url.URL{}
	}
	r.URL.Path = path
}
29364
func WithPath(path string) PrepareDecorator {
	return func(p Preparer) Preparer {
		return PreparerFunc(func(r *http.Request) (*http.Request, error) {
			r, err := p.Prepare(r)
			if err == nil {
				if r.URL == nil {
					return r, NewError("autorest", "WithPath", "Invoked with a nil URL")
				}
				if r.URL, err = parseURL(r.URL, path); err != nil {
					return r, err
				}
			}
			return r, err
		})
	}
}
763540
func (m *Message) SetPathString(s string) {
	for s[0] == '/' {
		s = s[1:]
	}
	m.SetPath(strings.Split(s, "/"))
}
1315137
func WithOCIHookPath(path string) Opts {
	return func(c *config) error {
		c.OCIHookPath = path
		return nil
	}
}
140789
func (this *HttpClient) WithOptions(m Map) *HttpClient {
	options, _ := parseMap(m)
	for k, v := range options {
		this.WithOption(k, v)
	}

	return this
}
784613
func (s *Section) SetOption(key string, value string) *Section {
	s.Options = s.Options.withSettedOption(key, value)
	return s
}
227494
func (s *BusinessReportS3Location) SetPath(v string) *BusinessReportS3Location {
	s.Path = &v
	return s
}
92894
func (s *ProcessDetails) SetPath(v string) *ProcessDetails {
	s.Path = &v
	return s
}