pub struct AlertInstance {
pub analysis_key: String,
pub classifications: Vec<String>,
pub commit_sha: Option<String>,
pub environment: String,
pub location: Option<AlertInstanceLocation>,
pub message: Option<AlertInstanceMessage>,
pub ref_: String,
pub state: AlertInstanceState,
}
Expand description
AlertInstance
JSON schema
{
"title": "Alert Instance",
"type": "object",
"required": [
"analysis_key",
"environment",
"ref",
"state"
],
"properties": {
"analysis_key": {
"description": "Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name.",
"type": "string"
},
"classifications": {
"type": "array",
"items": {
"type": "string"
}
},
"commit_sha": {
"type": "string"
},
"environment": {
"description": "Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed.",
"type": "string"
},
"location": {
"type": "object",
"properties": {
"end_column": {
"type": "integer"
},
"end_line": {
"type": "integer"
},
"path": {
"type": "string"
},
"start_column": {
"type": "integer"
},
"start_line": {
"type": "integer"
}
},
"additionalProperties": false
},
"message": {
"type": "object",
"properties": {
"text": {
"type": "string"
}
},
"additionalProperties": false
},
"ref": {
"description": "The full Git reference, formatted as `refs/heads/<branch name>`.",
"type": "string"
},
"state": {
"description": "State of a code scanning alert.",
"type": "string",
"enum": [
"open",
"dismissed",
"fixed"
]
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema"
}
Fields§
§analysis_key: String
Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name.
classifications: Vec<String>
§commit_sha: Option<String>
§environment: String
Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed.
location: Option<AlertInstanceLocation>
§message: Option<AlertInstanceMessage>
§ref_: String
The full Git reference, formatted as refs/heads/<branch name>
.
state: AlertInstanceState
State of a code scanning alert.
Implementations§
Source§impl AlertInstance
impl AlertInstance
pub fn builder() -> AlertInstance
Trait Implementations§
Source§impl Clone for AlertInstance
impl Clone for AlertInstance
Source§fn clone(&self) -> AlertInstance
fn clone(&self) -> AlertInstance
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AlertInstance
impl Debug for AlertInstance
Source§impl<'de> Deserialize<'de> for AlertInstance
impl<'de> Deserialize<'de> for AlertInstance
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&AlertInstance> for AlertInstance
impl From<&AlertInstance> for AlertInstance
Source§fn from(value: &AlertInstance) -> Self
fn from(value: &AlertInstance) -> Self
Converts to this type from the input type.
Source§impl From<AlertInstance> for AlertInstance
impl From<AlertInstance> for AlertInstance
Source§fn from(value: AlertInstance) -> Self
fn from(value: AlertInstance) -> Self
Converts to this type from the input type.
Source§impl Serialize for AlertInstance
impl Serialize for AlertInstance
Source§impl TryFrom<AlertInstance> for AlertInstance
impl TryFrom<AlertInstance> for AlertInstance
Auto Trait Implementations§
impl Freeze for AlertInstance
impl RefUnwindSafe for AlertInstance
impl Send for AlertInstance
impl Sync for AlertInstance
impl Unpin for AlertInstance
impl UnwindSafe for AlertInstance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more