func (s *QualityProfilesService) Copy(opt *QualityProfilesCopyOption) (v *QualityProfile, resp *http.Response, err error) {
	err = s.ValidateCopyOpt(opt)
	if err != nil {
		return
	}
	req, err := s.client.NewRequest("POST", "qualityprofiles/copy", opt)
	if err != nil {
		return
	}
	v = new(QualityProfile)
	resp, err = s.client.Do(req, v)
	if err != nil {
		return nil, resp, err
	}
	return
}
Copy Copy a quality profile.<br> Requires to be logged in and the 'Administer Quality Profiles' permission.
package sonargo
import (
	"net/http"
)
type QualityProfilesService struct {
	client *Client
}
type QualityProfile struct {
	Actions                   *Actions `json:"actions,omitempty"`
	ActiveRuleCount           int64    `json:"activeRuleCount,omitempty"`
	IsBuiltIn                 bool     `json:"isBuiltIn,omitempty"`
	IsDefault                 bool     `json:"isDefault,omitempty"`
	IsInherited               bool     `json:"isInherited,omitempty"`
	Key                       string   `json:"key,omitempty"`
	Language                  string   `json:"language,omitempty"`
	LanguageName              string   `json:"languageName,omitempty"`
	Name                      string   `json:"name,omitempty"`
	OverridingRuleCount       int64    `json:"overridingRuleCount,omitempty"`
	Organization              string   `json:"organization,omitempty"`
	Parent                    string   `json:"parent,omitempty"`
	ParentKey                 string   `json:"parentKey,omitempty"`
	ActiveDeprecatedRuleCount int      `json:"activeDeprecatedRuleCount,omitempty"`
	RulesUpdatedAt            string   `json:"rulesUpdatedAt,omitempty"`
	UserUpdatedAt             string   `json:"userUpdatedAt,omitempty"`
	LastUsed                  string   `json:"lastUsed,omitempty"`
	ProjectCount              int      `json:"projectCount,omitempty"`
}
type QualityProfilesChangelogObject struct {
	Events []*QualityProfilesEvent `json:"events,omitempty"`
	P      int64                   `json:"p,omitempty"`
	Ps     int64                   `json:"ps,omitempty"`
	Total  int64                   `json:"total,omitempty"`
}
type QualityProfilesEvent struct {
	Action      string      `json:"action,omitempty"`
	AuthorLogin string      `json:"authorLogin,omitempty"`
	AuthorName  string      `json:"authorName,omitempty"`
	Date        string      `json:"date,omitempty"`
	Params      interface{} `json:"params,omitempty"`
	RuleKey     string      `json:"ruleKey,omitempty"`
	RuleName    string      `json:"ruleName,omitempty"`
}
type QualityProfilesActiveRulesObject struct {
	Succeeded int `json:"succeeded"`
	Failed    int `json:"failed"`
	Errors    []struct {
		Msg string `json:"msg"`
	} `json:"errors"`
}
type QualityProfilesDeactiveRulesObject QualityProfilesActiveRulesObject
type QualityProfilesCreateObject struct {
	Profile  *QualityProfile `json:"profile,omitempty"`
	Warnings []string        `json:"warnings,omitempty"`
}
type ExportImporter struct {
	Key       string   `json:"key,omitempty"`
	Name      string   `json:"name,omitempty"`
	Languages []string `json:"languages,omitempty"`
}
type QualityProfilesExportersObject struct {
	Exporters []*ExportImporter `json:"exporters,omitempty"`
}
type QualityProfilesImportersObject struct {
	Importers []*ExportImporter `json:"importers,omitempty"`
}
type QualityProfilesInheritanceObject struct {
	Ancestors []*QualityProfile `json:"ancestors,omitempty"`
	Children  []*QualityProfile `json:"children,omitempty"`
	Profile   QualityProfile    `json:"profile,omitempty"`
}
type QualityProfilesSearchObject struct {
	Actions  *Actions          `json:"actions,omitempty"`
	Profiles []*QualityProfile `json:"profiles,omitempty"`
}
type QualityProfilesActivateRuleOption struct {
	Key      string `url:"key,omitempty"`       
	Params   string `url:"params,omitempty"`    
	Reset    string `url:"reset,omitempty"`     
	Rule     string `url:"rule,omitempty"`      
	Severity string `url:"severity,omitempty"`  
}
func (s *QualityProfilesService) ActivateRule(opt *QualityProfilesActivateRuleOption) (resp *http.Response, err error) {
	err = s.ValidateActivateRuleOpt(opt)
	if err != nil {
		return
	}
	req, err := s.client.NewRequest("POST", "qualityprofiles/activate_rule", opt)
	if err != nil {
		return
	}
	resp, err = s.client.Do(req, nil)
	if err != nil {
		return
	}
	return
}
type QualityProfilesActivateRulesOption struct {
	Activation       string `url:"activation,omitempty"`         
	ActiveSeverities string `url:"active_severities,omitempty"`  
	Asc              string `url:"asc,omitempty"`                
	AvailableSince   string `url:"available_since,omitempty"`    
	Inheritance      string `url:"inheritance,omitempty"`        
	IsTemplate       string `url:"is_template,omitempty"`        
	Languages        string `url:"languages,omitempty"`          
	Q                string `url:"q,omitempty"`                  
	Qprofile         string `url:"qprofile,omitempty"`           
	Repositories     string `url:"repositories,omitempty"`       
	RuleKey          string `url:"rule_key,omitempty"`           
	S                string `url:"s,omitempty"`                  
	Severities       string `url:"severities,omitempty"`         
	Statuses         string `url:"statuses,omitempty"`           
	Tags             string `url:"tags,omitempty"`               
	TargetKey        string `url:"targetKey,omitempty"`          
	TargetSeverity   string `url:"targetSeverity,omitempty"`     
	TemplateKey      string `url:"template_key,omitempty"`       
	Types            string `url:"types,omitempty"`              
}
func (s *QualityProfilesService) ActivateRules(opt *QualityProfilesActivateRulesOption) (v *QualityProfilesActiveRulesObject, resp *http.Response, err error) {
	err = s.ValidateActivateRulesOpt(opt)
	if err != nil {
		return
	}
	req, err := s.client.NewRequest("POST", "qualityprofiles/activate_rules", opt)
	if err != nil {
		return
	}
	v = new(QualityProfilesActiveRulesObject)
	resp, err = s.client.Do(req, v)
	if err != nil {
		return
	}
	return
}
type QualityProfilesAddProjectOption struct {
	Key            string `url:"key,omitempty"`             
	Language       string `url:"language,omitempty"`        
	Project        string `url:"project,omitempty"`         
	ProjectUuid    string `url:"projectUuid,omitempty"`     
	QualityProfile string `url:"qualityProfile,omitempty"`  
	Organization   string `json:"organization,omitempty"`
}
func (s *QualityProfilesService) AddProject(opt *QualityProfilesAddProjectOption) (resp *http.Response, err error) {
	err = s.ValidateAddProjectOpt(opt)
	if err != nil {
		return
	}
	req, err := s.client.NewRequest("POST", "qualityprofiles/add_project", opt)
	if err != nil {
		return
	}
	resp, err = s.client.Do(req, nil)
	if err != nil {
		return
	}
	return
}
type QualityProfilesBackupOption struct {
	ProfileKey string `url:"profileKey,omitempty"`  
}
func (s *QualityProfilesService) Backup(opt *QualityProfilesBackupOption) (v *string, resp *http.Response, err error) {
	err = s.ValidateBackupOpt(opt)
	if err != nil {
		return
	}
	req, err := s.client.NewRequest("GET", "qualityprofiles/backup", opt)
	if err != nil {
		return
	}
	v = new(string)
	resp, err = s.client.Do(req, v)
	if err != nil {
		return nil, resp, err
	}
	return
}
type QualityProfilesChangeParentOption struct {
	Key                  string `url:"key,omitempty"`                   
	Language             string `url:"language,omitempty"`              
	ParentKey            string `url:"parentKey,omitempty"`             
	ParentQualityProfile string `url:"parentQualityProfile,omitempty"`  
	QualityProfile       string `url:"qualityProfile,omitempty"`        
}
func (s *QualityProfilesService) ChangeParent(opt *QualityProfilesChangeParentOption) (resp *http.Response, err error) {
	err = s.ValidateChangeParentOpt(opt)
	if err != nil {
		return
	}
	req, err := s.client.NewRequest("POST", "qualityprofiles/change_parent", opt)
	if err != nil {
		return
	}
	resp, err = s.client.Do(req, nil)
	if err != nil {
		return
	}
	return
}
type QualityProfilesChangelogOption struct {
	Key            string `url:"key,omitempty"`             
	Language       string `url:"language,omitempty"`        
	P              string `url:"p,omitempty"`               
	Ps             string `url:"ps,omitempty"`              
	QualityProfile string `url:"qualityProfile,omitempty"`  
	Since          string `url:"since,omitempty"`           
	To             string `url:"to,omitempty"`              
}
func (s *QualityProfilesService) Changelog(opt *QualityProfilesChangelogOption) (v *QualityProfilesChangelogObject, resp *http.Response, err error) {
	err = s.ValidateChangelogOpt(opt)
	if err != nil {
		return
	}
	req, err := s.client.NewRequest("GET", "qualityprofiles/changelog", opt)
	if err != nil {
		return
	}
	v = new(QualityProfilesChangelogObject)
	resp, err = s.client.Do(req, v)
	if err != nil {
		return nil, resp, err
	}
	return
}
type QualityProfilesCopyOption struct {
	FromKey string `url:"fromKey,omitempty"`  
	ToName  string `url:"toName,omitempty"`   
}