/*
SetBaseDirectory sets the base directory used in the other helper methods
*/
509926
func SetBaseDirectory(dir string) error {
	if len(dir) == 0 {
		usr, err := user.Current()
		if err != nil {
			fmt.Println(err)
		}
		dir = usr.HomeDir
	}
	dir, err := filepath.Abs(dir)
	if err != nil {
		fmt.Println("Could not calculate absolute path", err)
		return err
	}
	base = dir

	return nil
}
17927
func (s *DescribeTrustsInput) SetDirectoryId(v string) *DescribeTrustsInput {
	s.DirectoryId = &v
	return s
}
1268803
func (s *CancelSchemaExtensionInput) SetDirectoryId(v string) *CancelSchemaExtensionInput {
	s.DirectoryId = &v
	return s
}
996660
func (s *UpdateBasePathMappingInput) SetBasePath(v string) *UpdateBasePathMappingInput {
	s.BasePath = &v
	return s
}
1173572
func (s *EnableRadiusInput) SetDirectoryId(v string) *EnableRadiusInput {
	s.DirectoryId = &v
	return s
}
157179
func (s *GetObjectAttributesInput) SetDirectoryArn(v string) *GetObjectAttributesInput {
	s.DirectoryArn = &v
	return s
}
1040415
func (s *ApplySchemaInput) SetDirectoryArn(v string) *ApplySchemaInput {
	s.DirectoryArn = &v
	return s
}
634515
func (b *Builder) SetDir(tmpDir string) *Builder {
	b.tmpDir = tmpDir
	return b
}
1037237
func (s *CreateConditionalForwarderInput) SetDirectoryId(v string) *CreateConditionalForwarderInput {
	s.DirectoryId = &v
	return s
}
1057134
func (s *ShareDirectoryInput) SetDirectoryId(v string) *ShareDirectoryInput {
	s.DirectoryId = &v
	return s
}
1126135
func (s *Trust) SetDirectoryId(v string) *Trust {
	s.DirectoryId = &v
	return s
}
100286
func (s *DeleteLogSubscriptionInput) SetDirectoryId(v string) *DeleteLogSubscriptionInput {
	s.DirectoryId = &v
	return s
}
13358
func (s *DirectoryDescription) SetDirectoryId(v string) *DirectoryDescription {
	s.DirectoryId = &v
	return s
}
716756
func (p *Paths) initBaseDirectory(baseDirectoryPath string) (err error) {
	// No path specified in the options
	p.baseDirectory = baseDirectoryPath
	if len(p.baseDirectory) == 0 {
		// Retrieve executable path
		var ep string
		if ep, err = os.Executable(); err != nil {
			err = errors.Wrap(err, "retrieving executable path failed")
			return
		}
		p.baseDirectory = filepath.Dir(ep)
	}

	// We need the absolute path
	if p.baseDirectory, err = filepath.Abs(p.baseDirectory); err != nil {
		err = errors.Wrap(err, "computing absolute path failed")
		return
	}
	return
}
780236
func (s *CreateDirectoryOutput) SetDirectoryId(v string) *CreateDirectoryOutput {
	s.DirectoryId = &v
	return s
}
104347
func (s *AddFacetToObjectInput) SetDirectoryArn(v string) *AddFacetToObjectInput {
	s.DirectoryArn = &v
	return s
}
334586
func (s *DescribeDomainControllersInput) SetDirectoryId(v string) *DescribeDomainControllersInput {
	s.DirectoryId = &v
	return s
}