// WithNewBase implements the Cloner interface.
334336
func (i *Image) WithNewBase(base string) resource.Resource {
	return &Image{
		imaging:         i.imaging,
		format:          i.format,
		genericResource: i.genericResource.WithNewBase(base).(*genericResource)}
}
689242
func (o *GetOrderByIDURL) WithBasePath(bp string) *GetOrderByIDURL {
	o.SetBasePath(bp)
	return o
}
726685
func NewDatabase() *Database {
	header := NewHeader()
	return &Database{
		Options:     NewOptions(),
		Credentials: new(DBCredentials),
		Header:      header,
		Hashes:      NewHashes(header),
		Content:     NewContent(),
	}
}
709963
func (o *GetStatusURL) WithBasePath(bp string) *GetStatusURL {
	o.SetBasePath(bp)
	return o
}
985655
func (o *PutServiceIDURL) WithBasePath(bp string) *PutServiceIDURL {
	o.SetBasePath(bp)
	return o
}
591541
func PathWithinBase(fullPath, basePath string) bool {
	rel, err := filepath.Rel(basePath, fullPath)
	if err != nil {
		return false
	}
	if StartsWithBackstep(rel) {
		// Needed to escape the base path
		return false
	}
	return true
}
638254
func (o *GetItemsURL) WithBasePath(bp string) *GetItemsURL {
	o.SetBasePath(bp)
	return o
}
373871
func (options PoolOptions) WithDatabase(database int) PoolOptions {
	options.Database = database
	return options
}
534703
func (o *PatchEndpointIDURL) WithBasePath(bp string) *PatchEndpointIDURL {
	o.SetBasePath(bp)
	return o
}
884398
func (o *PetUpdateURL) WithBasePath(bp string) *PetUpdateURL {
	o.SetBasePath(bp)
	return o
}
409907
func (o *GetAccountURL) WithBasePath(bp string) *GetAccountURL {
	o.SetBasePath(bp)
	return o
}
73049
func (o *DeleteFqdnCacheURL) WithBasePath(bp string) *DeleteFqdnCacheURL {
	o.SetBasePath(bp)
	return o
}
1219467
func (o *PostIPAMURL) WithBasePath(bp string) *PostIPAMURL {
	o.SetBasePath(bp)
	return o
}
506333
func (o *GetPolicyResolveURL) WithBasePath(bp string) *GetPolicyResolveURL {
	o.SetBasePath(bp)
	return o
}
519874
func NewWithCap(size int) *Database {
	return &Database{
		db: make(map[string][]byte, size),
	}
}
87435
func NewWithFile(path string) (*Database, error) {
	db := &Database{make(map[string]string), make(map[string]string), path}
	db.customPath = path

	blob, err := Asset("4byte.json")
	if err != nil {
		return nil, err
	}
	if err := json.Unmarshal(blob, &db.embedded); err != nil {
		return nil, err
	}
	// Custom file may not exist. Will be created during save, if needed.
	if _, err := os.Stat(path); err == nil {
		if blob, err = ioutil.ReadFile(path); err != nil {
			return nil, err
		}
		if err := json.Unmarshal(blob, &db.custom); err != nil {
			return nil, err
		}
	}
	return db, nil
}
61121
func (o *GetHealthzURL) WithBasePath(bp string) *GetHealthzURL {
	o.SetBasePath(bp)
	return o
}