| 1 |
package sarif |
| 2 |
|
| 3 |
// ReportingConfiguration ... |
| 4 |
type ReportingConfiguration struct { |
| 5 |
Enabled *bool `json:"enabled,omitempty"` |
| 6 |
Level string `json:"level,omitempty"` |
| 7 |
Parameters *PropertyBag `json:"parameters,omitempty"` |
| 8 |
Rank *float64 `json:"rank,omitempty"` |
| 9 |
PropertyBag |
| 10 |
|
| 11 |
} |
| 12 |
|
| 13 |
// NewReportingConfiguration creates a new ReportingConfiguration and returns a pointer to it |
| 14 |
func NewReportingConfiguration() *ReportingConfiguration { |
| 15 |
return &ReportingConfiguration{} |
| 16 |
} |
| 17 |
|
| 18 |
// WithEnabled sets the Enabled |
| 19 |
func (reportingConfiguration *ReportingConfiguration) WithEnabled(enabled bool) *ReportingConfiguration { |
| 20 |
reportingConfiguration.Enabled = &enabled |
| 21 |
return reportingConfiguration |
| 22 |
} |
| 23 |
|
| 24 |
// WithLevel sets the Level |
| 25 |
func (reportingConfiguration *ReportingConfiguration) WithLevel(level string) *ReportingConfiguration { |
| 26 |
reportingConfiguration.Level = level |
| 27 |
return reportingConfiguration |
| 28 |
} |
| 29 |
|
| 30 |
// WithParameters sets the Parameters |
| 31 |
func (reportingConfiguration *ReportingConfiguration) WithParameters(parameters *PropertyBag) *ReportingConfiguration { |
| 32 |
reportingConfiguration.Parameters = parameters |
| 33 |
return reportingConfiguration |
| 34 |
} |
| 35 |
|
| 36 |
// WithRank sets the Rank |
| 37 |
func (reportingConfiguration *ReportingConfiguration) WithRank(rank float64) *ReportingConfiguration { |
| 38 |
reportingConfiguration.Rank = &rank |
| 39 |
return reportingConfiguration |
| 40 |
} |