#[doc = "`AlertInstance`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct AlertInstance {
#[doc = "Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name."]
pub analysis_key: ::std::string::String,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub classifications: ::std::vec::Vec<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub commit_sha: ::std::option::Option<::std::string::String>,
#[doc = "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."]
pub environment: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub location: ::std::option::Option<AlertInstanceLocation>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub message: ::std::option::Option<AlertInstanceMessage>,
#[doc = "The full Git reference, formatted as `refs/heads/<branch name>`."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
#[doc = "State of a code scanning alert."]
pub state: AlertInstanceState,
}
#[doc = "`AlertInstanceLocation`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct AlertInstanceLocation {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub end_column: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub end_line: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub path: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub start_column: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub start_line: ::std::option::Option<i64>,
}
#[doc = "`AlertInstanceMessage`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct AlertInstanceMessage {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub text: ::std::option::Option<::std::string::String>,
}
#[doc = "State of a code scanning alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AlertInstanceState {
#[serde(rename = "open")]
Open,
#[serde(rename = "dismissed")]
Dismissed,
#[serde(rename = "fixed")]
Fixed,
}
impl ::std::fmt::Display for AlertInstanceState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Dismissed => f.write_str("dismissed"),
Self::Fixed => f.write_str("fixed"),
}
}
}
impl ::std::str::FromStr for AlertInstanceState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"dismissed" => Ok(Self::Dismissed),
"fixed" => Ok(Self::Fixed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AlertInstanceState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AlertInstanceState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct App {
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[doc = "The list of events for the GitHub app"]
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub events: ::std::vec::Vec<AppEventsItem>,
pub external_url: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the GitHub app"]
pub id: i64,
#[doc = "The name of the GitHub app"]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub owner: User,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub permissions: ::std::option::Option<AppPermissions>,
#[doc = "The slug name of the GitHub app"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub slug: ::std::option::Option<::std::string::String>,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
}
#[doc = "`AppEventsItem`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppEventsItem {
#[serde(rename = "check_run")]
CheckRun,
#[serde(rename = "check_suite")]
CheckSuite,
#[serde(rename = "code_scanning_alert")]
CodeScanningAlert,
#[serde(rename = "commit_comment")]
CommitComment,
#[serde(rename = "content_reference")]
ContentReference,
#[serde(rename = "create")]
Create,
#[serde(rename = "delete")]
Delete,
#[serde(rename = "deployment")]
Deployment,
#[serde(rename = "deployment_review")]
DeploymentReview,
#[serde(rename = "deployment_status")]
DeploymentStatus,
#[serde(rename = "deploy_key")]
DeployKey,
#[serde(rename = "discussion")]
Discussion,
#[serde(rename = "discussion_comment")]
DiscussionComment,
#[serde(rename = "fork")]
Fork,
#[serde(rename = "gollum")]
Gollum,
#[serde(rename = "issues")]
Issues,
#[serde(rename = "issue_comment")]
IssueComment,
#[serde(rename = "label")]
Label,
#[serde(rename = "member")]
Member,
#[serde(rename = "membership")]
Membership,
#[serde(rename = "milestone")]
Milestone,
#[serde(rename = "organization")]
Organization,
#[serde(rename = "org_block")]
OrgBlock,
#[serde(rename = "page_build")]
PageBuild,
#[serde(rename = "project")]
Project,
#[serde(rename = "project_card")]
ProjectCard,
#[serde(rename = "project_column")]
ProjectColumn,
#[serde(rename = "public")]
Public,
#[serde(rename = "pull_request")]
PullRequest,
#[serde(rename = "pull_request_review")]
PullRequestReview,
#[serde(rename = "pull_request_review_comment")]
PullRequestReviewComment,
#[serde(rename = "push")]
Push,
#[serde(rename = "registry_package")]
RegistryPackage,
#[serde(rename = "release")]
Release,
#[serde(rename = "repository")]
Repository,
#[serde(rename = "repository_dispatch")]
RepositoryDispatch,
#[serde(rename = "secret_scanning_alert")]
SecretScanningAlert,
#[serde(rename = "star")]
Star,
#[serde(rename = "status")]
Status,
#[serde(rename = "team")]
Team,
#[serde(rename = "team_add")]
TeamAdd,
#[serde(rename = "watch")]
Watch,
#[serde(rename = "workflow_dispatch")]
WorkflowDispatch,
#[serde(rename = "workflow_run")]
WorkflowRun,
}
impl ::std::fmt::Display for AppEventsItem {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::CheckRun => f.write_str("check_run"),
Self::CheckSuite => f.write_str("check_suite"),
Self::CodeScanningAlert => f.write_str("code_scanning_alert"),
Self::CommitComment => f.write_str("commit_comment"),
Self::ContentReference => f.write_str("content_reference"),
Self::Create => f.write_str("create"),
Self::Delete => f.write_str("delete"),
Self::Deployment => f.write_str("deployment"),
Self::DeploymentReview => f.write_str("deployment_review"),
Self::DeploymentStatus => f.write_str("deployment_status"),
Self::DeployKey => f.write_str("deploy_key"),
Self::Discussion => f.write_str("discussion"),
Self::DiscussionComment => f.write_str("discussion_comment"),
Self::Fork => f.write_str("fork"),
Self::Gollum => f.write_str("gollum"),
Self::Issues => f.write_str("issues"),
Self::IssueComment => f.write_str("issue_comment"),
Self::Label => f.write_str("label"),
Self::Member => f.write_str("member"),
Self::Membership => f.write_str("membership"),
Self::Milestone => f.write_str("milestone"),
Self::Organization => f.write_str("organization"),
Self::OrgBlock => f.write_str("org_block"),
Self::PageBuild => f.write_str("page_build"),
Self::Project => f.write_str("project"),
Self::ProjectCard => f.write_str("project_card"),
Self::ProjectColumn => f.write_str("project_column"),
Self::Public => f.write_str("public"),
Self::PullRequest => f.write_str("pull_request"),
Self::PullRequestReview => f.write_str("pull_request_review"),
Self::PullRequestReviewComment => f.write_str("pull_request_review_comment"),
Self::Push => f.write_str("push"),
Self::RegistryPackage => f.write_str("registry_package"),
Self::Release => f.write_str("release"),
Self::Repository => f.write_str("repository"),
Self::RepositoryDispatch => f.write_str("repository_dispatch"),
Self::SecretScanningAlert => f.write_str("secret_scanning_alert"),
Self::Star => f.write_str("star"),
Self::Status => f.write_str("status"),
Self::Team => f.write_str("team"),
Self::TeamAdd => f.write_str("team_add"),
Self::Watch => f.write_str("watch"),
Self::WorkflowDispatch => f.write_str("workflow_dispatch"),
Self::WorkflowRun => f.write_str("workflow_run"),
}
}
}
impl ::std::str::FromStr for AppEventsItem {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"check_run" => Ok(Self::CheckRun),
"check_suite" => Ok(Self::CheckSuite),
"code_scanning_alert" => Ok(Self::CodeScanningAlert),
"commit_comment" => Ok(Self::CommitComment),
"content_reference" => Ok(Self::ContentReference),
"create" => Ok(Self::Create),
"delete" => Ok(Self::Delete),
"deployment" => Ok(Self::Deployment),
"deployment_review" => Ok(Self::DeploymentReview),
"deployment_status" => Ok(Self::DeploymentStatus),
"deploy_key" => Ok(Self::DeployKey),
"discussion" => Ok(Self::Discussion),
"discussion_comment" => Ok(Self::DiscussionComment),
"fork" => Ok(Self::Fork),
"gollum" => Ok(Self::Gollum),
"issues" => Ok(Self::Issues),
"issue_comment" => Ok(Self::IssueComment),
"label" => Ok(Self::Label),
"member" => Ok(Self::Member),
"membership" => Ok(Self::Membership),
"milestone" => Ok(Self::Milestone),
"organization" => Ok(Self::Organization),
"org_block" => Ok(Self::OrgBlock),
"page_build" => Ok(Self::PageBuild),
"project" => Ok(Self::Project),
"project_card" => Ok(Self::ProjectCard),
"project_column" => Ok(Self::ProjectColumn),
"public" => Ok(Self::Public),
"pull_request" => Ok(Self::PullRequest),
"pull_request_review" => Ok(Self::PullRequestReview),
"pull_request_review_comment" => Ok(Self::PullRequestReviewComment),
"push" => Ok(Self::Push),
"registry_package" => Ok(Self::RegistryPackage),
"release" => Ok(Self::Release),
"repository" => Ok(Self::Repository),
"repository_dispatch" => Ok(Self::RepositoryDispatch),
"secret_scanning_alert" => Ok(Self::SecretScanningAlert),
"star" => Ok(Self::Star),
"status" => Ok(Self::Status),
"team" => Ok(Self::Team),
"team_add" => Ok(Self::TeamAdd),
"watch" => Ok(Self::Watch),
"workflow_dispatch" => Ok(Self::WorkflowDispatch),
"workflow_run" => Ok(Self::WorkflowRun),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppEventsItem {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppEventsItem {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The set of permissions for the GitHub app"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct AppPermissions {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub actions: ::std::option::Option<AppPermissionsActions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub administration: ::std::option::Option<AppPermissionsAdministration>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub checks: ::std::option::Option<AppPermissionsChecks>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub content_references: ::std::option::Option<AppPermissionsContentReferences>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub contents: ::std::option::Option<AppPermissionsContents>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub deployments: ::std::option::Option<AppPermissionsDeployments>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub discussions: ::std::option::Option<AppPermissionsDiscussions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub emails: ::std::option::Option<AppPermissionsEmails>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub environments: ::std::option::Option<AppPermissionsEnvironments>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub issues: ::std::option::Option<AppPermissionsIssues>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub members: ::std::option::Option<AppPermissionsMembers>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub metadata: ::std::option::Option<AppPermissionsMetadata>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_administration:
::std::option::Option<AppPermissionsOrganizationAdministration>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_hooks: ::std::option::Option<AppPermissionsOrganizationHooks>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_packages: ::std::option::Option<AppPermissionsOrganizationPackages>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_plan: ::std::option::Option<AppPermissionsOrganizationPlan>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_projects: ::std::option::Option<AppPermissionsOrganizationProjects>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_secrets: ::std::option::Option<AppPermissionsOrganizationSecrets>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_self_hosted_runners:
::std::option::Option<AppPermissionsOrganizationSelfHostedRunners>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_user_blocking: ::std::option::Option<AppPermissionsOrganizationUserBlocking>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub packages: ::std::option::Option<AppPermissionsPackages>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pages: ::std::option::Option<AppPermissionsPages>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_requests: ::std::option::Option<AppPermissionsPullRequests>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository_hooks: ::std::option::Option<AppPermissionsRepositoryHooks>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository_projects: ::std::option::Option<AppPermissionsRepositoryProjects>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub secret_scanning_alerts: ::std::option::Option<AppPermissionsSecretScanningAlerts>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub secrets: ::std::option::Option<AppPermissionsSecrets>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub security_events: ::std::option::Option<AppPermissionsSecurityEvents>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub security_scanning_alert: ::std::option::Option<AppPermissionsSecurityScanningAlert>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub single_file: ::std::option::Option<AppPermissionsSingleFile>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub statuses: ::std::option::Option<AppPermissionsStatuses>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub team_discussions: ::std::option::Option<AppPermissionsTeamDiscussions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub vulnerability_alerts: ::std::option::Option<AppPermissionsVulnerabilityAlerts>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub workflows: ::std::option::Option<AppPermissionsWorkflows>,
}
#[doc = "`AppPermissionsActions`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsActions {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsActions {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsActions {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsActions {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsActions {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsAdministration`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsAdministration {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsAdministration {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsAdministration {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsAdministration {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsAdministration {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsChecks`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsChecks {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsChecks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsChecks {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsChecks {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsChecks {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsContentReferences`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsContentReferences {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsContentReferences {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsContentReferences {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsContentReferences {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsContentReferences {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsContents`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsContents {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsContents {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsContents {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsContents {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsContents {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsDeployments`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsDeployments {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsDeployments {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsDeployments {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsDeployments {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsDeployments {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsDiscussions`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsDiscussions {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsDiscussions {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsDiscussions {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsDiscussions {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsDiscussions {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsEmails`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsEmails {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsEmails {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsEmails {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsEmails {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsEmails {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsEnvironments`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsEnvironments {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsEnvironments {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsEnvironments {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsEnvironments {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsEnvironments {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsIssues`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsIssues {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsIssues {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsIssues {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsIssues {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsIssues {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsMembers`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsMembers {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsMembers {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsMembers {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsMembers {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsMembers {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsMetadata`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsMetadata {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsMetadata {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsMetadata {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsMetadata {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsMetadata {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsOrganizationAdministration`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsOrganizationAdministration {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsOrganizationAdministration {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsOrganizationAdministration {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsOrganizationAdministration {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsOrganizationAdministration {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsOrganizationHooks`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsOrganizationHooks {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsOrganizationHooks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsOrganizationHooks {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsOrganizationHooks {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsOrganizationHooks {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsOrganizationPackages`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsOrganizationPackages {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsOrganizationPackages {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsOrganizationPackages {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsOrganizationPackages {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsOrganizationPackages {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsOrganizationPlan`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsOrganizationPlan {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsOrganizationPlan {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsOrganizationPlan {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsOrganizationPlan {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsOrganizationPlan {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsOrganizationProjects`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsOrganizationProjects {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsOrganizationProjects {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsOrganizationProjects {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsOrganizationProjects {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsOrganizationProjects {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsOrganizationSecrets`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsOrganizationSecrets {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsOrganizationSecrets {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsOrganizationSecrets {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsOrganizationSecrets {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsOrganizationSecrets {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsOrganizationSelfHostedRunners`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsOrganizationSelfHostedRunners {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsOrganizationSelfHostedRunners {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsOrganizationSelfHostedRunners {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsOrganizationSelfHostedRunners {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for AppPermissionsOrganizationSelfHostedRunners
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsOrganizationUserBlocking`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsOrganizationUserBlocking {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsOrganizationUserBlocking {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsOrganizationUserBlocking {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsOrganizationUserBlocking {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsOrganizationUserBlocking {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsPackages`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsPackages {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsPackages {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsPackages {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsPackages {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsPackages {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsPages`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsPages {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsPages {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsPages {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsPages {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsPages {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsPullRequests`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsPullRequests {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsPullRequests {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsPullRequests {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsPullRequests {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsPullRequests {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsRepositoryHooks`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsRepositoryHooks {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsRepositoryHooks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsRepositoryHooks {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsRepositoryHooks {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsRepositoryHooks {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsRepositoryProjects`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsRepositoryProjects {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsRepositoryProjects {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsRepositoryProjects {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsRepositoryProjects {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsRepositoryProjects {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsSecretScanningAlerts`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsSecretScanningAlerts {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsSecretScanningAlerts {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsSecretScanningAlerts {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsSecretScanningAlerts {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsSecretScanningAlerts {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsSecrets`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsSecrets {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsSecrets {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsSecrets {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsSecrets {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsSecrets {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsSecurityEvents`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsSecurityEvents {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsSecurityEvents {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsSecurityEvents {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsSecurityEvents {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsSecurityEvents {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsSecurityScanningAlert`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsSecurityScanningAlert {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsSecurityScanningAlert {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsSecurityScanningAlert {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsSecurityScanningAlert {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsSecurityScanningAlert {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsSingleFile`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsSingleFile {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsSingleFile {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsSingleFile {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsSingleFile {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsSingleFile {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsStatuses`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsStatuses {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsStatuses {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsStatuses {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsStatuses {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsStatuses {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsTeamDiscussions`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsTeamDiscussions {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsTeamDiscussions {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsTeamDiscussions {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsTeamDiscussions {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsTeamDiscussions {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsVulnerabilityAlerts`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsVulnerabilityAlerts {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsVulnerabilityAlerts {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsVulnerabilityAlerts {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsVulnerabilityAlerts {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsVulnerabilityAlerts {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`AppPermissionsWorkflows`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AppPermissionsWorkflows {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for AppPermissionsWorkflows {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for AppPermissionsWorkflows {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AppPermissionsWorkflows {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AppPermissionsWorkflows {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "How the author is associated with the repository."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum AuthorAssociation {
#[serde(rename = "COLLABORATOR")]
Collaborator,
#[serde(rename = "CONTRIBUTOR")]
Contributor,
#[serde(rename = "FIRST_TIMER")]
FirstTimer,
#[serde(rename = "FIRST_TIME_CONTRIBUTOR")]
FirstTimeContributor,
#[serde(rename = "MANNEQUIN")]
Mannequin,
#[serde(rename = "MEMBER")]
Member,
#[serde(rename = "NONE")]
None,
#[serde(rename = "OWNER")]
Owner,
}
impl ::std::fmt::Display for AuthorAssociation {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Collaborator => f.write_str("COLLABORATOR"),
Self::Contributor => f.write_str("CONTRIBUTOR"),
Self::FirstTimer => f.write_str("FIRST_TIMER"),
Self::FirstTimeContributor => f.write_str("FIRST_TIME_CONTRIBUTOR"),
Self::Mannequin => f.write_str("MANNEQUIN"),
Self::Member => f.write_str("MEMBER"),
Self::None => f.write_str("NONE"),
Self::Owner => f.write_str("OWNER"),
}
}
}
impl ::std::str::FromStr for AuthorAssociation {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"COLLABORATOR" => Ok(Self::Collaborator),
"CONTRIBUTOR" => Ok(Self::Contributor),
"FIRST_TIMER" => Ok(Self::FirstTimer),
"FIRST_TIME_CONTRIBUTOR" => Ok(Self::FirstTimeContributor),
"MANNEQUIN" => Ok(Self::Mannequin),
"MEMBER" => Ok(Self::Member),
"NONE" => Ok(Self::None),
"OWNER" => Ok(Self::Owner),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for AuthorAssociation {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for AuthorAssociation {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/en/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct BranchProtectionRule {
pub admin_enforced: bool,
pub allow_deletions_enforcement_level: BranchProtectionRuleAllowDeletionsEnforcementLevel,
pub allow_force_pushes_enforcement_level: BranchProtectionRuleAllowForcePushesEnforcementLevel,
pub authorized_actor_names: ::std::vec::Vec<::std::string::String>,
pub authorized_actors_only: bool,
pub authorized_dismissal_actors_only: bool,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub dismiss_stale_reviews_on_push: bool,
pub id: i64,
pub ignore_approvals_from_contributors: bool,
pub linear_history_requirement_enforcement_level:
BranchProtectionRuleLinearHistoryRequirementEnforcementLevel,
pub merge_queue_enforcement_level: BranchProtectionRuleMergeQueueEnforcementLevel,
pub name: ::std::string::String,
pub pull_request_reviews_enforcement_level:
BranchProtectionRulePullRequestReviewsEnforcementLevel,
pub repository_id: i64,
pub require_code_owner_review: bool,
pub required_approving_review_count: i64,
pub required_conversation_resolution_level:
BranchProtectionRuleRequiredConversationResolutionLevel,
pub required_deployments_enforcement_level:
BranchProtectionRuleRequiredDeploymentsEnforcementLevel,
pub required_status_checks: ::std::vec::Vec<::std::string::String>,
pub required_status_checks_enforcement_level:
BranchProtectionRuleRequiredStatusChecksEnforcementLevel,
pub signature_requirement_enforcement_level:
BranchProtectionRuleSignatureRequirementEnforcementLevel,
pub strict_required_status_checks_policy: bool,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
}
#[doc = "`BranchProtectionRuleAllowDeletionsEnforcementLevel`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BranchProtectionRuleAllowDeletionsEnforcementLevel {
#[serde(rename = "off")]
Off,
#[serde(rename = "non_admins")]
NonAdmins,
#[serde(rename = "everyone")]
Everyone,
}
impl ::std::fmt::Display for BranchProtectionRuleAllowDeletionsEnforcementLevel {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Off => f.write_str("off"),
Self::NonAdmins => f.write_str("non_admins"),
Self::Everyone => f.write_str("everyone"),
}
}
}
impl ::std::str::FromStr for BranchProtectionRuleAllowDeletionsEnforcementLevel {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"off" => Ok(Self::Off),
"non_admins" => Ok(Self::NonAdmins),
"everyone" => Ok(Self::Everyone),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BranchProtectionRuleAllowDeletionsEnforcementLevel {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BranchProtectionRuleAllowDeletionsEnforcementLevel
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BranchProtectionRuleAllowForcePushesEnforcementLevel`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BranchProtectionRuleAllowForcePushesEnforcementLevel {
#[serde(rename = "off")]
Off,
#[serde(rename = "non_admins")]
NonAdmins,
#[serde(rename = "everyone")]
Everyone,
}
impl ::std::fmt::Display for BranchProtectionRuleAllowForcePushesEnforcementLevel {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Off => f.write_str("off"),
Self::NonAdmins => f.write_str("non_admins"),
Self::Everyone => f.write_str("everyone"),
}
}
}
impl ::std::str::FromStr for BranchProtectionRuleAllowForcePushesEnforcementLevel {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"off" => Ok(Self::Off),
"non_admins" => Ok(Self::NonAdmins),
"everyone" => Ok(Self::Everyone),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BranchProtectionRuleAllowForcePushesEnforcementLevel {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BranchProtectionRuleAllowForcePushesEnforcementLevel
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "Activity related to a branch protection rule. For more information, see \"[About branch protection rules](https://docs.github.com/en/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-rules).\""]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct BranchProtectionRuleCreated {
pub action: BranchProtectionRuleCreatedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub rule: BranchProtectionRule,
pub sender: User,
}
#[doc = "`BranchProtectionRuleCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BranchProtectionRuleCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for BranchProtectionRuleCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for BranchProtectionRuleCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BranchProtectionRuleCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for BranchProtectionRuleCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "Activity related to a branch protection rule. For more information, see \"[About branch protection rules](https://docs.github.com/en/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-rules).\""]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct BranchProtectionRuleDeleted {
pub action: BranchProtectionRuleDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub rule: BranchProtectionRule,
pub sender: User,
}
#[doc = "`BranchProtectionRuleDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BranchProtectionRuleDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for BranchProtectionRuleDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for BranchProtectionRuleDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BranchProtectionRuleDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for BranchProtectionRuleDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "Activity related to a branch protection rule. For more information, see \"[About branch protection rules](https://docs.github.com/en/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-rules).\""]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct BranchProtectionRuleEdited {
pub action: BranchProtectionRuleEditedAction,
pub changes: BranchProtectionRuleEditedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub rule: BranchProtectionRule,
pub sender: User,
}
#[doc = "`BranchProtectionRuleEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BranchProtectionRuleEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for BranchProtectionRuleEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for BranchProtectionRuleEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BranchProtectionRuleEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for BranchProtectionRuleEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "If the action was `edited`, the changes to the rule."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct BranchProtectionRuleEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub authorized_actor_names:
::std::option::Option<BranchProtectionRuleEditedChangesAuthorizedActorNames>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub authorized_actors_only:
::std::option::Option<BranchProtectionRuleEditedChangesAuthorizedActorsOnly>,
}
#[doc = "`BranchProtectionRuleEditedChangesAuthorizedActorNames`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct BranchProtectionRuleEditedChangesAuthorizedActorNames {
pub from: ::std::vec::Vec<::std::string::String>,
}
#[doc = "`BranchProtectionRuleEditedChangesAuthorizedActorsOnly`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct BranchProtectionRuleEditedChangesAuthorizedActorsOnly {
pub from: bool,
}
#[doc = "`BranchProtectionRuleEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum BranchProtectionRuleEvent {
Created(BranchProtectionRuleCreated),
Deleted(BranchProtectionRuleDeleted),
Edited(BranchProtectionRuleEdited),
}
impl ::std::convert::From<BranchProtectionRuleCreated> for BranchProtectionRuleEvent {
fn from(value: BranchProtectionRuleCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<BranchProtectionRuleDeleted> for BranchProtectionRuleEvent {
fn from(value: BranchProtectionRuleDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<BranchProtectionRuleEdited> for BranchProtectionRuleEvent {
fn from(value: BranchProtectionRuleEdited) -> Self {
Self::Edited(value)
}
}
#[doc = "`BranchProtectionRuleLinearHistoryRequirementEnforcementLevel`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BranchProtectionRuleLinearHistoryRequirementEnforcementLevel {
#[serde(rename = "off")]
Off,
#[serde(rename = "non_admins")]
NonAdmins,
#[serde(rename = "everyone")]
Everyone,
}
impl ::std::fmt::Display for BranchProtectionRuleLinearHistoryRequirementEnforcementLevel {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Off => f.write_str("off"),
Self::NonAdmins => f.write_str("non_admins"),
Self::Everyone => f.write_str("everyone"),
}
}
}
impl ::std::str::FromStr for BranchProtectionRuleLinearHistoryRequirementEnforcementLevel {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"off" => Ok(Self::Off),
"non_admins" => Ok(Self::NonAdmins),
"everyone" => Ok(Self::Everyone),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for BranchProtectionRuleLinearHistoryRequirementEnforcementLevel
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BranchProtectionRuleLinearHistoryRequirementEnforcementLevel
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BranchProtectionRuleMergeQueueEnforcementLevel`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BranchProtectionRuleMergeQueueEnforcementLevel {
#[serde(rename = "off")]
Off,
#[serde(rename = "non_admins")]
NonAdmins,
#[serde(rename = "everyone")]
Everyone,
}
impl ::std::fmt::Display for BranchProtectionRuleMergeQueueEnforcementLevel {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Off => f.write_str("off"),
Self::NonAdmins => f.write_str("non_admins"),
Self::Everyone => f.write_str("everyone"),
}
}
}
impl ::std::str::FromStr for BranchProtectionRuleMergeQueueEnforcementLevel {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"off" => Ok(Self::Off),
"non_admins" => Ok(Self::NonAdmins),
"everyone" => Ok(Self::Everyone),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BranchProtectionRuleMergeQueueEnforcementLevel {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BranchProtectionRuleMergeQueueEnforcementLevel
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BranchProtectionRulePullRequestReviewsEnforcementLevel`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BranchProtectionRulePullRequestReviewsEnforcementLevel {
#[serde(rename = "off")]
Off,
#[serde(rename = "non_admins")]
NonAdmins,
#[serde(rename = "everyone")]
Everyone,
}
impl ::std::fmt::Display for BranchProtectionRulePullRequestReviewsEnforcementLevel {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Off => f.write_str("off"),
Self::NonAdmins => f.write_str("non_admins"),
Self::Everyone => f.write_str("everyone"),
}
}
}
impl ::std::str::FromStr for BranchProtectionRulePullRequestReviewsEnforcementLevel {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"off" => Ok(Self::Off),
"non_admins" => Ok(Self::NonAdmins),
"everyone" => Ok(Self::Everyone),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BranchProtectionRulePullRequestReviewsEnforcementLevel {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BranchProtectionRulePullRequestReviewsEnforcementLevel
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BranchProtectionRuleRequiredConversationResolutionLevel`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BranchProtectionRuleRequiredConversationResolutionLevel {
#[serde(rename = "off")]
Off,
#[serde(rename = "non_admins")]
NonAdmins,
#[serde(rename = "everyone")]
Everyone,
}
impl ::std::fmt::Display for BranchProtectionRuleRequiredConversationResolutionLevel {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Off => f.write_str("off"),
Self::NonAdmins => f.write_str("non_admins"),
Self::Everyone => f.write_str("everyone"),
}
}
}
impl ::std::str::FromStr for BranchProtectionRuleRequiredConversationResolutionLevel {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"off" => Ok(Self::Off),
"non_admins" => Ok(Self::NonAdmins),
"everyone" => Ok(Self::Everyone),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BranchProtectionRuleRequiredConversationResolutionLevel {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BranchProtectionRuleRequiredConversationResolutionLevel
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BranchProtectionRuleRequiredDeploymentsEnforcementLevel`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BranchProtectionRuleRequiredDeploymentsEnforcementLevel {
#[serde(rename = "off")]
Off,
#[serde(rename = "non_admins")]
NonAdmins,
#[serde(rename = "everyone")]
Everyone,
}
impl ::std::fmt::Display for BranchProtectionRuleRequiredDeploymentsEnforcementLevel {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Off => f.write_str("off"),
Self::NonAdmins => f.write_str("non_admins"),
Self::Everyone => f.write_str("everyone"),
}
}
}
impl ::std::str::FromStr for BranchProtectionRuleRequiredDeploymentsEnforcementLevel {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"off" => Ok(Self::Off),
"non_admins" => Ok(Self::NonAdmins),
"everyone" => Ok(Self::Everyone),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BranchProtectionRuleRequiredDeploymentsEnforcementLevel {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BranchProtectionRuleRequiredDeploymentsEnforcementLevel
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BranchProtectionRuleRequiredStatusChecksEnforcementLevel`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BranchProtectionRuleRequiredStatusChecksEnforcementLevel {
#[serde(rename = "off")]
Off,
#[serde(rename = "non_admins")]
NonAdmins,
#[serde(rename = "everyone")]
Everyone,
}
impl ::std::fmt::Display for BranchProtectionRuleRequiredStatusChecksEnforcementLevel {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Off => f.write_str("off"),
Self::NonAdmins => f.write_str("non_admins"),
Self::Everyone => f.write_str("everyone"),
}
}
}
impl ::std::str::FromStr for BranchProtectionRuleRequiredStatusChecksEnforcementLevel {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"off" => Ok(Self::Off),
"non_admins" => Ok(Self::NonAdmins),
"everyone" => Ok(Self::Everyone),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BranchProtectionRuleRequiredStatusChecksEnforcementLevel {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BranchProtectionRuleRequiredStatusChecksEnforcementLevel
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`BranchProtectionRuleSignatureRequirementEnforcementLevel`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum BranchProtectionRuleSignatureRequirementEnforcementLevel {
#[serde(rename = "off")]
Off,
#[serde(rename = "non_admins")]
NonAdmins,
#[serde(rename = "everyone")]
Everyone,
}
impl ::std::fmt::Display for BranchProtectionRuleSignatureRequirementEnforcementLevel {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Off => f.write_str("off"),
Self::NonAdmins => f.write_str("non_admins"),
Self::Everyone => f.write_str("everyone"),
}
}
}
impl ::std::str::FromStr for BranchProtectionRuleSignatureRequirementEnforcementLevel {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"off" => Ok(Self::Off),
"non_admins" => Ok(Self::NonAdmins),
"everyone" => Ok(Self::Everyone),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for BranchProtectionRuleSignatureRequirementEnforcementLevel {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for BranchProtectionRuleSignatureRequirementEnforcementLevel
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CheckRunCompleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunCompleted {
pub action: CheckRunCompletedAction,
pub check_run: CheckRunCompletedCheckRun,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
#[doc = "The action requested by the user."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub requested_action: ::std::option::Option<CheckRunCompletedRequestedAction>,
pub sender: User,
}
#[doc = "`CheckRunCompletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunCompletedAction {
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for CheckRunCompletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for CheckRunCompletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunCompletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunCompletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [check_run](https://docs.github.com/en/rest/reference/checks#get-a-check-run)."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunCompletedCheckRun {
pub app: App,
pub check_suite: CheckRunCompletedCheckRunCheckSuite,
#[doc = "The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`."]
pub completed_at: ::std::string::String,
#[doc = "The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub conclusion: ::std::option::Option<CheckRunCompletedCheckRunConclusion>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub details_url: ::std::option::Option<::std::string::String>,
pub external_id: ::std::string::String,
#[doc = "The SHA of the commit that is being checked."]
pub head_sha: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "The id of the check."]
pub id: i64,
#[doc = "The name of the check run."]
pub name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub node_id: ::std::option::Option<::std::string::String>,
pub output: CheckRunCompletedCheckRunOutput,
pub pull_requests: ::std::vec::Vec<CheckRunPullRequest>,
#[doc = "The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`."]
pub started_at: ::std::string::String,
#[doc = "The current status of the check run. Can be `queued`, `in_progress`, or `completed`."]
pub status: CheckRunCompletedCheckRunStatus,
pub url: ::std::string::String,
}
#[doc = "`CheckRunCompletedCheckRunCheckSuite`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunCompletedCheckRunCheckSuite {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub after: ::std::option::Option<::std::string::String>,
pub app: App,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub before: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub conclusion: ::std::option::Option<CheckRunCompletedCheckRunCheckSuiteConclusion>,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub deployment: ::std::option::Option<CheckRunDeployment>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub head_branch: ::std::option::Option<::std::string::String>,
#[doc = "The SHA of the head commit that is being checked."]
pub head_sha: ::std::string::String,
#[doc = "The id of the check suite that this check run is part of."]
pub id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub node_id: ::std::option::Option<::std::string::String>,
#[doc = "An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty."]
pub pull_requests: ::std::vec::Vec<CheckRunPullRequest>,
pub status: CheckRunCompletedCheckRunCheckSuiteStatus,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`CheckRunCompletedCheckRunCheckSuiteConclusion`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunCompletedCheckRunCheckSuiteConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
}
impl ::std::fmt::Display for CheckRunCompletedCheckRunCheckSuiteConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
}
}
}
impl ::std::str::FromStr for CheckRunCompletedCheckRunCheckSuiteConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunCompletedCheckRunCheckSuiteConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CheckRunCompletedCheckRunCheckSuiteConclusion
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CheckRunCompletedCheckRunCheckSuiteStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunCompletedCheckRunCheckSuiteStatus {
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
#[serde(rename = "queued")]
Queued,
}
impl ::std::fmt::Display for CheckRunCompletedCheckRunCheckSuiteStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
Self::Queued => f.write_str("queued"),
}
}
}
impl ::std::str::FromStr for CheckRunCompletedCheckRunCheckSuiteStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
"queued" => Ok(Self::Queued),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunCompletedCheckRunCheckSuiteStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunCompletedCheckRunCheckSuiteStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunCompletedCheckRunConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
#[serde(rename = "skipped")]
Skipped,
}
impl ::std::fmt::Display for CheckRunCompletedCheckRunConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
Self::Skipped => f.write_str("skipped"),
}
}
}
impl ::std::str::FromStr for CheckRunCompletedCheckRunConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
"skipped" => Ok(Self::Skipped),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunCompletedCheckRunConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunCompletedCheckRunConclusion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CheckRunCompletedCheckRunOutput`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunCompletedCheckRunOutput {
pub annotations_count: i64,
pub annotations_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub summary: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub text: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<::std::string::String>,
}
#[doc = "The current status of the check run. Can be `queued`, `in_progress`, or `completed`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunCompletedCheckRunStatus {
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for CheckRunCompletedCheckRunStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for CheckRunCompletedCheckRunStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunCompletedCheckRunStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunCompletedCheckRunStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The action requested by the user."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CheckRunCompletedRequestedAction {
#[doc = "The integrator reference of the action requested by the user."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub identifier: ::std::option::Option<::std::string::String>,
}
#[doc = "`CheckRunCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunCreated {
pub action: CheckRunCreatedAction,
pub check_run: CheckRunCreatedCheckRun,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
#[doc = "The action requested by the user."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub requested_action: ::std::option::Option<CheckRunCreatedRequestedAction>,
pub sender: User,
}
#[doc = "`CheckRunCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for CheckRunCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for CheckRunCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [check_run](https://docs.github.com/en/rest/reference/checks#get-a-check-run)."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunCreatedCheckRun {
pub app: App,
pub check_suite: CheckRunCreatedCheckRunCheckSuite,
#[doc = "The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub completed_at: ::std::option::Option<::std::string::String>,
#[doc = "The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub conclusion: ::std::option::Option<CheckRunCreatedCheckRunConclusion>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub details_url: ::std::option::Option<::std::string::String>,
pub external_id: ::std::string::String,
#[doc = "The SHA of the commit that is being checked."]
pub head_sha: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "The id of the check."]
pub id: i64,
#[doc = "The name of the check run."]
pub name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub node_id: ::std::option::Option<::std::string::String>,
pub output: CheckRunCreatedCheckRunOutput,
pub pull_requests: ::std::vec::Vec<CheckRunPullRequest>,
#[doc = "The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`."]
pub started_at: ::std::string::String,
#[doc = "The current status of the check run. Can be `queued`, `in_progress`, or `completed`."]
pub status: CheckRunCreatedCheckRunStatus,
pub url: ::std::string::String,
}
#[doc = "`CheckRunCreatedCheckRunCheckSuite`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunCreatedCheckRunCheckSuite {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub after: ::std::option::Option<::std::string::String>,
pub app: App,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub before: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub conclusion: ::std::option::Option<CheckRunCreatedCheckRunCheckSuiteConclusion>,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub deployment: ::std::option::Option<CheckRunDeployment>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub head_branch: ::std::option::Option<::std::string::String>,
#[doc = "The SHA of the head commit that is being checked."]
pub head_sha: ::std::string::String,
#[doc = "The id of the check suite that this check run is part of."]
pub id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub node_id: ::std::option::Option<::std::string::String>,
#[doc = "An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty."]
pub pull_requests: ::std::vec::Vec<CheckRunPullRequest>,
pub status: CheckRunCreatedCheckRunCheckSuiteStatus,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`CheckRunCreatedCheckRunCheckSuiteConclusion`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunCreatedCheckRunCheckSuiteConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
}
impl ::std::fmt::Display for CheckRunCreatedCheckRunCheckSuiteConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
}
}
}
impl ::std::str::FromStr for CheckRunCreatedCheckRunCheckSuiteConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunCreatedCheckRunCheckSuiteConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CheckRunCreatedCheckRunCheckSuiteConclusion
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CheckRunCreatedCheckRunCheckSuiteStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunCreatedCheckRunCheckSuiteStatus {
#[serde(rename = "queued")]
Queued,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for CheckRunCreatedCheckRunCheckSuiteStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Queued => f.write_str("queued"),
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for CheckRunCreatedCheckRunCheckSuiteStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"queued" => Ok(Self::Queued),
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunCreatedCheckRunCheckSuiteStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunCreatedCheckRunCheckSuiteStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunCreatedCheckRunConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
#[serde(rename = "skipped")]
Skipped,
}
impl ::std::fmt::Display for CheckRunCreatedCheckRunConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
Self::Skipped => f.write_str("skipped"),
}
}
}
impl ::std::str::FromStr for CheckRunCreatedCheckRunConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
"skipped" => Ok(Self::Skipped),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunCreatedCheckRunConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunCreatedCheckRunConclusion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CheckRunCreatedCheckRunOutput`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunCreatedCheckRunOutput {
pub annotations_count: i64,
pub annotations_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub summary: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub text: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<::std::string::String>,
}
#[doc = "The current status of the check run. Can be `queued`, `in_progress`, or `completed`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunCreatedCheckRunStatus {
#[serde(rename = "queued")]
Queued,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for CheckRunCreatedCheckRunStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Queued => f.write_str("queued"),
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for CheckRunCreatedCheckRunStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"queued" => Ok(Self::Queued),
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunCreatedCheckRunStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunCreatedCheckRunStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The action requested by the user."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CheckRunCreatedRequestedAction {
#[doc = "The integrator reference of the action requested by the user."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub identifier: ::std::option::Option<::std::string::String>,
}
#[doc = "A deployment to a repository environment. This will only be populated if the check run was created by a GitHub Actions workflow job that references an environment."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunDeployment {
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
pub environment: ::std::string::String,
pub id: i64,
pub node_id: ::std::string::String,
pub original_environment: ::std::string::String,
pub repository_url: ::std::string::String,
pub statuses_url: ::std::string::String,
pub task: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`CheckRunEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CheckRunEvent {
Completed(CheckRunCompleted),
Created(CheckRunCreated),
RequestedAction(CheckRunRequestedAction),
Rerequested(CheckRunRerequested),
}
impl ::std::convert::From<CheckRunCompleted> for CheckRunEvent {
fn from(value: CheckRunCompleted) -> Self {
Self::Completed(value)
}
}
impl ::std::convert::From<CheckRunCreated> for CheckRunEvent {
fn from(value: CheckRunCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<CheckRunRequestedAction> for CheckRunEvent {
fn from(value: CheckRunRequestedAction) -> Self {
Self::RequestedAction(value)
}
}
impl ::std::convert::From<CheckRunRerequested> for CheckRunEvent {
fn from(value: CheckRunRerequested) -> Self {
Self::Rerequested(value)
}
}
#[doc = "`CheckRunPullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunPullRequest {
pub base: CheckRunPullRequestBase,
pub head: CheckRunPullRequestHead,
pub id: i64,
pub number: i64,
pub url: ::std::string::String,
}
#[doc = "`CheckRunPullRequestBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunPullRequestBase {
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: RepoRef,
pub sha: ::std::string::String,
}
#[doc = "`CheckRunPullRequestHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunPullRequestHead {
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: RepoRef,
pub sha: ::std::string::String,
}
#[doc = "`CheckRunRequestedAction`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunRequestedAction {
pub action: CheckRunRequestedActionAction,
pub check_run: CheckRunRequestedActionCheckRun,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub requested_action: CheckRunRequestedActionRequestedAction,
pub sender: User,
}
#[doc = "`CheckRunRequestedActionAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunRequestedActionAction {
#[serde(rename = "requested_action")]
RequestedAction,
}
impl ::std::fmt::Display for CheckRunRequestedActionAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::RequestedAction => f.write_str("requested_action"),
}
}
}
impl ::std::str::FromStr for CheckRunRequestedActionAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"requested_action" => Ok(Self::RequestedAction),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunRequestedActionAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunRequestedActionAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [check_run](https://docs.github.com/en/rest/reference/checks#get-a-check-run)."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunRequestedActionCheckRun {
pub app: App,
pub check_suite: CheckRunRequestedActionCheckRunCheckSuite,
#[doc = "The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub completed_at: ::std::option::Option<::std::string::String>,
#[doc = "The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub conclusion: ::std::option::Option<CheckRunRequestedActionCheckRunConclusion>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub details_url: ::std::option::Option<::std::string::String>,
pub external_id: ::std::string::String,
#[doc = "The SHA of the commit that is being checked."]
pub head_sha: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "The id of the check."]
pub id: i64,
#[doc = "The name of the check run."]
pub name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub node_id: ::std::option::Option<::std::string::String>,
pub output: CheckRunRequestedActionCheckRunOutput,
pub pull_requests: ::std::vec::Vec<CheckRunPullRequest>,
#[doc = "The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`."]
pub started_at: ::std::string::String,
#[doc = "The current status of the check run. Can be `queued`, `in_progress`, or `completed`."]
pub status: CheckRunRequestedActionCheckRunStatus,
pub url: ::std::string::String,
}
#[doc = "`CheckRunRequestedActionCheckRunCheckSuite`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunRequestedActionCheckRunCheckSuite {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub after: ::std::option::Option<::std::string::String>,
pub app: App,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub before: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub conclusion: ::std::option::Option<CheckRunRequestedActionCheckRunCheckSuiteConclusion>,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub deployment: ::std::option::Option<CheckRunDeployment>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub head_branch: ::std::option::Option<::std::string::String>,
#[doc = "The SHA of the head commit that is being checked."]
pub head_sha: ::std::string::String,
#[doc = "The id of the check suite that this check run is part of."]
pub id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub node_id: ::std::option::Option<::std::string::String>,
#[doc = "An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty."]
pub pull_requests: ::std::vec::Vec<CheckRunPullRequest>,
pub status: CheckRunRequestedActionCheckRunCheckSuiteStatus,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`CheckRunRequestedActionCheckRunCheckSuiteConclusion`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunRequestedActionCheckRunCheckSuiteConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
}
impl ::std::fmt::Display for CheckRunRequestedActionCheckRunCheckSuiteConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
}
}
}
impl ::std::str::FromStr for CheckRunRequestedActionCheckRunCheckSuiteConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunRequestedActionCheckRunCheckSuiteConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CheckRunRequestedActionCheckRunCheckSuiteConclusion
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CheckRunRequestedActionCheckRunCheckSuiteStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunRequestedActionCheckRunCheckSuiteStatus {
#[serde(rename = "queued")]
Queued,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for CheckRunRequestedActionCheckRunCheckSuiteStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Queued => f.write_str("queued"),
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for CheckRunRequestedActionCheckRunCheckSuiteStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"queued" => Ok(Self::Queued),
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunRequestedActionCheckRunCheckSuiteStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CheckRunRequestedActionCheckRunCheckSuiteStatus
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunRequestedActionCheckRunConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
#[serde(rename = "skipped")]
Skipped,
}
impl ::std::fmt::Display for CheckRunRequestedActionCheckRunConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
Self::Skipped => f.write_str("skipped"),
}
}
}
impl ::std::str::FromStr for CheckRunRequestedActionCheckRunConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
"skipped" => Ok(Self::Skipped),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunRequestedActionCheckRunConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunRequestedActionCheckRunConclusion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CheckRunRequestedActionCheckRunOutput`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunRequestedActionCheckRunOutput {
pub annotations_count: i64,
pub annotations_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub summary: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub text: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<::std::string::String>,
}
#[doc = "The current status of the check run. Can be `queued`, `in_progress`, or `completed`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunRequestedActionCheckRunStatus {
#[serde(rename = "queued")]
Queued,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for CheckRunRequestedActionCheckRunStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Queued => f.write_str("queued"),
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for CheckRunRequestedActionCheckRunStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"queued" => Ok(Self::Queued),
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunRequestedActionCheckRunStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunRequestedActionCheckRunStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The action requested by the user."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CheckRunRequestedActionRequestedAction {
#[doc = "The integrator reference of the action requested by the user."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub identifier: ::std::option::Option<::std::string::String>,
}
#[doc = "`CheckRunRerequested`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunRerequested {
pub action: CheckRunRerequestedAction,
pub check_run: CheckRunRerequestedCheckRun,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
#[doc = "The action requested by the user."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub requested_action: ::std::option::Option<CheckRunRerequestedRequestedAction>,
pub sender: User,
}
#[doc = "`CheckRunRerequestedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunRerequestedAction {
#[serde(rename = "rerequested")]
Rerequested,
}
impl ::std::fmt::Display for CheckRunRerequestedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Rerequested => f.write_str("rerequested"),
}
}
}
impl ::std::str::FromStr for CheckRunRerequestedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"rerequested" => Ok(Self::Rerequested),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunRerequestedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunRerequestedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [check_run](https://docs.github.com/en/rest/reference/checks#get-a-check-run)."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunRerequestedCheckRun {
pub app: App,
pub check_suite: CheckRunRerequestedCheckRunCheckSuite,
#[doc = "The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`."]
pub completed_at: ::std::string::String,
#[doc = "The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub conclusion: ::std::option::Option<CheckRunRerequestedCheckRunConclusion>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub details_url: ::std::option::Option<::std::string::String>,
pub external_id: ::std::string::String,
#[doc = "The SHA of the commit that is being checked."]
pub head_sha: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "The id of the check."]
pub id: i64,
#[doc = "The name of the check."]
pub name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub node_id: ::std::option::Option<::std::string::String>,
pub output: CheckRunRerequestedCheckRunOutput,
pub pull_requests: ::std::vec::Vec<CheckRunPullRequest>,
#[doc = "The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`."]
pub started_at: ::std::string::String,
#[doc = "The phase of the lifecycle that the check is currently in."]
pub status: CheckRunRerequestedCheckRunStatus,
pub url: ::std::string::String,
}
#[doc = "`CheckRunRerequestedCheckRunCheckSuite`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunRerequestedCheckRunCheckSuite {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub after: ::std::option::Option<::std::string::String>,
pub app: App,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub before: ::std::option::Option<::std::string::String>,
pub conclusion: CheckRunRerequestedCheckRunCheckSuiteConclusion,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub deployment: ::std::option::Option<CheckRunDeployment>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub head_branch: ::std::option::Option<::std::string::String>,
#[doc = "The SHA of the head commit that is being checked."]
pub head_sha: ::std::string::String,
#[doc = "The id of the check suite that this check run is part of."]
pub id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub node_id: ::std::option::Option<::std::string::String>,
#[doc = "An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty."]
pub pull_requests: ::std::vec::Vec<CheckRunPullRequest>,
pub status: CheckRunRerequestedCheckRunCheckSuiteStatus,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`CheckRunRerequestedCheckRunCheckSuiteConclusion`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunRerequestedCheckRunCheckSuiteConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
}
impl ::std::fmt::Display for CheckRunRerequestedCheckRunCheckSuiteConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
}
}
}
impl ::std::str::FromStr for CheckRunRerequestedCheckRunCheckSuiteConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunRerequestedCheckRunCheckSuiteConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CheckRunRerequestedCheckRunCheckSuiteConclusion
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CheckRunRerequestedCheckRunCheckSuiteStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunRerequestedCheckRunCheckSuiteStatus {
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for CheckRunRerequestedCheckRunCheckSuiteStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for CheckRunRerequestedCheckRunCheckSuiteStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunRerequestedCheckRunCheckSuiteStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CheckRunRerequestedCheckRunCheckSuiteStatus
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunRerequestedCheckRunConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
#[serde(rename = "skipped")]
Skipped,
}
impl ::std::fmt::Display for CheckRunRerequestedCheckRunConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
Self::Skipped => f.write_str("skipped"),
}
}
}
impl ::std::str::FromStr for CheckRunRerequestedCheckRunConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
"skipped" => Ok(Self::Skipped),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunRerequestedCheckRunConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunRerequestedCheckRunConclusion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CheckRunRerequestedCheckRunOutput`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckRunRerequestedCheckRunOutput {
pub annotations_count: i64,
pub annotations_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub summary: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub text: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<::std::string::String>,
}
#[doc = "The phase of the lifecycle that the check is currently in."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckRunRerequestedCheckRunStatus {
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for CheckRunRerequestedCheckRunStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for CheckRunRerequestedCheckRunStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckRunRerequestedCheckRunStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckRunRerequestedCheckRunStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The action requested by the user."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CheckRunRerequestedRequestedAction {
#[doc = "The integrator reference of the action requested by the user."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub identifier: ::std::option::Option<::std::string::String>,
}
#[doc = "`CheckSuiteCompleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckSuiteCompleted {
pub action: CheckSuiteCompletedAction,
pub check_suite: CheckSuiteCompletedCheckSuite,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`CheckSuiteCompletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckSuiteCompletedAction {
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for CheckSuiteCompletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for CheckSuiteCompletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckSuiteCompletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckSuiteCompletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [check_suite](https://docs.github.com/en/rest/reference/checks#suites)."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckSuiteCompletedCheckSuite {
pub after: ::std::string::String,
pub app: App,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub before: ::std::option::Option<::std::string::String>,
pub check_runs_url: ::std::string::String,
#[doc = "The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub conclusion: ::std::option::Option<CheckSuiteCompletedCheckSuiteConclusion>,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The head branch name the changes are on."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub head_branch: ::std::option::Option<::std::string::String>,
pub head_commit: CommitSimple,
#[doc = "The SHA of the head commit that is being checked."]
pub head_sha: ::std::string::String,
pub id: i64,
pub latest_check_runs_count: i64,
pub node_id: ::std::string::String,
#[doc = "An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty."]
pub pull_requests: ::std::vec::Vec<CheckRunPullRequest>,
#[doc = "The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub status: ::std::option::Option<CheckSuiteCompletedCheckSuiteStatus>,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL that points to the check suite API resource."]
pub url: ::std::string::String,
}
#[doc = "The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckSuiteCompletedCheckSuiteConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
}
impl ::std::fmt::Display for CheckSuiteCompletedCheckSuiteConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
}
}
}
impl ::std::str::FromStr for CheckSuiteCompletedCheckSuiteConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckSuiteCompletedCheckSuiteConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckSuiteCompletedCheckSuiteConclusion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckSuiteCompletedCheckSuiteStatus {
#[serde(rename = "requested")]
Requested,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
#[serde(rename = "queued")]
Queued,
}
impl ::std::fmt::Display for CheckSuiteCompletedCheckSuiteStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Requested => f.write_str("requested"),
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
Self::Queued => f.write_str("queued"),
}
}
}
impl ::std::str::FromStr for CheckSuiteCompletedCheckSuiteStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"requested" => Ok(Self::Requested),
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
"queued" => Ok(Self::Queued),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckSuiteCompletedCheckSuiteStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckSuiteCompletedCheckSuiteStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CheckSuiteEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CheckSuiteEvent {
Completed(CheckSuiteCompleted),
Requested(CheckSuiteRequested),
Rerequested(CheckSuiteRerequested),
}
impl ::std::convert::From<CheckSuiteCompleted> for CheckSuiteEvent {
fn from(value: CheckSuiteCompleted) -> Self {
Self::Completed(value)
}
}
impl ::std::convert::From<CheckSuiteRequested> for CheckSuiteEvent {
fn from(value: CheckSuiteRequested) -> Self {
Self::Requested(value)
}
}
impl ::std::convert::From<CheckSuiteRerequested> for CheckSuiteEvent {
fn from(value: CheckSuiteRerequested) -> Self {
Self::Rerequested(value)
}
}
#[doc = "`CheckSuiteRequested`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckSuiteRequested {
pub action: CheckSuiteRequestedAction,
pub check_suite: CheckSuiteRequestedCheckSuite,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`CheckSuiteRequestedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckSuiteRequestedAction {
#[serde(rename = "requested")]
Requested,
}
impl ::std::fmt::Display for CheckSuiteRequestedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Requested => f.write_str("requested"),
}
}
}
impl ::std::str::FromStr for CheckSuiteRequestedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"requested" => Ok(Self::Requested),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckSuiteRequestedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckSuiteRequestedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [check_suite](https://docs.github.com/en/rest/reference/checks#suites)."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckSuiteRequestedCheckSuite {
pub after: ::std::string::String,
pub app: App,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub before: ::std::option::Option<::std::string::String>,
pub check_runs_url: ::std::string::String,
#[doc = "The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub conclusion: ::std::option::Option<CheckSuiteRequestedCheckSuiteConclusion>,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The head branch name the changes are on."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub head_branch: ::std::option::Option<::std::string::String>,
pub head_commit: CommitSimple,
#[doc = "The SHA of the head commit that is being checked."]
pub head_sha: ::std::string::String,
pub id: i64,
pub latest_check_runs_count: i64,
pub node_id: ::std::string::String,
#[doc = "An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty."]
pub pull_requests: ::std::vec::Vec<CheckRunPullRequest>,
#[doc = "The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub status: ::std::option::Option<CheckSuiteRequestedCheckSuiteStatus>,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL that points to the check suite API resource."]
pub url: ::std::string::String,
}
#[doc = "The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckSuiteRequestedCheckSuiteConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
}
impl ::std::fmt::Display for CheckSuiteRequestedCheckSuiteConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
}
}
}
impl ::std::str::FromStr for CheckSuiteRequestedCheckSuiteConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckSuiteRequestedCheckSuiteConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckSuiteRequestedCheckSuiteConclusion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckSuiteRequestedCheckSuiteStatus {
#[serde(rename = "requested")]
Requested,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
#[serde(rename = "queued")]
Queued,
}
impl ::std::fmt::Display for CheckSuiteRequestedCheckSuiteStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Requested => f.write_str("requested"),
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
Self::Queued => f.write_str("queued"),
}
}
}
impl ::std::str::FromStr for CheckSuiteRequestedCheckSuiteStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"requested" => Ok(Self::Requested),
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
"queued" => Ok(Self::Queued),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckSuiteRequestedCheckSuiteStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckSuiteRequestedCheckSuiteStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CheckSuiteRerequested`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckSuiteRerequested {
pub action: CheckSuiteRerequestedAction,
pub check_suite: CheckSuiteRerequestedCheckSuite,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`CheckSuiteRerequestedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckSuiteRerequestedAction {
#[serde(rename = "rerequested")]
Rerequested,
}
impl ::std::fmt::Display for CheckSuiteRerequestedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Rerequested => f.write_str("rerequested"),
}
}
}
impl ::std::str::FromStr for CheckSuiteRerequestedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"rerequested" => Ok(Self::Rerequested),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckSuiteRerequestedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckSuiteRerequestedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [check_suite](https://docs.github.com/en/rest/reference/checks#suites)."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CheckSuiteRerequestedCheckSuite {
pub after: ::std::string::String,
pub app: App,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub before: ::std::option::Option<::std::string::String>,
pub check_runs_url: ::std::string::String,
#[doc = "The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub conclusion: ::std::option::Option<CheckSuiteRerequestedCheckSuiteConclusion>,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The head branch name the changes are on."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub head_branch: ::std::option::Option<::std::string::String>,
pub head_commit: CommitSimple,
#[doc = "The SHA of the head commit that is being checked."]
pub head_sha: ::std::string::String,
pub id: i64,
pub latest_check_runs_count: i64,
pub node_id: ::std::string::String,
#[doc = "An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty."]
pub pull_requests: ::std::vec::Vec<CheckRunPullRequest>,
#[doc = "The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub status: ::std::option::Option<CheckSuiteRerequestedCheckSuiteStatus>,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL that points to the check suite API resource."]
pub url: ::std::string::String,
}
#[doc = "The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckSuiteRerequestedCheckSuiteConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
}
impl ::std::fmt::Display for CheckSuiteRerequestedCheckSuiteConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
}
}
}
impl ::std::str::FromStr for CheckSuiteRerequestedCheckSuiteConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckSuiteRerequestedCheckSuiteConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckSuiteRerequestedCheckSuiteConclusion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CheckSuiteRerequestedCheckSuiteStatus {
#[serde(rename = "requested")]
Requested,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
#[serde(rename = "queued")]
Queued,
}
impl ::std::fmt::Display for CheckSuiteRerequestedCheckSuiteStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Requested => f.write_str("requested"),
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
Self::Queued => f.write_str("queued"),
}
}
}
impl ::std::str::FromStr for CheckSuiteRerequestedCheckSuiteStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"requested" => Ok(Self::Requested),
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
"queued" => Ok(Self::Queued),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CheckSuiteRerequestedCheckSuiteStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CheckSuiteRerequestedCheckSuiteStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertAppearedInBranch`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertAppearedInBranch {
pub action: CodeScanningAlertAppearedInBranchAction,
pub alert: CodeScanningAlertAppearedInBranchAlert,
#[doc = "The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty."]
pub commit_oid: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
#[doc = "The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repository: Repository,
pub sender: GithubOrg,
}
#[doc = "`CodeScanningAlertAppearedInBranchAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertAppearedInBranchAction {
#[serde(rename = "appeared_in_branch")]
AppearedInBranch,
}
impl ::std::fmt::Display for CodeScanningAlertAppearedInBranchAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::AppearedInBranch => f.write_str("appeared_in_branch"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertAppearedInBranchAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"appeared_in_branch" => Ok(Self::AppearedInBranch),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertAppearedInBranchAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertAppearedInBranchAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The code scanning alert involved in the event."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertAppearedInBranchAlert {
#[doc = "The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.`"]
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub dismissed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub dismissed_by: ::std::option::Option<User>,
#[doc = "The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub dismissed_reason:
::std::option::Option<CodeScanningAlertAppearedInBranchAlertDismissedReason>,
#[doc = "The GitHub URL of the alert resource."]
pub html_url: ::std::string::String,
pub instances: ::std::vec::Vec<AlertInstance>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub most_recent_instance: ::std::option::Option<AlertInstance>,
#[doc = "The code scanning alert number."]
pub number: i64,
pub rule: CodeScanningAlertAppearedInBranchAlertRule,
#[doc = "State of a code scanning alert."]
pub state: CodeScanningAlertAppearedInBranchAlertState,
pub tool: CodeScanningAlertAppearedInBranchAlertTool,
pub url: ::std::string::String,
}
#[doc = "The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertAppearedInBranchAlertDismissedReason {
#[serde(rename = "false positive")]
FalsePositive,
#[serde(rename = "won't fix")]
WontFix,
#[serde(rename = "used in tests")]
UsedInTests,
}
impl ::std::fmt::Display for CodeScanningAlertAppearedInBranchAlertDismissedReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::FalsePositive => f.write_str("false positive"),
Self::WontFix => f.write_str("won't fix"),
Self::UsedInTests => f.write_str("used in tests"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertAppearedInBranchAlertDismissedReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"false positive" => Ok(Self::FalsePositive),
"won't fix" => Ok(Self::WontFix),
"used in tests" => Ok(Self::UsedInTests),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertAppearedInBranchAlertDismissedReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CodeScanningAlertAppearedInBranchAlertDismissedReason
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertAppearedInBranchAlertRule`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertAppearedInBranchAlertRule {
#[doc = "A short description of the rule used to detect the alert."]
pub description: ::std::string::String,
#[doc = "A unique identifier for the rule used to detect the alert."]
pub id: ::std::string::String,
#[doc = "The severity of the alert."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub severity: ::std::option::Option<CodeScanningAlertAppearedInBranchAlertRuleSeverity>,
}
#[doc = "The severity of the alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertAppearedInBranchAlertRuleSeverity {
#[serde(rename = "none")]
None,
#[serde(rename = "note")]
Note,
#[serde(rename = "warning")]
Warning,
#[serde(rename = "error")]
Error,
}
impl ::std::fmt::Display for CodeScanningAlertAppearedInBranchAlertRuleSeverity {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Note => f.write_str("note"),
Self::Warning => f.write_str("warning"),
Self::Error => f.write_str("error"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertAppearedInBranchAlertRuleSeverity {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"note" => Ok(Self::Note),
"warning" => Ok(Self::Warning),
"error" => Ok(Self::Error),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertAppearedInBranchAlertRuleSeverity {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CodeScanningAlertAppearedInBranchAlertRuleSeverity
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "State of a code scanning alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertAppearedInBranchAlertState {
#[serde(rename = "open")]
Open,
#[serde(rename = "dismissed")]
Dismissed,
#[serde(rename = "fixed")]
Fixed,
}
impl ::std::fmt::Display for CodeScanningAlertAppearedInBranchAlertState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Dismissed => f.write_str("dismissed"),
Self::Fixed => f.write_str("fixed"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertAppearedInBranchAlertState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"dismissed" => Ok(Self::Dismissed),
"fixed" => Ok(Self::Fixed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertAppearedInBranchAlertState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CodeScanningAlertAppearedInBranchAlertState
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertAppearedInBranchAlertTool`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertAppearedInBranchAlertTool {
#[doc = "The name of the tool used to generate the code scanning analysis alert."]
pub name: ::std::string::String,
#[doc = "The version of the tool used to detect the alert."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub version: ::std::option::Option<::std::string::String>,
}
#[doc = "`CodeScanningAlertClosedByUser`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertClosedByUser {
pub action: CodeScanningAlertClosedByUserAction,
pub alert: CodeScanningAlertClosedByUserAlert,
#[doc = "The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty."]
pub commit_oid: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
#[doc = "The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repository: Repository,
pub sender: User,
}
#[doc = "`CodeScanningAlertClosedByUserAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertClosedByUserAction {
#[serde(rename = "closed_by_user")]
ClosedByUser,
}
impl ::std::fmt::Display for CodeScanningAlertClosedByUserAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::ClosedByUser => f.write_str("closed_by_user"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertClosedByUserAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"closed_by_user" => Ok(Self::ClosedByUser),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertClosedByUserAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertClosedByUserAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The code scanning alert involved in the event."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertClosedByUserAlert {
#[doc = "The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.`"]
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`."]
pub dismissed_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub dismissed_by: User,
#[doc = "The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub dismissed_reason: ::std::option::Option<CodeScanningAlertClosedByUserAlertDismissedReason>,
#[doc = "The GitHub URL of the alert resource."]
pub html_url: ::std::string::String,
pub instances: ::std::vec::Vec<CodeScanningAlertClosedByUserAlertInstancesItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub most_recent_instance: ::std::option::Option<AlertInstance>,
#[doc = "The code scanning alert number."]
pub number: i64,
pub rule: CodeScanningAlertClosedByUserAlertRule,
#[doc = "State of a code scanning alert."]
pub state: CodeScanningAlertClosedByUserAlertState,
pub tool: CodeScanningAlertClosedByUserAlertTool,
pub url: ::std::string::String,
}
#[doc = "The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertClosedByUserAlertDismissedReason {
#[serde(rename = "false positive")]
FalsePositive,
#[serde(rename = "won't fix")]
WontFix,
#[serde(rename = "used in tests")]
UsedInTests,
}
impl ::std::fmt::Display for CodeScanningAlertClosedByUserAlertDismissedReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::FalsePositive => f.write_str("false positive"),
Self::WontFix => f.write_str("won't fix"),
Self::UsedInTests => f.write_str("used in tests"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertClosedByUserAlertDismissedReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"false positive" => Ok(Self::FalsePositive),
"won't fix" => Ok(Self::WontFix),
"used in tests" => Ok(Self::UsedInTests),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertClosedByUserAlertDismissedReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CodeScanningAlertClosedByUserAlertDismissedReason
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertClosedByUserAlertInstancesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertClosedByUserAlertInstancesItem {
#[doc = "Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name."]
pub analysis_key: ::std::string::String,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub classifications: ::std::vec::Vec<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub commit_sha: ::std::option::Option<::std::string::String>,
#[doc = "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."]
pub environment: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub location: ::std::option::Option<CodeScanningAlertClosedByUserAlertInstancesItemLocation>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub message: ::std::option::Option<CodeScanningAlertClosedByUserAlertInstancesItemMessage>,
#[doc = "The full Git reference, formatted as `refs/heads/<branch name>`."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub state: CodeScanningAlertClosedByUserAlertInstancesItemState,
}
#[doc = "`CodeScanningAlertClosedByUserAlertInstancesItemLocation`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertClosedByUserAlertInstancesItemLocation {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub end_column: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub end_line: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub path: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub start_column: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub start_line: ::std::option::Option<i64>,
}
#[doc = "`CodeScanningAlertClosedByUserAlertInstancesItemMessage`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertClosedByUserAlertInstancesItemMessage {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub text: ::std::option::Option<::std::string::String>,
}
#[doc = "`CodeScanningAlertClosedByUserAlertInstancesItemState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertClosedByUserAlertInstancesItemState {
#[serde(rename = "dismissed")]
Dismissed,
}
impl ::std::fmt::Display for CodeScanningAlertClosedByUserAlertInstancesItemState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Dismissed => f.write_str("dismissed"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertClosedByUserAlertInstancesItemState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"dismissed" => Ok(Self::Dismissed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertClosedByUserAlertInstancesItemState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CodeScanningAlertClosedByUserAlertInstancesItemState
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertClosedByUserAlertRule`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertClosedByUserAlertRule {
#[doc = "A short description of the rule used to detect the alert."]
pub description: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub full_description: ::std::option::Option<::std::string::String>,
#[serde(default)]
pub help: (),
#[doc = "A unique identifier for the rule used to detect the alert."]
pub id: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
#[doc = "The severity of the alert."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub severity: ::std::option::Option<CodeScanningAlertClosedByUserAlertRuleSeverity>,
#[serde(default)]
pub tags: (),
}
#[doc = "The severity of the alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertClosedByUserAlertRuleSeverity {
#[serde(rename = "none")]
None,
#[serde(rename = "note")]
Note,
#[serde(rename = "warning")]
Warning,
#[serde(rename = "error")]
Error,
}
impl ::std::fmt::Display for CodeScanningAlertClosedByUserAlertRuleSeverity {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Note => f.write_str("note"),
Self::Warning => f.write_str("warning"),
Self::Error => f.write_str("error"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertClosedByUserAlertRuleSeverity {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"note" => Ok(Self::Note),
"warning" => Ok(Self::Warning),
"error" => Ok(Self::Error),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertClosedByUserAlertRuleSeverity {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CodeScanningAlertClosedByUserAlertRuleSeverity
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "State of a code scanning alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertClosedByUserAlertState {
#[serde(rename = "dismissed")]
Dismissed,
}
impl ::std::fmt::Display for CodeScanningAlertClosedByUserAlertState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Dismissed => f.write_str("dismissed"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertClosedByUserAlertState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"dismissed" => Ok(Self::Dismissed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertClosedByUserAlertState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertClosedByUserAlertState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertClosedByUserAlertTool`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertClosedByUserAlertTool {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub guid: ::std::option::Option<::std::string::String>,
#[doc = "The name of the tool used to generate the code scanning analysis alert."]
pub name: ::std::string::String,
#[doc = "The version of the tool used to detect the alert."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub version: ::std::option::Option<::std::string::String>,
}
#[doc = "`CodeScanningAlertCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertCreated {
pub action: CodeScanningAlertCreatedAction,
pub alert: CodeScanningAlertCreatedAlert,
#[doc = "The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty."]
pub commit_oid: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
#[doc = "The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repository: Repository,
pub sender: GithubOrg,
}
#[doc = "`CodeScanningAlertCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for CodeScanningAlertCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The code scanning alert involved in the event."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertCreatedAlert {
#[doc = "The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.`"]
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`."]
pub dismissed_at: (),
pub dismissed_by: (),
#[doc = "The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."]
pub dismissed_reason: (),
#[doc = "The GitHub URL of the alert resource."]
pub html_url: ::std::string::String,
pub instances: ::std::vec::Vec<CodeScanningAlertCreatedAlertInstancesItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub most_recent_instance: ::std::option::Option<AlertInstance>,
#[doc = "The code scanning alert number."]
pub number: i64,
pub rule: CodeScanningAlertCreatedAlertRule,
#[doc = "State of a code scanning alert."]
pub state: CodeScanningAlertCreatedAlertState,
pub tool: CodeScanningAlertCreatedAlertTool,
pub url: ::std::string::String,
}
#[doc = "`CodeScanningAlertCreatedAlertInstancesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertCreatedAlertInstancesItem {
#[doc = "Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name."]
pub analysis_key: ::std::string::String,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub classifications: ::std::vec::Vec<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub commit_sha: ::std::option::Option<::std::string::String>,
#[doc = "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."]
pub environment: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub location: ::std::option::Option<CodeScanningAlertCreatedAlertInstancesItemLocation>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub message: ::std::option::Option<CodeScanningAlertCreatedAlertInstancesItemMessage>,
#[doc = "The full Git reference, formatted as `refs/heads/<branch name>`."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub state: CodeScanningAlertCreatedAlertInstancesItemState,
}
#[doc = "`CodeScanningAlertCreatedAlertInstancesItemLocation`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertCreatedAlertInstancesItemLocation {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub end_column: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub end_line: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub path: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub start_column: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub start_line: ::std::option::Option<i64>,
}
#[doc = "`CodeScanningAlertCreatedAlertInstancesItemMessage`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertCreatedAlertInstancesItemMessage {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub text: ::std::option::Option<::std::string::String>,
}
#[doc = "`CodeScanningAlertCreatedAlertInstancesItemState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertCreatedAlertInstancesItemState {
#[serde(rename = "open")]
Open,
#[serde(rename = "dismissed")]
Dismissed,
}
impl ::std::fmt::Display for CodeScanningAlertCreatedAlertInstancesItemState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Dismissed => f.write_str("dismissed"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertCreatedAlertInstancesItemState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"dismissed" => Ok(Self::Dismissed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertCreatedAlertInstancesItemState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CodeScanningAlertCreatedAlertInstancesItemState
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertCreatedAlertRule`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertCreatedAlertRule {
#[doc = "A short description of the rule used to detect the alert."]
pub description: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub full_description: ::std::option::Option<::std::string::String>,
#[serde(default)]
pub help: (),
#[doc = "A unique identifier for the rule used to detect the alert."]
pub id: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
#[doc = "The severity of the alert."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub severity: ::std::option::Option<CodeScanningAlertCreatedAlertRuleSeverity>,
#[serde(default)]
pub tags: (),
}
#[doc = "The severity of the alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertCreatedAlertRuleSeverity {
#[serde(rename = "none")]
None,
#[serde(rename = "note")]
Note,
#[serde(rename = "warning")]
Warning,
#[serde(rename = "error")]
Error,
}
impl ::std::fmt::Display for CodeScanningAlertCreatedAlertRuleSeverity {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Note => f.write_str("note"),
Self::Warning => f.write_str("warning"),
Self::Error => f.write_str("error"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertCreatedAlertRuleSeverity {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"note" => Ok(Self::Note),
"warning" => Ok(Self::Warning),
"error" => Ok(Self::Error),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertCreatedAlertRuleSeverity {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertCreatedAlertRuleSeverity {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "State of a code scanning alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertCreatedAlertState {
#[serde(rename = "open")]
Open,
#[serde(rename = "dismissed")]
Dismissed,
}
impl ::std::fmt::Display for CodeScanningAlertCreatedAlertState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Dismissed => f.write_str("dismissed"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertCreatedAlertState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"dismissed" => Ok(Self::Dismissed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertCreatedAlertState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertCreatedAlertState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertCreatedAlertTool`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertCreatedAlertTool {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub guid: ::std::option::Option<::std::string::String>,
#[doc = "The name of the tool used to generate the code scanning analysis alert."]
pub name: ::std::string::String,
#[doc = "The version of the tool used to detect the alert."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub version: ::std::option::Option<::std::string::String>,
}
#[doc = "`CodeScanningAlertEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum CodeScanningAlertEvent {
AppearedInBranch(CodeScanningAlertAppearedInBranch),
ClosedByUser(CodeScanningAlertClosedByUser),
Created(CodeScanningAlertCreated),
Fixed(CodeScanningAlertFixed),
Reopened(CodeScanningAlertReopened),
ReopenedByUser(CodeScanningAlertReopenedByUser),
}
impl ::std::convert::From<CodeScanningAlertAppearedInBranch> for CodeScanningAlertEvent {
fn from(value: CodeScanningAlertAppearedInBranch) -> Self {
Self::AppearedInBranch(value)
}
}
impl ::std::convert::From<CodeScanningAlertClosedByUser> for CodeScanningAlertEvent {
fn from(value: CodeScanningAlertClosedByUser) -> Self {
Self::ClosedByUser(value)
}
}
impl ::std::convert::From<CodeScanningAlertCreated> for CodeScanningAlertEvent {
fn from(value: CodeScanningAlertCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<CodeScanningAlertFixed> for CodeScanningAlertEvent {
fn from(value: CodeScanningAlertFixed) -> Self {
Self::Fixed(value)
}
}
impl ::std::convert::From<CodeScanningAlertReopened> for CodeScanningAlertEvent {
fn from(value: CodeScanningAlertReopened) -> Self {
Self::Reopened(value)
}
}
impl ::std::convert::From<CodeScanningAlertReopenedByUser> for CodeScanningAlertEvent {
fn from(value: CodeScanningAlertReopenedByUser) -> Self {
Self::ReopenedByUser(value)
}
}
#[doc = "`CodeScanningAlertFixed`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertFixed {
pub action: CodeScanningAlertFixedAction,
pub alert: CodeScanningAlertFixedAlert,
#[doc = "The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty."]
pub commit_oid: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
#[doc = "The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repository: Repository,
pub sender: GithubOrg,
}
#[doc = "`CodeScanningAlertFixedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertFixedAction {
#[serde(rename = "fixed")]
Fixed,
}
impl ::std::fmt::Display for CodeScanningAlertFixedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Fixed => f.write_str("fixed"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertFixedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"fixed" => Ok(Self::Fixed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertFixedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertFixedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The code scanning alert involved in the event."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertFixedAlert {
#[doc = "The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.`"]
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub dismissed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub dismissed_by: ::std::option::Option<User>,
#[doc = "The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub dismissed_reason: ::std::option::Option<CodeScanningAlertFixedAlertDismissedReason>,
#[doc = "The GitHub URL of the alert resource."]
pub html_url: ::std::string::String,
pub instances: ::std::vec::Vec<CodeScanningAlertFixedAlertInstancesItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub instances_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub most_recent_instance: ::std::option::Option<AlertInstance>,
#[doc = "The code scanning alert number."]
pub number: i64,
pub rule: CodeScanningAlertFixedAlertRule,
#[doc = "State of a code scanning alert."]
pub state: CodeScanningAlertFixedAlertState,
pub tool: CodeScanningAlertFixedAlertTool,
pub url: ::std::string::String,
}
#[doc = "The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertFixedAlertDismissedReason {
#[serde(rename = "false positive")]
FalsePositive,
#[serde(rename = "won't fix")]
WontFix,
#[serde(rename = "used in tests")]
UsedInTests,
}
impl ::std::fmt::Display for CodeScanningAlertFixedAlertDismissedReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::FalsePositive => f.write_str("false positive"),
Self::WontFix => f.write_str("won't fix"),
Self::UsedInTests => f.write_str("used in tests"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertFixedAlertDismissedReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"false positive" => Ok(Self::FalsePositive),
"won't fix" => Ok(Self::WontFix),
"used in tests" => Ok(Self::UsedInTests),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertFixedAlertDismissedReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertFixedAlertDismissedReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertFixedAlertInstancesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertFixedAlertInstancesItem {
#[doc = "Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name."]
pub analysis_key: ::std::string::String,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub classifications: ::std::vec::Vec<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub commit_sha: ::std::option::Option<::std::string::String>,
#[doc = "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."]
pub environment: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub location: ::std::option::Option<CodeScanningAlertFixedAlertInstancesItemLocation>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub message: ::std::option::Option<CodeScanningAlertFixedAlertInstancesItemMessage>,
#[doc = "The full Git reference, formatted as `refs/heads/<branch name>`."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub state: CodeScanningAlertFixedAlertInstancesItemState,
}
#[doc = "`CodeScanningAlertFixedAlertInstancesItemLocation`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertFixedAlertInstancesItemLocation {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub end_column: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub end_line: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub path: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub start_column: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub start_line: ::std::option::Option<i64>,
}
#[doc = "`CodeScanningAlertFixedAlertInstancesItemMessage`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertFixedAlertInstancesItemMessage {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub text: ::std::option::Option<::std::string::String>,
}
#[doc = "`CodeScanningAlertFixedAlertInstancesItemState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertFixedAlertInstancesItemState {
#[serde(rename = "fixed")]
Fixed,
}
impl ::std::fmt::Display for CodeScanningAlertFixedAlertInstancesItemState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Fixed => f.write_str("fixed"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertFixedAlertInstancesItemState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"fixed" => Ok(Self::Fixed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertFixedAlertInstancesItemState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CodeScanningAlertFixedAlertInstancesItemState
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertFixedAlertRule`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertFixedAlertRule {
#[doc = "A short description of the rule used to detect the alert."]
pub description: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub full_description: ::std::option::Option<::std::string::String>,
#[serde(default)]
pub help: (),
#[doc = "A unique identifier for the rule used to detect the alert."]
pub id: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
#[doc = "The severity of the alert."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub severity: ::std::option::Option<CodeScanningAlertFixedAlertRuleSeverity>,
#[serde(default)]
pub tags: (),
}
#[doc = "The severity of the alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertFixedAlertRuleSeverity {
#[serde(rename = "none")]
None,
#[serde(rename = "note")]
Note,
#[serde(rename = "warning")]
Warning,
#[serde(rename = "error")]
Error,
}
impl ::std::fmt::Display for CodeScanningAlertFixedAlertRuleSeverity {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Note => f.write_str("note"),
Self::Warning => f.write_str("warning"),
Self::Error => f.write_str("error"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertFixedAlertRuleSeverity {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"note" => Ok(Self::Note),
"warning" => Ok(Self::Warning),
"error" => Ok(Self::Error),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertFixedAlertRuleSeverity {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertFixedAlertRuleSeverity {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "State of a code scanning alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertFixedAlertState {
#[serde(rename = "fixed")]
Fixed,
}
impl ::std::fmt::Display for CodeScanningAlertFixedAlertState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Fixed => f.write_str("fixed"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertFixedAlertState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"fixed" => Ok(Self::Fixed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertFixedAlertState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertFixedAlertState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertFixedAlertTool`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertFixedAlertTool {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub guid: ::std::option::Option<::std::string::String>,
#[doc = "The name of the tool used to generate the code scanning analysis alert."]
pub name: ::std::string::String,
#[doc = "The version of the tool used to detect the alert."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub version: ::std::option::Option<::std::string::String>,
}
#[doc = "`CodeScanningAlertReopened`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopened {
pub action: CodeScanningAlertReopenedAction,
pub alert: CodeScanningAlertReopenedAlert,
#[doc = "The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty."]
pub commit_oid: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
#[doc = "The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repository: Repository,
pub sender: GithubOrg,
}
#[doc = "`CodeScanningAlertReopenedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertReopenedAction {
#[serde(rename = "reopened")]
Reopened,
}
impl ::std::fmt::Display for CodeScanningAlertReopenedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Reopened => f.write_str("reopened"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertReopenedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"reopened" => Ok(Self::Reopened),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertReopenedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertReopenedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The code scanning alert involved in the event."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedAlert {
#[doc = "The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.`"]
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`."]
pub dismissed_at: (),
pub dismissed_by: (),
#[doc = "The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."]
pub dismissed_reason: (),
#[doc = "The GitHub URL of the alert resource."]
pub html_url: ::std::string::String,
pub instances: ::std::vec::Vec<CodeScanningAlertReopenedAlertInstancesItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub most_recent_instance: ::std::option::Option<AlertInstance>,
#[doc = "The code scanning alert number."]
pub number: i64,
pub rule: CodeScanningAlertReopenedAlertRule,
#[doc = "State of a code scanning alert."]
pub state: CodeScanningAlertReopenedAlertState,
pub tool: CodeScanningAlertReopenedAlertTool,
pub url: ::std::string::String,
}
#[doc = "`CodeScanningAlertReopenedAlertInstancesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedAlertInstancesItem {
#[doc = "Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name."]
pub analysis_key: ::std::string::String,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub classifications: ::std::vec::Vec<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub commit_sha: ::std::option::Option<::std::string::String>,
#[doc = "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."]
pub environment: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub location: ::std::option::Option<CodeScanningAlertReopenedAlertInstancesItemLocation>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub message: ::std::option::Option<CodeScanningAlertReopenedAlertInstancesItemMessage>,
#[doc = "The full Git reference, formatted as `refs/heads/<branch name>`."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub state: CodeScanningAlertReopenedAlertInstancesItemState,
}
#[doc = "`CodeScanningAlertReopenedAlertInstancesItemLocation`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedAlertInstancesItemLocation {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub end_column: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub end_line: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub path: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub start_column: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub start_line: ::std::option::Option<i64>,
}
#[doc = "`CodeScanningAlertReopenedAlertInstancesItemMessage`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedAlertInstancesItemMessage {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub text: ::std::option::Option<::std::string::String>,
}
#[doc = "`CodeScanningAlertReopenedAlertInstancesItemState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertReopenedAlertInstancesItemState {
#[serde(rename = "open")]
Open,
}
impl ::std::fmt::Display for CodeScanningAlertReopenedAlertInstancesItemState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertReopenedAlertInstancesItemState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertReopenedAlertInstancesItemState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CodeScanningAlertReopenedAlertInstancesItemState
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertReopenedAlertRule`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedAlertRule {
#[doc = "A short description of the rule used to detect the alert."]
pub description: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub full_description: ::std::option::Option<::std::string::String>,
#[serde(default)]
pub help: (),
#[doc = "A unique identifier for the rule used to detect the alert."]
pub id: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
#[doc = "The severity of the alert."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub severity: ::std::option::Option<CodeScanningAlertReopenedAlertRuleSeverity>,
#[serde(default)]
pub tags: (),
}
#[doc = "The severity of the alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertReopenedAlertRuleSeverity {
#[serde(rename = "none")]
None,
#[serde(rename = "note")]
Note,
#[serde(rename = "warning")]
Warning,
#[serde(rename = "error")]
Error,
}
impl ::std::fmt::Display for CodeScanningAlertReopenedAlertRuleSeverity {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Note => f.write_str("note"),
Self::Warning => f.write_str("warning"),
Self::Error => f.write_str("error"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertReopenedAlertRuleSeverity {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"note" => Ok(Self::Note),
"warning" => Ok(Self::Warning),
"error" => Ok(Self::Error),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertReopenedAlertRuleSeverity {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertReopenedAlertRuleSeverity {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "State of a code scanning alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertReopenedAlertState {
#[serde(rename = "open")]
Open,
#[serde(rename = "dismissed")]
Dismissed,
#[serde(rename = "fixed")]
Fixed,
}
impl ::std::fmt::Display for CodeScanningAlertReopenedAlertState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Dismissed => f.write_str("dismissed"),
Self::Fixed => f.write_str("fixed"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertReopenedAlertState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"dismissed" => Ok(Self::Dismissed),
"fixed" => Ok(Self::Fixed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertReopenedAlertState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertReopenedAlertState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertReopenedAlertTool`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedAlertTool {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub guid: ::std::option::Option<::std::string::String>,
#[doc = "The name of the tool used to generate the code scanning analysis alert."]
pub name: ::std::string::String,
#[doc = "The version of the tool used to detect the alert."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub version: ::std::option::Option<::std::string::String>,
}
#[doc = "`CodeScanningAlertReopenedByUser`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedByUser {
pub action: CodeScanningAlertReopenedByUserAction,
pub alert: CodeScanningAlertReopenedByUserAlert,
#[doc = "The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty."]
pub commit_oid: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
#[doc = "The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repository: Repository,
pub sender: User,
}
#[doc = "`CodeScanningAlertReopenedByUserAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertReopenedByUserAction {
#[serde(rename = "reopened_by_user")]
ReopenedByUser,
}
impl ::std::fmt::Display for CodeScanningAlertReopenedByUserAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::ReopenedByUser => f.write_str("reopened_by_user"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertReopenedByUserAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"reopened_by_user" => Ok(Self::ReopenedByUser),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertReopenedByUserAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertReopenedByUserAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The code scanning alert involved in the event."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedByUserAlert {
#[doc = "The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.`"]
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`."]
pub dismissed_at: (),
pub dismissed_by: (),
#[doc = "The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."]
pub dismissed_reason: (),
#[doc = "The GitHub URL of the alert resource."]
pub html_url: ::std::string::String,
pub instances: ::std::vec::Vec<CodeScanningAlertReopenedByUserAlertInstancesItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub most_recent_instance: ::std::option::Option<AlertInstance>,
#[doc = "The code scanning alert number."]
pub number: i64,
pub rule: CodeScanningAlertReopenedByUserAlertRule,
#[doc = "State of a code scanning alert."]
pub state: CodeScanningAlertReopenedByUserAlertState,
pub tool: CodeScanningAlertReopenedByUserAlertTool,
pub url: ::std::string::String,
}
#[doc = "`CodeScanningAlertReopenedByUserAlertInstancesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedByUserAlertInstancesItem {
#[doc = "Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name."]
pub analysis_key: ::std::string::String,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub classifications: ::std::vec::Vec<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub commit_sha: ::std::option::Option<::std::string::String>,
#[doc = "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."]
pub environment: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub location: ::std::option::Option<CodeScanningAlertReopenedByUserAlertInstancesItemLocation>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub message: ::std::option::Option<CodeScanningAlertReopenedByUserAlertInstancesItemMessage>,
#[doc = "The full Git reference, formatted as `refs/heads/<branch name>`."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub state: CodeScanningAlertReopenedByUserAlertInstancesItemState,
}
#[doc = "`CodeScanningAlertReopenedByUserAlertInstancesItemLocation`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedByUserAlertInstancesItemLocation {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub end_column: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub end_line: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub path: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub start_column: ::std::option::Option<i64>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub start_line: ::std::option::Option<i64>,
}
#[doc = "`CodeScanningAlertReopenedByUserAlertInstancesItemMessage`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedByUserAlertInstancesItemMessage {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub text: ::std::option::Option<::std::string::String>,
}
#[doc = "`CodeScanningAlertReopenedByUserAlertInstancesItemState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertReopenedByUserAlertInstancesItemState {
#[serde(rename = "open")]
Open,
}
impl ::std::fmt::Display for CodeScanningAlertReopenedByUserAlertInstancesItemState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertReopenedByUserAlertInstancesItemState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertReopenedByUserAlertInstancesItemState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CodeScanningAlertReopenedByUserAlertInstancesItemState
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertReopenedByUserAlertRule`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedByUserAlertRule {
#[doc = "A short description of the rule used to detect the alert."]
pub description: ::std::string::String,
#[doc = "A unique identifier for the rule used to detect the alert."]
pub id: ::std::string::String,
#[doc = "The severity of the alert."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub severity: ::std::option::Option<CodeScanningAlertReopenedByUserAlertRuleSeverity>,
}
#[doc = "The severity of the alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertReopenedByUserAlertRuleSeverity {
#[serde(rename = "none")]
None,
#[serde(rename = "note")]
Note,
#[serde(rename = "warning")]
Warning,
#[serde(rename = "error")]
Error,
}
impl ::std::fmt::Display for CodeScanningAlertReopenedByUserAlertRuleSeverity {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::None => f.write_str("none"),
Self::Note => f.write_str("note"),
Self::Warning => f.write_str("warning"),
Self::Error => f.write_str("error"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertReopenedByUserAlertRuleSeverity {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"none" => Ok(Self::None),
"note" => Ok(Self::Note),
"warning" => Ok(Self::Warning),
"error" => Ok(Self::Error),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertReopenedByUserAlertRuleSeverity {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for CodeScanningAlertReopenedByUserAlertRuleSeverity
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "State of a code scanning alert."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CodeScanningAlertReopenedByUserAlertState {
#[serde(rename = "open")]
Open,
}
impl ::std::fmt::Display for CodeScanningAlertReopenedByUserAlertState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
}
}
}
impl ::std::str::FromStr for CodeScanningAlertReopenedByUserAlertState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CodeScanningAlertReopenedByUserAlertState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CodeScanningAlertReopenedByUserAlertState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`CodeScanningAlertReopenedByUserAlertTool`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CodeScanningAlertReopenedByUserAlertTool {
#[doc = "The name of the tool used to generate the code scanning analysis alert."]
pub name: ::std::string::String,
#[doc = "The version of the tool used to detect the alert."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub version: ::std::option::Option<::std::string::String>,
}
#[doc = "`Commit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Commit {
#[doc = "An array of files added in the commit."]
pub added: ::std::vec::Vec<::std::string::String>,
pub author: Committer,
pub committer: Committer,
#[doc = "Whether this commit is distinct from any that have been pushed before."]
pub distinct: bool,
pub id: ::std::string::String,
#[doc = "The commit message."]
pub message: ::std::string::String,
#[doc = "An array of files modified by the commit."]
pub modified: ::std::vec::Vec<::std::string::String>,
#[doc = "An array of files removed in the commit."]
pub removed: ::std::vec::Vec<::std::string::String>,
#[doc = "The ISO 8601 timestamp of the commit."]
pub timestamp: ::std::string::String,
pub tree_id: ::std::string::String,
#[doc = "URL that points to the commit API resource."]
pub url: ::std::string::String,
}
#[doc = "A commit comment is created. The type of activity is specified in the `action` property. "]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CommitCommentCreated {
#[doc = "The action performed. Can be `created`."]
pub action: CommitCommentCreatedAction,
pub comment: CommitCommentCreatedComment,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "The action performed. Can be `created`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CommitCommentCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for CommitCommentCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for CommitCommentCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CommitCommentCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CommitCommentCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [commit comment](https://docs.github.com/en/rest/reference/repos#get-a-commit-comment) resource."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CommitCommentCreatedComment {
pub author_association: AuthorAssociation,
#[doc = "The text of the comment."]
pub body: ::std::string::String,
#[doc = "The SHA of the commit to which the comment applies."]
pub commit_id: ::std::string::String,
pub created_at: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "The ID of the commit comment."]
pub id: i64,
#[doc = "The line of the blob to which the comment applies. The last line of the range for a multi-line comment"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub line: ::std::option::Option<i64>,
#[doc = "The node ID of the commit comment."]
pub node_id: ::std::string::String,
#[doc = "The relative path of the file to which the comment applies."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub path: ::std::option::Option<::std::string::String>,
#[doc = "The line index in the diff to which the comment applies."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub position: ::std::option::Option<i64>,
pub updated_at: ::std::string::String,
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`CommitCommentEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct CommitCommentEvent(pub CommitCommentCreated);
impl ::std::ops::Deref for CommitCommentEvent {
type Target = CommitCommentCreated;
fn deref(&self) -> &CommitCommentCreated {
&self.0
}
}
impl ::std::convert::From<CommitCommentEvent> for CommitCommentCreated {
fn from(value: CommitCommentEvent) -> Self {
value.0
}
}
impl ::std::convert::From<CommitCommentCreated> for CommitCommentEvent {
fn from(value: CommitCommentCreated) -> Self {
Self(value)
}
}
#[doc = "`CommitSimple`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CommitSimple {
pub author: Committer,
pub committer: Committer,
pub id: ::std::string::String,
pub message: ::std::string::String,
pub timestamp: ::std::string::String,
pub tree_id: ::std::string::String,
}
#[doc = "Metaproperties for Git author/committer information."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Committer {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub date: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[doc = "The git author's email address."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub email: ::std::option::Option<::std::string::String>,
#[doc = "The git author's name."]
pub name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub username: ::std::option::Option<::std::string::String>,
}
#[doc = "`ContentReferenceCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ContentReferenceCreated {
pub action: ContentReferenceCreatedAction,
pub content_reference: ContentReferenceCreatedContentReference,
pub installation: InstallationLite,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ContentReferenceCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ContentReferenceCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for ContentReferenceCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for ContentReferenceCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ContentReferenceCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ContentReferenceCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ContentReferenceCreatedContentReference`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ContentReferenceCreatedContentReference {
pub id: i64,
pub node_id: ::std::string::String,
pub reference: ::std::string::String,
}
#[doc = "`ContentReferenceEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct ContentReferenceEvent(pub ContentReferenceCreated);
impl ::std::ops::Deref for ContentReferenceEvent {
type Target = ContentReferenceCreated;
fn deref(&self) -> &ContentReferenceCreated {
&self.0
}
}
impl ::std::convert::From<ContentReferenceEvent> for ContentReferenceCreated {
fn from(value: ContentReferenceEvent) -> Self {
value.0
}
}
impl ::std::convert::From<ContentReferenceCreated> for ContentReferenceEvent {
fn from(value: ContentReferenceCreated) -> Self {
Self(value)
}
}
#[doc = "A Git branch or tag is created."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct CreateEvent {
#[doc = "The repository's current description."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The name of the repository's default branch (usually `main`)."]
pub master_branch: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
#[doc = "The pusher type for the event. Can be either `user` or a deploy key."]
pub pusher_type: ::std::string::String,
#[doc = "The [`git ref`](https://docs.github.com/en/rest/reference/git#get-a-reference) resource."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
#[doc = "The type of Git ref object created in the repository. Can be either `branch` or `tag`."]
pub ref_type: CreateEventRefType,
pub repository: Repository,
pub sender: User,
}
#[doc = "The type of Git ref object created in the repository. Can be either `branch` or `tag`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum CreateEventRefType {
#[serde(rename = "tag")]
Tag,
#[serde(rename = "branch")]
Branch,
}
impl ::std::fmt::Display for CreateEventRefType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Tag => f.write_str("tag"),
Self::Branch => f.write_str("branch"),
}
}
}
impl ::std::str::FromStr for CreateEventRefType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"tag" => Ok(Self::Tag),
"branch" => Ok(Self::Branch),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for CreateEventRefType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for CreateEventRefType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "A Git branch or tag is deleted."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DeleteEvent {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
#[doc = "The pusher type for the event. Can be either `user` or a deploy key."]
pub pusher_type: ::std::string::String,
#[doc = "The [`git ref`](https://docs.github.com/en/rest/reference/git#get-a-reference) resource."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
#[doc = "The type of Git ref object deleted in the repository. Can be either `branch` or `tag`."]
pub ref_type: DeleteEventRefType,
pub repository: Repository,
pub sender: User,
}
#[doc = "The type of Git ref object deleted in the repository. Can be either `branch` or `tag`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DeleteEventRefType {
#[serde(rename = "tag")]
Tag,
#[serde(rename = "branch")]
Branch,
}
impl ::std::fmt::Display for DeleteEventRefType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Tag => f.write_str("tag"),
Self::Branch => f.write_str("branch"),
}
}
}
impl ::std::str::FromStr for DeleteEventRefType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"tag" => Ok(Self::Tag),
"branch" => Ok(Self::Branch),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DeleteEventRefType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DeleteEventRefType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DeployKeyCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DeployKeyCreated {
pub action: DeployKeyCreatedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub key: DeployKeyCreatedKey,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DeployKeyCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DeployKeyCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for DeployKeyCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for DeployKeyCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DeployKeyCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DeployKeyCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [`deploy key`](https://docs.github.com/en/rest/reference/repos#get-a-deploy-key) resource."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DeployKeyCreatedKey {
pub created_at: ::std::string::String,
pub id: i64,
pub key: ::std::string::String,
pub read_only: bool,
pub title: ::std::string::String,
pub url: ::std::string::String,
pub verified: bool,
}
#[doc = "`DeployKeyDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DeployKeyDeleted {
pub action: DeployKeyDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub key: DeployKeyDeletedKey,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DeployKeyDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DeployKeyDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for DeployKeyDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for DeployKeyDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DeployKeyDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DeployKeyDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [`deploy key`](https://docs.github.com/en/rest/reference/repos#get-a-deploy-key) resource."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DeployKeyDeletedKey {
pub created_at: ::std::string::String,
pub id: i64,
pub key: ::std::string::String,
pub read_only: bool,
pub title: ::std::string::String,
pub url: ::std::string::String,
pub verified: bool,
}
#[doc = "`DeployKeyEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DeployKeyEvent {
Created(DeployKeyCreated),
Deleted(DeployKeyDeleted),
}
impl ::std::convert::From<DeployKeyCreated> for DeployKeyEvent {
fn from(value: DeployKeyCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<DeployKeyDeleted> for DeployKeyEvent {
fn from(value: DeployKeyDeleted) -> Self {
Self::Deleted(value)
}
}
#[doc = "`DeploymentCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DeploymentCreated {
pub action: DeploymentCreatedAction,
pub deployment: DeploymentCreatedDeployment,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
pub workflow: (),
pub workflow_run: (),
}
#[doc = "`DeploymentCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DeploymentCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for DeploymentCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for DeploymentCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DeploymentCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DeploymentCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [deployment](https://docs.github.com/en/rest/reference/repos#list-deployments)."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DeploymentCreatedDeployment {
pub created_at: ::std::string::String,
pub creator: User,
pub description: (),
pub environment: ::std::string::String,
pub id: i64,
pub node_id: ::std::string::String,
pub original_environment: ::std::string::String,
pub payload: DeploymentCreatedDeploymentPayload,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repository_url: ::std::string::String,
pub sha: ::std::string::String,
pub statuses_url: ::std::string::String,
pub task: ::std::string::String,
pub updated_at: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`DeploymentCreatedDeploymentPayload`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct DeploymentCreatedDeploymentPayload {}
#[doc = "`DeploymentEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct DeploymentEvent(pub DeploymentCreated);
impl ::std::ops::Deref for DeploymentEvent {
type Target = DeploymentCreated;
fn deref(&self) -> &DeploymentCreated {
&self.0
}
}
impl ::std::convert::From<DeploymentEvent> for DeploymentCreated {
fn from(value: DeploymentEvent) -> Self {
value.0
}
}
impl ::std::convert::From<DeploymentCreated> for DeploymentEvent {
fn from(value: DeploymentCreated) -> Self {
Self(value)
}
}
#[doc = "`DeploymentStatusCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DeploymentStatusCreated {
pub action: DeploymentStatusCreatedAction,
pub deployment: DeploymentStatusCreatedDeployment,
pub deployment_status: DeploymentStatusCreatedDeploymentStatus,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DeploymentStatusCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DeploymentStatusCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for DeploymentStatusCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for DeploymentStatusCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DeploymentStatusCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DeploymentStatusCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [deployment](https://docs.github.com/en/rest/reference/repos#list-deployments) that this status is associated with."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DeploymentStatusCreatedDeployment {
pub created_at: ::std::string::String,
pub creator: User,
pub description: (),
pub environment: ::std::string::String,
pub id: i64,
pub node_id: ::std::string::String,
pub original_environment: ::std::string::String,
pub payload: DeploymentStatusCreatedDeploymentPayload,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repository_url: ::std::string::String,
pub sha: ::std::string::String,
pub statuses_url: ::std::string::String,
pub task: ::std::string::String,
pub updated_at: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`DeploymentStatusCreatedDeploymentPayload`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct DeploymentStatusCreatedDeploymentPayload {}
#[doc = "The [deployment status](https://docs.github.com/en/rest/reference/repos#list-deployment-statuses)."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DeploymentStatusCreatedDeploymentStatus {
pub created_at: ::std::string::String,
pub creator: User,
pub deployment_url: ::std::string::String,
#[doc = "The optional human-readable description added to the status."]
pub description: ::std::string::String,
pub environment: ::std::string::String,
pub id: i64,
pub node_id: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
pub repository_url: ::std::string::String,
#[doc = "The new state. Can be `pending`, `success`, `failure`, or `error`."]
pub state: ::std::string::String,
#[doc = "The optional link added to the status."]
pub target_url: ::std::string::String,
pub updated_at: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`DeploymentStatusEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct DeploymentStatusEvent(pub DeploymentStatusCreated);
impl ::std::ops::Deref for DeploymentStatusEvent {
type Target = DeploymentStatusCreated;
fn deref(&self) -> &DeploymentStatusCreated {
&self.0
}
}
impl ::std::convert::From<DeploymentStatusEvent> for DeploymentStatusCreated {
fn from(value: DeploymentStatusEvent) -> Self {
value.0
}
}
impl ::std::convert::From<DeploymentStatusCreated> for DeploymentStatusEvent {
fn from(value: DeploymentStatusCreated) -> Self {
Self(value)
}
}
#[doc = "`Discussion`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Discussion {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub answer_chosen_at: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub answer_chosen_by: ::std::option::Option<User>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub answer_html_url: ::std::option::Option<::std::string::String>,
pub author_association: AuthorAssociation,
pub body: ::std::string::String,
pub category: DiscussionCategory,
pub comments: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub html_url: ::std::string::String,
pub id: i64,
pub locked: bool,
pub node_id: ::std::string::String,
pub number: i64,
pub repository_url: ::std::string::String,
pub state: DiscussionState,
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub user: User,
}
#[doc = "`DiscussionAnswered`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionAnswered {
pub action: DiscussionAnsweredAction,
pub answer: DiscussionAnsweredAnswer,
pub discussion: DiscussionAnsweredDiscussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionAnsweredAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionAnsweredAction {
#[serde(rename = "answered")]
Answered,
}
impl ::std::fmt::Display for DiscussionAnsweredAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Answered => f.write_str("answered"),
}
}
}
impl ::std::str::FromStr for DiscussionAnsweredAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"answered" => Ok(Self::Answered),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionAnsweredAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionAnsweredAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionAnsweredAnswer`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionAnsweredAnswer {
pub author_association: AuthorAssociation,
pub body: ::std::string::String,
pub child_comment_count: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub discussion_id: i64,
pub html_url: ::std::string::String,
pub id: i64,
pub node_id: ::std::string::String,
pub parent_id: (),
pub repository_url: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub user: User,
}
#[doc = "`DiscussionAnsweredDiscussion`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionAnsweredDiscussion {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<::std::string::String>,
pub answer_chosen_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub answer_chosen_by: DiscussionAnsweredDiscussionAnswerChosenBy,
pub answer_html_url: ::std::string::String,
pub author_association: AuthorAssociation,
pub body: ::std::string::String,
pub category: DiscussionAnsweredDiscussionCategory,
pub comments: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub html_url: ::std::string::String,
pub id: i64,
pub locked: bool,
pub node_id: ::std::string::String,
pub number: i64,
pub repository_url: ::std::string::String,
pub state: DiscussionAnsweredDiscussionState,
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub user: User,
}
#[doc = "`DiscussionAnsweredDiscussionAnswerChosenBy`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionAnsweredDiscussionAnswerChosenBy {
pub avatar_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub email: ::std::option::Option<::std::string::String>,
pub events_url: ::std::string::String,
pub followers_url: ::std::string::String,
pub following_url: ::std::string::String,
pub gists_url: ::std::string::String,
pub gravatar_id: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub login: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
pub node_id: ::std::string::String,
pub organizations_url: ::std::string::String,
pub received_events_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub site_admin: bool,
pub starred_url: ::std::string::String,
pub subscriptions_url: ::std::string::String,
#[serde(rename = "type")]
pub type_: DiscussionAnsweredDiscussionAnswerChosenByType,
pub url: ::std::string::String,
}
#[doc = "`DiscussionAnsweredDiscussionAnswerChosenByType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionAnsweredDiscussionAnswerChosenByType {
Bot,
User,
Organization,
}
impl ::std::fmt::Display for DiscussionAnsweredDiscussionAnswerChosenByType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Bot => f.write_str("Bot"),
Self::User => f.write_str("User"),
Self::Organization => f.write_str("Organization"),
}
}
}
impl ::std::str::FromStr for DiscussionAnsweredDiscussionAnswerChosenByType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"Bot" => Ok(Self::Bot),
"User" => Ok(Self::User),
"Organization" => Ok(Self::Organization),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionAnsweredDiscussionAnswerChosenByType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for DiscussionAnsweredDiscussionAnswerChosenByType
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionAnsweredDiscussionCategory`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionAnsweredDiscussionCategory {
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub description: ::std::string::String,
pub emoji: ::std::string::String,
pub id: i64,
pub is_answerable: bool,
pub name: ::std::string::String,
pub repository_id: i64,
pub slug: ::std::string::String,
pub updated_at: ::std::string::String,
}
#[doc = "`DiscussionAnsweredDiscussionState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionAnsweredDiscussionState {
#[serde(rename = "open")]
Open,
#[serde(rename = "locked")]
Locked,
#[serde(rename = "converting")]
Converting,
}
impl ::std::fmt::Display for DiscussionAnsweredDiscussionState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Locked => f.write_str("locked"),
Self::Converting => f.write_str("converting"),
}
}
}
impl ::std::str::FromStr for DiscussionAnsweredDiscussionState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"locked" => Ok(Self::Locked),
"converting" => Ok(Self::Converting),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionAnsweredDiscussionState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionAnsweredDiscussionState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionCategory`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCategory {
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub description: ::std::string::String,
pub emoji: ::std::string::String,
pub id: i64,
pub is_answerable: bool,
pub name: ::std::string::String,
pub repository_id: i64,
pub slug: ::std::string::String,
pub updated_at: ::std::string::String,
}
#[doc = "`DiscussionCategoryChanged`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCategoryChanged {
pub action: DiscussionCategoryChangedAction,
pub changes: DiscussionCategoryChangedChanges,
pub discussion: Discussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionCategoryChangedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionCategoryChangedAction {
#[serde(rename = "category_changed")]
CategoryChanged,
}
impl ::std::fmt::Display for DiscussionCategoryChangedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::CategoryChanged => f.write_str("category_changed"),
}
}
}
impl ::std::str::FromStr for DiscussionCategoryChangedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"category_changed" => Ok(Self::CategoryChanged),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionCategoryChangedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionCategoryChangedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionCategoryChangedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCategoryChangedChanges {
pub category: DiscussionCategoryChangedChangesCategory,
}
#[doc = "`DiscussionCategoryChangedChangesCategory`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCategoryChangedChangesCategory {
pub from: DiscussionCategoryChangedChangesCategoryFrom,
}
#[doc = "`DiscussionCategoryChangedChangesCategoryFrom`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCategoryChangedChangesCategoryFrom {
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub description: ::std::string::String,
pub emoji: ::std::string::String,
pub id: i64,
pub is_answerable: bool,
pub name: ::std::string::String,
pub repository_id: i64,
pub slug: ::std::string::String,
pub updated_at: ::std::string::String,
}
#[doc = "`DiscussionCommentCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCommentCreated {
pub action: DiscussionCommentCreatedAction,
pub comment: DiscussionCommentCreatedComment,
pub discussion: Discussion,
pub installation: InstallationLite,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionCommentCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionCommentCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for DiscussionCommentCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for DiscussionCommentCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionCommentCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionCommentCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionCommentCreatedComment`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCommentCreatedComment {
pub author_association: AuthorAssociation,
pub body: ::std::string::String,
pub child_comment_count: i64,
pub created_at: ::std::string::String,
pub discussion_id: i64,
pub html_url: ::std::string::String,
pub id: i64,
pub node_id: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub parent_id: ::std::option::Option<i64>,
pub repository_url: ::std::string::String,
pub updated_at: ::std::string::String,
pub user: User,
}
#[doc = "`DiscussionCommentDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCommentDeleted {
pub action: DiscussionCommentDeletedAction,
pub comment: DiscussionCommentDeletedComment,
pub discussion: Discussion,
pub installation: InstallationLite,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionCommentDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionCommentDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for DiscussionCommentDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for DiscussionCommentDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionCommentDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionCommentDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionCommentDeletedComment`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCommentDeletedComment {
pub author_association: AuthorAssociation,
pub body: ::std::string::String,
pub child_comment_count: i64,
pub created_at: ::std::string::String,
pub discussion_id: i64,
pub html_url: ::std::string::String,
pub id: i64,
pub node_id: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub parent_id: ::std::option::Option<i64>,
pub repository_url: ::std::string::String,
pub updated_at: ::std::string::String,
pub user: User,
}
#[doc = "`DiscussionCommentEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCommentEdited {
pub action: DiscussionCommentEditedAction,
pub changes: DiscussionCommentEditedChanges,
pub comment: DiscussionCommentEditedComment,
pub discussion: Discussion,
pub installation: InstallationLite,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionCommentEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionCommentEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for DiscussionCommentEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for DiscussionCommentEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionCommentEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionCommentEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionCommentEditedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCommentEditedChanges {
pub body: DiscussionCommentEditedChangesBody,
}
#[doc = "`DiscussionCommentEditedChangesBody`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCommentEditedChangesBody {
pub from: ::std::string::String,
}
#[doc = "`DiscussionCommentEditedComment`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCommentEditedComment {
pub author_association: AuthorAssociation,
pub body: ::std::string::String,
pub child_comment_count: i64,
pub created_at: ::std::string::String,
pub discussion_id: i64,
pub html_url: ::std::string::String,
pub id: i64,
pub node_id: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub parent_id: ::std::option::Option<i64>,
pub repository_url: ::std::string::String,
pub updated_at: ::std::string::String,
pub user: User,
}
#[doc = "`DiscussionCommentEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DiscussionCommentEvent {
Created(DiscussionCommentCreated),
Deleted(DiscussionCommentDeleted),
Edited(DiscussionCommentEdited),
}
impl ::std::convert::From<DiscussionCommentCreated> for DiscussionCommentEvent {
fn from(value: DiscussionCommentCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<DiscussionCommentDeleted> for DiscussionCommentEvent {
fn from(value: DiscussionCommentDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<DiscussionCommentEdited> for DiscussionCommentEvent {
fn from(value: DiscussionCommentEdited) -> Self {
Self::Edited(value)
}
}
#[doc = "`DiscussionCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCreated {
pub action: DiscussionCreatedAction,
pub discussion: DiscussionCreatedDiscussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for DiscussionCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for DiscussionCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionCreatedDiscussion`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCreatedDiscussion {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<::std::string::String>,
pub answer_chosen_at: (),
pub answer_chosen_by: (),
pub answer_html_url: (),
pub author_association: AuthorAssociation,
pub body: ::std::string::String,
pub category: DiscussionCreatedDiscussionCategory,
pub comments: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub html_url: ::std::string::String,
pub id: i64,
pub locked: bool,
pub node_id: ::std::string::String,
pub number: i64,
pub repository_url: ::std::string::String,
pub state: DiscussionCreatedDiscussionState,
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub user: User,
}
#[doc = "`DiscussionCreatedDiscussionCategory`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionCreatedDiscussionCategory {
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub description: ::std::string::String,
pub emoji: ::std::string::String,
pub id: i64,
pub is_answerable: bool,
pub name: ::std::string::String,
pub repository_id: i64,
pub slug: ::std::string::String,
pub updated_at: ::std::string::String,
}
#[doc = "`DiscussionCreatedDiscussionState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionCreatedDiscussionState {
#[serde(rename = "open")]
Open,
#[serde(rename = "converting")]
Converting,
}
impl ::std::fmt::Display for DiscussionCreatedDiscussionState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Converting => f.write_str("converting"),
}
}
}
impl ::std::str::FromStr for DiscussionCreatedDiscussionState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"converting" => Ok(Self::Converting),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionCreatedDiscussionState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionCreatedDiscussionState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionDeleted {
pub action: DiscussionDeletedAction,
pub discussion: Discussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for DiscussionDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for DiscussionDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionEdited {
pub action: DiscussionEditedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub changes: ::std::option::Option<DiscussionEditedChanges>,
pub discussion: Discussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for DiscussionEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for DiscussionEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionEditedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct DiscussionEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub body: ::std::option::Option<DiscussionEditedChangesBody>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<DiscussionEditedChangesTitle>,
}
#[doc = "`DiscussionEditedChangesBody`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionEditedChangesBody {
pub from: ::std::string::String,
}
#[doc = "`DiscussionEditedChangesTitle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionEditedChangesTitle {
pub from: ::std::string::String,
}
#[doc = "`DiscussionEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum DiscussionEvent {
Answered(DiscussionAnswered),
CategoryChanged(DiscussionCategoryChanged),
Created(DiscussionCreated),
Deleted(DiscussionDeleted),
Edited(DiscussionEdited),
Labeled(DiscussionLabeled),
Locked(DiscussionLocked),
Pinned(DiscussionPinned),
Transferred(DiscussionTransferred),
Unanswered(DiscussionUnanswered),
Unlabeled(DiscussionUnlabeled),
Unlocked(DiscussionUnlocked),
Unpinned(DiscussionUnpinned),
}
impl ::std::convert::From<DiscussionAnswered> for DiscussionEvent {
fn from(value: DiscussionAnswered) -> Self {
Self::Answered(value)
}
}
impl ::std::convert::From<DiscussionCategoryChanged> for DiscussionEvent {
fn from(value: DiscussionCategoryChanged) -> Self {
Self::CategoryChanged(value)
}
}
impl ::std::convert::From<DiscussionCreated> for DiscussionEvent {
fn from(value: DiscussionCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<DiscussionDeleted> for DiscussionEvent {
fn from(value: DiscussionDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<DiscussionEdited> for DiscussionEvent {
fn from(value: DiscussionEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<DiscussionLabeled> for DiscussionEvent {
fn from(value: DiscussionLabeled) -> Self {
Self::Labeled(value)
}
}
impl ::std::convert::From<DiscussionLocked> for DiscussionEvent {
fn from(value: DiscussionLocked) -> Self {
Self::Locked(value)
}
}
impl ::std::convert::From<DiscussionPinned> for DiscussionEvent {
fn from(value: DiscussionPinned) -> Self {
Self::Pinned(value)
}
}
impl ::std::convert::From<DiscussionTransferred> for DiscussionEvent {
fn from(value: DiscussionTransferred) -> Self {
Self::Transferred(value)
}
}
impl ::std::convert::From<DiscussionUnanswered> for DiscussionEvent {
fn from(value: DiscussionUnanswered) -> Self {
Self::Unanswered(value)
}
}
impl ::std::convert::From<DiscussionUnlabeled> for DiscussionEvent {
fn from(value: DiscussionUnlabeled) -> Self {
Self::Unlabeled(value)
}
}
impl ::std::convert::From<DiscussionUnlocked> for DiscussionEvent {
fn from(value: DiscussionUnlocked) -> Self {
Self::Unlocked(value)
}
}
impl ::std::convert::From<DiscussionUnpinned> for DiscussionEvent {
fn from(value: DiscussionUnpinned) -> Self {
Self::Unpinned(value)
}
}
#[doc = "`DiscussionLabeled`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionLabeled {
pub action: DiscussionLabeledAction,
pub discussion: Discussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub label: Label,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionLabeledAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionLabeledAction {
#[serde(rename = "labeled")]
Labeled,
}
impl ::std::fmt::Display for DiscussionLabeledAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Labeled => f.write_str("labeled"),
}
}
}
impl ::std::str::FromStr for DiscussionLabeledAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"labeled" => Ok(Self::Labeled),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionLabeledAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionLabeledAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionLocked`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionLocked {
pub action: DiscussionLockedAction,
pub discussion: DiscussionLockedDiscussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionLockedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionLockedAction {
#[serde(rename = "locked")]
Locked,
}
impl ::std::fmt::Display for DiscussionLockedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Locked => f.write_str("locked"),
}
}
}
impl ::std::str::FromStr for DiscussionLockedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"locked" => Ok(Self::Locked),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionLockedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionLockedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionLockedDiscussion`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionLockedDiscussion {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub answer_chosen_at: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub answer_chosen_by: ::std::option::Option<User>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub answer_html_url: ::std::option::Option<::std::string::String>,
pub author_association: AuthorAssociation,
pub body: ::std::string::String,
pub category: DiscussionLockedDiscussionCategory,
pub comments: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub html_url: ::std::string::String,
pub id: i64,
pub locked: bool,
pub node_id: ::std::string::String,
pub number: i64,
pub repository_url: ::std::string::String,
pub state: DiscussionLockedDiscussionState,
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub user: User,
}
#[doc = "`DiscussionLockedDiscussionCategory`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionLockedDiscussionCategory {
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub description: ::std::string::String,
pub emoji: ::std::string::String,
pub id: i64,
pub is_answerable: bool,
pub name: ::std::string::String,
pub repository_id: i64,
pub slug: ::std::string::String,
pub updated_at: ::std::string::String,
}
#[doc = "`DiscussionLockedDiscussionState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionLockedDiscussionState {
#[serde(rename = "locked")]
Locked,
}
impl ::std::fmt::Display for DiscussionLockedDiscussionState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Locked => f.write_str("locked"),
}
}
}
impl ::std::str::FromStr for DiscussionLockedDiscussionState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"locked" => Ok(Self::Locked),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionLockedDiscussionState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionLockedDiscussionState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionPinned`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionPinned {
pub action: DiscussionPinnedAction,
pub discussion: Discussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionPinnedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionPinnedAction {
#[serde(rename = "pinned")]
Pinned,
}
impl ::std::fmt::Display for DiscussionPinnedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Pinned => f.write_str("pinned"),
}
}
}
impl ::std::str::FromStr for DiscussionPinnedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pinned" => Ok(Self::Pinned),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionPinnedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionPinnedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionState {
#[serde(rename = "open")]
Open,
#[serde(rename = "locked")]
Locked,
#[serde(rename = "converting")]
Converting,
}
impl ::std::fmt::Display for DiscussionState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Locked => f.write_str("locked"),
Self::Converting => f.write_str("converting"),
}
}
}
impl ::std::str::FromStr for DiscussionState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"locked" => Ok(Self::Locked),
"converting" => Ok(Self::Converting),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionTransferred`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionTransferred {
pub action: DiscussionTransferredAction,
pub changes: DiscussionTransferredChanges,
pub discussion: Discussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionTransferredAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionTransferredAction {
#[serde(rename = "transferred")]
Transferred,
}
impl ::std::fmt::Display for DiscussionTransferredAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Transferred => f.write_str("transferred"),
}
}
}
impl ::std::str::FromStr for DiscussionTransferredAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"transferred" => Ok(Self::Transferred),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionTransferredAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionTransferredAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionTransferredChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionTransferredChanges {
pub new_discussion: Discussion,
pub new_repository: Repository,
}
#[doc = "`DiscussionUnanswered`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionUnanswered {
pub action: DiscussionUnansweredAction,
pub discussion: DiscussionUnansweredDiscussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub old_answer: DiscussionUnansweredOldAnswer,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionUnansweredAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionUnansweredAction {
#[serde(rename = "unanswered")]
Unanswered,
}
impl ::std::fmt::Display for DiscussionUnansweredAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unanswered => f.write_str("unanswered"),
}
}
}
impl ::std::str::FromStr for DiscussionUnansweredAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unanswered" => Ok(Self::Unanswered),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionUnansweredAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionUnansweredAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionUnansweredDiscussion`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionUnansweredDiscussion {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<::std::string::String>,
pub answer_chosen_at: (),
pub answer_chosen_by: (),
pub answer_html_url: (),
pub author_association: AuthorAssociation,
pub body: ::std::string::String,
pub category: DiscussionUnansweredDiscussionCategory,
pub comments: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub html_url: ::std::string::String,
pub id: i64,
pub locked: bool,
pub node_id: ::std::string::String,
pub number: i64,
pub repository_url: ::std::string::String,
pub state: DiscussionUnansweredDiscussionState,
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub user: User,
}
#[doc = "`DiscussionUnansweredDiscussionCategory`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionUnansweredDiscussionCategory {
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub description: ::std::string::String,
pub emoji: ::std::string::String,
pub id: i64,
pub is_answerable: bool,
pub name: ::std::string::String,
pub repository_id: i64,
pub slug: ::std::string::String,
pub updated_at: ::std::string::String,
}
#[doc = "`DiscussionUnansweredDiscussionState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionUnansweredDiscussionState {
#[serde(rename = "open")]
Open,
#[serde(rename = "locked")]
Locked,
#[serde(rename = "converting")]
Converting,
}
impl ::std::fmt::Display for DiscussionUnansweredDiscussionState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Locked => f.write_str("locked"),
Self::Converting => f.write_str("converting"),
}
}
}
impl ::std::str::FromStr for DiscussionUnansweredDiscussionState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"locked" => Ok(Self::Locked),
"converting" => Ok(Self::Converting),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionUnansweredDiscussionState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionUnansweredDiscussionState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionUnansweredOldAnswer`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionUnansweredOldAnswer {
pub author_association: AuthorAssociation,
pub body: ::std::string::String,
pub child_comment_count: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub discussion_id: i64,
pub html_url: ::std::string::String,
pub id: i64,
pub node_id: ::std::string::String,
pub parent_id: (),
pub repository_url: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub user: User,
}
#[doc = "`DiscussionUnlabeled`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionUnlabeled {
pub action: DiscussionUnlabeledAction,
pub discussion: Discussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub label: Label,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionUnlabeledAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionUnlabeledAction {
#[serde(rename = "unlabeled")]
Unlabeled,
}
impl ::std::fmt::Display for DiscussionUnlabeledAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unlabeled => f.write_str("unlabeled"),
}
}
}
impl ::std::str::FromStr for DiscussionUnlabeledAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unlabeled" => Ok(Self::Unlabeled),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionUnlabeledAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionUnlabeledAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionUnlocked`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionUnlocked {
pub action: DiscussionUnlockedAction,
pub discussion: DiscussionUnlockedDiscussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionUnlockedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionUnlockedAction {
#[serde(rename = "unlocked")]
Unlocked,
}
impl ::std::fmt::Display for DiscussionUnlockedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unlocked => f.write_str("unlocked"),
}
}
}
impl ::std::str::FromStr for DiscussionUnlockedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unlocked" => Ok(Self::Unlocked),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionUnlockedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionUnlockedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionUnlockedDiscussion`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionUnlockedDiscussion {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub answer_chosen_at: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub answer_chosen_by: ::std::option::Option<User>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub answer_html_url: ::std::option::Option<::std::string::String>,
pub author_association: AuthorAssociation,
pub body: ::std::string::String,
pub category: DiscussionUnlockedDiscussionCategory,
pub comments: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub html_url: ::std::string::String,
pub id: i64,
pub locked: bool,
pub node_id: ::std::string::String,
pub number: i64,
pub repository_url: ::std::string::String,
pub state: DiscussionUnlockedDiscussionState,
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub user: User,
}
#[doc = "`DiscussionUnlockedDiscussionCategory`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionUnlockedDiscussionCategory {
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub description: ::std::string::String,
pub emoji: ::std::string::String,
pub id: i64,
pub is_answerable: bool,
pub name: ::std::string::String,
pub repository_id: i64,
pub slug: ::std::string::String,
pub updated_at: ::std::string::String,
}
#[doc = "`DiscussionUnlockedDiscussionState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionUnlockedDiscussionState {
#[serde(rename = "open")]
Open,
}
impl ::std::fmt::Display for DiscussionUnlockedDiscussionState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
}
}
}
impl ::std::str::FromStr for DiscussionUnlockedDiscussionState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionUnlockedDiscussionState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionUnlockedDiscussionState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`DiscussionUnpinned`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct DiscussionUnpinned {
pub action: DiscussionUnpinnedAction,
pub discussion: Discussion,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`DiscussionUnpinnedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum DiscussionUnpinnedAction {
#[serde(rename = "unpinned")]
Unpinned,
}
impl ::std::fmt::Display for DiscussionUnpinnedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unpinned => f.write_str("unpinned"),
}
}
}
impl ::std::str::FromStr for DiscussionUnpinnedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unpinned" => Ok(Self::Unpinned),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for DiscussionUnpinnedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for DiscussionUnpinnedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Everything`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum Everything {
BranchProtectionRuleEvent(BranchProtectionRuleEvent),
CheckRunEvent(CheckRunEvent),
CheckSuiteEvent(CheckSuiteEvent),
CodeScanningAlertEvent(CodeScanningAlertEvent),
CommitCommentEvent(CommitCommentEvent),
ContentReferenceEvent(ContentReferenceEvent),
CreateEvent(CreateEvent),
DeleteEvent(DeleteEvent),
DeployKeyEvent(DeployKeyEvent),
DeploymentEvent(DeploymentEvent),
DeploymentStatusEvent(DeploymentStatusEvent),
DiscussionEvent(DiscussionEvent),
DiscussionCommentEvent(DiscussionCommentEvent),
ForkEvent(ForkEvent),
GithubAppAuthorizationEvent(GithubAppAuthorizationEvent),
GollumEvent(GollumEvent),
InstallationEvent(InstallationEvent),
InstallationRepositoriesEvent(InstallationRepositoriesEvent),
IssueCommentEvent(IssueCommentEvent),
IssuesEvent(IssuesEvent),
LabelEvent(LabelEvent),
MarketplacePurchaseEvent(MarketplacePurchaseEvent),
MemberEvent(MemberEvent),
MembershipEvent(MembershipEvent),
MetaEvent(MetaEvent),
MilestoneEvent(MilestoneEvent),
OrgBlockEvent(OrgBlockEvent),
OrganizationEvent(OrganizationEvent),
PackageEvent(PackageEvent),
PageBuildEvent(PageBuildEvent),
PingEvent(PingEvent),
ProjectEvent(ProjectEvent),
ProjectCardEvent(ProjectCardEvent),
ProjectColumnEvent(ProjectColumnEvent),
PublicEvent(PublicEvent),
PullRequestEvent(PullRequestEvent),
PullRequestReviewEvent(PullRequestReviewEvent),
PullRequestReviewCommentEvent(PullRequestReviewCommentEvent),
PushEvent(PushEvent),
ReleaseEvent(ReleaseEvent),
RepositoryEvent(RepositoryEvent),
RepositoryDispatchEvent(RepositoryDispatchEvent),
RepositoryImportEvent(RepositoryImportEvent),
RepositoryVulnerabilityAlertEvent(RepositoryVulnerabilityAlertEvent),
SecretScanningAlertEvent(SecretScanningAlertEvent),
SecurityAdvisoryEvent(SecurityAdvisoryEvent),
SponsorshipEvent(SponsorshipEvent),
StarEvent(StarEvent),
StatusEvent(StatusEvent),
TeamEvent(TeamEvent),
TeamAddEvent(TeamAddEvent),
WatchEvent(WatchEvent),
WorkflowDispatchEvent(WorkflowDispatchEvent),
WorkflowJobEvent(WorkflowJobEvent),
WorkflowRunEvent(WorkflowRunEvent),
}
impl ::std::convert::From<BranchProtectionRuleEvent> for Everything {
fn from(value: BranchProtectionRuleEvent) -> Self {
Self::BranchProtectionRuleEvent(value)
}
}
impl ::std::convert::From<CheckRunEvent> for Everything {
fn from(value: CheckRunEvent) -> Self {
Self::CheckRunEvent(value)
}
}
impl ::std::convert::From<CheckSuiteEvent> for Everything {
fn from(value: CheckSuiteEvent) -> Self {
Self::CheckSuiteEvent(value)
}
}
impl ::std::convert::From<CodeScanningAlertEvent> for Everything {
fn from(value: CodeScanningAlertEvent) -> Self {
Self::CodeScanningAlertEvent(value)
}
}
impl ::std::convert::From<CommitCommentEvent> for Everything {
fn from(value: CommitCommentEvent) -> Self {
Self::CommitCommentEvent(value)
}
}
impl ::std::convert::From<ContentReferenceEvent> for Everything {
fn from(value: ContentReferenceEvent) -> Self {
Self::ContentReferenceEvent(value)
}
}
impl ::std::convert::From<CreateEvent> for Everything {
fn from(value: CreateEvent) -> Self {
Self::CreateEvent(value)
}
}
impl ::std::convert::From<DeleteEvent> for Everything {
fn from(value: DeleteEvent) -> Self {
Self::DeleteEvent(value)
}
}
impl ::std::convert::From<DeployKeyEvent> for Everything {
fn from(value: DeployKeyEvent) -> Self {
Self::DeployKeyEvent(value)
}
}
impl ::std::convert::From<DeploymentEvent> for Everything {
fn from(value: DeploymentEvent) -> Self {
Self::DeploymentEvent(value)
}
}
impl ::std::convert::From<DeploymentStatusEvent> for Everything {
fn from(value: DeploymentStatusEvent) -> Self {
Self::DeploymentStatusEvent(value)
}
}
impl ::std::convert::From<DiscussionEvent> for Everything {
fn from(value: DiscussionEvent) -> Self {
Self::DiscussionEvent(value)
}
}
impl ::std::convert::From<DiscussionCommentEvent> for Everything {
fn from(value: DiscussionCommentEvent) -> Self {
Self::DiscussionCommentEvent(value)
}
}
impl ::std::convert::From<ForkEvent> for Everything {
fn from(value: ForkEvent) -> Self {
Self::ForkEvent(value)
}
}
impl ::std::convert::From<GithubAppAuthorizationEvent> for Everything {
fn from(value: GithubAppAuthorizationEvent) -> Self {
Self::GithubAppAuthorizationEvent(value)
}
}
impl ::std::convert::From<GollumEvent> for Everything {
fn from(value: GollumEvent) -> Self {
Self::GollumEvent(value)
}
}
impl ::std::convert::From<InstallationEvent> for Everything {
fn from(value: InstallationEvent) -> Self {
Self::InstallationEvent(value)
}
}
impl ::std::convert::From<InstallationRepositoriesEvent> for Everything {
fn from(value: InstallationRepositoriesEvent) -> Self {
Self::InstallationRepositoriesEvent(value)
}
}
impl ::std::convert::From<IssueCommentEvent> for Everything {
fn from(value: IssueCommentEvent) -> Self {
Self::IssueCommentEvent(value)
}
}
impl ::std::convert::From<IssuesEvent> for Everything {
fn from(value: IssuesEvent) -> Self {
Self::IssuesEvent(value)
}
}
impl ::std::convert::From<LabelEvent> for Everything {
fn from(value: LabelEvent) -> Self {
Self::LabelEvent(value)
}
}
impl ::std::convert::From<MarketplacePurchaseEvent> for Everything {
fn from(value: MarketplacePurchaseEvent) -> Self {
Self::MarketplacePurchaseEvent(value)
}
}
impl ::std::convert::From<MemberEvent> for Everything {
fn from(value: MemberEvent) -> Self {
Self::MemberEvent(value)
}
}
impl ::std::convert::From<MembershipEvent> for Everything {
fn from(value: MembershipEvent) -> Self {
Self::MembershipEvent(value)
}
}
impl ::std::convert::From<MetaEvent> for Everything {
fn from(value: MetaEvent) -> Self {
Self::MetaEvent(value)
}
}
impl ::std::convert::From<MilestoneEvent> for Everything {
fn from(value: MilestoneEvent) -> Self {
Self::MilestoneEvent(value)
}
}
impl ::std::convert::From<OrgBlockEvent> for Everything {
fn from(value: OrgBlockEvent) -> Self {
Self::OrgBlockEvent(value)
}
}
impl ::std::convert::From<OrganizationEvent> for Everything {
fn from(value: OrganizationEvent) -> Self {
Self::OrganizationEvent(value)
}
}
impl ::std::convert::From<PackageEvent> for Everything {
fn from(value: PackageEvent) -> Self {
Self::PackageEvent(value)
}
}
impl ::std::convert::From<PageBuildEvent> for Everything {
fn from(value: PageBuildEvent) -> Self {
Self::PageBuildEvent(value)
}
}
impl ::std::convert::From<PingEvent> for Everything {
fn from(value: PingEvent) -> Self {
Self::PingEvent(value)
}
}
impl ::std::convert::From<ProjectEvent> for Everything {
fn from(value: ProjectEvent) -> Self {
Self::ProjectEvent(value)
}
}
impl ::std::convert::From<ProjectCardEvent> for Everything {
fn from(value: ProjectCardEvent) -> Self {
Self::ProjectCardEvent(value)
}
}
impl ::std::convert::From<ProjectColumnEvent> for Everything {
fn from(value: ProjectColumnEvent) -> Self {
Self::ProjectColumnEvent(value)
}
}
impl ::std::convert::From<PublicEvent> for Everything {
fn from(value: PublicEvent) -> Self {
Self::PublicEvent(value)
}
}
impl ::std::convert::From<PullRequestEvent> for Everything {
fn from(value: PullRequestEvent) -> Self {
Self::PullRequestEvent(value)
}
}
impl ::std::convert::From<PullRequestReviewEvent> for Everything {
fn from(value: PullRequestReviewEvent) -> Self {
Self::PullRequestReviewEvent(value)
}
}
impl ::std::convert::From<PullRequestReviewCommentEvent> for Everything {
fn from(value: PullRequestReviewCommentEvent) -> Self {
Self::PullRequestReviewCommentEvent(value)
}
}
impl ::std::convert::From<PushEvent> for Everything {
fn from(value: PushEvent) -> Self {
Self::PushEvent(value)
}
}
impl ::std::convert::From<ReleaseEvent> for Everything {
fn from(value: ReleaseEvent) -> Self {
Self::ReleaseEvent(value)
}
}
impl ::std::convert::From<RepositoryEvent> for Everything {
fn from(value: RepositoryEvent) -> Self {
Self::RepositoryEvent(value)
}
}
impl ::std::convert::From<RepositoryDispatchEvent> for Everything {
fn from(value: RepositoryDispatchEvent) -> Self {
Self::RepositoryDispatchEvent(value)
}
}
impl ::std::convert::From<RepositoryImportEvent> for Everything {
fn from(value: RepositoryImportEvent) -> Self {
Self::RepositoryImportEvent(value)
}
}
impl ::std::convert::From<RepositoryVulnerabilityAlertEvent> for Everything {
fn from(value: RepositoryVulnerabilityAlertEvent) -> Self {
Self::RepositoryVulnerabilityAlertEvent(value)
}
}
impl ::std::convert::From<SecretScanningAlertEvent> for Everything {
fn from(value: SecretScanningAlertEvent) -> Self {
Self::SecretScanningAlertEvent(value)
}
}
impl ::std::convert::From<SecurityAdvisoryEvent> for Everything {
fn from(value: SecurityAdvisoryEvent) -> Self {
Self::SecurityAdvisoryEvent(value)
}
}
impl ::std::convert::From<SponsorshipEvent> for Everything {
fn from(value: SponsorshipEvent) -> Self {
Self::SponsorshipEvent(value)
}
}
impl ::std::convert::From<StarEvent> for Everything {
fn from(value: StarEvent) -> Self {
Self::StarEvent(value)
}
}
impl ::std::convert::From<StatusEvent> for Everything {
fn from(value: StatusEvent) -> Self {
Self::StatusEvent(value)
}
}
impl ::std::convert::From<TeamEvent> for Everything {
fn from(value: TeamEvent) -> Self {
Self::TeamEvent(value)
}
}
impl ::std::convert::From<TeamAddEvent> for Everything {
fn from(value: TeamAddEvent) -> Self {
Self::TeamAddEvent(value)
}
}
impl ::std::convert::From<WatchEvent> for Everything {
fn from(value: WatchEvent) -> Self {
Self::WatchEvent(value)
}
}
impl ::std::convert::From<WorkflowDispatchEvent> for Everything {
fn from(value: WorkflowDispatchEvent) -> Self {
Self::WorkflowDispatchEvent(value)
}
}
impl ::std::convert::From<WorkflowJobEvent> for Everything {
fn from(value: WorkflowJobEvent) -> Self {
Self::WorkflowJobEvent(value)
}
}
impl ::std::convert::From<WorkflowRunEvent> for Everything {
fn from(value: WorkflowRunEvent) -> Self {
Self::WorkflowRunEvent(value)
}
}
#[doc = "A user forks a repository."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ForkEvent {
pub forkee: ForkEventForkee,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "The created [`repository`](https://docs.github.com/en/rest/reference/repos#get-a-repository) resource."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ForkEventForkee {
#[doc = "Whether to allow auto-merge for pull requests."]
#[serde(default)]
pub allow_auto_merge: bool,
#[doc = "Whether to allow private forks"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub allow_forking: ::std::option::Option<bool>,
#[doc = "Whether to allow merge commits for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_merge_commit: bool,
#[doc = "Whether to allow rebase merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_rebase_merge: bool,
#[doc = "Whether to allow squash merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_squash_merge: bool,
pub archive_url: ::std::string::String,
#[doc = "Whether the repository is archived."]
pub archived: bool,
pub assignees_url: ::std::string::String,
pub blobs_url: ::std::string::String,
pub branches_url: ::std::string::String,
pub clone_url: ::std::string::String,
pub collaborators_url: ::std::string::String,
pub comments_url: ::std::string::String,
pub commits_url: ::std::string::String,
pub compare_url: ::std::string::String,
pub contents_url: ::std::string::String,
pub contributors_url: ::std::string::String,
pub created_at: ForkEventForkeeCreatedAt,
#[doc = "The default branch of the repository."]
pub default_branch: ::std::string::String,
#[doc = "Whether to delete head branches when pull requests are merged"]
#[serde(default)]
pub delete_branch_on_merge: bool,
pub deployments_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[doc = "Returns whether or not this repository is disabled."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub disabled: ::std::option::Option<bool>,
pub downloads_url: ::std::string::String,
pub events_url: ::std::string::String,
pub fork: bool,
pub forks: i64,
pub forks_count: i64,
pub forks_url: ::std::string::String,
pub full_name: ::std::string::String,
pub git_commits_url: ::std::string::String,
pub git_refs_url: ::std::string::String,
pub git_tags_url: ::std::string::String,
pub git_url: ::std::string::String,
#[doc = "Whether downloads are enabled."]
pub has_downloads: bool,
#[doc = "Whether issues are enabled."]
pub has_issues: bool,
pub has_pages: bool,
#[doc = "Whether projects are enabled."]
pub has_projects: bool,
#[doc = "Whether the wiki is enabled."]
pub has_wiki: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub homepage: ::std::option::Option<::std::string::String>,
pub hooks_url: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
pub issue_comment_url: ::std::string::String,
pub issue_events_url: ::std::string::String,
pub issues_url: ::std::string::String,
pub keys_url: ::std::string::String,
pub labels_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub language: ::std::option::Option<::std::string::String>,
pub languages_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub license: ::std::option::Option<License>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub master_branch: ::std::option::Option<::std::string::String>,
pub merges_url: ::std::string::String,
pub milestones_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mirror_url: ::std::option::Option<::std::string::String>,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub notifications_url: ::std::string::String,
pub open_issues: i64,
pub open_issues_count: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<::std::string::String>,
pub owner: User,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub permissions: ::std::option::Option<ForkEventForkeePermissions>,
#[doc = "Whether the repository is private or public."]
pub private: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub public: ::std::option::Option<bool>,
pub pulls_url: ::std::string::String,
pub pushed_at: ForkEventForkeePushedAt,
pub releases_url: ::std::string::String,
pub size: i64,
pub ssh_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub stargazers: ::std::option::Option<i64>,
pub stargazers_count: i64,
pub stargazers_url: ::std::string::String,
pub statuses_url: ::std::string::String,
pub subscribers_url: ::std::string::String,
pub subscription_url: ::std::string::String,
pub svn_url: ::std::string::String,
pub tags_url: ::std::string::String,
pub teams_url: ::std::string::String,
pub trees_url: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub watchers: i64,
pub watchers_count: i64,
}
#[doc = "`ForkEventForkeeCreatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForkEventForkeeCreatedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
}
impl ::std::fmt::Display for ForkEventForkeeCreatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Integer(x) => x.fmt(f),
Self::DateTime(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for ForkEventForkeeCreatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for ForkEventForkeeCreatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ForkEventForkeeCreatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<i64> for ForkEventForkeeCreatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>> for ForkEventForkeeCreatedAt {
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`ForkEventForkeePermissions`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ForkEventForkeePermissions {
pub admin: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub maintain: ::std::option::Option<bool>,
pub pull: bool,
pub push: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub triage: ::std::option::Option<bool>,
}
#[doc = "`ForkEventForkeePushedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ForkEventForkeePushedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Null,
}
impl ::std::convert::From<i64> for ForkEventForkeePushedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>> for ForkEventForkeePushedAt {
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`GithubAppAuthorizationEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct GithubAppAuthorizationEvent(pub GithubAppAuthorizationRevoked);
impl ::std::ops::Deref for GithubAppAuthorizationEvent {
type Target = GithubAppAuthorizationRevoked;
fn deref(&self) -> &GithubAppAuthorizationRevoked {
&self.0
}
}
impl ::std::convert::From<GithubAppAuthorizationEvent> for GithubAppAuthorizationRevoked {
fn from(value: GithubAppAuthorizationEvent) -> Self {
value.0
}
}
impl ::std::convert::From<GithubAppAuthorizationRevoked> for GithubAppAuthorizationEvent {
fn from(value: GithubAppAuthorizationRevoked) -> Self {
Self(value)
}
}
#[doc = "`GithubAppAuthorizationRevoked`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct GithubAppAuthorizationRevoked {
pub action: GithubAppAuthorizationRevokedAction,
pub sender: User,
}
#[doc = "`GithubAppAuthorizationRevokedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum GithubAppAuthorizationRevokedAction {
#[serde(rename = "revoked")]
Revoked,
}
impl ::std::fmt::Display for GithubAppAuthorizationRevokedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Revoked => f.write_str("revoked"),
}
}
}
impl ::std::str::FromStr for GithubAppAuthorizationRevokedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"revoked" => Ok(Self::Revoked),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for GithubAppAuthorizationRevokedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for GithubAppAuthorizationRevokedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`GithubOrg`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct GithubOrg {
pub avatar_url: ::std::string::String,
#[serde(default)]
pub email: (),
pub events_url: ::std::string::String,
pub followers_url: ::std::string::String,
pub following_url: ::std::string::String,
pub gists_url: ::std::string::String,
pub gravatar_id: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub login: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
pub node_id: ::std::string::String,
pub organizations_url: ::std::string::String,
pub received_events_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub site_admin: bool,
pub starred_url: ::std::string::String,
pub subscriptions_url: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "A wiki page is created or updated."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct GollumEvent {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
#[doc = "The pages that were updated."]
pub pages: ::std::vec::Vec<GollumEventPagesItem>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`GollumEventPagesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct GollumEventPagesItem {
#[doc = "The action that was performed on the page. Can be `created` or `edited`."]
pub action: GollumEventPagesItemAction,
#[doc = "Points to the HTML wiki page."]
pub html_url: ::std::string::String,
#[doc = "The name of the page."]
pub page_name: ::std::string::String,
#[doc = "The latest commit SHA of the page."]
pub sha: ::std::string::String,
pub summary: (),
#[doc = "The current page title."]
pub title: ::std::string::String,
}
#[doc = "The action that was performed on the page. Can be `created` or `edited`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum GollumEventPagesItemAction {
#[serde(rename = "created")]
Created,
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for GollumEventPagesItemAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for GollumEventPagesItemAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for GollumEventPagesItemAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for GollumEventPagesItemAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The GitHub App installation."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Installation {
pub access_tokens_url: ::std::string::String,
pub account: User,
pub app_id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub app_slug: ::std::option::Option<::std::string::String>,
pub created_at: InstallationCreatedAt,
pub events: ::std::vec::Vec<InstallationEventsItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub has_multiple_single_files: ::std::option::Option<bool>,
pub html_url: ::std::string::String,
#[doc = "The ID of the installation."]
pub id: i64,
pub permissions: InstallationPermissions,
pub repositories_url: ::std::string::String,
#[doc = "Describe whether all repositories have been selected or there's a selection involved"]
pub repository_selection: InstallationRepositorySelection,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub single_file_name: ::std::option::Option<::std::string::String>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub single_file_paths: ::std::vec::Vec<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub suspended_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub suspended_by: ::std::option::Option<User>,
#[doc = "The ID of the user or organization this token is being scoped to."]
pub target_id: i64,
pub target_type: InstallationTargetType,
pub updated_at: InstallationUpdatedAt,
}
#[doc = "`InstallationCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationCreated {
pub action: InstallationCreatedAction,
pub installation: Installation,
#[doc = "An array of repository objects that the installation can access."]
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub repositories: ::std::vec::Vec<InstallationCreatedRepositoriesItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub requester: ::std::option::Option<User>,
pub sender: User,
}
#[doc = "`InstallationCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for InstallationCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for InstallationCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationCreatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum InstallationCreatedAt {
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Integer(i64),
}
impl ::std::fmt::Display for InstallationCreatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::DateTime(x) => x.fmt(f),
Self::Integer(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for InstallationCreatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationCreatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationCreatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>> for InstallationCreatedAt {
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
impl ::std::convert::From<i64> for InstallationCreatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
#[doc = "`InstallationCreatedRepositoriesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationCreatedRepositoriesItem {
pub full_name: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "Whether the repository is private or public."]
pub private: bool,
}
#[doc = "`InstallationDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationDeleted {
pub action: InstallationDeletedAction,
pub installation: Installation,
#[doc = "An array of repository objects that the installation can access."]
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub repositories: ::std::vec::Vec<InstallationDeletedRepositoriesItem>,
#[serde(default)]
pub requester: (),
pub sender: User,
}
#[doc = "`InstallationDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for InstallationDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for InstallationDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationDeletedRepositoriesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationDeletedRepositoriesItem {
pub full_name: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "Whether the repository is private or public."]
pub private: bool,
}
#[doc = "`InstallationEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum InstallationEvent {
Created(InstallationCreated),
Deleted(InstallationDeleted),
NewPermissionsAccepted(InstallationNewPermissionsAccepted),
Suspend(InstallationSuspend),
Unsuspend(InstallationUnsuspend),
}
impl ::std::convert::From<InstallationCreated> for InstallationEvent {
fn from(value: InstallationCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<InstallationDeleted> for InstallationEvent {
fn from(value: InstallationDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<InstallationNewPermissionsAccepted> for InstallationEvent {
fn from(value: InstallationNewPermissionsAccepted) -> Self {
Self::NewPermissionsAccepted(value)
}
}
impl ::std::convert::From<InstallationSuspend> for InstallationEvent {
fn from(value: InstallationSuspend) -> Self {
Self::Suspend(value)
}
}
impl ::std::convert::From<InstallationUnsuspend> for InstallationEvent {
fn from(value: InstallationUnsuspend) -> Self {
Self::Unsuspend(value)
}
}
#[doc = "`InstallationEventsItem`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationEventsItem {
#[serde(rename = "check_run")]
CheckRun,
#[serde(rename = "check_suite")]
CheckSuite,
#[serde(rename = "code_scanning_alert")]
CodeScanningAlert,
#[serde(rename = "commit_comment")]
CommitComment,
#[serde(rename = "content_reference")]
ContentReference,
#[serde(rename = "create")]
Create,
#[serde(rename = "delete")]
Delete,
#[serde(rename = "deployment")]
Deployment,
#[serde(rename = "deployment_review")]
DeploymentReview,
#[serde(rename = "deployment_status")]
DeploymentStatus,
#[serde(rename = "deploy_key")]
DeployKey,
#[serde(rename = "discussion")]
Discussion,
#[serde(rename = "discussion_comment")]
DiscussionComment,
#[serde(rename = "fork")]
Fork,
#[serde(rename = "gollum")]
Gollum,
#[serde(rename = "issues")]
Issues,
#[serde(rename = "issue_comment")]
IssueComment,
#[serde(rename = "label")]
Label,
#[serde(rename = "member")]
Member,
#[serde(rename = "membership")]
Membership,
#[serde(rename = "merge_queue_entry")]
MergeQueueEntry,
#[serde(rename = "milestone")]
Milestone,
#[serde(rename = "organization")]
Organization,
#[serde(rename = "org_block")]
OrgBlock,
#[serde(rename = "page_build")]
PageBuild,
#[serde(rename = "project")]
Project,
#[serde(rename = "project_card")]
ProjectCard,
#[serde(rename = "project_column")]
ProjectColumn,
#[serde(rename = "public")]
Public,
#[serde(rename = "pull_request")]
PullRequest,
#[serde(rename = "pull_request_review")]
PullRequestReview,
#[serde(rename = "pull_request_review_comment")]
PullRequestReviewComment,
#[serde(rename = "push")]
Push,
#[serde(rename = "registry_package")]
RegistryPackage,
#[serde(rename = "release")]
Release,
#[serde(rename = "repository")]
Repository,
#[serde(rename = "repository_dispatch")]
RepositoryDispatch,
#[serde(rename = "secret_scanning_alert")]
SecretScanningAlert,
#[serde(rename = "star")]
Star,
#[serde(rename = "status")]
Status,
#[serde(rename = "team")]
Team,
#[serde(rename = "team_add")]
TeamAdd,
#[serde(rename = "watch")]
Watch,
#[serde(rename = "workflow_dispatch")]
WorkflowDispatch,
#[serde(rename = "workflow_run")]
WorkflowRun,
}
impl ::std::fmt::Display for InstallationEventsItem {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::CheckRun => f.write_str("check_run"),
Self::CheckSuite => f.write_str("check_suite"),
Self::CodeScanningAlert => f.write_str("code_scanning_alert"),
Self::CommitComment => f.write_str("commit_comment"),
Self::ContentReference => f.write_str("content_reference"),
Self::Create => f.write_str("create"),
Self::Delete => f.write_str("delete"),
Self::Deployment => f.write_str("deployment"),
Self::DeploymentReview => f.write_str("deployment_review"),
Self::DeploymentStatus => f.write_str("deployment_status"),
Self::DeployKey => f.write_str("deploy_key"),
Self::Discussion => f.write_str("discussion"),
Self::DiscussionComment => f.write_str("discussion_comment"),
Self::Fork => f.write_str("fork"),
Self::Gollum => f.write_str("gollum"),
Self::Issues => f.write_str("issues"),
Self::IssueComment => f.write_str("issue_comment"),
Self::Label => f.write_str("label"),
Self::Member => f.write_str("member"),
Self::Membership => f.write_str("membership"),
Self::MergeQueueEntry => f.write_str("merge_queue_entry"),
Self::Milestone => f.write_str("milestone"),
Self::Organization => f.write_str("organization"),
Self::OrgBlock => f.write_str("org_block"),
Self::PageBuild => f.write_str("page_build"),
Self::Project => f.write_str("project"),
Self::ProjectCard => f.write_str("project_card"),
Self::ProjectColumn => f.write_str("project_column"),
Self::Public => f.write_str("public"),
Self::PullRequest => f.write_str("pull_request"),
Self::PullRequestReview => f.write_str("pull_request_review"),
Self::PullRequestReviewComment => f.write_str("pull_request_review_comment"),
Self::Push => f.write_str("push"),
Self::RegistryPackage => f.write_str("registry_package"),
Self::Release => f.write_str("release"),
Self::Repository => f.write_str("repository"),
Self::RepositoryDispatch => f.write_str("repository_dispatch"),
Self::SecretScanningAlert => f.write_str("secret_scanning_alert"),
Self::Star => f.write_str("star"),
Self::Status => f.write_str("status"),
Self::Team => f.write_str("team"),
Self::TeamAdd => f.write_str("team_add"),
Self::Watch => f.write_str("watch"),
Self::WorkflowDispatch => f.write_str("workflow_dispatch"),
Self::WorkflowRun => f.write_str("workflow_run"),
}
}
}
impl ::std::str::FromStr for InstallationEventsItem {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"check_run" => Ok(Self::CheckRun),
"check_suite" => Ok(Self::CheckSuite),
"code_scanning_alert" => Ok(Self::CodeScanningAlert),
"commit_comment" => Ok(Self::CommitComment),
"content_reference" => Ok(Self::ContentReference),
"create" => Ok(Self::Create),
"delete" => Ok(Self::Delete),
"deployment" => Ok(Self::Deployment),
"deployment_review" => Ok(Self::DeploymentReview),
"deployment_status" => Ok(Self::DeploymentStatus),
"deploy_key" => Ok(Self::DeployKey),
"discussion" => Ok(Self::Discussion),
"discussion_comment" => Ok(Self::DiscussionComment),
"fork" => Ok(Self::Fork),
"gollum" => Ok(Self::Gollum),
"issues" => Ok(Self::Issues),
"issue_comment" => Ok(Self::IssueComment),
"label" => Ok(Self::Label),
"member" => Ok(Self::Member),
"membership" => Ok(Self::Membership),
"merge_queue_entry" => Ok(Self::MergeQueueEntry),
"milestone" => Ok(Self::Milestone),
"organization" => Ok(Self::Organization),
"org_block" => Ok(Self::OrgBlock),
"page_build" => Ok(Self::PageBuild),
"project" => Ok(Self::Project),
"project_card" => Ok(Self::ProjectCard),
"project_column" => Ok(Self::ProjectColumn),
"public" => Ok(Self::Public),
"pull_request" => Ok(Self::PullRequest),
"pull_request_review" => Ok(Self::PullRequestReview),
"pull_request_review_comment" => Ok(Self::PullRequestReviewComment),
"push" => Ok(Self::Push),
"registry_package" => Ok(Self::RegistryPackage),
"release" => Ok(Self::Release),
"repository" => Ok(Self::Repository),
"repository_dispatch" => Ok(Self::RepositoryDispatch),
"secret_scanning_alert" => Ok(Self::SecretScanningAlert),
"star" => Ok(Self::Star),
"status" => Ok(Self::Status),
"team" => Ok(Self::Team),
"team_add" => Ok(Self::TeamAdd),
"watch" => Ok(Self::Watch),
"workflow_dispatch" => Ok(Self::WorkflowDispatch),
"workflow_run" => Ok(Self::WorkflowRun),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationEventsItem {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationEventsItem {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "Installation"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationLite {
#[doc = "The ID of the installation."]
pub id: i64,
pub node_id: ::std::string::String,
}
#[doc = "`InstallationNewPermissionsAccepted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationNewPermissionsAccepted {
pub action: InstallationNewPermissionsAcceptedAction,
pub installation: Installation,
#[doc = "An array of repository objects that the installation can access."]
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub repositories: ::std::vec::Vec<InstallationNewPermissionsAcceptedRepositoriesItem>,
#[serde(default)]
pub requester: (),
pub sender: User,
}
#[doc = "`InstallationNewPermissionsAcceptedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationNewPermissionsAcceptedAction {
#[serde(rename = "new_permissions_accepted")]
NewPermissionsAccepted,
}
impl ::std::fmt::Display for InstallationNewPermissionsAcceptedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::NewPermissionsAccepted => f.write_str("new_permissions_accepted"),
}
}
}
impl ::std::str::FromStr for InstallationNewPermissionsAcceptedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"new_permissions_accepted" => Ok(Self::NewPermissionsAccepted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationNewPermissionsAcceptedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationNewPermissionsAcceptedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationNewPermissionsAcceptedRepositoriesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationNewPermissionsAcceptedRepositoriesItem {
pub full_name: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "Whether the repository is private or public."]
pub private: bool,
}
#[doc = "`InstallationPermissions`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct InstallationPermissions {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub actions: ::std::option::Option<InstallationPermissionsActions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub administration: ::std::option::Option<InstallationPermissionsAdministration>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub checks: ::std::option::Option<InstallationPermissionsChecks>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub content_references: ::std::option::Option<InstallationPermissionsContentReferences>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub contents: ::std::option::Option<InstallationPermissionsContents>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub deployments: ::std::option::Option<InstallationPermissionsDeployments>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub discussions: ::std::option::Option<InstallationPermissionsDiscussions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub emails: ::std::option::Option<InstallationPermissionsEmails>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub environments: ::std::option::Option<InstallationPermissionsEnvironments>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub issues: ::std::option::Option<InstallationPermissionsIssues>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub members: ::std::option::Option<InstallationPermissionsMembers>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub metadata: ::std::option::Option<InstallationPermissionsMetadata>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_administration:
::std::option::Option<InstallationPermissionsOrganizationAdministration>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_events: ::std::option::Option<InstallationPermissionsOrganizationEvents>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_hooks: ::std::option::Option<InstallationPermissionsOrganizationHooks>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_packages: ::std::option::Option<InstallationPermissionsOrganizationPackages>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_plan: ::std::option::Option<InstallationPermissionsOrganizationPlan>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_projects: ::std::option::Option<InstallationPermissionsOrganizationProjects>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_secrets: ::std::option::Option<InstallationPermissionsOrganizationSecrets>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_self_hosted_runners:
::std::option::Option<InstallationPermissionsOrganizationSelfHostedRunners>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_user_blocking:
::std::option::Option<InstallationPermissionsOrganizationUserBlocking>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub packages: ::std::option::Option<InstallationPermissionsPackages>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pages: ::std::option::Option<InstallationPermissionsPages>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_requests: ::std::option::Option<InstallationPermissionsPullRequests>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository_hooks: ::std::option::Option<InstallationPermissionsRepositoryHooks>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository_projects: ::std::option::Option<InstallationPermissionsRepositoryProjects>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub secret_scanning_alerts: ::std::option::Option<InstallationPermissionsSecretScanningAlerts>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub secrets: ::std::option::Option<InstallationPermissionsSecrets>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub security_events: ::std::option::Option<InstallationPermissionsSecurityEvents>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub security_scanning_alert:
::std::option::Option<InstallationPermissionsSecurityScanningAlert>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub single_file: ::std::option::Option<InstallationPermissionsSingleFile>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub statuses: ::std::option::Option<InstallationPermissionsStatuses>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub team_discussions: ::std::option::Option<InstallationPermissionsTeamDiscussions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub vulnerability_alerts: ::std::option::Option<InstallationPermissionsVulnerabilityAlerts>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub workflows: ::std::option::Option<InstallationPermissionsWorkflows>,
}
#[doc = "`InstallationPermissionsActions`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsActions {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsActions {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsActions {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsActions {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsActions {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsAdministration`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsAdministration {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsAdministration {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsAdministration {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsAdministration {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsAdministration {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsChecks`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsChecks {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsChecks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsChecks {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsChecks {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsChecks {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsContentReferences`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsContentReferences {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsContentReferences {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsContentReferences {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsContentReferences {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsContentReferences {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsContents`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsContents {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsContents {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsContents {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsContents {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsContents {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsDeployments`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsDeployments {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsDeployments {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsDeployments {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsDeployments {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsDeployments {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsDiscussions`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsDiscussions {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsDiscussions {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsDiscussions {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsDiscussions {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsDiscussions {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsEmails`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsEmails {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsEmails {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsEmails {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsEmails {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsEmails {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsEnvironments`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsEnvironments {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsEnvironments {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsEnvironments {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsEnvironments {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsEnvironments {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsIssues`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsIssues {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsIssues {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsIssues {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsIssues {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsIssues {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsMembers`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsMembers {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsMembers {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsMembers {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsMembers {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsMembers {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsMetadata`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsMetadata {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsMetadata {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsMetadata {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsMetadata {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsMetadata {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsOrganizationAdministration`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsOrganizationAdministration {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsOrganizationAdministration {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsOrganizationAdministration {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsOrganizationAdministration {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationPermissionsOrganizationAdministration
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsOrganizationEvents`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsOrganizationEvents {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsOrganizationEvents {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsOrganizationEvents {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsOrganizationEvents {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsOrganizationEvents {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsOrganizationHooks`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsOrganizationHooks {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsOrganizationHooks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsOrganizationHooks {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsOrganizationHooks {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsOrganizationHooks {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsOrganizationPackages`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsOrganizationPackages {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsOrganizationPackages {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsOrganizationPackages {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsOrganizationPackages {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationPermissionsOrganizationPackages
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsOrganizationPlan`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsOrganizationPlan {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsOrganizationPlan {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsOrganizationPlan {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsOrganizationPlan {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsOrganizationPlan {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsOrganizationProjects`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsOrganizationProjects {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsOrganizationProjects {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsOrganizationProjects {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsOrganizationProjects {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationPermissionsOrganizationProjects
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsOrganizationSecrets`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsOrganizationSecrets {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsOrganizationSecrets {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsOrganizationSecrets {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsOrganizationSecrets {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsOrganizationSecrets {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsOrganizationSelfHostedRunners`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsOrganizationSelfHostedRunners {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsOrganizationSelfHostedRunners {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsOrganizationSelfHostedRunners {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsOrganizationSelfHostedRunners {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationPermissionsOrganizationSelfHostedRunners
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsOrganizationUserBlocking`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsOrganizationUserBlocking {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsOrganizationUserBlocking {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsOrganizationUserBlocking {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsOrganizationUserBlocking {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationPermissionsOrganizationUserBlocking
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsPackages`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsPackages {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsPackages {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsPackages {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsPackages {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsPackages {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsPages`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsPages {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsPages {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsPages {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsPages {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsPages {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsPullRequests`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsPullRequests {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsPullRequests {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsPullRequests {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsPullRequests {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsPullRequests {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsRepositoryHooks`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsRepositoryHooks {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsRepositoryHooks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsRepositoryHooks {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsRepositoryHooks {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsRepositoryHooks {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsRepositoryProjects`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsRepositoryProjects {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsRepositoryProjects {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsRepositoryProjects {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsRepositoryProjects {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsRepositoryProjects {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsSecretScanningAlerts`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsSecretScanningAlerts {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsSecretScanningAlerts {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsSecretScanningAlerts {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsSecretScanningAlerts {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationPermissionsSecretScanningAlerts
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsSecrets`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsSecrets {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsSecrets {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsSecrets {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsSecrets {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsSecrets {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsSecurityEvents`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsSecurityEvents {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsSecurityEvents {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsSecurityEvents {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsSecurityEvents {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsSecurityEvents {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsSecurityScanningAlert`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsSecurityScanningAlert {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsSecurityScanningAlert {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsSecurityScanningAlert {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsSecurityScanningAlert {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationPermissionsSecurityScanningAlert
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsSingleFile`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsSingleFile {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsSingleFile {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsSingleFile {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsSingleFile {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsSingleFile {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsStatuses`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsStatuses {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsStatuses {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsStatuses {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsStatuses {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsStatuses {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsTeamDiscussions`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsTeamDiscussions {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsTeamDiscussions {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsTeamDiscussions {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsTeamDiscussions {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsTeamDiscussions {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsVulnerabilityAlerts`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsVulnerabilityAlerts {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsVulnerabilityAlerts {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsVulnerabilityAlerts {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsVulnerabilityAlerts {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsVulnerabilityAlerts {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationPermissionsWorkflows`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationPermissionsWorkflows {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationPermissionsWorkflows {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationPermissionsWorkflows {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationPermissionsWorkflows {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationPermissionsWorkflows {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationRepositoriesAdded`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationRepositoriesAdded {
pub action: InstallationRepositoriesAddedAction,
pub installation: Installation,
#[doc = "An array of repository objects, which were added to the installation."]
pub repositories_added: ::std::vec::Vec<InstallationRepositoriesAddedRepositoriesAddedItem>,
#[doc = "An array of repository objects, which were removed from the installation."]
pub repositories_removed: ::std::vec::Vec<InstallationRepositoriesAddedRepositoriesRemovedItem>,
#[doc = "Describe whether all repositories have been selected or there's a selection involved"]
pub repository_selection: InstallationRepositoriesAddedRepositorySelection,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub requester: ::std::option::Option<User>,
pub sender: User,
}
#[doc = "`InstallationRepositoriesAddedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationRepositoriesAddedAction {
#[serde(rename = "added")]
Added,
}
impl ::std::fmt::Display for InstallationRepositoriesAddedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Added => f.write_str("added"),
}
}
}
impl ::std::str::FromStr for InstallationRepositoriesAddedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"added" => Ok(Self::Added),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationRepositoriesAddedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationRepositoriesAddedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationRepositoriesAddedRepositoriesAddedItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationRepositoriesAddedRepositoriesAddedItem {
pub full_name: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "Whether the repository is private or public."]
pub private: bool,
}
#[doc = "`InstallationRepositoriesAddedRepositoriesRemovedItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct InstallationRepositoriesAddedRepositoriesRemovedItem {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub full_name: ::std::option::Option<::std::string::String>,
#[doc = "Unique identifier of the repository"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub id: ::std::option::Option<i64>,
#[doc = "The name of the repository."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub node_id: ::std::option::Option<::std::string::String>,
#[doc = "Whether the repository is private or public."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub private: ::std::option::Option<bool>,
}
#[doc = "Describe whether all repositories have been selected or there's a selection involved"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationRepositoriesAddedRepositorySelection {
#[serde(rename = "all")]
All,
#[serde(rename = "selected")]
Selected,
}
impl ::std::fmt::Display for InstallationRepositoriesAddedRepositorySelection {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Selected => f.write_str("selected"),
}
}
}
impl ::std::str::FromStr for InstallationRepositoriesAddedRepositorySelection {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"selected" => Ok(Self::Selected),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationRepositoriesAddedRepositorySelection {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationRepositoriesAddedRepositorySelection
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationRepositoriesEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum InstallationRepositoriesEvent {
Added(InstallationRepositoriesAdded),
Removed(InstallationRepositoriesRemoved),
}
impl ::std::convert::From<InstallationRepositoriesAdded> for InstallationRepositoriesEvent {
fn from(value: InstallationRepositoriesAdded) -> Self {
Self::Added(value)
}
}
impl ::std::convert::From<InstallationRepositoriesRemoved> for InstallationRepositoriesEvent {
fn from(value: InstallationRepositoriesRemoved) -> Self {
Self::Removed(value)
}
}
#[doc = "`InstallationRepositoriesRemoved`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationRepositoriesRemoved {
pub action: InstallationRepositoriesRemovedAction,
pub installation: Installation,
#[doc = "An array of repository objects, which were added to the installation."]
pub repositories_added: ::std::vec::Vec<InstallationRepositoriesRemovedRepositoriesAddedItem>,
#[doc = "An array of repository objects, which were removed from the installation."]
pub repositories_removed:
::std::vec::Vec<InstallationRepositoriesRemovedRepositoriesRemovedItem>,
#[doc = "Describe whether all repositories have been selected or there's a selection involved"]
pub repository_selection: InstallationRepositoriesRemovedRepositorySelection,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub requester: ::std::option::Option<User>,
pub sender: User,
}
#[doc = "`InstallationRepositoriesRemovedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationRepositoriesRemovedAction {
#[serde(rename = "removed")]
Removed,
}
impl ::std::fmt::Display for InstallationRepositoriesRemovedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Removed => f.write_str("removed"),
}
}
}
impl ::std::str::FromStr for InstallationRepositoriesRemovedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"removed" => Ok(Self::Removed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationRepositoriesRemovedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationRepositoriesRemovedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationRepositoriesRemovedRepositoriesAddedItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationRepositoriesRemovedRepositoriesAddedItem {
pub full_name: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "Whether the repository is private or public."]
pub private: bool,
}
#[doc = "`InstallationRepositoriesRemovedRepositoriesRemovedItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationRepositoriesRemovedRepositoriesRemovedItem {
pub full_name: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "Whether the repository is private or public."]
pub private: bool,
}
#[doc = "Describe whether all repositories have been selected or there's a selection involved"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationRepositoriesRemovedRepositorySelection {
#[serde(rename = "all")]
All,
#[serde(rename = "selected")]
Selected,
}
impl ::std::fmt::Display for InstallationRepositoriesRemovedRepositorySelection {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Selected => f.write_str("selected"),
}
}
}
impl ::std::str::FromStr for InstallationRepositoriesRemovedRepositorySelection {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"selected" => Ok(Self::Selected),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationRepositoriesRemovedRepositorySelection {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationRepositoriesRemovedRepositorySelection
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "Describe whether all repositories have been selected or there's a selection involved"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationRepositorySelection {
#[serde(rename = "all")]
All,
#[serde(rename = "selected")]
Selected,
}
impl ::std::fmt::Display for InstallationRepositorySelection {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Selected => f.write_str("selected"),
}
}
}
impl ::std::str::FromStr for InstallationRepositorySelection {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"selected" => Ok(Self::Selected),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationRepositorySelection {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationRepositorySelection {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspend`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationSuspend {
pub action: InstallationSuspendAction,
pub installation: InstallationSuspendInstallation,
#[doc = "An array of repository objects that the installation can access."]
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub repositories: ::std::vec::Vec<InstallationSuspendRepositoriesItem>,
#[serde(default)]
pub requester: (),
pub sender: User,
}
#[doc = "`InstallationSuspendAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendAction {
#[serde(rename = "suspend")]
Suspend,
}
impl ::std::fmt::Display for InstallationSuspendAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Suspend => f.write_str("suspend"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"suspend" => Ok(Self::Suspend),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationSuspendAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallation`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationSuspendInstallation {
pub access_tokens_url: ::std::string::String,
pub account: User,
pub app_id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub app_slug: ::std::option::Option<::std::string::String>,
pub created_at: InstallationSuspendInstallationCreatedAt,
pub events: ::std::vec::Vec<InstallationSuspendInstallationEventsItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub has_multiple_single_files: ::std::option::Option<bool>,
pub html_url: ::std::string::String,
#[doc = "The ID of the installation."]
pub id: i64,
pub permissions: InstallationSuspendInstallationPermissions,
pub repositories_url: ::std::string::String,
#[doc = "Describe whether all repositories have been selected or there's a selection involved"]
pub repository_selection: InstallationSuspendInstallationRepositorySelection,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub single_file_name: ::std::option::Option<::std::string::String>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub single_file_paths: ::std::vec::Vec<::std::string::String>,
pub suspended_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub suspended_by: InstallationSuspendInstallationSuspendedBy,
#[doc = "The ID of the user or organization this token is being scoped to."]
pub target_id: i64,
pub target_type: InstallationSuspendInstallationTargetType,
pub updated_at: InstallationSuspendInstallationUpdatedAt,
}
#[doc = "`InstallationSuspendInstallationCreatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum InstallationSuspendInstallationCreatedAt {
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Integer(i64),
}
impl ::std::fmt::Display for InstallationSuspendInstallationCreatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::DateTime(x) => x.fmt(f),
Self::Integer(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationCreatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationCreatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationSuspendInstallationCreatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for InstallationSuspendInstallationCreatedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
impl ::std::convert::From<i64> for InstallationSuspendInstallationCreatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
#[doc = "`InstallationSuspendInstallationEventsItem`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationEventsItem {
#[serde(rename = "check_run")]
CheckRun,
#[serde(rename = "check_suite")]
CheckSuite,
#[serde(rename = "code_scanning_alert")]
CodeScanningAlert,
#[serde(rename = "commit_comment")]
CommitComment,
#[serde(rename = "content_reference")]
ContentReference,
#[serde(rename = "create")]
Create,
#[serde(rename = "delete")]
Delete,
#[serde(rename = "deployment")]
Deployment,
#[serde(rename = "deployment_review")]
DeploymentReview,
#[serde(rename = "deployment_status")]
DeploymentStatus,
#[serde(rename = "deploy_key")]
DeployKey,
#[serde(rename = "discussion")]
Discussion,
#[serde(rename = "discussion_comment")]
DiscussionComment,
#[serde(rename = "fork")]
Fork,
#[serde(rename = "gollum")]
Gollum,
#[serde(rename = "issues")]
Issues,
#[serde(rename = "issue_comment")]
IssueComment,
#[serde(rename = "label")]
Label,
#[serde(rename = "member")]
Member,
#[serde(rename = "membership")]
Membership,
#[serde(rename = "merge_queue_entry")]
MergeQueueEntry,
#[serde(rename = "milestone")]
Milestone,
#[serde(rename = "organization")]
Organization,
#[serde(rename = "org_block")]
OrgBlock,
#[serde(rename = "page_build")]
PageBuild,
#[serde(rename = "project")]
Project,
#[serde(rename = "project_card")]
ProjectCard,
#[serde(rename = "project_column")]
ProjectColumn,
#[serde(rename = "public")]
Public,
#[serde(rename = "pull_request")]
PullRequest,
#[serde(rename = "pull_request_review")]
PullRequestReview,
#[serde(rename = "pull_request_review_comment")]
PullRequestReviewComment,
#[serde(rename = "push")]
Push,
#[serde(rename = "registry_package")]
RegistryPackage,
#[serde(rename = "release")]
Release,
#[serde(rename = "repository")]
Repository,
#[serde(rename = "repository_dispatch")]
RepositoryDispatch,
#[serde(rename = "secret_scanning_alert")]
SecretScanningAlert,
#[serde(rename = "star")]
Star,
#[serde(rename = "status")]
Status,
#[serde(rename = "team")]
Team,
#[serde(rename = "team_add")]
TeamAdd,
#[serde(rename = "watch")]
Watch,
#[serde(rename = "workflow_dispatch")]
WorkflowDispatch,
#[serde(rename = "workflow_run")]
WorkflowRun,
}
impl ::std::fmt::Display for InstallationSuspendInstallationEventsItem {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::CheckRun => f.write_str("check_run"),
Self::CheckSuite => f.write_str("check_suite"),
Self::CodeScanningAlert => f.write_str("code_scanning_alert"),
Self::CommitComment => f.write_str("commit_comment"),
Self::ContentReference => f.write_str("content_reference"),
Self::Create => f.write_str("create"),
Self::Delete => f.write_str("delete"),
Self::Deployment => f.write_str("deployment"),
Self::DeploymentReview => f.write_str("deployment_review"),
Self::DeploymentStatus => f.write_str("deployment_status"),
Self::DeployKey => f.write_str("deploy_key"),
Self::Discussion => f.write_str("discussion"),
Self::DiscussionComment => f.write_str("discussion_comment"),
Self::Fork => f.write_str("fork"),
Self::Gollum => f.write_str("gollum"),
Self::Issues => f.write_str("issues"),
Self::IssueComment => f.write_str("issue_comment"),
Self::Label => f.write_str("label"),
Self::Member => f.write_str("member"),
Self::Membership => f.write_str("membership"),
Self::MergeQueueEntry => f.write_str("merge_queue_entry"),
Self::Milestone => f.write_str("milestone"),
Self::Organization => f.write_str("organization"),
Self::OrgBlock => f.write_str("org_block"),
Self::PageBuild => f.write_str("page_build"),
Self::Project => f.write_str("project"),
Self::ProjectCard => f.write_str("project_card"),
Self::ProjectColumn => f.write_str("project_column"),
Self::Public => f.write_str("public"),
Self::PullRequest => f.write_str("pull_request"),
Self::PullRequestReview => f.write_str("pull_request_review"),
Self::PullRequestReviewComment => f.write_str("pull_request_review_comment"),
Self::Push => f.write_str("push"),
Self::RegistryPackage => f.write_str("registry_package"),
Self::Release => f.write_str("release"),
Self::Repository => f.write_str("repository"),
Self::RepositoryDispatch => f.write_str("repository_dispatch"),
Self::SecretScanningAlert => f.write_str("secret_scanning_alert"),
Self::Star => f.write_str("star"),
Self::Status => f.write_str("status"),
Self::Team => f.write_str("team"),
Self::TeamAdd => f.write_str("team_add"),
Self::Watch => f.write_str("watch"),
Self::WorkflowDispatch => f.write_str("workflow_dispatch"),
Self::WorkflowRun => f.write_str("workflow_run"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationEventsItem {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"check_run" => Ok(Self::CheckRun),
"check_suite" => Ok(Self::CheckSuite),
"code_scanning_alert" => Ok(Self::CodeScanningAlert),
"commit_comment" => Ok(Self::CommitComment),
"content_reference" => Ok(Self::ContentReference),
"create" => Ok(Self::Create),
"delete" => Ok(Self::Delete),
"deployment" => Ok(Self::Deployment),
"deployment_review" => Ok(Self::DeploymentReview),
"deployment_status" => Ok(Self::DeploymentStatus),
"deploy_key" => Ok(Self::DeployKey),
"discussion" => Ok(Self::Discussion),
"discussion_comment" => Ok(Self::DiscussionComment),
"fork" => Ok(Self::Fork),
"gollum" => Ok(Self::Gollum),
"issues" => Ok(Self::Issues),
"issue_comment" => Ok(Self::IssueComment),
"label" => Ok(Self::Label),
"member" => Ok(Self::Member),
"membership" => Ok(Self::Membership),
"merge_queue_entry" => Ok(Self::MergeQueueEntry),
"milestone" => Ok(Self::Milestone),
"organization" => Ok(Self::Organization),
"org_block" => Ok(Self::OrgBlock),
"page_build" => Ok(Self::PageBuild),
"project" => Ok(Self::Project),
"project_card" => Ok(Self::ProjectCard),
"project_column" => Ok(Self::ProjectColumn),
"public" => Ok(Self::Public),
"pull_request" => Ok(Self::PullRequest),
"pull_request_review" => Ok(Self::PullRequestReview),
"pull_request_review_comment" => Ok(Self::PullRequestReviewComment),
"push" => Ok(Self::Push),
"registry_package" => Ok(Self::RegistryPackage),
"release" => Ok(Self::Release),
"repository" => Ok(Self::Repository),
"repository_dispatch" => Ok(Self::RepositoryDispatch),
"secret_scanning_alert" => Ok(Self::SecretScanningAlert),
"star" => Ok(Self::Star),
"status" => Ok(Self::Status),
"team" => Ok(Self::Team),
"team_add" => Ok(Self::TeamAdd),
"watch" => Ok(Self::Watch),
"workflow_dispatch" => Ok(Self::WorkflowDispatch),
"workflow_run" => Ok(Self::WorkflowRun),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationEventsItem {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationSuspendInstallationEventsItem {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissions`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct InstallationSuspendInstallationPermissions {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub actions: ::std::option::Option<InstallationSuspendInstallationPermissionsActions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub administration:
::std::option::Option<InstallationSuspendInstallationPermissionsAdministration>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub checks: ::std::option::Option<InstallationSuspendInstallationPermissionsChecks>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub content_references:
::std::option::Option<InstallationSuspendInstallationPermissionsContentReferences>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub contents: ::std::option::Option<InstallationSuspendInstallationPermissionsContents>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub deployments: ::std::option::Option<InstallationSuspendInstallationPermissionsDeployments>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub discussions: ::std::option::Option<InstallationSuspendInstallationPermissionsDiscussions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub emails: ::std::option::Option<InstallationSuspendInstallationPermissionsEmails>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub environments: ::std::option::Option<InstallationSuspendInstallationPermissionsEnvironments>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub issues: ::std::option::Option<InstallationSuspendInstallationPermissionsIssues>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub members: ::std::option::Option<InstallationSuspendInstallationPermissionsMembers>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub metadata: ::std::option::Option<InstallationSuspendInstallationPermissionsMetadata>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_administration:
::std::option::Option<InstallationSuspendInstallationPermissionsOrganizationAdministration>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_events:
::std::option::Option<InstallationSuspendInstallationPermissionsOrganizationEvents>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_hooks:
::std::option::Option<InstallationSuspendInstallationPermissionsOrganizationHooks>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_packages:
::std::option::Option<InstallationSuspendInstallationPermissionsOrganizationPackages>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_plan:
::std::option::Option<InstallationSuspendInstallationPermissionsOrganizationPlan>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_projects:
::std::option::Option<InstallationSuspendInstallationPermissionsOrganizationProjects>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_secrets:
::std::option::Option<InstallationSuspendInstallationPermissionsOrganizationSecrets>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_self_hosted_runners: ::std::option::Option<
InstallationSuspendInstallationPermissionsOrganizationSelfHostedRunners,
>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_user_blocking:
::std::option::Option<InstallationSuspendInstallationPermissionsOrganizationUserBlocking>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub packages: ::std::option::Option<InstallationSuspendInstallationPermissionsPackages>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pages: ::std::option::Option<InstallationSuspendInstallationPermissionsPages>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_requests:
::std::option::Option<InstallationSuspendInstallationPermissionsPullRequests>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository_hooks:
::std::option::Option<InstallationSuspendInstallationPermissionsRepositoryHooks>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository_projects:
::std::option::Option<InstallationSuspendInstallationPermissionsRepositoryProjects>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub secret_scanning_alerts:
::std::option::Option<InstallationSuspendInstallationPermissionsSecretScanningAlerts>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub secrets: ::std::option::Option<InstallationSuspendInstallationPermissionsSecrets>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub security_events:
::std::option::Option<InstallationSuspendInstallationPermissionsSecurityEvents>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub security_scanning_alert:
::std::option::Option<InstallationSuspendInstallationPermissionsSecurityScanningAlert>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub single_file: ::std::option::Option<InstallationSuspendInstallationPermissionsSingleFile>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub statuses: ::std::option::Option<InstallationSuspendInstallationPermissionsStatuses>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub team_discussions:
::std::option::Option<InstallationSuspendInstallationPermissionsTeamDiscussions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub vulnerability_alerts:
::std::option::Option<InstallationSuspendInstallationPermissionsVulnerabilityAlerts>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub workflows: ::std::option::Option<InstallationSuspendInstallationPermissionsWorkflows>,
}
#[doc = "`InstallationSuspendInstallationPermissionsActions`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsActions {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsActions {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsActions {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsActions {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsActions
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsAdministration`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsAdministration {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsAdministration {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsAdministration {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsAdministration {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsAdministration
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsChecks`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsChecks {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsChecks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsChecks {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsChecks {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsChecks
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsContentReferences`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsContentReferences {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsContentReferences {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsContentReferences {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsContentReferences {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsContentReferences
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsContents`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsContents {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsContents {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsContents {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsContents {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsContents
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsDeployments`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsDeployments {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsDeployments {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsDeployments {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsDeployments {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsDeployments
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsDiscussions`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsDiscussions {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsDiscussions {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsDiscussions {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsDiscussions {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsDiscussions
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsEmails`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsEmails {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsEmails {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsEmails {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsEmails {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsEmails
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsEnvironments`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsEnvironments {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsEnvironments {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsEnvironments {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsEnvironments {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsEnvironments
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsIssues`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsIssues {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsIssues {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsIssues {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsIssues {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsIssues
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsMembers`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsMembers {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsMembers {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsMembers {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsMembers {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsMembers
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsMetadata`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsMetadata {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsMetadata {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsMetadata {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsMetadata {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsMetadata
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsOrganizationAdministration`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsOrganizationAdministration {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsOrganizationAdministration {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsOrganizationAdministration {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationSuspendInstallationPermissionsOrganizationAdministration
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsOrganizationAdministration
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsOrganizationEvents`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsOrganizationEvents {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsOrganizationEvents {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsOrganizationEvents {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationSuspendInstallationPermissionsOrganizationEvents
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsOrganizationEvents
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsOrganizationHooks`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsOrganizationHooks {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsOrganizationHooks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsOrganizationHooks {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsOrganizationHooks {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsOrganizationHooks
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsOrganizationPackages`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsOrganizationPackages {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsOrganizationPackages {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsOrganizationPackages {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationSuspendInstallationPermissionsOrganizationPackages
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsOrganizationPackages
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsOrganizationPlan`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsOrganizationPlan {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsOrganizationPlan {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsOrganizationPlan {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsOrganizationPlan {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsOrganizationPlan
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsOrganizationProjects`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsOrganizationProjects {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsOrganizationProjects {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsOrganizationProjects {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationSuspendInstallationPermissionsOrganizationProjects
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsOrganizationProjects
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsOrganizationSecrets`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsOrganizationSecrets {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsOrganizationSecrets {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsOrganizationSecrets {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationSuspendInstallationPermissionsOrganizationSecrets
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsOrganizationSecrets
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsOrganizationSelfHostedRunners`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsOrganizationSelfHostedRunners {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display
for InstallationSuspendInstallationPermissionsOrganizationSelfHostedRunners
{
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr
for InstallationSuspendInstallationPermissionsOrganizationSelfHostedRunners
{
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationSuspendInstallationPermissionsOrganizationSelfHostedRunners
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsOrganizationSelfHostedRunners
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsOrganizationUserBlocking`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsOrganizationUserBlocking {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsOrganizationUserBlocking {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsOrganizationUserBlocking {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationSuspendInstallationPermissionsOrganizationUserBlocking
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsOrganizationUserBlocking
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsPackages`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsPackages {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsPackages {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsPackages {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsPackages {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsPackages
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsPages`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsPages {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsPages {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsPages {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsPages {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsPages
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsPullRequests`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsPullRequests {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsPullRequests {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsPullRequests {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsPullRequests {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsPullRequests
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsRepositoryHooks`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsRepositoryHooks {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsRepositoryHooks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsRepositoryHooks {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsRepositoryHooks {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsRepositoryHooks
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsRepositoryProjects`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsRepositoryProjects {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsRepositoryProjects {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsRepositoryProjects {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationSuspendInstallationPermissionsRepositoryProjects
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsRepositoryProjects
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsSecretScanningAlerts`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsSecretScanningAlerts {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsSecretScanningAlerts {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsSecretScanningAlerts {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationSuspendInstallationPermissionsSecretScanningAlerts
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsSecretScanningAlerts
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsSecrets`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsSecrets {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsSecrets {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsSecrets {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsSecrets {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsSecrets
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsSecurityEvents`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsSecurityEvents {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsSecurityEvents {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsSecurityEvents {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsSecurityEvents {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsSecurityEvents
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsSecurityScanningAlert`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsSecurityScanningAlert {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsSecurityScanningAlert {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsSecurityScanningAlert {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationSuspendInstallationPermissionsSecurityScanningAlert
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsSecurityScanningAlert
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsSingleFile`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsSingleFile {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsSingleFile {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsSingleFile {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsSingleFile {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsSingleFile
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsStatuses`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsStatuses {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsStatuses {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsStatuses {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsStatuses {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsStatuses
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsTeamDiscussions`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsTeamDiscussions {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsTeamDiscussions {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsTeamDiscussions {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsTeamDiscussions {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsTeamDiscussions
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsVulnerabilityAlerts`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsVulnerabilityAlerts {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsVulnerabilityAlerts {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsVulnerabilityAlerts {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationSuspendInstallationPermissionsVulnerabilityAlerts
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsVulnerabilityAlerts
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationPermissionsWorkflows`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationPermissionsWorkflows {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationSuspendInstallationPermissionsWorkflows {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationPermissionsWorkflows {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationPermissionsWorkflows {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationPermissionsWorkflows
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "Describe whether all repositories have been selected or there's a selection involved"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationRepositorySelection {
#[serde(rename = "all")]
All,
#[serde(rename = "selected")]
Selected,
}
impl ::std::fmt::Display for InstallationSuspendInstallationRepositorySelection {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Selected => f.write_str("selected"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationRepositorySelection {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"selected" => Ok(Self::Selected),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationRepositorySelection {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationRepositorySelection
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationSuspendedBy`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationSuspendInstallationSuspendedBy {
pub avatar_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub email: ::std::option::Option<::std::string::String>,
pub events_url: ::std::string::String,
pub followers_url: ::std::string::String,
pub following_url: ::std::string::String,
pub gists_url: ::std::string::String,
pub gravatar_id: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub login: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
pub node_id: ::std::string::String,
pub organizations_url: ::std::string::String,
pub received_events_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub site_admin: bool,
pub starred_url: ::std::string::String,
pub subscriptions_url: ::std::string::String,
#[serde(rename = "type")]
pub type_: InstallationSuspendInstallationSuspendedByType,
pub url: ::std::string::String,
}
#[doc = "`InstallationSuspendInstallationSuspendedByType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationSuspendedByType {
Bot,
User,
Organization,
}
impl ::std::fmt::Display for InstallationSuspendInstallationSuspendedByType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Bot => f.write_str("Bot"),
Self::User => f.write_str("User"),
Self::Organization => f.write_str("Organization"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationSuspendedByType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"Bot" => Ok(Self::Bot),
"User" => Ok(Self::User),
"Organization" => Ok(Self::Organization),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationSuspendedByType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationSuspendInstallationSuspendedByType
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationTargetType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationSuspendInstallationTargetType {
User,
Organization,
}
impl ::std::fmt::Display for InstallationSuspendInstallationTargetType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::User => f.write_str("User"),
Self::Organization => f.write_str("Organization"),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationTargetType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"User" => Ok(Self::User),
"Organization" => Ok(Self::Organization),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationTargetType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationSuspendInstallationTargetType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationSuspendInstallationUpdatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum InstallationSuspendInstallationUpdatedAt {
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Integer(i64),
}
impl ::std::fmt::Display for InstallationSuspendInstallationUpdatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::DateTime(x) => x.fmt(f),
Self::Integer(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for InstallationSuspendInstallationUpdatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationSuspendInstallationUpdatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationSuspendInstallationUpdatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for InstallationSuspendInstallationUpdatedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
impl ::std::convert::From<i64> for InstallationSuspendInstallationUpdatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
#[doc = "`InstallationSuspendRepositoriesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationSuspendRepositoriesItem {
pub full_name: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "Whether the repository is private or public."]
pub private: bool,
}
#[doc = "`InstallationTargetType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationTargetType {
User,
Organization,
}
impl ::std::fmt::Display for InstallationTargetType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::User => f.write_str("User"),
Self::Organization => f.write_str("Organization"),
}
}
}
impl ::std::str::FromStr for InstallationTargetType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"User" => Ok(Self::User),
"Organization" => Ok(Self::Organization),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationTargetType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationTargetType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspend`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationUnsuspend {
pub action: InstallationUnsuspendAction,
pub installation: InstallationUnsuspendInstallation,
#[doc = "An array of repository objects that the installation can access."]
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub repositories: ::std::vec::Vec<InstallationUnsuspendRepositoriesItem>,
#[serde(default)]
pub requester: (),
pub sender: User,
}
#[doc = "`InstallationUnsuspendAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendAction {
#[serde(rename = "unsuspend")]
Unsuspend,
}
impl ::std::fmt::Display for InstallationUnsuspendAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unsuspend => f.write_str("unsuspend"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unsuspend" => Ok(Self::Unsuspend),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationUnsuspendAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallation`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationUnsuspendInstallation {
pub access_tokens_url: ::std::string::String,
pub account: User,
pub app_id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub app_slug: ::std::option::Option<::std::string::String>,
pub created_at: InstallationUnsuspendInstallationCreatedAt,
pub events: ::std::vec::Vec<InstallationUnsuspendInstallationEventsItem>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub has_multiple_single_files: ::std::option::Option<bool>,
pub html_url: ::std::string::String,
#[doc = "The ID of the installation."]
pub id: i64,
pub permissions: InstallationUnsuspendInstallationPermissions,
pub repositories_url: ::std::string::String,
#[doc = "Describe whether all repositories have been selected or there's a selection involved"]
pub repository_selection: InstallationUnsuspendInstallationRepositorySelection,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub single_file_name: ::std::option::Option<::std::string::String>,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub single_file_paths: ::std::vec::Vec<::std::string::String>,
pub suspended_at: (),
pub suspended_by: (),
#[doc = "The ID of the user or organization this token is being scoped to."]
pub target_id: i64,
pub target_type: InstallationUnsuspendInstallationTargetType,
pub updated_at: InstallationUnsuspendInstallationUpdatedAt,
}
#[doc = "`InstallationUnsuspendInstallationCreatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum InstallationUnsuspendInstallationCreatedAt {
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Integer(i64),
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationCreatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::DateTime(x) => x.fmt(f),
Self::Integer(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationCreatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationCreatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationUnsuspendInstallationCreatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for InstallationUnsuspendInstallationCreatedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
impl ::std::convert::From<i64> for InstallationUnsuspendInstallationCreatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
#[doc = "`InstallationUnsuspendInstallationEventsItem`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationEventsItem {
#[serde(rename = "check_run")]
CheckRun,
#[serde(rename = "check_suite")]
CheckSuite,
#[serde(rename = "code_scanning_alert")]
CodeScanningAlert,
#[serde(rename = "commit_comment")]
CommitComment,
#[serde(rename = "content_reference")]
ContentReference,
#[serde(rename = "create")]
Create,
#[serde(rename = "delete")]
Delete,
#[serde(rename = "deployment")]
Deployment,
#[serde(rename = "deployment_review")]
DeploymentReview,
#[serde(rename = "deployment_status")]
DeploymentStatus,
#[serde(rename = "deploy_key")]
DeployKey,
#[serde(rename = "discussion")]
Discussion,
#[serde(rename = "discussion_comment")]
DiscussionComment,
#[serde(rename = "fork")]
Fork,
#[serde(rename = "gollum")]
Gollum,
#[serde(rename = "issues")]
Issues,
#[serde(rename = "issue_comment")]
IssueComment,
#[serde(rename = "label")]
Label,
#[serde(rename = "member")]
Member,
#[serde(rename = "membership")]
Membership,
#[serde(rename = "merge_queue_entry")]
MergeQueueEntry,
#[serde(rename = "milestone")]
Milestone,
#[serde(rename = "organization")]
Organization,
#[serde(rename = "org_block")]
OrgBlock,
#[serde(rename = "page_build")]
PageBuild,
#[serde(rename = "project")]
Project,
#[serde(rename = "project_card")]
ProjectCard,
#[serde(rename = "project_column")]
ProjectColumn,
#[serde(rename = "public")]
Public,
#[serde(rename = "pull_request")]
PullRequest,
#[serde(rename = "pull_request_review")]
PullRequestReview,
#[serde(rename = "pull_request_review_comment")]
PullRequestReviewComment,
#[serde(rename = "push")]
Push,
#[serde(rename = "registry_package")]
RegistryPackage,
#[serde(rename = "release")]
Release,
#[serde(rename = "repository")]
Repository,
#[serde(rename = "repository_dispatch")]
RepositoryDispatch,
#[serde(rename = "secret_scanning_alert")]
SecretScanningAlert,
#[serde(rename = "star")]
Star,
#[serde(rename = "status")]
Status,
#[serde(rename = "team")]
Team,
#[serde(rename = "team_add")]
TeamAdd,
#[serde(rename = "watch")]
Watch,
#[serde(rename = "workflow_dispatch")]
WorkflowDispatch,
#[serde(rename = "workflow_run")]
WorkflowRun,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationEventsItem {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::CheckRun => f.write_str("check_run"),
Self::CheckSuite => f.write_str("check_suite"),
Self::CodeScanningAlert => f.write_str("code_scanning_alert"),
Self::CommitComment => f.write_str("commit_comment"),
Self::ContentReference => f.write_str("content_reference"),
Self::Create => f.write_str("create"),
Self::Delete => f.write_str("delete"),
Self::Deployment => f.write_str("deployment"),
Self::DeploymentReview => f.write_str("deployment_review"),
Self::DeploymentStatus => f.write_str("deployment_status"),
Self::DeployKey => f.write_str("deploy_key"),
Self::Discussion => f.write_str("discussion"),
Self::DiscussionComment => f.write_str("discussion_comment"),
Self::Fork => f.write_str("fork"),
Self::Gollum => f.write_str("gollum"),
Self::Issues => f.write_str("issues"),
Self::IssueComment => f.write_str("issue_comment"),
Self::Label => f.write_str("label"),
Self::Member => f.write_str("member"),
Self::Membership => f.write_str("membership"),
Self::MergeQueueEntry => f.write_str("merge_queue_entry"),
Self::Milestone => f.write_str("milestone"),
Self::Organization => f.write_str("organization"),
Self::OrgBlock => f.write_str("org_block"),
Self::PageBuild => f.write_str("page_build"),
Self::Project => f.write_str("project"),
Self::ProjectCard => f.write_str("project_card"),
Self::ProjectColumn => f.write_str("project_column"),
Self::Public => f.write_str("public"),
Self::PullRequest => f.write_str("pull_request"),
Self::PullRequestReview => f.write_str("pull_request_review"),
Self::PullRequestReviewComment => f.write_str("pull_request_review_comment"),
Self::Push => f.write_str("push"),
Self::RegistryPackage => f.write_str("registry_package"),
Self::Release => f.write_str("release"),
Self::Repository => f.write_str("repository"),
Self::RepositoryDispatch => f.write_str("repository_dispatch"),
Self::SecretScanningAlert => f.write_str("secret_scanning_alert"),
Self::Star => f.write_str("star"),
Self::Status => f.write_str("status"),
Self::Team => f.write_str("team"),
Self::TeamAdd => f.write_str("team_add"),
Self::Watch => f.write_str("watch"),
Self::WorkflowDispatch => f.write_str("workflow_dispatch"),
Self::WorkflowRun => f.write_str("workflow_run"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationEventsItem {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"check_run" => Ok(Self::CheckRun),
"check_suite" => Ok(Self::CheckSuite),
"code_scanning_alert" => Ok(Self::CodeScanningAlert),
"commit_comment" => Ok(Self::CommitComment),
"content_reference" => Ok(Self::ContentReference),
"create" => Ok(Self::Create),
"delete" => Ok(Self::Delete),
"deployment" => Ok(Self::Deployment),
"deployment_review" => Ok(Self::DeploymentReview),
"deployment_status" => Ok(Self::DeploymentStatus),
"deploy_key" => Ok(Self::DeployKey),
"discussion" => Ok(Self::Discussion),
"discussion_comment" => Ok(Self::DiscussionComment),
"fork" => Ok(Self::Fork),
"gollum" => Ok(Self::Gollum),
"issues" => Ok(Self::Issues),
"issue_comment" => Ok(Self::IssueComment),
"label" => Ok(Self::Label),
"member" => Ok(Self::Member),
"membership" => Ok(Self::Membership),
"merge_queue_entry" => Ok(Self::MergeQueueEntry),
"milestone" => Ok(Self::Milestone),
"organization" => Ok(Self::Organization),
"org_block" => Ok(Self::OrgBlock),
"page_build" => Ok(Self::PageBuild),
"project" => Ok(Self::Project),
"project_card" => Ok(Self::ProjectCard),
"project_column" => Ok(Self::ProjectColumn),
"public" => Ok(Self::Public),
"pull_request" => Ok(Self::PullRequest),
"pull_request_review" => Ok(Self::PullRequestReview),
"pull_request_review_comment" => Ok(Self::PullRequestReviewComment),
"push" => Ok(Self::Push),
"registry_package" => Ok(Self::RegistryPackage),
"release" => Ok(Self::Release),
"repository" => Ok(Self::Repository),
"repository_dispatch" => Ok(Self::RepositoryDispatch),
"secret_scanning_alert" => Ok(Self::SecretScanningAlert),
"star" => Ok(Self::Star),
"status" => Ok(Self::Status),
"team" => Ok(Self::Team),
"team_add" => Ok(Self::TeamAdd),
"watch" => Ok(Self::Watch),
"workflow_dispatch" => Ok(Self::WorkflowDispatch),
"workflow_run" => Ok(Self::WorkflowRun),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationEventsItem {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationEventsItem
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissions`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct InstallationUnsuspendInstallationPermissions {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub actions: ::std::option::Option<InstallationUnsuspendInstallationPermissionsActions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub administration:
::std::option::Option<InstallationUnsuspendInstallationPermissionsAdministration>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub checks: ::std::option::Option<InstallationUnsuspendInstallationPermissionsChecks>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub content_references:
::std::option::Option<InstallationUnsuspendInstallationPermissionsContentReferences>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub contents: ::std::option::Option<InstallationUnsuspendInstallationPermissionsContents>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub deployments: ::std::option::Option<InstallationUnsuspendInstallationPermissionsDeployments>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub discussions: ::std::option::Option<InstallationUnsuspendInstallationPermissionsDiscussions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub emails: ::std::option::Option<InstallationUnsuspendInstallationPermissionsEmails>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub environments:
::std::option::Option<InstallationUnsuspendInstallationPermissionsEnvironments>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub issues: ::std::option::Option<InstallationUnsuspendInstallationPermissionsIssues>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub members: ::std::option::Option<InstallationUnsuspendInstallationPermissionsMembers>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub metadata: ::std::option::Option<InstallationUnsuspendInstallationPermissionsMetadata>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_administration: ::std::option::Option<
InstallationUnsuspendInstallationPermissionsOrganizationAdministration,
>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_events:
::std::option::Option<InstallationUnsuspendInstallationPermissionsOrganizationEvents>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_hooks:
::std::option::Option<InstallationUnsuspendInstallationPermissionsOrganizationHooks>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_packages:
::std::option::Option<InstallationUnsuspendInstallationPermissionsOrganizationPackages>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_plan:
::std::option::Option<InstallationUnsuspendInstallationPermissionsOrganizationPlan>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_projects:
::std::option::Option<InstallationUnsuspendInstallationPermissionsOrganizationProjects>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_secrets:
::std::option::Option<InstallationUnsuspendInstallationPermissionsOrganizationSecrets>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_self_hosted_runners: ::std::option::Option<
InstallationUnsuspendInstallationPermissionsOrganizationSelfHostedRunners,
>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization_user_blocking:
::std::option::Option<InstallationUnsuspendInstallationPermissionsOrganizationUserBlocking>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub packages: ::std::option::Option<InstallationUnsuspendInstallationPermissionsPackages>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pages: ::std::option::Option<InstallationUnsuspendInstallationPermissionsPages>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_requests:
::std::option::Option<InstallationUnsuspendInstallationPermissionsPullRequests>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository_hooks:
::std::option::Option<InstallationUnsuspendInstallationPermissionsRepositoryHooks>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository_projects:
::std::option::Option<InstallationUnsuspendInstallationPermissionsRepositoryProjects>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub secret_scanning_alerts:
::std::option::Option<InstallationUnsuspendInstallationPermissionsSecretScanningAlerts>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub secrets: ::std::option::Option<InstallationUnsuspendInstallationPermissionsSecrets>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub security_events:
::std::option::Option<InstallationUnsuspendInstallationPermissionsSecurityEvents>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub security_scanning_alert:
::std::option::Option<InstallationUnsuspendInstallationPermissionsSecurityScanningAlert>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub single_file: ::std::option::Option<InstallationUnsuspendInstallationPermissionsSingleFile>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub statuses: ::std::option::Option<InstallationUnsuspendInstallationPermissionsStatuses>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub team_discussions:
::std::option::Option<InstallationUnsuspendInstallationPermissionsTeamDiscussions>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub vulnerability_alerts:
::std::option::Option<InstallationUnsuspendInstallationPermissionsVulnerabilityAlerts>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub workflows: ::std::option::Option<InstallationUnsuspendInstallationPermissionsWorkflows>,
}
#[doc = "`InstallationUnsuspendInstallationPermissionsActions`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsActions {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsActions {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsActions {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsActions {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsActions
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsAdministration`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsAdministration {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsAdministration {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsAdministration {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsAdministration {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsAdministration
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsChecks`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsChecks {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsChecks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsChecks {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsChecks {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsChecks
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsContentReferences`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsContentReferences {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsContentReferences {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsContentReferences {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsContentReferences
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsContentReferences
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsContents`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsContents {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsContents {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsContents {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsContents {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsContents
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsDeployments`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsDeployments {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsDeployments {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsDeployments {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsDeployments {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsDeployments
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsDiscussions`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsDiscussions {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsDiscussions {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsDiscussions {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsDiscussions {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsDiscussions
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsEmails`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsEmails {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsEmails {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsEmails {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsEmails {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsEmails
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsEnvironments`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsEnvironments {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsEnvironments {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsEnvironments {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsEnvironments {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsEnvironments
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsIssues`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsIssues {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsIssues {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsIssues {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsIssues {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsIssues
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsMembers`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsMembers {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsMembers {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsMembers {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsMembers {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsMembers
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsMetadata`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsMetadata {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsMetadata {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsMetadata {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsMetadata {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsMetadata
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsOrganizationAdministration`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsOrganizationAdministration {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display
for InstallationUnsuspendInstallationPermissionsOrganizationAdministration
{
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr
for InstallationUnsuspendInstallationPermissionsOrganizationAdministration
{
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsOrganizationAdministration
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsOrganizationAdministration
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsOrganizationEvents`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsOrganizationEvents {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsOrganizationEvents {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsOrganizationEvents {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsOrganizationEvents
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsOrganizationEvents
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsOrganizationHooks`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsOrganizationHooks {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsOrganizationHooks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsOrganizationHooks {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsOrganizationHooks
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsOrganizationHooks
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsOrganizationPackages`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsOrganizationPackages {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsOrganizationPackages {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsOrganizationPackages {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsOrganizationPackages
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsOrganizationPackages
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsOrganizationPlan`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsOrganizationPlan {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsOrganizationPlan {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsOrganizationPlan {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsOrganizationPlan
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsOrganizationPlan
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsOrganizationProjects`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsOrganizationProjects {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsOrganizationProjects {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsOrganizationProjects {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsOrganizationProjects
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsOrganizationProjects
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsOrganizationSecrets`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsOrganizationSecrets {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsOrganizationSecrets {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsOrganizationSecrets {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsOrganizationSecrets
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsOrganizationSecrets
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsOrganizationSelfHostedRunners`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsOrganizationSelfHostedRunners {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display
for InstallationUnsuspendInstallationPermissionsOrganizationSelfHostedRunners
{
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr
for InstallationUnsuspendInstallationPermissionsOrganizationSelfHostedRunners
{
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsOrganizationSelfHostedRunners
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsOrganizationSelfHostedRunners
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsOrganizationUserBlocking`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsOrganizationUserBlocking {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsOrganizationUserBlocking {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsOrganizationUserBlocking {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsOrganizationUserBlocking
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsOrganizationUserBlocking
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsPackages`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsPackages {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsPackages {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsPackages {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsPackages {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsPackages
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsPages`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsPages {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsPages {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsPages {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsPages {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsPages
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsPullRequests`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsPullRequests {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsPullRequests {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsPullRequests {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsPullRequests {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsPullRequests
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsRepositoryHooks`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsRepositoryHooks {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsRepositoryHooks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsRepositoryHooks {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsRepositoryHooks {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsRepositoryHooks
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsRepositoryProjects`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsRepositoryProjects {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsRepositoryProjects {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsRepositoryProjects {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsRepositoryProjects
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsRepositoryProjects
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsSecretScanningAlerts`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsSecretScanningAlerts {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsSecretScanningAlerts {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsSecretScanningAlerts {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsSecretScanningAlerts
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsSecretScanningAlerts
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsSecrets`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsSecrets {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsSecrets {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsSecrets {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsSecrets {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsSecrets
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsSecurityEvents`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsSecurityEvents {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsSecurityEvents {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsSecurityEvents {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsSecurityEvents {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsSecurityEvents
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsSecurityScanningAlert`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsSecurityScanningAlert {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsSecurityScanningAlert {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsSecurityScanningAlert {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsSecurityScanningAlert
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsSecurityScanningAlert
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsSingleFile`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsSingleFile {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsSingleFile {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsSingleFile {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsSingleFile {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsSingleFile
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsStatuses`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsStatuses {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsStatuses {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsStatuses {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsStatuses {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsStatuses
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsTeamDiscussions`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsTeamDiscussions {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsTeamDiscussions {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsTeamDiscussions {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsTeamDiscussions {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsTeamDiscussions
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsVulnerabilityAlerts`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsVulnerabilityAlerts {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsVulnerabilityAlerts {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsVulnerabilityAlerts {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str>
for InstallationUnsuspendInstallationPermissionsVulnerabilityAlerts
{
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsVulnerabilityAlerts
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationPermissionsWorkflows`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationPermissionsWorkflows {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationPermissionsWorkflows {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Read => f.write_str("read"),
Self::Write => f.write_str("write"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationPermissionsWorkflows {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"read" => Ok(Self::Read),
"write" => Ok(Self::Write),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationPermissionsWorkflows {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationPermissionsWorkflows
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "Describe whether all repositories have been selected or there's a selection involved"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationRepositorySelection {
#[serde(rename = "all")]
All,
#[serde(rename = "selected")]
Selected,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationRepositorySelection {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::All => f.write_str("all"),
Self::Selected => f.write_str("selected"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationRepositorySelection {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"all" => Ok(Self::All),
"selected" => Ok(Self::Selected),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationRepositorySelection {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationRepositorySelection
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationTargetType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum InstallationUnsuspendInstallationTargetType {
User,
Organization,
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationTargetType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::User => f.write_str("User"),
Self::Organization => f.write_str("Organization"),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationTargetType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"User" => Ok(Self::User),
"Organization" => Ok(Self::Organization),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationTargetType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for InstallationUnsuspendInstallationTargetType
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`InstallationUnsuspendInstallationUpdatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum InstallationUnsuspendInstallationUpdatedAt {
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Integer(i64),
}
impl ::std::fmt::Display for InstallationUnsuspendInstallationUpdatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::DateTime(x) => x.fmt(f),
Self::Integer(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for InstallationUnsuspendInstallationUpdatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUnsuspendInstallationUpdatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationUnsuspendInstallationUpdatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for InstallationUnsuspendInstallationUpdatedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
impl ::std::convert::From<i64> for InstallationUnsuspendInstallationUpdatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
#[doc = "`InstallationUnsuspendRepositoriesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct InstallationUnsuspendRepositoriesItem {
pub full_name: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "Whether the repository is private or public."]
pub private: bool,
}
#[doc = "`InstallationUpdatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum InstallationUpdatedAt {
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Integer(i64),
}
impl ::std::fmt::Display for InstallationUpdatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::DateTime(x) => x.fmt(f),
Self::Integer(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for InstallationUpdatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for InstallationUpdatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for InstallationUpdatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>> for InstallationUpdatedAt {
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
impl ::std::convert::From<i64> for InstallationUpdatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
#[doc = "The [issue](https://docs.github.com/en/rest/reference/issues) itself."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Issue {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<IssueActiveLockReason>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[doc = "Contents of the issue"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub comments: i64,
pub comments_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub events_url: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub labels: ::std::vec::Vec<Label>,
pub labels_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub locked: ::std::option::Option<bool>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_request: ::std::option::Option<IssuePullRequest>,
pub repository_url: ::std::string::String,
#[doc = "State of the issue; either 'open' or 'closed'"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub state: ::std::option::Option<IssueState>,
#[doc = "Title of the issue"]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the issue"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`IssueActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for IssueActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for IssueActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [comment](https://docs.github.com/en/rest/reference/issues#comments) itself."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueComment {
pub author_association: AuthorAssociation,
#[doc = "Contents of the issue comment"]
pub body: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the issue comment"]
pub id: i64,
pub issue_url: ::std::string::String,
pub node_id: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub performed_via_github_app: ::std::option::Option<App>,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the issue comment"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`IssueCommentCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentCreated {
pub action: IssueCommentCreatedAction,
pub comment: IssueComment,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: IssueCommentCreatedIssue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssueCommentCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueCommentCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for IssueCommentCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for IssueCommentCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueCommentCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueCommentCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [issue](https://docs.github.com/en/rest/reference/issues) the comment belongs to."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentCreatedIssue {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<IssueCommentCreatedIssueActiveLockReason>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<IssueCommentCreatedIssueAssignee>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[doc = "Contents of the issue"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub comments: i64,
pub comments_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub events_url: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub labels: ::std::vec::Vec<Label>,
pub labels_url: ::std::string::String,
pub locked: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_request: ::std::option::Option<IssueCommentCreatedIssuePullRequest>,
pub repository_url: ::std::string::String,
pub state: IssueCommentCreatedIssueState,
#[doc = "Title of the issue"]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the issue"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`IssueCommentCreatedIssueActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueCommentCreatedIssueActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for IssueCommentCreatedIssueActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for IssueCommentCreatedIssueActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueCommentCreatedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueCommentCreatedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssueCommentCreatedIssueAssignee`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentCreatedIssueAssignee {
pub avatar_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub email: ::std::option::Option<::std::string::String>,
pub events_url: ::std::string::String,
pub followers_url: ::std::string::String,
pub following_url: ::std::string::String,
pub gists_url: ::std::string::String,
pub gravatar_id: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub login: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
pub node_id: ::std::string::String,
pub organizations_url: ::std::string::String,
pub received_events_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub site_admin: bool,
pub starred_url: ::std::string::String,
pub subscriptions_url: ::std::string::String,
#[serde(rename = "type")]
pub type_: IssueCommentCreatedIssueAssigneeType,
pub url: ::std::string::String,
}
#[doc = "`IssueCommentCreatedIssueAssigneeType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueCommentCreatedIssueAssigneeType {
Bot,
User,
Organization,
}
impl ::std::fmt::Display for IssueCommentCreatedIssueAssigneeType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Bot => f.write_str("Bot"),
Self::User => f.write_str("User"),
Self::Organization => f.write_str("Organization"),
}
}
}
impl ::std::str::FromStr for IssueCommentCreatedIssueAssigneeType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"Bot" => Ok(Self::Bot),
"User" => Ok(Self::User),
"Organization" => Ok(Self::Organization),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueCommentCreatedIssueAssigneeType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueCommentCreatedIssueAssigneeType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssueCommentCreatedIssuePullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentCreatedIssuePullRequest {
pub diff_url: ::std::string::String,
pub html_url: ::std::string::String,
pub patch_url: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`IssueCommentCreatedIssueState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueCommentCreatedIssueState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for IssueCommentCreatedIssueState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for IssueCommentCreatedIssueState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueCommentCreatedIssueState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueCommentCreatedIssueState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssueCommentDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentDeleted {
pub action: IssueCommentDeletedAction,
pub comment: IssueComment,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: IssueCommentDeletedIssue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssueCommentDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueCommentDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for IssueCommentDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for IssueCommentDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueCommentDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueCommentDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [issue](https://docs.github.com/en/rest/reference/issues) the comment belongs to."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentDeletedIssue {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<IssueCommentDeletedIssueActiveLockReason>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<IssueCommentDeletedIssueAssignee>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[doc = "Contents of the issue"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub comments: i64,
pub comments_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub events_url: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub labels: ::std::vec::Vec<Label>,
pub labels_url: ::std::string::String,
pub locked: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_request: ::std::option::Option<IssueCommentDeletedIssuePullRequest>,
pub repository_url: ::std::string::String,
pub state: IssueCommentDeletedIssueState,
#[doc = "Title of the issue"]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the issue"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`IssueCommentDeletedIssueActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueCommentDeletedIssueActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for IssueCommentDeletedIssueActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for IssueCommentDeletedIssueActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueCommentDeletedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueCommentDeletedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssueCommentDeletedIssueAssignee`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentDeletedIssueAssignee {
pub avatar_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub email: ::std::option::Option<::std::string::String>,
pub events_url: ::std::string::String,
pub followers_url: ::std::string::String,
pub following_url: ::std::string::String,
pub gists_url: ::std::string::String,
pub gravatar_id: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub login: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
pub node_id: ::std::string::String,
pub organizations_url: ::std::string::String,
pub received_events_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub site_admin: bool,
pub starred_url: ::std::string::String,
pub subscriptions_url: ::std::string::String,
#[serde(rename = "type")]
pub type_: IssueCommentDeletedIssueAssigneeType,
pub url: ::std::string::String,
}
#[doc = "`IssueCommentDeletedIssueAssigneeType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueCommentDeletedIssueAssigneeType {
Bot,
User,
Organization,
}
impl ::std::fmt::Display for IssueCommentDeletedIssueAssigneeType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Bot => f.write_str("Bot"),
Self::User => f.write_str("User"),
Self::Organization => f.write_str("Organization"),
}
}
}
impl ::std::str::FromStr for IssueCommentDeletedIssueAssigneeType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"Bot" => Ok(Self::Bot),
"User" => Ok(Self::User),
"Organization" => Ok(Self::Organization),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueCommentDeletedIssueAssigneeType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueCommentDeletedIssueAssigneeType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssueCommentDeletedIssuePullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentDeletedIssuePullRequest {
pub diff_url: ::std::string::String,
pub html_url: ::std::string::String,
pub patch_url: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`IssueCommentDeletedIssueState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueCommentDeletedIssueState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for IssueCommentDeletedIssueState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for IssueCommentDeletedIssueState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueCommentDeletedIssueState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueCommentDeletedIssueState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssueCommentEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentEdited {
pub action: IssueCommentEditedAction,
pub changes: IssueCommentEditedChanges,
pub comment: IssueComment,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: IssueCommentEditedIssue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssueCommentEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueCommentEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for IssueCommentEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for IssueCommentEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueCommentEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueCommentEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The changes to the comment."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub body: ::std::option::Option<IssueCommentEditedChangesBody>,
}
#[doc = "`IssueCommentEditedChangesBody`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentEditedChangesBody {
#[doc = "The previous version of the body."]
pub from: ::std::string::String,
}
#[doc = "The [issue](https://docs.github.com/en/rest/reference/issues) the comment belongs to."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentEditedIssue {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<IssueCommentEditedIssueActiveLockReason>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<IssueCommentEditedIssueAssignee>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[doc = "Contents of the issue"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub comments: i64,
pub comments_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub events_url: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub labels: ::std::vec::Vec<Label>,
pub labels_url: ::std::string::String,
pub locked: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_request: ::std::option::Option<IssueCommentEditedIssuePullRequest>,
pub repository_url: ::std::string::String,
pub state: IssueCommentEditedIssueState,
#[doc = "Title of the issue"]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the issue"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`IssueCommentEditedIssueActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueCommentEditedIssueActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for IssueCommentEditedIssueActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for IssueCommentEditedIssueActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueCommentEditedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueCommentEditedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssueCommentEditedIssueAssignee`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentEditedIssueAssignee {
pub avatar_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub email: ::std::option::Option<::std::string::String>,
pub events_url: ::std::string::String,
pub followers_url: ::std::string::String,
pub following_url: ::std::string::String,
pub gists_url: ::std::string::String,
pub gravatar_id: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub login: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
pub node_id: ::std::string::String,
pub organizations_url: ::std::string::String,
pub received_events_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub site_admin: bool,
pub starred_url: ::std::string::String,
pub subscriptions_url: ::std::string::String,
#[serde(rename = "type")]
pub type_: IssueCommentEditedIssueAssigneeType,
pub url: ::std::string::String,
}
#[doc = "`IssueCommentEditedIssueAssigneeType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueCommentEditedIssueAssigneeType {
Bot,
User,
Organization,
}
impl ::std::fmt::Display for IssueCommentEditedIssueAssigneeType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Bot => f.write_str("Bot"),
Self::User => f.write_str("User"),
Self::Organization => f.write_str("Organization"),
}
}
}
impl ::std::str::FromStr for IssueCommentEditedIssueAssigneeType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"Bot" => Ok(Self::Bot),
"User" => Ok(Self::User),
"Organization" => Ok(Self::Organization),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueCommentEditedIssueAssigneeType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueCommentEditedIssueAssigneeType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssueCommentEditedIssuePullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssueCommentEditedIssuePullRequest {
pub diff_url: ::std::string::String,
pub html_url: ::std::string::String,
pub patch_url: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`IssueCommentEditedIssueState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueCommentEditedIssueState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for IssueCommentEditedIssueState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for IssueCommentEditedIssueState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueCommentEditedIssueState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueCommentEditedIssueState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssueCommentEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IssueCommentEvent {
Created(IssueCommentCreated),
Deleted(IssueCommentDeleted),
Edited(IssueCommentEdited),
}
impl ::std::convert::From<IssueCommentCreated> for IssueCommentEvent {
fn from(value: IssueCommentCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<IssueCommentDeleted> for IssueCommentEvent {
fn from(value: IssueCommentDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<IssueCommentEdited> for IssueCommentEvent {
fn from(value: IssueCommentEdited) -> Self {
Self::Edited(value)
}
}
#[doc = "`IssuePullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct IssuePullRequest {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub diff_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub html_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub patch_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub url: ::std::option::Option<::std::string::String>,
}
#[doc = "State of the issue; either 'open' or 'closed'"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssueState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for IssueState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for IssueState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssueState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssueState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "Activity related to an issue. The type of activity is specified in the action property."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesAssigned {
#[doc = "The action that was performed."]
pub action: IssuesAssignedAction,
#[doc = "The optional user who was assigned or unassigned from the issue."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub assignee: ::std::option::Option<User>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: Issue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "The action that was performed."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesAssignedAction {
#[serde(rename = "assigned")]
Assigned,
}
impl ::std::fmt::Display for IssuesAssignedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Assigned => f.write_str("assigned"),
}
}
}
impl ::std::str::FromStr for IssuesAssignedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"assigned" => Ok(Self::Assigned),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesAssignedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesAssignedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesClosed`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesClosed {
#[doc = "The action that was performed."]
pub action: IssuesClosedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: IssuesClosedIssue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "The action that was performed."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesClosedAction {
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for IssuesClosedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for IssuesClosedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesClosedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesClosedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [issue](https://docs.github.com/en/rest/reference/issues) itself."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesClosedIssue {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<IssuesClosedIssueActiveLockReason>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[doc = "Contents of the issue"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
pub closed_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub comments: i64,
pub comments_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub events_url: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub labels: ::std::vec::Vec<Label>,
pub labels_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub locked: ::std::option::Option<bool>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_request: ::std::option::Option<IssuesClosedIssuePullRequest>,
pub repository_url: ::std::string::String,
pub state: IssuesClosedIssueState,
#[doc = "Title of the issue"]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the issue"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`IssuesClosedIssueActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesClosedIssueActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for IssuesClosedIssueActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for IssuesClosedIssueActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesClosedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesClosedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesClosedIssuePullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct IssuesClosedIssuePullRequest {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub diff_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub html_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub patch_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub url: ::std::option::Option<::std::string::String>,
}
#[doc = "`IssuesClosedIssueState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesClosedIssueState {
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for IssuesClosedIssueState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for IssuesClosedIssueState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesClosedIssueState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesClosedIssueState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesDeleted {
pub action: IssuesDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: Issue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for IssuesDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for IssuesDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesDemilestoned`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesDemilestoned {
pub action: IssuesDemilestonedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: IssuesDemilestonedIssue,
pub milestone: Milestone,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesDemilestonedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesDemilestonedAction {
#[serde(rename = "demilestoned")]
Demilestoned,
}
impl ::std::fmt::Display for IssuesDemilestonedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Demilestoned => f.write_str("demilestoned"),
}
}
}
impl ::std::str::FromStr for IssuesDemilestonedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"demilestoned" => Ok(Self::Demilestoned),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesDemilestonedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesDemilestonedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesDemilestonedIssue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesDemilestonedIssue {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<IssuesDemilestonedIssueActiveLockReason>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[doc = "Contents of the issue"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub comments: i64,
pub comments_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub events_url: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub labels: ::std::vec::Vec<Label>,
pub labels_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub locked: ::std::option::Option<bool>,
pub milestone: (),
pub node_id: ::std::string::String,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_request: ::std::option::Option<IssuesDemilestonedIssuePullRequest>,
pub repository_url: ::std::string::String,
#[doc = "State of the issue; either 'open' or 'closed'"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub state: ::std::option::Option<IssuesDemilestonedIssueState>,
#[doc = "Title of the issue"]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the issue"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`IssuesDemilestonedIssueActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesDemilestonedIssueActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for IssuesDemilestonedIssueActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for IssuesDemilestonedIssueActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesDemilestonedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesDemilestonedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesDemilestonedIssuePullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct IssuesDemilestonedIssuePullRequest {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub diff_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub html_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub patch_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub url: ::std::option::Option<::std::string::String>,
}
#[doc = "State of the issue; either 'open' or 'closed'"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesDemilestonedIssueState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for IssuesDemilestonedIssueState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for IssuesDemilestonedIssueState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesDemilestonedIssueState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesDemilestonedIssueState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesEdited {
pub action: IssuesEditedAction,
pub changes: IssuesEditedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: Issue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub label: ::std::option::Option<Label>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for IssuesEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for IssuesEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The changes to the issue."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct IssuesEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub body: ::std::option::Option<IssuesEditedChangesBody>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<IssuesEditedChangesTitle>,
}
#[doc = "`IssuesEditedChangesBody`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesEditedChangesBody {
#[doc = "The previous version of the body."]
pub from: ::std::string::String,
}
#[doc = "`IssuesEditedChangesTitle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesEditedChangesTitle {
#[doc = "The previous version of the title."]
pub from: ::std::string::String,
}
#[doc = "`IssuesEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum IssuesEvent {
Assigned(IssuesAssigned),
Closed(IssuesClosed),
Deleted(IssuesDeleted),
Demilestoned(IssuesDemilestoned),
Edited(IssuesEdited),
Labeled(IssuesLabeled),
Locked(IssuesLocked),
Milestoned(IssuesMilestoned),
Opened(IssuesOpened),
Pinned(IssuesPinned),
Reopened(IssuesReopened),
Transferred(IssuesTransferred),
Unassigned(IssuesUnassigned),
Unlabeled(IssuesUnlabeled),
Unlocked(IssuesUnlocked),
Unpinned(IssuesUnpinned),
}
impl ::std::convert::From<IssuesAssigned> for IssuesEvent {
fn from(value: IssuesAssigned) -> Self {
Self::Assigned(value)
}
}
impl ::std::convert::From<IssuesClosed> for IssuesEvent {
fn from(value: IssuesClosed) -> Self {
Self::Closed(value)
}
}
impl ::std::convert::From<IssuesDeleted> for IssuesEvent {
fn from(value: IssuesDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<IssuesDemilestoned> for IssuesEvent {
fn from(value: IssuesDemilestoned) -> Self {
Self::Demilestoned(value)
}
}
impl ::std::convert::From<IssuesEdited> for IssuesEvent {
fn from(value: IssuesEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<IssuesLabeled> for IssuesEvent {
fn from(value: IssuesLabeled) -> Self {
Self::Labeled(value)
}
}
impl ::std::convert::From<IssuesLocked> for IssuesEvent {
fn from(value: IssuesLocked) -> Self {
Self::Locked(value)
}
}
impl ::std::convert::From<IssuesMilestoned> for IssuesEvent {
fn from(value: IssuesMilestoned) -> Self {
Self::Milestoned(value)
}
}
impl ::std::convert::From<IssuesOpened> for IssuesEvent {
fn from(value: IssuesOpened) -> Self {
Self::Opened(value)
}
}
impl ::std::convert::From<IssuesPinned> for IssuesEvent {
fn from(value: IssuesPinned) -> Self {
Self::Pinned(value)
}
}
impl ::std::convert::From<IssuesReopened> for IssuesEvent {
fn from(value: IssuesReopened) -> Self {
Self::Reopened(value)
}
}
impl ::std::convert::From<IssuesTransferred> for IssuesEvent {
fn from(value: IssuesTransferred) -> Self {
Self::Transferred(value)
}
}
impl ::std::convert::From<IssuesUnassigned> for IssuesEvent {
fn from(value: IssuesUnassigned) -> Self {
Self::Unassigned(value)
}
}
impl ::std::convert::From<IssuesUnlabeled> for IssuesEvent {
fn from(value: IssuesUnlabeled) -> Self {
Self::Unlabeled(value)
}
}
impl ::std::convert::From<IssuesUnlocked> for IssuesEvent {
fn from(value: IssuesUnlocked) -> Self {
Self::Unlocked(value)
}
}
impl ::std::convert::From<IssuesUnpinned> for IssuesEvent {
fn from(value: IssuesUnpinned) -> Self {
Self::Unpinned(value)
}
}
#[doc = "`IssuesLabeled`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesLabeled {
pub action: IssuesLabeledAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: Issue,
#[doc = "The label that was added to the issue."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub label: ::std::option::Option<Label>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesLabeledAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesLabeledAction {
#[serde(rename = "labeled")]
Labeled,
}
impl ::std::fmt::Display for IssuesLabeledAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Labeled => f.write_str("labeled"),
}
}
}
impl ::std::str::FromStr for IssuesLabeledAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"labeled" => Ok(Self::Labeled),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesLabeledAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesLabeledAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesLocked`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesLocked {
pub action: IssuesLockedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: IssuesLockedIssue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesLockedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesLockedAction {
#[serde(rename = "locked")]
Locked,
}
impl ::std::fmt::Display for IssuesLockedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Locked => f.write_str("locked"),
}
}
}
impl ::std::str::FromStr for IssuesLockedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"locked" => Ok(Self::Locked),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesLockedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesLockedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesLockedIssue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesLockedIssue {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<IssuesLockedIssueActiveLockReason>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[doc = "Contents of the issue"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub comments: i64,
pub comments_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub events_url: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub labels: ::std::vec::Vec<Label>,
pub labels_url: ::std::string::String,
pub locked: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_request: ::std::option::Option<IssuesLockedIssuePullRequest>,
pub repository_url: ::std::string::String,
#[doc = "State of the issue; either 'open' or 'closed'"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub state: ::std::option::Option<IssuesLockedIssueState>,
#[doc = "Title of the issue"]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the issue"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`IssuesLockedIssueActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesLockedIssueActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for IssuesLockedIssueActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for IssuesLockedIssueActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesLockedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesLockedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesLockedIssuePullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct IssuesLockedIssuePullRequest {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub diff_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub html_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub patch_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub url: ::std::option::Option<::std::string::String>,
}
#[doc = "State of the issue; either 'open' or 'closed'"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesLockedIssueState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for IssuesLockedIssueState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for IssuesLockedIssueState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesLockedIssueState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesLockedIssueState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesMilestoned`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesMilestoned {
pub action: IssuesMilestonedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: IssuesMilestonedIssue,
pub milestone: Milestone,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesMilestonedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesMilestonedAction {
#[serde(rename = "milestoned")]
Milestoned,
}
impl ::std::fmt::Display for IssuesMilestonedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Milestoned => f.write_str("milestoned"),
}
}
}
impl ::std::str::FromStr for IssuesMilestonedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"milestoned" => Ok(Self::Milestoned),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesMilestonedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesMilestonedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesMilestonedIssue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesMilestonedIssue {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<IssuesMilestonedIssueActiveLockReason>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[doc = "Contents of the issue"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub comments: i64,
pub comments_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub events_url: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub labels: ::std::vec::Vec<Label>,
pub labels_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub locked: ::std::option::Option<bool>,
pub milestone: IssuesMilestonedIssueMilestone,
pub node_id: ::std::string::String,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_request: ::std::option::Option<IssuesMilestonedIssuePullRequest>,
pub repository_url: ::std::string::String,
#[doc = "State of the issue; either 'open' or 'closed'"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub state: ::std::option::Option<IssuesMilestonedIssueState>,
#[doc = "Title of the issue"]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the issue"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`IssuesMilestonedIssueActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesMilestonedIssueActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for IssuesMilestonedIssueActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for IssuesMilestonedIssueActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesMilestonedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesMilestonedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesMilestonedIssueMilestone`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesMilestonedIssueMilestone {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub closed_issues: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub creator: User,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub due_on: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub html_url: ::std::string::String,
pub id: i64,
pub labels_url: ::std::string::String,
pub node_id: ::std::string::String,
pub number: i64,
pub open_issues: i64,
pub state: IssuesMilestonedIssueMilestoneState,
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`IssuesMilestonedIssueMilestoneState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesMilestonedIssueMilestoneState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for IssuesMilestonedIssueMilestoneState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for IssuesMilestonedIssueMilestoneState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesMilestonedIssueMilestoneState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesMilestonedIssueMilestoneState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesMilestonedIssuePullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct IssuesMilestonedIssuePullRequest {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub diff_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub html_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub patch_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub url: ::std::option::Option<::std::string::String>,
}
#[doc = "State of the issue; either 'open' or 'closed'"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesMilestonedIssueState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for IssuesMilestonedIssueState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for IssuesMilestonedIssueState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesMilestonedIssueState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesMilestonedIssueState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesOpened`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesOpened {
pub action: IssuesOpenedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub changes: ::std::option::Option<IssuesOpenedChanges>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: IssuesOpenedIssue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesOpenedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesOpenedAction {
#[serde(rename = "opened")]
Opened,
}
impl ::std::fmt::Display for IssuesOpenedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Opened => f.write_str("opened"),
}
}
}
impl ::std::str::FromStr for IssuesOpenedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"opened" => Ok(Self::Opened),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesOpenedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesOpenedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesOpenedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesOpenedChanges {
pub old_issue: Issue,
pub old_repository: Repository,
}
#[doc = "`IssuesOpenedIssue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesOpenedIssue {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<IssuesOpenedIssueActiveLockReason>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[doc = "Contents of the issue"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
pub closed_at: (),
pub comments: i64,
pub comments_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub events_url: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub labels: ::std::vec::Vec<Label>,
pub labels_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub locked: ::std::option::Option<bool>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_request: ::std::option::Option<IssuesOpenedIssuePullRequest>,
pub repository_url: ::std::string::String,
pub state: IssuesOpenedIssueState,
#[doc = "Title of the issue"]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the issue"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`IssuesOpenedIssueActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesOpenedIssueActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for IssuesOpenedIssueActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for IssuesOpenedIssueActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesOpenedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesOpenedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesOpenedIssuePullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct IssuesOpenedIssuePullRequest {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub diff_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub html_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub patch_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub url: ::std::option::Option<::std::string::String>,
}
#[doc = "`IssuesOpenedIssueState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesOpenedIssueState {
#[serde(rename = "open")]
Open,
}
impl ::std::fmt::Display for IssuesOpenedIssueState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
}
}
}
impl ::std::str::FromStr for IssuesOpenedIssueState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesOpenedIssueState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesOpenedIssueState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesPinned`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesPinned {
pub action: IssuesPinnedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: Issue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesPinnedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesPinnedAction {
#[serde(rename = "pinned")]
Pinned,
}
impl ::std::fmt::Display for IssuesPinnedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Pinned => f.write_str("pinned"),
}
}
}
impl ::std::str::FromStr for IssuesPinnedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pinned" => Ok(Self::Pinned),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesPinnedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesPinnedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesReopened`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesReopened {
pub action: IssuesReopenedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: IssuesReopenedIssue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesReopenedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesReopenedAction {
#[serde(rename = "reopened")]
Reopened,
}
impl ::std::fmt::Display for IssuesReopenedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Reopened => f.write_str("reopened"),
}
}
}
impl ::std::str::FromStr for IssuesReopenedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"reopened" => Ok(Self::Reopened),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesReopenedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesReopenedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesReopenedIssue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesReopenedIssue {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<IssuesReopenedIssueActiveLockReason>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[doc = "Contents of the issue"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub comments: i64,
pub comments_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub events_url: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub labels: ::std::vec::Vec<Label>,
pub labels_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub locked: ::std::option::Option<bool>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_request: ::std::option::Option<IssuesReopenedIssuePullRequest>,
pub repository_url: ::std::string::String,
pub state: IssuesReopenedIssueState,
#[doc = "Title of the issue"]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the issue"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`IssuesReopenedIssueActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesReopenedIssueActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for IssuesReopenedIssueActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for IssuesReopenedIssueActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesReopenedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesReopenedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesReopenedIssuePullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct IssuesReopenedIssuePullRequest {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub diff_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub html_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub patch_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub url: ::std::option::Option<::std::string::String>,
}
#[doc = "`IssuesReopenedIssueState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesReopenedIssueState {
#[serde(rename = "open")]
Open,
}
impl ::std::fmt::Display for IssuesReopenedIssueState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
}
}
}
impl ::std::str::FromStr for IssuesReopenedIssueState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesReopenedIssueState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesReopenedIssueState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesTransferred`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesTransferred {
pub action: IssuesTransferredAction,
pub changes: IssuesTransferredChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: Issue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesTransferredAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesTransferredAction {
#[serde(rename = "transferred")]
Transferred,
}
impl ::std::fmt::Display for IssuesTransferredAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Transferred => f.write_str("transferred"),
}
}
}
impl ::std::str::FromStr for IssuesTransferredAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"transferred" => Ok(Self::Transferred),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesTransferredAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesTransferredAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesTransferredChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesTransferredChanges {
pub new_issue: Issue,
pub new_repository: Repository,
}
#[doc = "`IssuesUnassigned`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesUnassigned {
#[doc = "The action that was performed."]
pub action: IssuesUnassignedAction,
#[doc = "The optional user who was assigned or unassigned from the issue."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub assignee: ::std::option::Option<User>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: Issue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "The action that was performed."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesUnassignedAction {
#[serde(rename = "unassigned")]
Unassigned,
}
impl ::std::fmt::Display for IssuesUnassignedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unassigned => f.write_str("unassigned"),
}
}
}
impl ::std::str::FromStr for IssuesUnassignedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unassigned" => Ok(Self::Unassigned),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesUnassignedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesUnassignedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesUnlabeled`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesUnlabeled {
pub action: IssuesUnlabeledAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: Issue,
#[doc = "The label that was removed from the issue."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub label: ::std::option::Option<Label>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesUnlabeledAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesUnlabeledAction {
#[serde(rename = "unlabeled")]
Unlabeled,
}
impl ::std::fmt::Display for IssuesUnlabeledAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unlabeled => f.write_str("unlabeled"),
}
}
}
impl ::std::str::FromStr for IssuesUnlabeledAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unlabeled" => Ok(Self::Unlabeled),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesUnlabeledAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesUnlabeledAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesUnlocked`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesUnlocked {
pub action: IssuesUnlockedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: IssuesUnlockedIssue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesUnlockedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesUnlockedAction {
#[serde(rename = "unlocked")]
Unlocked,
}
impl ::std::fmt::Display for IssuesUnlockedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unlocked => f.write_str("unlocked"),
}
}
}
impl ::std::str::FromStr for IssuesUnlockedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unlocked" => Ok(Self::Unlocked),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesUnlockedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesUnlockedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesUnlockedIssue`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesUnlockedIssue {
pub active_lock_reason: IssuesUnlockedIssueActiveLockReason,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[doc = "Contents of the issue"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub comments: i64,
pub comments_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub events_url: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
pub labels: ::std::vec::Vec<Label>,
pub labels_url: ::std::string::String,
pub locked: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub performed_via_github_app: ::std::option::Option<App>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull_request: ::std::option::Option<IssuesUnlockedIssuePullRequest>,
pub repository_url: ::std::string::String,
#[doc = "State of the issue; either 'open' or 'closed'"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub state: ::std::option::Option<IssuesUnlockedIssueState>,
#[doc = "Title of the issue"]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the issue"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`IssuesUnlockedIssueActiveLockReason`"]
#[derive(:: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct IssuesUnlockedIssueActiveLockReason(());
impl ::std::ops::Deref for IssuesUnlockedIssueActiveLockReason {
type Target = ();
fn deref(&self) -> &() {
&self.0
}
}
impl ::std::convert::From<IssuesUnlockedIssueActiveLockReason> for () {
fn from(value: IssuesUnlockedIssueActiveLockReason) -> Self {
value.0
}
}
impl ::std::convert::TryFrom<()> for IssuesUnlockedIssueActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: ()) -> ::std::result::Result<Self, self::error::ConversionError> {
if ![()].contains(&value) {
Err("invalid value".into())
} else {
Ok(Self(value))
}
}
}
impl<'de> ::serde::Deserialize<'de> for IssuesUnlockedIssueActiveLockReason {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
Self::try_from(<()>::deserialize(deserializer)?)
.map_err(|e| <D::Error as ::serde::de::Error>::custom(e.to_string()))
}
}
#[doc = "`IssuesUnlockedIssuePullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct IssuesUnlockedIssuePullRequest {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub diff_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub html_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub patch_url: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub url: ::std::option::Option<::std::string::String>,
}
#[doc = "State of the issue; either 'open' or 'closed'"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesUnlockedIssueState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for IssuesUnlockedIssueState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for IssuesUnlockedIssueState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesUnlockedIssueState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesUnlockedIssueState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`IssuesUnpinned`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct IssuesUnpinned {
pub action: IssuesUnpinnedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub issue: Issue,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`IssuesUnpinnedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum IssuesUnpinnedAction {
#[serde(rename = "unpinned")]
Unpinned,
}
impl ::std::fmt::Display for IssuesUnpinnedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unpinned => f.write_str("unpinned"),
}
}
}
impl ::std::str::FromStr for IssuesUnpinnedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unpinned" => Ok(Self::Unpinned),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for IssuesUnpinnedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for IssuesUnpinnedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Label`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Label {
#[doc = "6-character hex code, without the leading #, identifying the color"]
pub color: ::std::string::String,
pub default: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
pub id: i64,
#[doc = "The name of the label."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "URL for the label"]
pub url: ::std::string::String,
}
#[doc = "`LabelCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct LabelCreated {
pub action: LabelCreatedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The label that was added."]
pub label: Label,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`LabelCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LabelCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for LabelCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for LabelCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LabelCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LabelCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LabelDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct LabelDeleted {
pub action: LabelDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The label that was removed."]
pub label: Label,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`LabelDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LabelDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for LabelDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for LabelDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LabelDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LabelDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`LabelEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct LabelEdited {
pub action: LabelEditedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub changes: ::std::option::Option<LabelEditedChanges>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The label that was edited."]
pub label: Label,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`LabelEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum LabelEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for LabelEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for LabelEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for LabelEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for LabelEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The changes to the label if the action was `edited`."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct LabelEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub color: ::std::option::Option<LabelEditedChangesColor>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub description: ::std::option::Option<LabelEditedChangesDescription>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<LabelEditedChangesName>,
}
#[doc = "`LabelEditedChangesColor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct LabelEditedChangesColor {
#[doc = "The previous version of the color if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`LabelEditedChangesDescription`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct LabelEditedChangesDescription {
#[doc = "The previous version of the description if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`LabelEditedChangesName`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct LabelEditedChangesName {
#[doc = "The previous version of the name if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`LabelEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum LabelEvent {
Created(LabelCreated),
Deleted(LabelDeleted),
Edited(LabelEdited),
}
impl ::std::convert::From<LabelCreated> for LabelEvent {
fn from(value: LabelCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<LabelDeleted> for LabelEvent {
fn from(value: LabelDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<LabelEdited> for LabelEvent {
fn from(value: LabelEdited) -> Self {
Self::Edited(value)
}
}
#[doc = "`License`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct License {
pub key: ::std::string::String,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub spdx_id: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub url: ::std::option::Option<::std::string::String>,
}
#[doc = "`Link`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Link {
pub href: ::std::string::String,
}
#[doc = "`MarketplacePurchase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchase {
pub account: MarketplacePurchaseAccount,
pub billing_cycle: ::std::string::String,
pub free_trial_ends_on: (),
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub next_billing_date: ::std::option::Option<::std::string::String>,
pub on_free_trial: bool,
pub plan: MarketplacePurchasePlan,
pub unit_count: i64,
}
#[doc = "`MarketplacePurchaseAccount`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchaseAccount {
pub id: i64,
pub login: ::std::string::String,
pub node_id: ::std::string::String,
pub organization_billing_email: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
}
#[doc = "`MarketplacePurchaseCancelled`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchaseCancelled {
pub action: MarketplacePurchaseCancelledAction,
pub effective_date: ::std::string::String,
pub marketplace_purchase: MarketplacePurchaseCancelledMarketplacePurchase,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub previous_marketplace_purchase: ::std::option::Option<MarketplacePurchase>,
pub sender: MarketplacePurchaseCancelledSender,
}
#[doc = "`MarketplacePurchaseCancelledAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MarketplacePurchaseCancelledAction {
#[serde(rename = "cancelled")]
Cancelled,
}
impl ::std::fmt::Display for MarketplacePurchaseCancelledAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Cancelled => f.write_str("cancelled"),
}
}
}
impl ::std::str::FromStr for MarketplacePurchaseCancelledAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"cancelled" => Ok(Self::Cancelled),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MarketplacePurchaseCancelledAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MarketplacePurchaseCancelledAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MarketplacePurchaseCancelledMarketplacePurchase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchaseCancelledMarketplacePurchase {
pub account: MarketplacePurchaseCancelledMarketplacePurchaseAccount,
pub billing_cycle: ::std::string::String,
pub free_trial_ends_on: (),
pub next_billing_date: ::std::string::String,
pub on_free_trial: bool,
pub plan: MarketplacePurchaseCancelledMarketplacePurchasePlan,
pub unit_count: i64,
}
#[doc = "`MarketplacePurchaseCancelledMarketplacePurchaseAccount`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchaseCancelledMarketplacePurchaseAccount {
pub id: i64,
pub login: ::std::string::String,
pub node_id: ::std::string::String,
pub organization_billing_email: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
}
#[doc = "`MarketplacePurchaseCancelledMarketplacePurchasePlan`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchaseCancelledMarketplacePurchasePlan {
pub bullets: ::std::vec::Vec<::std::string::String>,
pub description: ::std::string::String,
pub has_free_trial: bool,
pub id: i64,
pub monthly_price_in_cents: i64,
pub name: ::std::string::String,
pub price_model: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub unit_name: ::std::option::Option<::std::string::String>,
pub yearly_price_in_cents: i64,
}
#[doc = "`MarketplacePurchaseCancelledSender`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchaseCancelledSender {
pub avatar_url: ::std::string::String,
pub email: ::std::string::String,
pub events_url: ::std::string::String,
pub followers_url: ::std::string::String,
pub following_url: ::std::string::String,
pub gists_url: ::std::string::String,
pub gravatar_id: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub login: ::std::string::String,
pub organizations_url: ::std::string::String,
pub received_events_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub site_admin: bool,
pub starred_url: ::std::string::String,
pub subscriptions_url: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`MarketplacePurchaseChanged`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchaseChanged {
pub action: MarketplacePurchaseChangedAction,
pub effective_date: ::std::string::String,
pub marketplace_purchase: MarketplacePurchaseChangedMarketplacePurchase,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub previous_marketplace_purchase: ::std::option::Option<MarketplacePurchase>,
pub sender: MarketplacePurchaseChangedSender,
}
#[doc = "`MarketplacePurchaseChangedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MarketplacePurchaseChangedAction {
#[serde(rename = "changed")]
Changed,
}
impl ::std::fmt::Display for MarketplacePurchaseChangedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Changed => f.write_str("changed"),
}
}
}
impl ::std::str::FromStr for MarketplacePurchaseChangedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"changed" => Ok(Self::Changed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MarketplacePurchaseChangedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MarketplacePurchaseChangedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MarketplacePurchaseChangedMarketplacePurchase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchaseChangedMarketplacePurchase {
pub account: MarketplacePurchaseChangedMarketplacePurchaseAccount,
pub billing_cycle: ::std::string::String,
pub free_trial_ends_on: (),
pub next_billing_date: ::std::string::String,
pub on_free_trial: bool,
pub plan: MarketplacePurchaseChangedMarketplacePurchasePlan,
pub unit_count: i64,
}
#[doc = "`MarketplacePurchaseChangedMarketplacePurchaseAccount`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchaseChangedMarketplacePurchaseAccount {
pub id: i64,
pub login: ::std::string::String,
pub node_id: ::std::string::String,
pub organization_billing_email: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
}
#[doc = "`MarketplacePurchaseChangedMarketplacePurchasePlan`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchaseChangedMarketplacePurchasePlan {
pub bullets: ::std::vec::Vec<::std::string::String>,
pub description: ::std::string::String,
pub has_free_trial: bool,
pub id: i64,
pub monthly_price_in_cents: i64,
pub name: ::std::string::String,
pub price_model: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub unit_name: ::std::option::Option<::std::string::String>,
pub yearly_price_in_cents: i64,
}
#[doc = "`MarketplacePurchaseChangedSender`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchaseChangedSender {
pub avatar_url: ::std::string::String,
pub email: ::std::string::String,
pub events_url: ::std::string::String,
pub followers_url: ::std::string::String,
pub following_url: ::std::string::String,
pub gists_url: ::std::string::String,
pub gravatar_id: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub login: ::std::string::String,
pub organizations_url: ::std::string::String,
pub received_events_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub site_admin: bool,
pub starred_url: ::std::string::String,
pub subscriptions_url: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`MarketplacePurchaseEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum MarketplacePurchaseEvent {
Cancelled(MarketplacePurchaseCancelled),
Changed(MarketplacePurchaseChanged),
PendingChange(MarketplacePurchasePendingChange),
PendingChangeCancelled(MarketplacePurchasePendingChangeCancelled),
Purchased(MarketplacePurchasePurchased),
}
impl ::std::convert::From<MarketplacePurchaseCancelled> for MarketplacePurchaseEvent {
fn from(value: MarketplacePurchaseCancelled) -> Self {
Self::Cancelled(value)
}
}
impl ::std::convert::From<MarketplacePurchaseChanged> for MarketplacePurchaseEvent {
fn from(value: MarketplacePurchaseChanged) -> Self {
Self::Changed(value)
}
}
impl ::std::convert::From<MarketplacePurchasePendingChange> for MarketplacePurchaseEvent {
fn from(value: MarketplacePurchasePendingChange) -> Self {
Self::PendingChange(value)
}
}
impl ::std::convert::From<MarketplacePurchasePendingChangeCancelled> for MarketplacePurchaseEvent {
fn from(value: MarketplacePurchasePendingChangeCancelled) -> Self {
Self::PendingChangeCancelled(value)
}
}
impl ::std::convert::From<MarketplacePurchasePurchased> for MarketplacePurchaseEvent {
fn from(value: MarketplacePurchasePurchased) -> Self {
Self::Purchased(value)
}
}
#[doc = "`MarketplacePurchasePendingChange`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePendingChange {
pub action: MarketplacePurchasePendingChangeAction,
pub effective_date: ::std::string::String,
pub marketplace_purchase: MarketplacePurchasePendingChangeMarketplacePurchase,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub previous_marketplace_purchase: ::std::option::Option<MarketplacePurchase>,
pub sender: MarketplacePurchasePendingChangeSender,
}
#[doc = "`MarketplacePurchasePendingChangeAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MarketplacePurchasePendingChangeAction {
#[serde(rename = "pending_change")]
PendingChange,
}
impl ::std::fmt::Display for MarketplacePurchasePendingChangeAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::PendingChange => f.write_str("pending_change"),
}
}
}
impl ::std::str::FromStr for MarketplacePurchasePendingChangeAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pending_change" => Ok(Self::PendingChange),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MarketplacePurchasePendingChangeAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MarketplacePurchasePendingChangeAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MarketplacePurchasePendingChangeCancelled`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePendingChangeCancelled {
pub action: MarketplacePurchasePendingChangeCancelledAction,
pub effective_date: ::std::string::String,
pub marketplace_purchase: MarketplacePurchasePendingChangeCancelledMarketplacePurchase,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub previous_marketplace_purchase: ::std::option::Option<MarketplacePurchase>,
pub sender: MarketplacePurchasePendingChangeCancelledSender,
}
#[doc = "`MarketplacePurchasePendingChangeCancelledAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MarketplacePurchasePendingChangeCancelledAction {
#[serde(rename = "pending_change_cancelled")]
PendingChangeCancelled,
}
impl ::std::fmt::Display for MarketplacePurchasePendingChangeCancelledAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::PendingChangeCancelled => f.write_str("pending_change_cancelled"),
}
}
}
impl ::std::str::FromStr for MarketplacePurchasePendingChangeCancelledAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pending_change_cancelled" => Ok(Self::PendingChangeCancelled),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MarketplacePurchasePendingChangeCancelledAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for MarketplacePurchasePendingChangeCancelledAction
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MarketplacePurchasePendingChangeCancelledMarketplacePurchase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePendingChangeCancelledMarketplacePurchase {
pub account: MarketplacePurchasePendingChangeCancelledMarketplacePurchaseAccount,
pub billing_cycle: ::std::string::String,
pub free_trial_ends_on: (),
pub next_billing_date: ::std::string::String,
pub on_free_trial: bool,
pub plan: MarketplacePurchasePendingChangeCancelledMarketplacePurchasePlan,
pub unit_count: i64,
}
#[doc = "`MarketplacePurchasePendingChangeCancelledMarketplacePurchaseAccount`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePendingChangeCancelledMarketplacePurchaseAccount {
pub id: i64,
pub login: ::std::string::String,
pub node_id: ::std::string::String,
pub organization_billing_email: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
}
#[doc = "`MarketplacePurchasePendingChangeCancelledMarketplacePurchasePlan`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePendingChangeCancelledMarketplacePurchasePlan {
pub bullets: ::std::vec::Vec<::std::string::String>,
pub description: ::std::string::String,
pub has_free_trial: bool,
pub id: i64,
pub monthly_price_in_cents: i64,
pub name: ::std::string::String,
pub price_model: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub unit_name: ::std::option::Option<::std::string::String>,
pub yearly_price_in_cents: i64,
}
#[doc = "`MarketplacePurchasePendingChangeCancelledSender`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePendingChangeCancelledSender {
pub avatar_url: ::std::string::String,
pub email: ::std::string::String,
pub events_url: ::std::string::String,
pub followers_url: ::std::string::String,
pub following_url: ::std::string::String,
pub gists_url: ::std::string::String,
pub gravatar_id: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub login: ::std::string::String,
pub organizations_url: ::std::string::String,
pub received_events_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub site_admin: bool,
pub starred_url: ::std::string::String,
pub subscriptions_url: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`MarketplacePurchasePendingChangeMarketplacePurchase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePendingChangeMarketplacePurchase {
pub account: MarketplacePurchasePendingChangeMarketplacePurchaseAccount,
pub billing_cycle: ::std::string::String,
pub free_trial_ends_on: (),
pub next_billing_date: ::std::string::String,
pub on_free_trial: bool,
pub plan: MarketplacePurchasePendingChangeMarketplacePurchasePlan,
pub unit_count: i64,
}
#[doc = "`MarketplacePurchasePendingChangeMarketplacePurchaseAccount`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePendingChangeMarketplacePurchaseAccount {
pub id: i64,
pub login: ::std::string::String,
pub node_id: ::std::string::String,
pub organization_billing_email: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
}
#[doc = "`MarketplacePurchasePendingChangeMarketplacePurchasePlan`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePendingChangeMarketplacePurchasePlan {
pub bullets: ::std::vec::Vec<::std::string::String>,
pub description: ::std::string::String,
pub has_free_trial: bool,
pub id: i64,
pub monthly_price_in_cents: i64,
pub name: ::std::string::String,
pub price_model: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub unit_name: ::std::option::Option<::std::string::String>,
pub yearly_price_in_cents: i64,
}
#[doc = "`MarketplacePurchasePendingChangeSender`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePendingChangeSender {
pub avatar_url: ::std::string::String,
pub email: ::std::string::String,
pub events_url: ::std::string::String,
pub followers_url: ::std::string::String,
pub following_url: ::std::string::String,
pub gists_url: ::std::string::String,
pub gravatar_id: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub login: ::std::string::String,
pub organizations_url: ::std::string::String,
pub received_events_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub site_admin: bool,
pub starred_url: ::std::string::String,
pub subscriptions_url: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`MarketplacePurchasePlan`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePlan {
pub bullets: ::std::vec::Vec<::std::string::String>,
pub description: ::std::string::String,
pub has_free_trial: bool,
pub id: i64,
pub monthly_price_in_cents: i64,
pub name: ::std::string::String,
pub price_model: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub unit_name: ::std::option::Option<::std::string::String>,
pub yearly_price_in_cents: i64,
}
#[doc = "`MarketplacePurchasePurchased`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePurchased {
pub action: MarketplacePurchasePurchasedAction,
pub effective_date: ::std::string::String,
pub marketplace_purchase: MarketplacePurchasePurchasedMarketplacePurchase,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub previous_marketplace_purchase: ::std::option::Option<MarketplacePurchase>,
pub sender: MarketplacePurchasePurchasedSender,
}
#[doc = "`MarketplacePurchasePurchasedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MarketplacePurchasePurchasedAction {
#[serde(rename = "purchased")]
Purchased,
}
impl ::std::fmt::Display for MarketplacePurchasePurchasedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Purchased => f.write_str("purchased"),
}
}
}
impl ::std::str::FromStr for MarketplacePurchasePurchasedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"purchased" => Ok(Self::Purchased),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MarketplacePurchasePurchasedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MarketplacePurchasePurchasedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MarketplacePurchasePurchasedMarketplacePurchase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePurchasedMarketplacePurchase {
pub account: MarketplacePurchasePurchasedMarketplacePurchaseAccount,
pub billing_cycle: ::std::string::String,
pub free_trial_ends_on: (),
pub next_billing_date: ::std::string::String,
pub on_free_trial: bool,
pub plan: MarketplacePurchasePurchasedMarketplacePurchasePlan,
pub unit_count: i64,
}
#[doc = "`MarketplacePurchasePurchasedMarketplacePurchaseAccount`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePurchasedMarketplacePurchaseAccount {
pub id: i64,
pub login: ::std::string::String,
pub node_id: ::std::string::String,
pub organization_billing_email: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
}
#[doc = "`MarketplacePurchasePurchasedMarketplacePurchasePlan`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePurchasedMarketplacePurchasePlan {
pub bullets: ::std::vec::Vec<::std::string::String>,
pub description: ::std::string::String,
pub has_free_trial: bool,
pub id: i64,
pub monthly_price_in_cents: i64,
pub name: ::std::string::String,
pub price_model: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub unit_name: ::std::option::Option<::std::string::String>,
pub yearly_price_in_cents: i64,
}
#[doc = "`MarketplacePurchasePurchasedSender`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MarketplacePurchasePurchasedSender {
pub avatar_url: ::std::string::String,
pub email: ::std::string::String,
pub events_url: ::std::string::String,
pub followers_url: ::std::string::String,
pub following_url: ::std::string::String,
pub gists_url: ::std::string::String,
pub gravatar_id: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub login: ::std::string::String,
pub organizations_url: ::std::string::String,
pub received_events_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub site_admin: bool,
pub starred_url: ::std::string::String,
pub subscriptions_url: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "Activity related to repository collaborators. The type of activity is specified in the action property."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MemberAdded {
pub action: MemberAddedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub changes: ::std::option::Option<MemberAddedChanges>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The user that was added."]
pub member: User,
pub repository: Repository,
pub sender: User,
}
#[doc = "`MemberAddedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MemberAddedAction {
#[serde(rename = "added")]
Added,
}
impl ::std::fmt::Display for MemberAddedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Added => f.write_str("added"),
}
}
}
impl ::std::str::FromStr for MemberAddedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"added" => Ok(Self::Added),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MemberAddedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MemberAddedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MemberAddedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct MemberAddedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub permission: ::std::option::Option<MemberAddedChangesPermission>,
}
#[doc = "`MemberAddedChangesPermission`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MemberAddedChangesPermission {
pub to: MemberAddedChangesPermissionTo,
}
#[doc = "`MemberAddedChangesPermissionTo`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MemberAddedChangesPermissionTo {
#[serde(rename = "write")]
Write,
#[serde(rename = "admin")]
Admin,
}
impl ::std::fmt::Display for MemberAddedChangesPermissionTo {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Write => f.write_str("write"),
Self::Admin => f.write_str("admin"),
}
}
}
impl ::std::str::FromStr for MemberAddedChangesPermissionTo {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"write" => Ok(Self::Write),
"admin" => Ok(Self::Admin),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MemberAddedChangesPermissionTo {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MemberAddedChangesPermissionTo {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MemberEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MemberEdited {
pub action: MemberEditedAction,
pub changes: MemberEditedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The user who's permissions are changed."]
pub member: User,
pub repository: Repository,
pub sender: User,
}
#[doc = "`MemberEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MemberEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for MemberEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for MemberEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MemberEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MemberEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The changes to the collaborator permissions"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MemberEditedChanges {
pub old_permission: MemberEditedChangesOldPermission,
}
#[doc = "`MemberEditedChangesOldPermission`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MemberEditedChangesOldPermission {
#[doc = "The previous permissions of the collaborator if the action was edited."]
pub from: ::std::string::String,
}
#[doc = "`MemberEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum MemberEvent {
Added(MemberAdded),
Edited(MemberEdited),
Removed(MemberRemoved),
}
impl ::std::convert::From<MemberAdded> for MemberEvent {
fn from(value: MemberAdded) -> Self {
Self::Added(value)
}
}
impl ::std::convert::From<MemberEdited> for MemberEvent {
fn from(value: MemberEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<MemberRemoved> for MemberEvent {
fn from(value: MemberRemoved) -> Self {
Self::Removed(value)
}
}
#[doc = "`MemberRemoved`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MemberRemoved {
pub action: MemberRemovedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The user that was removed."]
pub member: User,
pub repository: Repository,
pub sender: User,
}
#[doc = "`MemberRemovedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MemberRemovedAction {
#[serde(rename = "removed")]
Removed,
}
impl ::std::fmt::Display for MemberRemovedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Removed => f.write_str("removed"),
}
}
}
impl ::std::str::FromStr for MemberRemovedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"removed" => Ok(Self::Removed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MemberRemovedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MemberRemovedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The membership between the user and the organization. Not present when the action is `member_invited`."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Membership {
pub organization_url: ::std::string::String,
pub role: ::std::string::String,
pub state: ::std::string::String,
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`MembershipAdded`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MembershipAdded {
pub action: MembershipAddedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The [user](https://docs.github.com/en/rest/reference/users) that was added or removed."]
pub member: User,
pub organization: Organization,
#[doc = "The scope of the membership. Currently, can only be `team`."]
pub scope: MembershipAddedScope,
pub sender: User,
#[doc = "The [team](https://docs.github.com/en/rest/reference/teams) for the membership."]
pub team: Team,
}
#[doc = "`MembershipAddedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MembershipAddedAction {
#[serde(rename = "added")]
Added,
}
impl ::std::fmt::Display for MembershipAddedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Added => f.write_str("added"),
}
}
}
impl ::std::str::FromStr for MembershipAddedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"added" => Ok(Self::Added),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MembershipAddedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MembershipAddedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The scope of the membership. Currently, can only be `team`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MembershipAddedScope {
#[serde(rename = "team")]
Team,
}
impl ::std::fmt::Display for MembershipAddedScope {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Team => f.write_str("team"),
}
}
}
impl ::std::str::FromStr for MembershipAddedScope {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"team" => Ok(Self::Team),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MembershipAddedScope {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MembershipAddedScope {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MembershipEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum MembershipEvent {
Added(MembershipAdded),
Removed(MembershipRemoved),
}
impl ::std::convert::From<MembershipAdded> for MembershipEvent {
fn from(value: MembershipAdded) -> Self {
Self::Added(value)
}
}
impl ::std::convert::From<MembershipRemoved> for MembershipEvent {
fn from(value: MembershipRemoved) -> Self {
Self::Removed(value)
}
}
#[doc = "`MembershipRemoved`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MembershipRemoved {
pub action: MembershipRemovedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The [user](https://docs.github.com/en/rest/reference/users) that was added or removed."]
pub member: User,
pub organization: Organization,
#[doc = "The scope of the membership. Currently, can only be `team`."]
pub scope: MembershipRemovedScope,
pub sender: User,
#[doc = "The [team](https://docs.github.com/en/rest/reference/teams) for the membership."]
pub team: MembershipRemovedTeam,
}
#[doc = "`MembershipRemovedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MembershipRemovedAction {
#[serde(rename = "removed")]
Removed,
}
impl ::std::fmt::Display for MembershipRemovedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Removed => f.write_str("removed"),
}
}
}
impl ::std::str::FromStr for MembershipRemovedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"removed" => Ok(Self::Removed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MembershipRemovedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MembershipRemovedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The scope of the membership. Currently, can only be `team`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MembershipRemovedScope {
#[serde(rename = "team")]
Team,
#[serde(rename = "organization")]
Organization,
}
impl ::std::fmt::Display for MembershipRemovedScope {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Team => f.write_str("team"),
Self::Organization => f.write_str("organization"),
}
}
}
impl ::std::str::FromStr for MembershipRemovedScope {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"team" => Ok(Self::Team),
"organization" => Ok(Self::Organization),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MembershipRemovedScope {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MembershipRemovedScope {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The [team](https://docs.github.com/en/rest/reference/teams) for the membership."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum MembershipRemovedTeam {
Team(Team),
Object {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
deleted: ::std::option::Option<bool>,
id: i64,
name: ::std::string::String,
},
}
impl ::std::convert::From<Team> for MembershipRemovedTeam {
fn from(value: Team) -> Self {
Self::Team(value)
}
}
#[doc = "`MetaDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MetaDeleted {
pub action: MetaDeletedAction,
pub hook: MetaDeletedHook,
#[doc = "The id of the modified webhook."]
pub hook_id: i64,
pub repository: Repository,
pub sender: User,
}
#[doc = "`MetaDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MetaDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for MetaDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for MetaDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MetaDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MetaDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The modified webhook. This will contain different keys based on the type of webhook it is: repository, organization, business, app, or GitHub Marketplace."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MetaDeletedHook {
pub active: bool,
pub config: MetaDeletedHookConfig,
pub created_at: ::std::string::String,
pub events: WebhookEvents,
pub id: i64,
pub name: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub updated_at: ::std::string::String,
}
#[doc = "`MetaDeletedHookConfig`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MetaDeletedHookConfig {
pub content_type: MetaDeletedHookConfigContentType,
pub insecure_ssl: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`MetaDeletedHookConfigContentType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MetaDeletedHookConfigContentType {
#[serde(rename = "json")]
Json,
#[serde(rename = "form")]
Form,
}
impl ::std::fmt::Display for MetaDeletedHookConfigContentType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Json => f.write_str("json"),
Self::Form => f.write_str("form"),
}
}
}
impl ::std::str::FromStr for MetaDeletedHookConfigContentType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"json" => Ok(Self::Json),
"form" => Ok(Self::Form),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MetaDeletedHookConfigContentType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MetaDeletedHookConfigContentType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MetaEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct MetaEvent(pub MetaDeleted);
impl ::std::ops::Deref for MetaEvent {
type Target = MetaDeleted;
fn deref(&self) -> &MetaDeleted {
&self.0
}
}
impl ::std::convert::From<MetaEvent> for MetaDeleted {
fn from(value: MetaEvent) -> Self {
value.0
}
}
impl ::std::convert::From<MetaDeleted> for MetaEvent {
fn from(value: MetaDeleted) -> Self {
Self(value)
}
}
#[doc = "A collection of related issues and pull requests."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Milestone {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub closed_issues: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub creator: User,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub due_on: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub html_url: ::std::string::String,
pub id: i64,
pub labels_url: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "The number of the milestone."]
pub number: i64,
pub open_issues: i64,
#[doc = "The state of the milestone."]
pub state: MilestoneState,
#[doc = "The title of the milestone."]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`MilestoneClosed`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MilestoneClosed {
pub action: MilestoneClosedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub milestone: MilestoneClosedMilestone,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`MilestoneClosedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MilestoneClosedAction {
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for MilestoneClosedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for MilestoneClosedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MilestoneClosedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MilestoneClosedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MilestoneClosedMilestone`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MilestoneClosedMilestone {
pub closed_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub closed_issues: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub creator: User,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub due_on: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub html_url: ::std::string::String,
pub id: i64,
pub labels_url: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "The number of the milestone."]
pub number: i64,
pub open_issues: i64,
pub state: MilestoneClosedMilestoneState,
#[doc = "The title of the milestone."]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`MilestoneClosedMilestoneState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MilestoneClosedMilestoneState {
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for MilestoneClosedMilestoneState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for MilestoneClosedMilestoneState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MilestoneClosedMilestoneState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MilestoneClosedMilestoneState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MilestoneCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MilestoneCreated {
pub action: MilestoneCreatedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub milestone: MilestoneCreatedMilestone,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`MilestoneCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MilestoneCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for MilestoneCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for MilestoneCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MilestoneCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MilestoneCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MilestoneCreatedMilestone`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MilestoneCreatedMilestone {
pub closed_at: (),
pub closed_issues: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub creator: User,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub due_on: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub html_url: ::std::string::String,
pub id: i64,
pub labels_url: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "The number of the milestone."]
pub number: i64,
pub open_issues: i64,
pub state: MilestoneCreatedMilestoneState,
#[doc = "The title of the milestone."]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`MilestoneCreatedMilestoneState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MilestoneCreatedMilestoneState {
#[serde(rename = "open")]
Open,
}
impl ::std::fmt::Display for MilestoneCreatedMilestoneState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
}
}
}
impl ::std::str::FromStr for MilestoneCreatedMilestoneState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MilestoneCreatedMilestoneState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MilestoneCreatedMilestoneState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MilestoneDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MilestoneDeleted {
pub action: MilestoneDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub milestone: Milestone,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`MilestoneDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MilestoneDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for MilestoneDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for MilestoneDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MilestoneDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MilestoneDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MilestoneEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MilestoneEdited {
pub action: MilestoneEditedAction,
pub changes: MilestoneEditedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub milestone: Milestone,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`MilestoneEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MilestoneEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for MilestoneEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for MilestoneEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MilestoneEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MilestoneEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The changes to the milestone if the action was `edited`."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct MilestoneEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub description: ::std::option::Option<MilestoneEditedChangesDescription>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub due_on: ::std::option::Option<MilestoneEditedChangesDueOn>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<MilestoneEditedChangesTitle>,
}
#[doc = "`MilestoneEditedChangesDescription`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MilestoneEditedChangesDescription {
#[doc = "The previous version of the description if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`MilestoneEditedChangesDueOn`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MilestoneEditedChangesDueOn {
#[doc = "The previous version of the due date if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`MilestoneEditedChangesTitle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MilestoneEditedChangesTitle {
#[doc = "The previous version of the title if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`MilestoneEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum MilestoneEvent {
Closed(MilestoneClosed),
Created(MilestoneCreated),
Deleted(MilestoneDeleted),
Edited(MilestoneEdited),
Opened(MilestoneOpened),
}
impl ::std::convert::From<MilestoneClosed> for MilestoneEvent {
fn from(value: MilestoneClosed) -> Self {
Self::Closed(value)
}
}
impl ::std::convert::From<MilestoneCreated> for MilestoneEvent {
fn from(value: MilestoneCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<MilestoneDeleted> for MilestoneEvent {
fn from(value: MilestoneDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<MilestoneEdited> for MilestoneEvent {
fn from(value: MilestoneEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<MilestoneOpened> for MilestoneEvent {
fn from(value: MilestoneOpened) -> Self {
Self::Opened(value)
}
}
#[doc = "`MilestoneOpened`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MilestoneOpened {
pub action: MilestoneOpenedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub milestone: MilestoneOpenedMilestone,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`MilestoneOpenedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MilestoneOpenedAction {
#[serde(rename = "opened")]
Opened,
}
impl ::std::fmt::Display for MilestoneOpenedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Opened => f.write_str("opened"),
}
}
}
impl ::std::str::FromStr for MilestoneOpenedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"opened" => Ok(Self::Opened),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MilestoneOpenedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MilestoneOpenedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`MilestoneOpenedMilestone`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct MilestoneOpenedMilestone {
pub closed_at: (),
pub closed_issues: i64,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub creator: User,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub due_on: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub html_url: ::std::string::String,
pub id: i64,
pub labels_url: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "The number of the milestone."]
pub number: i64,
pub open_issues: i64,
pub state: MilestoneOpenedMilestoneState,
#[doc = "The title of the milestone."]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`MilestoneOpenedMilestoneState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MilestoneOpenedMilestoneState {
#[serde(rename = "open")]
Open,
}
impl ::std::fmt::Display for MilestoneOpenedMilestoneState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
}
}
}
impl ::std::str::FromStr for MilestoneOpenedMilestoneState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MilestoneOpenedMilestoneState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MilestoneOpenedMilestoneState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The state of the milestone."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum MilestoneState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for MilestoneState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for MilestoneState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for MilestoneState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for MilestoneState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`OrgBlockBlocked`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct OrgBlockBlocked {
pub action: OrgBlockBlockedAction,
#[doc = "Information about the user that was blocked or unblocked."]
pub blocked_user: User,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub organization: Organization,
pub sender: User,
}
#[doc = "`OrgBlockBlockedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum OrgBlockBlockedAction {
#[serde(rename = "blocked")]
Blocked,
}
impl ::std::fmt::Display for OrgBlockBlockedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Blocked => f.write_str("blocked"),
}
}
}
impl ::std::str::FromStr for OrgBlockBlockedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"blocked" => Ok(Self::Blocked),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for OrgBlockBlockedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for OrgBlockBlockedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`OrgBlockEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OrgBlockEvent {
Blocked(OrgBlockBlocked),
Unblocked(OrgBlockUnblocked),
}
impl ::std::convert::From<OrgBlockBlocked> for OrgBlockEvent {
fn from(value: OrgBlockBlocked) -> Self {
Self::Blocked(value)
}
}
impl ::std::convert::From<OrgBlockUnblocked> for OrgBlockEvent {
fn from(value: OrgBlockUnblocked) -> Self {
Self::Unblocked(value)
}
}
#[doc = "`OrgBlockUnblocked`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct OrgBlockUnblocked {
pub action: OrgBlockUnblockedAction,
#[doc = "Information about the user that was blocked or unblocked."]
pub blocked_user: User,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub organization: Organization,
pub sender: User,
}
#[doc = "`OrgBlockUnblockedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum OrgBlockUnblockedAction {
#[serde(rename = "unblocked")]
Unblocked,
}
impl ::std::fmt::Display for OrgBlockUnblockedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unblocked => f.write_str("unblocked"),
}
}
}
impl ::std::str::FromStr for OrgBlockUnblockedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unblocked" => Ok(Self::Unblocked),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for OrgBlockUnblockedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for OrgBlockUnblockedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Organization`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Organization {
pub avatar_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
pub events_url: ::std::string::String,
pub hooks_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub html_url: ::std::option::Option<::std::string::String>,
pub id: i64,
pub issues_url: ::std::string::String,
pub login: ::std::string::String,
pub members_url: ::std::string::String,
pub node_id: ::std::string::String,
pub public_members_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`OrganizationDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct OrganizationDeleted {
pub action: OrganizationDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub membership: Membership,
pub organization: Organization,
pub sender: User,
}
#[doc = "`OrganizationDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum OrganizationDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for OrganizationDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for OrganizationDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for OrganizationDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for OrganizationDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`OrganizationEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum OrganizationEvent {
Deleted(OrganizationDeleted),
MemberAdded(OrganizationMemberAdded),
MemberInvited(OrganizationMemberInvited),
MemberRemoved(OrganizationMemberRemoved),
Renamed(OrganizationRenamed),
}
impl ::std::convert::From<OrganizationDeleted> for OrganizationEvent {
fn from(value: OrganizationDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<OrganizationMemberAdded> for OrganizationEvent {
fn from(value: OrganizationMemberAdded) -> Self {
Self::MemberAdded(value)
}
}
impl ::std::convert::From<OrganizationMemberInvited> for OrganizationEvent {
fn from(value: OrganizationMemberInvited) -> Self {
Self::MemberInvited(value)
}
}
impl ::std::convert::From<OrganizationMemberRemoved> for OrganizationEvent {
fn from(value: OrganizationMemberRemoved) -> Self {
Self::MemberRemoved(value)
}
}
impl ::std::convert::From<OrganizationRenamed> for OrganizationEvent {
fn from(value: OrganizationRenamed) -> Self {
Self::Renamed(value)
}
}
#[doc = "`OrganizationMemberAdded`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct OrganizationMemberAdded {
pub action: OrganizationMemberAddedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub membership: Membership,
pub organization: Organization,
pub sender: User,
}
#[doc = "`OrganizationMemberAddedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum OrganizationMemberAddedAction {
#[serde(rename = "member_added")]
MemberAdded,
}
impl ::std::fmt::Display for OrganizationMemberAddedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::MemberAdded => f.write_str("member_added"),
}
}
}
impl ::std::str::FromStr for OrganizationMemberAddedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"member_added" => Ok(Self::MemberAdded),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for OrganizationMemberAddedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for OrganizationMemberAddedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`OrganizationMemberInvited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct OrganizationMemberInvited {
pub action: OrganizationMemberInvitedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub invitation: OrganizationMemberInvitedInvitation,
pub organization: Organization,
pub sender: User,
pub user: User,
}
#[doc = "`OrganizationMemberInvitedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum OrganizationMemberInvitedAction {
#[serde(rename = "member_invited")]
MemberInvited,
}
impl ::std::fmt::Display for OrganizationMemberInvitedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::MemberInvited => f.write_str("member_invited"),
}
}
}
impl ::std::str::FromStr for OrganizationMemberInvitedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"member_invited" => Ok(Self::MemberInvited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for OrganizationMemberInvitedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for OrganizationMemberInvitedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The invitation for the user or email if the action is `member_invited`."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct OrganizationMemberInvitedInvitation {
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub email: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub failed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub failed_reason: ::std::option::Option<::std::string::String>,
pub id: f64,
pub invitation_teams_url: ::std::string::String,
pub inviter: User,
pub login: ::std::string::String,
pub node_id: ::std::string::String,
pub role: ::std::string::String,
pub team_count: f64,
}
#[doc = "`OrganizationMemberRemoved`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct OrganizationMemberRemoved {
pub action: OrganizationMemberRemovedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub membership: Membership,
pub organization: Organization,
pub sender: User,
}
#[doc = "`OrganizationMemberRemovedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum OrganizationMemberRemovedAction {
#[serde(rename = "member_removed")]
MemberRemoved,
}
impl ::std::fmt::Display for OrganizationMemberRemovedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::MemberRemoved => f.write_str("member_removed"),
}
}
}
impl ::std::str::FromStr for OrganizationMemberRemovedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"member_removed" => Ok(Self::MemberRemoved),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for OrganizationMemberRemovedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for OrganizationMemberRemovedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`OrganizationRenamed`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct OrganizationRenamed {
pub action: OrganizationRenamedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub membership: Membership,
pub organization: Organization,
pub sender: User,
}
#[doc = "`OrganizationRenamedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum OrganizationRenamedAction {
#[serde(rename = "renamed")]
Renamed,
}
impl ::std::fmt::Display for OrganizationRenamedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Renamed => f.write_str("renamed"),
}
}
}
impl ::std::str::FromStr for OrganizationRenamedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"renamed" => Ok(Self::Renamed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for OrganizationRenamedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for OrganizationRenamedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PackageEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PackageEvent {
Published(PackagePublished),
Updated(PackageUpdated),
}
impl ::std::convert::From<PackagePublished> for PackageEvent {
fn from(value: PackagePublished) -> Self {
Self::Published(value)
}
}
impl ::std::convert::From<PackageUpdated> for PackageEvent {
fn from(value: PackageUpdated) -> Self {
Self::Updated(value)
}
}
#[doc = "`PackagePublished`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackagePublished {
pub action: PackagePublishedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub package: PackagePublishedPackage,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PackagePublishedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PackagePublishedAction {
#[serde(rename = "published")]
Published,
}
impl ::std::fmt::Display for PackagePublishedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Published => f.write_str("published"),
}
}
}
impl ::std::str::FromStr for PackagePublishedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"published" => Ok(Self::Published),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PackagePublishedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PackagePublishedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "Information about the package."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackagePublishedPackage {
pub created_at: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
pub ecosystem: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub name: ::std::string::String,
pub namespace: ::std::string::String,
pub owner: User,
pub package_type: ::std::string::String,
pub package_version: PackagePublishedPackagePackageVersion,
pub registry: PackagePublishedPackageRegistry,
pub updated_at: ::std::string::String,
}
#[doc = "`PackagePublishedPackagePackageVersion`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackagePublishedPackagePackageVersion {
pub author: User,
pub body: ::std::string::String,
pub body_html: ::std::string::String,
pub created_at: ::std::string::String,
pub description: ::std::string::String,
pub docker_metadata: ::std::vec::Vec<::serde_json::Value>,
pub draft: bool,
pub html_url: ::std::string::String,
pub id: i64,
pub installation_command: ::std::string::String,
pub manifest: ::std::string::String,
pub metadata: ::std::vec::Vec<::serde_json::Value>,
pub name: ::std::string::String,
pub package_files: ::std::vec::Vec<PackagePublishedPackagePackageVersionPackageFilesItem>,
pub prerelease: bool,
pub release: PackagePublishedPackagePackageVersionRelease,
pub source_url: ::std::string::String,
pub summary: ::std::string::String,
pub tag_name: ::std::string::String,
pub target_commitish: ::std::string::String,
pub target_oid: ::std::string::String,
pub updated_at: ::std::string::String,
pub version: ::std::string::String,
}
#[doc = "`PackagePublishedPackagePackageVersionPackageFilesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackagePublishedPackagePackageVersionPackageFilesItem {
pub content_type: ::std::string::String,
pub created_at: ::std::string::String,
pub download_url: ::std::string::String,
pub id: i64,
pub md5: ::std::string::String,
pub name: ::std::string::String,
pub sha1: ::std::string::String,
pub sha256: ::std::string::String,
pub size: i64,
pub state: ::std::string::String,
pub updated_at: ::std::string::String,
}
#[doc = "`PackagePublishedPackagePackageVersionRelease`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackagePublishedPackagePackageVersionRelease {
pub author: User,
pub created_at: ::std::string::String,
pub draft: bool,
pub html_url: ::std::string::String,
pub id: i64,
pub name: ::std::string::String,
pub prerelease: bool,
pub published_at: ::std::string::String,
pub tag_name: ::std::string::String,
pub target_commitish: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`PackagePublishedPackageRegistry`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackagePublishedPackageRegistry {
pub about_url: ::std::string::String,
pub name: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub url: ::std::string::String,
pub vendor: ::std::string::String,
}
#[doc = "`PackageUpdated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackageUpdated {
pub action: PackageUpdatedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub package: PackageUpdatedPackage,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PackageUpdatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PackageUpdatedAction {
#[serde(rename = "updated")]
Updated,
}
impl ::std::fmt::Display for PackageUpdatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Updated => f.write_str("updated"),
}
}
}
impl ::std::str::FromStr for PackageUpdatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"updated" => Ok(Self::Updated),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PackageUpdatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PackageUpdatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "Information about the package."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackageUpdatedPackage {
pub created_at: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
pub ecosystem: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub name: ::std::string::String,
pub namespace: ::std::string::String,
pub owner: User,
pub package_type: ::std::string::String,
pub package_version: PackageUpdatedPackagePackageVersion,
pub registry: PackageUpdatedPackageRegistry,
pub updated_at: ::std::string::String,
}
#[doc = "`PackageUpdatedPackagePackageVersion`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackageUpdatedPackagePackageVersion {
pub author: User,
pub body: ::std::string::String,
pub body_html: ::std::string::String,
pub created_at: ::std::string::String,
pub description: ::std::string::String,
pub docker_metadata: ::std::vec::Vec<::serde_json::Value>,
pub draft: bool,
pub html_url: ::std::string::String,
pub id: i64,
pub installation_command: ::std::string::String,
pub manifest: ::std::string::String,
pub metadata: ::std::vec::Vec<::serde_json::Value>,
pub name: ::std::string::String,
pub package_files: ::std::vec::Vec<PackageUpdatedPackagePackageVersionPackageFilesItem>,
pub prerelease: bool,
pub release: PackageUpdatedPackagePackageVersionRelease,
pub source_url: ::std::string::String,
pub summary: ::std::string::String,
pub tag_name: ::std::string::String,
pub target_commitish: ::std::string::String,
pub target_oid: ::std::string::String,
pub updated_at: ::std::string::String,
pub version: ::std::string::String,
}
#[doc = "`PackageUpdatedPackagePackageVersionPackageFilesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackageUpdatedPackagePackageVersionPackageFilesItem {
pub content_type: ::std::string::String,
pub created_at: ::std::string::String,
pub download_url: ::std::string::String,
pub id: i64,
pub md5: ::std::string::String,
pub name: ::std::string::String,
pub sha1: ::std::string::String,
pub sha256: ::std::string::String,
pub size: i64,
pub state: ::std::string::String,
pub updated_at: ::std::string::String,
}
#[doc = "`PackageUpdatedPackagePackageVersionRelease`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackageUpdatedPackagePackageVersionRelease {
pub author: User,
pub created_at: ::std::string::String,
pub draft: bool,
pub html_url: ::std::string::String,
pub id: i64,
pub name: ::std::string::String,
pub prerelease: bool,
pub published_at: ::std::string::String,
pub tag_name: ::std::string::String,
pub target_commitish: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`PackageUpdatedPackageRegistry`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PackageUpdatedPackageRegistry {
pub about_url: ::std::string::String,
pub name: ::std::string::String,
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub url: ::std::string::String,
pub vendor: ::std::string::String,
}
#[doc = "Page Build"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PageBuildEvent {
pub build: PageBuildEventBuild,
pub id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "The [List GitHub Pages builds](https://docs.github.com/en/rest/reference/repos#list-github-pages-builds) itself."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PageBuildEventBuild {
pub commit: ::std::string::String,
pub created_at: ::std::string::String,
pub duration: i64,
pub error: PageBuildEventBuildError,
pub pusher: User,
pub status: ::std::string::String,
pub updated_at: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`PageBuildEventBuildError`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PageBuildEventBuildError {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub message: ::std::option::Option<::std::string::String>,
}
#[doc = "`PingEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PingEvent {
pub hook: PingEventHook,
#[doc = "The ID of the webhook that triggered the ping."]
pub hook_id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository: ::std::option::Option<Repository>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub sender: ::std::option::Option<User>,
pub zen: ::std::string::String,
}
#[doc = "The [webhook configuration](https://docs.github.com/en/rest/reference/repos#get-a-repository-webhook)."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PingEventHook {
pub active: bool,
#[doc = "When you register a new GitHub App, GitHub sends a ping event to the **webhook URL** you specified during registration. The event contains the `app_id`, which is required for [authenticating](https://docs.github.com/en/apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps) an app."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub app_id: ::std::option::Option<i64>,
pub config: PingEventHookConfig,
pub created_at: ::std::string::String,
pub events: WebhookEvents,
pub id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub last_response: ::std::option::Option<PingEventHookLastResponse>,
pub name: ::std::string::String,
pub ping_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub test_url: ::std::option::Option<::std::string::String>,
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub updated_at: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`PingEventHookConfig`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PingEventHookConfig {
pub content_type: PingEventHookConfigContentType,
pub insecure_ssl: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub secret: ::std::option::Option<::std::string::String>,
pub url: ::std::string::String,
}
#[doc = "`PingEventHookConfigContentType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PingEventHookConfigContentType {
#[serde(rename = "json")]
Json,
#[serde(rename = "form")]
Form,
}
impl ::std::fmt::Display for PingEventHookConfigContentType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Json => f.write_str("json"),
Self::Form => f.write_str("form"),
}
}
}
impl ::std::str::FromStr for PingEventHookConfigContentType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"json" => Ok(Self::Json),
"form" => Ok(Self::Form),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PingEventHookConfigContentType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PingEventHookConfigContentType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PingEventHookLastResponse`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PingEventHookLastResponse {
pub code: (),
pub message: (),
pub status: ::std::string::String,
}
#[doc = "`Project`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Project {
#[doc = "Body of the project"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
pub columns_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub creator: User,
pub html_url: ::std::string::String,
pub id: i64,
#[doc = "Name of the project"]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub number: i64,
pub owner_url: ::std::string::String,
#[doc = "State of the project; either 'open' or 'closed'"]
pub state: ProjectState,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`ProjectCard`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCard {
#[serde(default)]
pub after_id: (),
#[doc = "Whether or not the card is archived"]
pub archived: bool,
pub column_id: i64,
pub column_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub content_url: ::std::option::Option<::std::string::String>,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub creator: User,
#[doc = "The project card's ID"]
pub id: i64,
pub node_id: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub note: ::std::option::Option<::std::string::String>,
pub project_url: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`ProjectCardConverted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCardConverted {
pub action: ProjectCardConvertedAction,
pub changes: ProjectCardConvertedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project_card: ProjectCard,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectCardConvertedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectCardConvertedAction {
#[serde(rename = "converted")]
Converted,
}
impl ::std::fmt::Display for ProjectCardConvertedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Converted => f.write_str("converted"),
}
}
}
impl ::std::str::FromStr for ProjectCardConvertedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"converted" => Ok(Self::Converted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectCardConvertedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectCardConvertedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ProjectCardConvertedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCardConvertedChanges {
pub note: ProjectCardConvertedChangesNote,
}
#[doc = "`ProjectCardConvertedChangesNote`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCardConvertedChangesNote {
pub from: ::std::string::String,
}
#[doc = "`ProjectCardCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCardCreated {
pub action: ProjectCardCreatedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project_card: ProjectCard,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectCardCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectCardCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for ProjectCardCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for ProjectCardCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectCardCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectCardCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ProjectCardDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCardDeleted {
pub action: ProjectCardDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project_card: ProjectCard,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectCardDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectCardDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for ProjectCardDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for ProjectCardDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectCardDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectCardDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ProjectCardEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCardEdited {
pub action: ProjectCardEditedAction,
pub changes: ProjectCardEditedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project_card: ProjectCard,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectCardEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectCardEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for ProjectCardEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for ProjectCardEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectCardEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectCardEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ProjectCardEditedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCardEditedChanges {
pub note: ProjectCardEditedChangesNote,
}
#[doc = "`ProjectCardEditedChangesNote`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCardEditedChangesNote {
pub from: ::std::string::String,
}
#[doc = "`ProjectCardEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectCardEvent {
Converted(ProjectCardConverted),
Created(ProjectCardCreated),
Deleted(ProjectCardDeleted),
Edited(ProjectCardEdited),
Moved(ProjectCardMoved),
}
impl ::std::convert::From<ProjectCardConverted> for ProjectCardEvent {
fn from(value: ProjectCardConverted) -> Self {
Self::Converted(value)
}
}
impl ::std::convert::From<ProjectCardCreated> for ProjectCardEvent {
fn from(value: ProjectCardCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<ProjectCardDeleted> for ProjectCardEvent {
fn from(value: ProjectCardDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<ProjectCardEdited> for ProjectCardEvent {
fn from(value: ProjectCardEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<ProjectCardMoved> for ProjectCardEvent {
fn from(value: ProjectCardMoved) -> Self {
Self::Moved(value)
}
}
#[doc = "`ProjectCardMoved`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCardMoved {
pub action: ProjectCardMovedAction,
pub changes: ProjectCardMovedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project_card: ProjectCardMovedProjectCard,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectCardMovedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectCardMovedAction {
#[serde(rename = "moved")]
Moved,
}
impl ::std::fmt::Display for ProjectCardMovedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Moved => f.write_str("moved"),
}
}
}
impl ::std::str::FromStr for ProjectCardMovedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"moved" => Ok(Self::Moved),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectCardMovedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectCardMovedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ProjectCardMovedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCardMovedChanges {
pub column_id: ProjectCardMovedChangesColumnId,
}
#[doc = "`ProjectCardMovedChangesColumnId`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCardMovedChangesColumnId {
pub from: i64,
}
#[doc = "`ProjectCardMovedProjectCard`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCardMovedProjectCard {
pub after_id: (),
#[doc = "Whether or not the card is archived"]
pub archived: bool,
pub column_id: i64,
pub column_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub content_url: ::std::option::Option<::std::string::String>,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub creator: User,
#[doc = "The project card's ID"]
pub id: i64,
pub node_id: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub note: ::std::option::Option<::std::string::String>,
pub project_url: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`ProjectClosed`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectClosed {
pub action: ProjectClosedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project: Project,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectClosedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectClosedAction {
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for ProjectClosedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for ProjectClosedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectClosedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectClosedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ProjectColumn`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectColumn {
pub cards_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The unique identifier of the project column"]
pub id: i64,
#[doc = "Name of the project column"]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub project_url: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
}
#[doc = "`ProjectColumnCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectColumnCreated {
pub action: ProjectColumnCreatedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project_column: ProjectColumn,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectColumnCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectColumnCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for ProjectColumnCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for ProjectColumnCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectColumnCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectColumnCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ProjectColumnDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectColumnDeleted {
pub action: ProjectColumnDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project_column: ProjectColumn,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectColumnDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectColumnDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for ProjectColumnDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for ProjectColumnDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectColumnDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectColumnDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ProjectColumnEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectColumnEdited {
pub action: ProjectColumnEditedAction,
pub changes: ProjectColumnEditedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project_column: ProjectColumn,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectColumnEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectColumnEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for ProjectColumnEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for ProjectColumnEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectColumnEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectColumnEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ProjectColumnEditedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct ProjectColumnEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<ProjectColumnEditedChangesName>,
}
#[doc = "`ProjectColumnEditedChangesName`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectColumnEditedChangesName {
pub from: ::std::string::String,
}
#[doc = "`ProjectColumnEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectColumnEvent {
Created(ProjectColumnCreated),
Deleted(ProjectColumnDeleted),
Edited(ProjectColumnEdited),
Moved(ProjectColumnMoved),
}
impl ::std::convert::From<ProjectColumnCreated> for ProjectColumnEvent {
fn from(value: ProjectColumnCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<ProjectColumnDeleted> for ProjectColumnEvent {
fn from(value: ProjectColumnDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<ProjectColumnEdited> for ProjectColumnEvent {
fn from(value: ProjectColumnEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<ProjectColumnMoved> for ProjectColumnEvent {
fn from(value: ProjectColumnMoved) -> Self {
Self::Moved(value)
}
}
#[doc = "`ProjectColumnMoved`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectColumnMoved {
pub action: ProjectColumnMovedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project_column: ProjectColumn,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectColumnMovedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectColumnMovedAction {
#[serde(rename = "moved")]
Moved,
}
impl ::std::fmt::Display for ProjectColumnMovedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Moved => f.write_str("moved"),
}
}
}
impl ::std::str::FromStr for ProjectColumnMovedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"moved" => Ok(Self::Moved),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectColumnMovedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectColumnMovedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ProjectCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectCreated {
pub action: ProjectCreatedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project: Project,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for ProjectCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for ProjectCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ProjectDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectDeleted {
pub action: ProjectDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project: Project,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for ProjectDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for ProjectDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ProjectEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectEdited {
pub action: ProjectEditedAction,
pub changes: ProjectEditedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project: Project,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for ProjectEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for ProjectEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The changes to the project if the action was `edited`."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct ProjectEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub body: ::std::option::Option<ProjectEditedChangesBody>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<ProjectEditedChangesName>,
}
#[doc = "`ProjectEditedChangesBody`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectEditedChangesBody {
#[doc = "The previous version of the body if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`ProjectEditedChangesName`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectEditedChangesName {
#[doc = "The changes to the project if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`ProjectEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ProjectEvent {
Closed(ProjectClosed),
Created(ProjectCreated),
Deleted(ProjectDeleted),
Edited(ProjectEdited),
Reopened(ProjectReopened),
}
impl ::std::convert::From<ProjectClosed> for ProjectEvent {
fn from(value: ProjectClosed) -> Self {
Self::Closed(value)
}
}
impl ::std::convert::From<ProjectCreated> for ProjectEvent {
fn from(value: ProjectCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<ProjectDeleted> for ProjectEvent {
fn from(value: ProjectDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<ProjectEdited> for ProjectEvent {
fn from(value: ProjectEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<ProjectReopened> for ProjectEvent {
fn from(value: ProjectReopened) -> Self {
Self::Reopened(value)
}
}
#[doc = "`ProjectReopened`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ProjectReopened {
pub action: ProjectReopenedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub project: Project,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ProjectReopenedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectReopenedAction {
#[serde(rename = "reopened")]
Reopened,
}
impl ::std::fmt::Display for ProjectReopenedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Reopened => f.write_str("reopened"),
}
}
}
impl ::std::str::FromStr for ProjectReopenedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"reopened" => Ok(Self::Reopened),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectReopenedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectReopenedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "State of the project; either 'open' or 'closed'"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ProjectState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for ProjectState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for ProjectState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ProjectState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ProjectState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "When a private repository is made public."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PublicEvent {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: PublicEventRepository,
pub sender: User,
}
#[doc = "`PublicEventRepository`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PublicEventRepository {
#[doc = "Whether to allow auto-merge for pull requests."]
#[serde(default)]
pub allow_auto_merge: bool,
#[doc = "Whether to allow private forks"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub allow_forking: ::std::option::Option<bool>,
#[doc = "Whether to allow merge commits for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_merge_commit: bool,
#[doc = "Whether to allow rebase merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_rebase_merge: bool,
#[doc = "Whether to allow squash merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_squash_merge: bool,
pub archive_url: ::std::string::String,
#[doc = "Whether the repository is archived."]
pub archived: bool,
pub assignees_url: ::std::string::String,
pub blobs_url: ::std::string::String,
pub branches_url: ::std::string::String,
pub clone_url: ::std::string::String,
pub collaborators_url: ::std::string::String,
pub comments_url: ::std::string::String,
pub commits_url: ::std::string::String,
pub compare_url: ::std::string::String,
pub contents_url: ::std::string::String,
pub contributors_url: ::std::string::String,
pub created_at: PublicEventRepositoryCreatedAt,
#[doc = "The default branch of the repository."]
pub default_branch: ::std::string::String,
#[doc = "Whether to delete head branches when pull requests are merged"]
#[serde(default)]
pub delete_branch_on_merge: bool,
pub deployments_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[doc = "Returns whether or not this repository is disabled."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub disabled: ::std::option::Option<bool>,
pub downloads_url: ::std::string::String,
pub events_url: ::std::string::String,
pub fork: bool,
pub forks: i64,
pub forks_count: i64,
pub forks_url: ::std::string::String,
pub full_name: ::std::string::String,
pub git_commits_url: ::std::string::String,
pub git_refs_url: ::std::string::String,
pub git_tags_url: ::std::string::String,
pub git_url: ::std::string::String,
#[doc = "Whether downloads are enabled."]
pub has_downloads: bool,
#[doc = "Whether issues are enabled."]
pub has_issues: bool,
pub has_pages: bool,
#[doc = "Whether projects are enabled."]
pub has_projects: bool,
#[doc = "Whether the wiki is enabled."]
pub has_wiki: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub homepage: ::std::option::Option<::std::string::String>,
pub hooks_url: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
pub issue_comment_url: ::std::string::String,
pub issue_events_url: ::std::string::String,
pub issues_url: ::std::string::String,
pub keys_url: ::std::string::String,
pub labels_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub language: ::std::option::Option<::std::string::String>,
pub languages_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub license: ::std::option::Option<License>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub master_branch: ::std::option::Option<::std::string::String>,
pub merges_url: ::std::string::String,
pub milestones_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mirror_url: ::std::option::Option<::std::string::String>,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub notifications_url: ::std::string::String,
pub open_issues: i64,
pub open_issues_count: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<::std::string::String>,
pub owner: User,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub permissions: ::std::option::Option<PublicEventRepositoryPermissions>,
pub private: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub public: ::std::option::Option<bool>,
pub pulls_url: ::std::string::String,
pub pushed_at: PublicEventRepositoryPushedAt,
pub releases_url: ::std::string::String,
pub size: i64,
pub ssh_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub stargazers: ::std::option::Option<i64>,
pub stargazers_count: i64,
pub stargazers_url: ::std::string::String,
pub statuses_url: ::std::string::String,
pub subscribers_url: ::std::string::String,
pub subscription_url: ::std::string::String,
pub svn_url: ::std::string::String,
pub tags_url: ::std::string::String,
pub teams_url: ::std::string::String,
pub trees_url: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub watchers: i64,
pub watchers_count: i64,
}
#[doc = "`PublicEventRepositoryCreatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PublicEventRepositoryCreatedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
}
impl ::std::fmt::Display for PublicEventRepositoryCreatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Integer(x) => x.fmt(f),
Self::DateTime(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for PublicEventRepositoryCreatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for PublicEventRepositoryCreatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PublicEventRepositoryCreatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<i64> for PublicEventRepositoryCreatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for PublicEventRepositoryCreatedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`PublicEventRepositoryPermissions`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PublicEventRepositoryPermissions {
pub admin: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub maintain: ::std::option::Option<bool>,
pub pull: bool,
pub push: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub triage: ::std::option::Option<bool>,
}
#[doc = "`PublicEventRepositoryPushedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PublicEventRepositoryPushedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Null,
}
impl ::std::convert::From<i64> for PublicEventRepositoryPushedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for PublicEventRepositoryPushedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`PullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequest {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<PullRequestActiveLockReason>,
pub additions: i64,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
pub auto_merge: (),
pub base: PullRequestBase,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
pub changed_files: i64,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
pub comments: i64,
pub comments_url: ::std::string::String,
pub commits: i64,
pub commits_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub deletions: i64,
pub diff_url: ::std::string::String,
#[doc = "Indicates whether or not the pull request is a draft."]
pub draft: bool,
pub head: PullRequestHead,
pub html_url: ::std::string::String,
pub id: i64,
pub issue_url: ::std::string::String,
pub labels: ::std::vec::Vec<Label>,
#[serde(rename = "_links")]
pub links: PullRequestLinks,
pub locked: bool,
#[doc = "Indicates whether maintainers can modify the pull request."]
pub maintainer_can_modify: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merge_commit_sha: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mergeable: ::std::option::Option<bool>,
pub mergeable_state: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merged: ::std::option::Option<bool>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merged_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merged_by: ::std::option::Option<User>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
#[doc = "Number uniquely identifying the pull request within its repository."]
pub number: i64,
pub patch_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub rebaseable: ::std::option::Option<bool>,
pub requested_reviewers: ::std::vec::Vec<PullRequestRequestedReviewersItem>,
pub requested_teams: ::std::vec::Vec<Team>,
pub review_comment_url: ::std::string::String,
pub review_comments: i64,
pub review_comments_url: ::std::string::String,
#[doc = "State of this Pull Request. Either `open` or `closed`."]
pub state: PullRequestState,
pub statuses_url: ::std::string::String,
#[doc = "The title of the pull request."]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for PullRequestActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for PullRequestActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestAssigned`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestAssigned {
pub action: PullRequestAssignedAction,
pub assignee: User,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestAssignedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestAssignedAction {
#[serde(rename = "assigned")]
Assigned,
}
impl ::std::fmt::Display for PullRequestAssignedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Assigned => f.write_str("assigned"),
}
}
}
impl ::std::str::FromStr for PullRequestAssignedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"assigned" => Ok(Self::Assigned),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestAssignedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestAssignedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestAutoMergeDisabled`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestAutoMergeDisabled {
pub action: PullRequestAutoMergeDisabledAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestAutoMergeDisabledAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestAutoMergeDisabledAction {
#[serde(rename = "auto_merge_disabled")]
AutoMergeDisabled,
}
impl ::std::fmt::Display for PullRequestAutoMergeDisabledAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::AutoMergeDisabled => f.write_str("auto_merge_disabled"),
}
}
}
impl ::std::str::FromStr for PullRequestAutoMergeDisabledAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"auto_merge_disabled" => Ok(Self::AutoMergeDisabled),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestAutoMergeDisabledAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestAutoMergeDisabledAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestAutoMergeEnabled`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestAutoMergeEnabled {
pub action: PullRequestAutoMergeEnabledAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestAutoMergeEnabledAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestAutoMergeEnabledAction {
#[serde(rename = "auto_merge_enabled")]
AutoMergeEnabled,
}
impl ::std::fmt::Display for PullRequestAutoMergeEnabledAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::AutoMergeEnabled => f.write_str("auto_merge_enabled"),
}
}
}
impl ::std::str::FromStr for PullRequestAutoMergeEnabledAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"auto_merge_enabled" => Ok(Self::AutoMergeEnabled),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestAutoMergeEnabledAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestAutoMergeEnabledAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestBase {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestClosed`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestClosed {
pub action: PullRequestClosedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequestClosedPullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestClosedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestClosedAction {
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for PullRequestClosedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for PullRequestClosedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestClosedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestClosedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestClosedPullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestClosedPullRequest {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<PullRequestClosedPullRequestActiveLockReason>,
pub additions: i64,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
pub auto_merge: (),
pub base: PullRequestClosedPullRequestBase,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
pub changed_files: i64,
pub closed_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub comments: i64,
pub comments_url: ::std::string::String,
pub commits: i64,
pub commits_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub deletions: i64,
pub diff_url: ::std::string::String,
#[doc = "Indicates whether or not the pull request is a draft."]
pub draft: bool,
pub head: PullRequestClosedPullRequestHead,
pub html_url: ::std::string::String,
pub id: i64,
pub issue_url: ::std::string::String,
pub labels: ::std::vec::Vec<Label>,
#[serde(rename = "_links")]
pub links: PullRequestClosedPullRequestLinks,
pub locked: bool,
#[doc = "Indicates whether maintainers can modify the pull request."]
pub maintainer_can_modify: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merge_commit_sha: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mergeable: ::std::option::Option<bool>,
pub mergeable_state: ::std::string::String,
pub merged: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merged_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merged_by: ::std::option::Option<User>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
#[doc = "Number uniquely identifying the pull request within its repository."]
pub number: i64,
pub patch_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub rebaseable: ::std::option::Option<bool>,
pub requested_reviewers: ::std::vec::Vec<PullRequestClosedPullRequestRequestedReviewersItem>,
pub requested_teams: ::std::vec::Vec<Team>,
pub review_comment_url: ::std::string::String,
pub review_comments: i64,
pub review_comments_url: ::std::string::String,
pub state: PullRequestClosedPullRequestState,
pub statuses_url: ::std::string::String,
#[doc = "The title of the pull request."]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestClosedPullRequestActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestClosedPullRequestActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for PullRequestClosedPullRequestActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for PullRequestClosedPullRequestActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestClosedPullRequestActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestClosedPullRequestActiveLockReason
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestClosedPullRequestBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestClosedPullRequestBase {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestClosedPullRequestHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestClosedPullRequestHead {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestClosedPullRequestLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestClosedPullRequestLinks {
pub comments: Link,
pub commits: Link,
pub html: Link,
pub issue: Link,
pub review_comment: Link,
pub review_comments: Link,
#[serde(rename = "self")]
pub self_: Link,
pub statuses: Link,
}
#[doc = "`PullRequestClosedPullRequestRequestedReviewersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PullRequestClosedPullRequestRequestedReviewersItem {
User(User),
Team(Team),
}
impl ::std::convert::From<User> for PullRequestClosedPullRequestRequestedReviewersItem {
fn from(value: User) -> Self {
Self::User(value)
}
}
impl ::std::convert::From<Team> for PullRequestClosedPullRequestRequestedReviewersItem {
fn from(value: Team) -> Self {
Self::Team(value)
}
}
#[doc = "`PullRequestClosedPullRequestState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestClosedPullRequestState {
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for PullRequestClosedPullRequestState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for PullRequestClosedPullRequestState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestClosedPullRequestState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestClosedPullRequestState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestConvertedToDraft`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestConvertedToDraft {
pub action: PullRequestConvertedToDraftAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequestConvertedToDraftPullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestConvertedToDraftAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestConvertedToDraftAction {
#[serde(rename = "converted_to_draft")]
ConvertedToDraft,
}
impl ::std::fmt::Display for PullRequestConvertedToDraftAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::ConvertedToDraft => f.write_str("converted_to_draft"),
}
}
}
impl ::std::str::FromStr for PullRequestConvertedToDraftAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"converted_to_draft" => Ok(Self::ConvertedToDraft),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestConvertedToDraftAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestConvertedToDraftAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestConvertedToDraftPullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestConvertedToDraftPullRequest {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason:
::std::option::Option<PullRequestConvertedToDraftPullRequestActiveLockReason>,
pub additions: i64,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
pub auto_merge: (),
pub base: PullRequestConvertedToDraftPullRequestBase,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
pub changed_files: i64,
pub closed_at: (),
pub comments: i64,
pub comments_url: ::std::string::String,
pub commits: i64,
pub commits_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub deletions: i64,
pub diff_url: ::std::string::String,
pub draft: bool,
pub head: PullRequestConvertedToDraftPullRequestHead,
pub html_url: ::std::string::String,
pub id: i64,
pub issue_url: ::std::string::String,
pub labels: ::std::vec::Vec<Label>,
#[serde(rename = "_links")]
pub links: PullRequestConvertedToDraftPullRequestLinks,
pub locked: bool,
#[doc = "Indicates whether maintainers can modify the pull request."]
pub maintainer_can_modify: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merge_commit_sha: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mergeable: ::std::option::Option<bool>,
pub mergeable_state: ::std::string::String,
pub merged: bool,
pub merged_at: (),
pub merged_by: (),
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
#[doc = "Number uniquely identifying the pull request within its repository."]
pub number: i64,
pub patch_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub rebaseable: ::std::option::Option<bool>,
pub requested_reviewers:
::std::vec::Vec<PullRequestConvertedToDraftPullRequestRequestedReviewersItem>,
pub requested_teams: ::std::vec::Vec<Team>,
pub review_comment_url: ::std::string::String,
pub review_comments: i64,
pub review_comments_url: ::std::string::String,
#[doc = "State of this Pull Request. Either `open` or `closed`."]
pub state: PullRequestConvertedToDraftPullRequestState,
pub statuses_url: ::std::string::String,
#[doc = "The title of the pull request."]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestConvertedToDraftPullRequestActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestConvertedToDraftPullRequestActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for PullRequestConvertedToDraftPullRequestActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for PullRequestConvertedToDraftPullRequestActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestConvertedToDraftPullRequestActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestConvertedToDraftPullRequestActiveLockReason
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestConvertedToDraftPullRequestBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestConvertedToDraftPullRequestBase {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestConvertedToDraftPullRequestHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestConvertedToDraftPullRequestHead {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestConvertedToDraftPullRequestLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestConvertedToDraftPullRequestLinks {
pub comments: Link,
pub commits: Link,
pub html: Link,
pub issue: Link,
pub review_comment: Link,
pub review_comments: Link,
#[serde(rename = "self")]
pub self_: Link,
pub statuses: Link,
}
#[doc = "`PullRequestConvertedToDraftPullRequestRequestedReviewersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PullRequestConvertedToDraftPullRequestRequestedReviewersItem {
User(User),
Team(Team),
}
impl ::std::convert::From<User> for PullRequestConvertedToDraftPullRequestRequestedReviewersItem {
fn from(value: User) -> Self {
Self::User(value)
}
}
impl ::std::convert::From<Team> for PullRequestConvertedToDraftPullRequestRequestedReviewersItem {
fn from(value: Team) -> Self {
Self::Team(value)
}
}
#[doc = "State of this Pull Request. Either `open` or `closed`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestConvertedToDraftPullRequestState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for PullRequestConvertedToDraftPullRequestState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for PullRequestConvertedToDraftPullRequestState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestConvertedToDraftPullRequestState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestConvertedToDraftPullRequestState
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestEdited {
pub action: PullRequestEditedAction,
pub changes: PullRequestEditedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for PullRequestEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for PullRequestEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The changes to the comment if the action was `edited`."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct PullRequestEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub body: ::std::option::Option<PullRequestEditedChangesBody>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub title: ::std::option::Option<PullRequestEditedChangesTitle>,
}
#[doc = "`PullRequestEditedChangesBody`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestEditedChangesBody {
#[doc = "The previous version of the body if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`PullRequestEditedChangesTitle`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestEditedChangesTitle {
#[doc = "The previous version of the title if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`PullRequestEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PullRequestEvent {
Assigned(PullRequestAssigned),
AutoMergeDisabled(PullRequestAutoMergeDisabled),
AutoMergeEnabled(PullRequestAutoMergeEnabled),
Closed(PullRequestClosed),
ConvertedToDraft(PullRequestConvertedToDraft),
Edited(PullRequestEdited),
Labeled(PullRequestLabeled),
Locked(PullRequestLocked),
Opened(PullRequestOpened),
ReadyForReview(PullRequestReadyForReview),
Reopened(PullRequestReopened),
ReviewRequestRemoved(PullRequestReviewRequestRemoved),
ReviewRequested(PullRequestReviewRequested),
Synchronize(PullRequestSynchronize),
Unassigned(PullRequestUnassigned),
Unlabeled(PullRequestUnlabeled),
Unlocked(PullRequestUnlocked),
}
impl ::std::convert::From<PullRequestAssigned> for PullRequestEvent {
fn from(value: PullRequestAssigned) -> Self {
Self::Assigned(value)
}
}
impl ::std::convert::From<PullRequestAutoMergeDisabled> for PullRequestEvent {
fn from(value: PullRequestAutoMergeDisabled) -> Self {
Self::AutoMergeDisabled(value)
}
}
impl ::std::convert::From<PullRequestAutoMergeEnabled> for PullRequestEvent {
fn from(value: PullRequestAutoMergeEnabled) -> Self {
Self::AutoMergeEnabled(value)
}
}
impl ::std::convert::From<PullRequestClosed> for PullRequestEvent {
fn from(value: PullRequestClosed) -> Self {
Self::Closed(value)
}
}
impl ::std::convert::From<PullRequestConvertedToDraft> for PullRequestEvent {
fn from(value: PullRequestConvertedToDraft) -> Self {
Self::ConvertedToDraft(value)
}
}
impl ::std::convert::From<PullRequestEdited> for PullRequestEvent {
fn from(value: PullRequestEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<PullRequestLabeled> for PullRequestEvent {
fn from(value: PullRequestLabeled) -> Self {
Self::Labeled(value)
}
}
impl ::std::convert::From<PullRequestLocked> for PullRequestEvent {
fn from(value: PullRequestLocked) -> Self {
Self::Locked(value)
}
}
impl ::std::convert::From<PullRequestOpened> for PullRequestEvent {
fn from(value: PullRequestOpened) -> Self {
Self::Opened(value)
}
}
impl ::std::convert::From<PullRequestReadyForReview> for PullRequestEvent {
fn from(value: PullRequestReadyForReview) -> Self {
Self::ReadyForReview(value)
}
}
impl ::std::convert::From<PullRequestReopened> for PullRequestEvent {
fn from(value: PullRequestReopened) -> Self {
Self::Reopened(value)
}
}
impl ::std::convert::From<PullRequestReviewRequestRemoved> for PullRequestEvent {
fn from(value: PullRequestReviewRequestRemoved) -> Self {
Self::ReviewRequestRemoved(value)
}
}
impl ::std::convert::From<PullRequestReviewRequested> for PullRequestEvent {
fn from(value: PullRequestReviewRequested) -> Self {
Self::ReviewRequested(value)
}
}
impl ::std::convert::From<PullRequestSynchronize> for PullRequestEvent {
fn from(value: PullRequestSynchronize) -> Self {
Self::Synchronize(value)
}
}
impl ::std::convert::From<PullRequestUnassigned> for PullRequestEvent {
fn from(value: PullRequestUnassigned) -> Self {
Self::Unassigned(value)
}
}
impl ::std::convert::From<PullRequestUnlabeled> for PullRequestEvent {
fn from(value: PullRequestUnlabeled) -> Self {
Self::Unlabeled(value)
}
}
impl ::std::convert::From<PullRequestUnlocked> for PullRequestEvent {
fn from(value: PullRequestUnlocked) -> Self {
Self::Unlocked(value)
}
}
#[doc = "`PullRequestHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestHead {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestLabeled`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestLabeled {
pub action: PullRequestLabeledAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub label: Label,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestLabeledAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestLabeledAction {
#[serde(rename = "labeled")]
Labeled,
}
impl ::std::fmt::Display for PullRequestLabeledAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Labeled => f.write_str("labeled"),
}
}
}
impl ::std::str::FromStr for PullRequestLabeledAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"labeled" => Ok(Self::Labeled),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestLabeledAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestLabeledAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestLinks {
pub comments: Link,
pub commits: Link,
pub html: Link,
pub issue: Link,
pub review_comment: Link,
pub review_comments: Link,
#[serde(rename = "self")]
pub self_: Link,
pub statuses: Link,
}
#[doc = "`PullRequestLocked`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestLocked {
pub action: PullRequestLockedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestLockedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestLockedAction {
#[serde(rename = "locked")]
Locked,
}
impl ::std::fmt::Display for PullRequestLockedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Locked => f.write_str("locked"),
}
}
}
impl ::std::str::FromStr for PullRequestLockedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"locked" => Ok(Self::Locked),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestLockedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestLockedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestOpened`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestOpened {
pub action: PullRequestOpenedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequestOpenedPullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestOpenedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestOpenedAction {
#[serde(rename = "opened")]
Opened,
}
impl ::std::fmt::Display for PullRequestOpenedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Opened => f.write_str("opened"),
}
}
}
impl ::std::str::FromStr for PullRequestOpenedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"opened" => Ok(Self::Opened),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestOpenedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestOpenedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestOpenedPullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestOpenedPullRequest {
pub active_lock_reason: PullRequestOpenedPullRequestActiveLockReason,
pub additions: i64,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
pub auto_merge: (),
pub base: PullRequestOpenedPullRequestBase,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
pub changed_files: i64,
pub closed_at: (),
pub comments: i64,
pub comments_url: ::std::string::String,
pub commits: i64,
pub commits_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub deletions: i64,
pub diff_url: ::std::string::String,
#[doc = "Indicates whether or not the pull request is a draft."]
pub draft: bool,
pub head: PullRequestOpenedPullRequestHead,
pub html_url: ::std::string::String,
pub id: i64,
pub issue_url: ::std::string::String,
pub labels: ::std::vec::Vec<Label>,
#[serde(rename = "_links")]
pub links: PullRequestOpenedPullRequestLinks,
pub locked: bool,
#[doc = "Indicates whether maintainers can modify the pull request."]
pub maintainer_can_modify: bool,
pub merge_commit_sha: (),
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mergeable: ::std::option::Option<bool>,
pub mergeable_state: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merged: ::std::option::Option<bool>,
pub merged_at: (),
pub merged_by: (),
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
#[doc = "Number uniquely identifying the pull request within its repository."]
pub number: i64,
pub patch_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub rebaseable: ::std::option::Option<bool>,
pub requested_reviewers: ::std::vec::Vec<PullRequestOpenedPullRequestRequestedReviewersItem>,
pub requested_teams: ::std::vec::Vec<Team>,
pub review_comment_url: ::std::string::String,
pub review_comments: i64,
pub review_comments_url: ::std::string::String,
pub state: PullRequestOpenedPullRequestState,
pub statuses_url: ::std::string::String,
#[doc = "The title of the pull request."]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestOpenedPullRequestActiveLockReason`"]
#[derive(:: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct PullRequestOpenedPullRequestActiveLockReason(());
impl ::std::ops::Deref for PullRequestOpenedPullRequestActiveLockReason {
type Target = ();
fn deref(&self) -> &() {
&self.0
}
}
impl ::std::convert::From<PullRequestOpenedPullRequestActiveLockReason> for () {
fn from(value: PullRequestOpenedPullRequestActiveLockReason) -> Self {
value.0
}
}
impl ::std::convert::TryFrom<()> for PullRequestOpenedPullRequestActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: ()) -> ::std::result::Result<Self, self::error::ConversionError> {
if ![()].contains(&value) {
Err("invalid value".into())
} else {
Ok(Self(value))
}
}
}
impl<'de> ::serde::Deserialize<'de> for PullRequestOpenedPullRequestActiveLockReason {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
Self::try_from(<()>::deserialize(deserializer)?)
.map_err(|e| <D::Error as ::serde::de::Error>::custom(e.to_string()))
}
}
#[doc = "`PullRequestOpenedPullRequestBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestOpenedPullRequestBase {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestOpenedPullRequestHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestOpenedPullRequestHead {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestOpenedPullRequestLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestOpenedPullRequestLinks {
pub comments: Link,
pub commits: Link,
pub html: Link,
pub issue: Link,
pub review_comment: Link,
pub review_comments: Link,
#[serde(rename = "self")]
pub self_: Link,
pub statuses: Link,
}
#[doc = "`PullRequestOpenedPullRequestRequestedReviewersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PullRequestOpenedPullRequestRequestedReviewersItem {
User(User),
Team(Team),
}
impl ::std::convert::From<User> for PullRequestOpenedPullRequestRequestedReviewersItem {
fn from(value: User) -> Self {
Self::User(value)
}
}
impl ::std::convert::From<Team> for PullRequestOpenedPullRequestRequestedReviewersItem {
fn from(value: Team) -> Self {
Self::Team(value)
}
}
#[doc = "`PullRequestOpenedPullRequestState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestOpenedPullRequestState {
#[serde(rename = "open")]
Open,
}
impl ::std::fmt::Display for PullRequestOpenedPullRequestState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
}
}
}
impl ::std::str::FromStr for PullRequestOpenedPullRequestState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestOpenedPullRequestState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestOpenedPullRequestState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReadyForReview`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReadyForReview {
pub action: PullRequestReadyForReviewAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequestReadyForReviewPullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestReadyForReviewAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReadyForReviewAction {
#[serde(rename = "ready_for_review")]
ReadyForReview,
}
impl ::std::fmt::Display for PullRequestReadyForReviewAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::ReadyForReview => f.write_str("ready_for_review"),
}
}
}
impl ::std::str::FromStr for PullRequestReadyForReviewAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"ready_for_review" => Ok(Self::ReadyForReview),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReadyForReviewAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReadyForReviewAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReadyForReviewPullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReadyForReviewPullRequest {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason:
::std::option::Option<PullRequestReadyForReviewPullRequestActiveLockReason>,
pub additions: i64,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
pub auto_merge: (),
pub base: PullRequestReadyForReviewPullRequestBase,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
pub changed_files: i64,
pub closed_at: (),
pub comments: i64,
pub comments_url: ::std::string::String,
pub commits: i64,
pub commits_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub deletions: i64,
pub diff_url: ::std::string::String,
pub draft: bool,
pub head: PullRequestReadyForReviewPullRequestHead,
pub html_url: ::std::string::String,
pub id: i64,
pub issue_url: ::std::string::String,
pub labels: ::std::vec::Vec<Label>,
#[serde(rename = "_links")]
pub links: PullRequestReadyForReviewPullRequestLinks,
pub locked: bool,
#[doc = "Indicates whether maintainers can modify the pull request."]
pub maintainer_can_modify: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merge_commit_sha: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mergeable: ::std::option::Option<bool>,
pub mergeable_state: ::std::string::String,
pub merged: bool,
pub merged_at: (),
pub merged_by: (),
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
#[doc = "Number uniquely identifying the pull request within its repository."]
pub number: i64,
pub patch_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub rebaseable: ::std::option::Option<bool>,
pub requested_reviewers:
::std::vec::Vec<PullRequestReadyForReviewPullRequestRequestedReviewersItem>,
pub requested_teams: ::std::vec::Vec<Team>,
pub review_comment_url: ::std::string::String,
pub review_comments: i64,
pub review_comments_url: ::std::string::String,
pub state: PullRequestReadyForReviewPullRequestState,
pub statuses_url: ::std::string::String,
#[doc = "The title of the pull request."]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReadyForReviewPullRequestActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReadyForReviewPullRequestActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for PullRequestReadyForReviewPullRequestActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for PullRequestReadyForReviewPullRequestActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReadyForReviewPullRequestActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestReadyForReviewPullRequestActiveLockReason
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReadyForReviewPullRequestBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReadyForReviewPullRequestBase {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReadyForReviewPullRequestHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReadyForReviewPullRequestHead {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReadyForReviewPullRequestLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReadyForReviewPullRequestLinks {
pub comments: Link,
pub commits: Link,
pub html: Link,
pub issue: Link,
pub review_comment: Link,
pub review_comments: Link,
#[serde(rename = "self")]
pub self_: Link,
pub statuses: Link,
}
#[doc = "`PullRequestReadyForReviewPullRequestRequestedReviewersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PullRequestReadyForReviewPullRequestRequestedReviewersItem {
User(User),
Team(Team),
}
impl ::std::convert::From<User> for PullRequestReadyForReviewPullRequestRequestedReviewersItem {
fn from(value: User) -> Self {
Self::User(value)
}
}
impl ::std::convert::From<Team> for PullRequestReadyForReviewPullRequestRequestedReviewersItem {
fn from(value: Team) -> Self {
Self::Team(value)
}
}
#[doc = "`PullRequestReadyForReviewPullRequestState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReadyForReviewPullRequestState {
#[serde(rename = "open")]
Open,
}
impl ::std::fmt::Display for PullRequestReadyForReviewPullRequestState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
}
}
}
impl ::std::str::FromStr for PullRequestReadyForReviewPullRequestState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReadyForReviewPullRequestState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReadyForReviewPullRequestState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReopened`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReopened {
pub action: PullRequestReopenedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequestReopenedPullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestReopenedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReopenedAction {
#[serde(rename = "reopened")]
Reopened,
}
impl ::std::fmt::Display for PullRequestReopenedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Reopened => f.write_str("reopened"),
}
}
}
impl ::std::str::FromStr for PullRequestReopenedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"reopened" => Ok(Self::Reopened),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReopenedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReopenedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReopenedPullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReopenedPullRequest {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<PullRequestReopenedPullRequestActiveLockReason>,
pub additions: i64,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
pub auto_merge: (),
pub base: PullRequestReopenedPullRequestBase,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
pub changed_files: i64,
pub closed_at: (),
pub comments: i64,
pub comments_url: ::std::string::String,
pub commits: i64,
pub commits_url: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub deletions: i64,
pub diff_url: ::std::string::String,
#[doc = "Indicates whether or not the pull request is a draft."]
pub draft: bool,
pub head: PullRequestReopenedPullRequestHead,
pub html_url: ::std::string::String,
pub id: i64,
pub issue_url: ::std::string::String,
pub labels: ::std::vec::Vec<Label>,
#[serde(rename = "_links")]
pub links: PullRequestReopenedPullRequestLinks,
pub locked: bool,
#[doc = "Indicates whether maintainers can modify the pull request."]
pub maintainer_can_modify: bool,
pub merge_commit_sha: (),
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mergeable: ::std::option::Option<bool>,
pub mergeable_state: ::std::string::String,
pub merged: bool,
pub merged_at: (),
pub merged_by: (),
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
#[doc = "Number uniquely identifying the pull request within its repository."]
pub number: i64,
pub patch_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub rebaseable: ::std::option::Option<bool>,
pub requested_reviewers: ::std::vec::Vec<PullRequestReopenedPullRequestRequestedReviewersItem>,
pub requested_teams: ::std::vec::Vec<Team>,
pub review_comment_url: ::std::string::String,
pub review_comments: i64,
pub review_comments_url: ::std::string::String,
pub state: PullRequestReopenedPullRequestState,
pub statuses_url: ::std::string::String,
#[doc = "The title of the pull request."]
pub title: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReopenedPullRequestActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReopenedPullRequestActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for PullRequestReopenedPullRequestActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for PullRequestReopenedPullRequestActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReopenedPullRequestActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestReopenedPullRequestActiveLockReason
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReopenedPullRequestBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReopenedPullRequestBase {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReopenedPullRequestHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReopenedPullRequestHead {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReopenedPullRequestLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReopenedPullRequestLinks {
pub comments: Link,
pub commits: Link,
pub html: Link,
pub issue: Link,
pub review_comment: Link,
pub review_comments: Link,
#[serde(rename = "self")]
pub self_: Link,
pub statuses: Link,
}
#[doc = "`PullRequestReopenedPullRequestRequestedReviewersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PullRequestReopenedPullRequestRequestedReviewersItem {
User(User),
Team(Team),
}
impl ::std::convert::From<User> for PullRequestReopenedPullRequestRequestedReviewersItem {
fn from(value: User) -> Self {
Self::User(value)
}
}
impl ::std::convert::From<Team> for PullRequestReopenedPullRequestRequestedReviewersItem {
fn from(value: Team) -> Self {
Self::Team(value)
}
}
#[doc = "`PullRequestReopenedPullRequestState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReopenedPullRequestState {
#[serde(rename = "open")]
Open,
}
impl ::std::fmt::Display for PullRequestReopenedPullRequestState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
}
}
}
impl ::std::str::FromStr for PullRequestReopenedPullRequestState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReopenedPullRequestState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReopenedPullRequestState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestRequestedReviewersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PullRequestRequestedReviewersItem {
User(User),
Team(Team),
}
impl ::std::convert::From<User> for PullRequestRequestedReviewersItem {
fn from(value: User) -> Self {
Self::User(value)
}
}
impl ::std::convert::From<Team> for PullRequestRequestedReviewersItem {
fn from(value: Team) -> Self {
Self::Team(value)
}
}
#[doc = "The [comment](https://docs.github.com/en/rest/reference/pulls#comments) itself."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewComment {
pub author_association: AuthorAssociation,
#[doc = "The text of the comment."]
pub body: ::std::string::String,
#[doc = "The SHA of the commit to which the comment applies."]
pub commit_id: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The diff of the line that the comment refers to."]
pub diff_hunk: ::std::string::String,
#[doc = "HTML URL for the pull request review comment."]
pub html_url: ::std::string::String,
#[doc = "The ID of the pull request review comment."]
pub id: i64,
#[doc = "The comment ID to reply to."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub in_reply_to_id: ::std::option::Option<i64>,
#[doc = "The line of the blob to which the comment applies. The last line of the range for a multi-line comment"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub line: ::std::option::Option<i64>,
#[serde(rename = "_links")]
pub links: PullRequestReviewCommentLinks,
#[doc = "The node ID of the pull request review comment."]
pub node_id: ::std::string::String,
#[doc = "The SHA of the original commit to which the comment applies."]
pub original_commit_id: ::std::string::String,
#[doc = "The line of the blob to which the comment applies. The last line of the range for a multi-line comment"]
pub original_line: i64,
#[doc = "The index of the original line in the diff to which the comment applies."]
pub original_position: i64,
#[doc = "The first line of the range for a multi-line comment."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub original_start_line: ::std::option::Option<i64>,
#[doc = "The relative path of the file to which the comment applies."]
pub path: ::std::string::String,
#[doc = "The line index in the diff to which the comment applies."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub position: ::std::option::Option<i64>,
#[doc = "The ID of the pull request review to which the comment belongs."]
pub pull_request_review_id: i64,
#[doc = "URL for the pull request that the review comment belongs to."]
pub pull_request_url: ::std::string::String,
#[doc = "The side of the first line of the range for a multi-line comment."]
pub side: PullRequestReviewCommentSide,
#[doc = "The first line of the range for a multi-line comment."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub start_line: ::std::option::Option<i64>,
#[doc = "The side of the first line of the range for a multi-line comment."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub start_side: ::std::option::Option<PullRequestReviewCommentStartSide>,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "URL for the pull request review comment"]
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReviewCommentCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentCreated {
pub action: PullRequestReviewCommentCreatedAction,
pub comment: PullRequestReviewComment,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequestReviewCommentCreatedPullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestReviewCommentCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewCommentCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for PullRequestReviewCommentCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewCommentCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewCommentCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReviewCommentCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewCommentCreatedPullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentCreatedPullRequest {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason:
::std::option::Option<PullRequestReviewCommentCreatedPullRequestActiveLockReason>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[serde(default)]
pub auto_merge: (),
pub base: PullRequestReviewCommentCreatedPullRequestBase,
pub body: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::std::string::String>,
pub comments_url: ::std::string::String,
pub commits_url: ::std::string::String,
pub created_at: ::std::string::String,
pub diff_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub draft: ::std::option::Option<bool>,
pub head: PullRequestReviewCommentCreatedPullRequestHead,
pub html_url: ::std::string::String,
pub id: i64,
pub issue_url: ::std::string::String,
pub labels: ::std::vec::Vec<Label>,
#[serde(rename = "_links")]
pub links: PullRequestReviewCommentCreatedPullRequestLinks,
pub locked: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merge_commit_sha: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merged_at: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
pub patch_url: ::std::string::String,
pub requested_reviewers:
::std::vec::Vec<PullRequestReviewCommentCreatedPullRequestRequestedReviewersItem>,
pub requested_teams: ::std::vec::Vec<Team>,
pub review_comment_url: ::std::string::String,
pub review_comments_url: ::std::string::String,
pub state: PullRequestReviewCommentCreatedPullRequestState,
pub statuses_url: ::std::string::String,
pub title: ::std::string::String,
pub updated_at: ::std::string::String,
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReviewCommentCreatedPullRequestActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewCommentCreatedPullRequestActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for PullRequestReviewCommentCreatedPullRequestActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewCommentCreatedPullRequestActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewCommentCreatedPullRequestActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestReviewCommentCreatedPullRequestActiveLockReason
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewCommentCreatedPullRequestBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentCreatedPullRequestBase {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReviewCommentCreatedPullRequestHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentCreatedPullRequestHead {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReviewCommentCreatedPullRequestLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentCreatedPullRequestLinks {
pub comments: Link,
pub commits: Link,
pub html: Link,
pub issue: Link,
pub review_comment: Link,
pub review_comments: Link,
#[serde(rename = "self")]
pub self_: Link,
pub statuses: Link,
}
#[doc = "`PullRequestReviewCommentCreatedPullRequestRequestedReviewersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PullRequestReviewCommentCreatedPullRequestRequestedReviewersItem {
User(User),
Team(Team),
}
impl ::std::convert::From<User>
for PullRequestReviewCommentCreatedPullRequestRequestedReviewersItem
{
fn from(value: User) -> Self {
Self::User(value)
}
}
impl ::std::convert::From<Team>
for PullRequestReviewCommentCreatedPullRequestRequestedReviewersItem
{
fn from(value: Team) -> Self {
Self::Team(value)
}
}
#[doc = "`PullRequestReviewCommentCreatedPullRequestState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewCommentCreatedPullRequestState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for PullRequestReviewCommentCreatedPullRequestState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewCommentCreatedPullRequestState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewCommentCreatedPullRequestState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestReviewCommentCreatedPullRequestState
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewCommentDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentDeleted {
pub action: PullRequestReviewCommentDeletedAction,
pub comment: PullRequestReviewComment,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequestReviewCommentDeletedPullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestReviewCommentDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewCommentDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for PullRequestReviewCommentDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewCommentDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewCommentDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReviewCommentDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewCommentDeletedPullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentDeletedPullRequest {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason:
::std::option::Option<PullRequestReviewCommentDeletedPullRequestActiveLockReason>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[serde(default)]
pub auto_merge: (),
pub base: PullRequestReviewCommentDeletedPullRequestBase,
pub body: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::std::string::String>,
pub comments_url: ::std::string::String,
pub commits_url: ::std::string::String,
pub created_at: ::std::string::String,
pub diff_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub draft: ::std::option::Option<bool>,
pub head: PullRequestReviewCommentDeletedPullRequestHead,
pub html_url: ::std::string::String,
pub id: i64,
pub issue_url: ::std::string::String,
pub labels: ::std::vec::Vec<Label>,
#[serde(rename = "_links")]
pub links: PullRequestReviewCommentDeletedPullRequestLinks,
pub locked: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merge_commit_sha: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merged_at: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
pub patch_url: ::std::string::String,
pub requested_reviewers:
::std::vec::Vec<PullRequestReviewCommentDeletedPullRequestRequestedReviewersItem>,
pub requested_teams: ::std::vec::Vec<Team>,
pub review_comment_url: ::std::string::String,
pub review_comments_url: ::std::string::String,
pub state: PullRequestReviewCommentDeletedPullRequestState,
pub statuses_url: ::std::string::String,
pub title: ::std::string::String,
pub updated_at: ::std::string::String,
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReviewCommentDeletedPullRequestActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewCommentDeletedPullRequestActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for PullRequestReviewCommentDeletedPullRequestActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewCommentDeletedPullRequestActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewCommentDeletedPullRequestActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestReviewCommentDeletedPullRequestActiveLockReason
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewCommentDeletedPullRequestBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentDeletedPullRequestBase {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReviewCommentDeletedPullRequestHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentDeletedPullRequestHead {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReviewCommentDeletedPullRequestLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentDeletedPullRequestLinks {
pub comments: Link,
pub commits: Link,
pub html: Link,
pub issue: Link,
pub review_comment: Link,
pub review_comments: Link,
#[serde(rename = "self")]
pub self_: Link,
pub statuses: Link,
}
#[doc = "`PullRequestReviewCommentDeletedPullRequestRequestedReviewersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PullRequestReviewCommentDeletedPullRequestRequestedReviewersItem {
User(User),
Team(Team),
}
impl ::std::convert::From<User>
for PullRequestReviewCommentDeletedPullRequestRequestedReviewersItem
{
fn from(value: User) -> Self {
Self::User(value)
}
}
impl ::std::convert::From<Team>
for PullRequestReviewCommentDeletedPullRequestRequestedReviewersItem
{
fn from(value: Team) -> Self {
Self::Team(value)
}
}
#[doc = "`PullRequestReviewCommentDeletedPullRequestState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewCommentDeletedPullRequestState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for PullRequestReviewCommentDeletedPullRequestState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewCommentDeletedPullRequestState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewCommentDeletedPullRequestState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestReviewCommentDeletedPullRequestState
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewCommentEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentEdited {
pub action: PullRequestReviewCommentEditedAction,
pub changes: PullRequestReviewCommentEditedChanges,
pub comment: PullRequestReviewComment,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequestReviewCommentEditedPullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestReviewCommentEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewCommentEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for PullRequestReviewCommentEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewCommentEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewCommentEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReviewCommentEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The changes to the comment."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub body: ::std::option::Option<PullRequestReviewCommentEditedChangesBody>,
}
#[doc = "`PullRequestReviewCommentEditedChangesBody`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentEditedChangesBody {
#[doc = "The previous version of the body."]
pub from: ::std::string::String,
}
#[doc = "`PullRequestReviewCommentEditedPullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentEditedPullRequest {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason:
::std::option::Option<PullRequestReviewCommentEditedPullRequestActiveLockReason>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
#[serde(default)]
pub auto_merge: (),
pub base: PullRequestReviewCommentEditedPullRequestBase,
pub body: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::std::string::String>,
pub comments_url: ::std::string::String,
pub commits_url: ::std::string::String,
pub created_at: ::std::string::String,
pub diff_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub draft: ::std::option::Option<bool>,
pub head: PullRequestReviewCommentEditedPullRequestHead,
pub html_url: ::std::string::String,
pub id: i64,
pub issue_url: ::std::string::String,
pub labels: ::std::vec::Vec<Label>,
#[serde(rename = "_links")]
pub links: PullRequestReviewCommentEditedPullRequestLinks,
pub locked: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merge_commit_sha: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merged_at: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
pub patch_url: ::std::string::String,
pub requested_reviewers:
::std::vec::Vec<PullRequestReviewCommentEditedPullRequestRequestedReviewersItem>,
pub requested_teams: ::std::vec::Vec<Team>,
pub review_comment_url: ::std::string::String,
pub review_comments_url: ::std::string::String,
pub state: PullRequestReviewCommentEditedPullRequestState,
pub statuses_url: ::std::string::String,
pub title: ::std::string::String,
pub updated_at: ::std::string::String,
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReviewCommentEditedPullRequestActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewCommentEditedPullRequestActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for PullRequestReviewCommentEditedPullRequestActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewCommentEditedPullRequestActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewCommentEditedPullRequestActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestReviewCommentEditedPullRequestActiveLockReason
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewCommentEditedPullRequestBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentEditedPullRequestBase {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReviewCommentEditedPullRequestHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentEditedPullRequestHead {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`PullRequestReviewCommentEditedPullRequestLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentEditedPullRequestLinks {
pub comments: Link,
pub commits: Link,
pub html: Link,
pub issue: Link,
pub review_comment: Link,
pub review_comments: Link,
#[serde(rename = "self")]
pub self_: Link,
pub statuses: Link,
}
#[doc = "`PullRequestReviewCommentEditedPullRequestRequestedReviewersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PullRequestReviewCommentEditedPullRequestRequestedReviewersItem {
User(User),
Team(Team),
}
impl ::std::convert::From<User>
for PullRequestReviewCommentEditedPullRequestRequestedReviewersItem
{
fn from(value: User) -> Self {
Self::User(value)
}
}
impl ::std::convert::From<Team>
for PullRequestReviewCommentEditedPullRequestRequestedReviewersItem
{
fn from(value: Team) -> Self {
Self::Team(value)
}
}
#[doc = "`PullRequestReviewCommentEditedPullRequestState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewCommentEditedPullRequestState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for PullRequestReviewCommentEditedPullRequestState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewCommentEditedPullRequestState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewCommentEditedPullRequestState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestReviewCommentEditedPullRequestState
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewCommentEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PullRequestReviewCommentEvent {
Created(PullRequestReviewCommentCreated),
Deleted(PullRequestReviewCommentDeleted),
Edited(PullRequestReviewCommentEdited),
}
impl ::std::convert::From<PullRequestReviewCommentCreated> for PullRequestReviewCommentEvent {
fn from(value: PullRequestReviewCommentCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<PullRequestReviewCommentDeleted> for PullRequestReviewCommentEvent {
fn from(value: PullRequestReviewCommentDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<PullRequestReviewCommentEdited> for PullRequestReviewCommentEvent {
fn from(value: PullRequestReviewCommentEdited) -> Self {
Self::Edited(value)
}
}
#[doc = "`PullRequestReviewCommentLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewCommentLinks {
pub html: Link,
pub pull_request: Link,
#[serde(rename = "self")]
pub self_: Link,
}
#[doc = "The side of the first line of the range for a multi-line comment."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewCommentSide {
#[serde(rename = "LEFT")]
Left,
#[serde(rename = "RIGHT")]
Right,
}
impl ::std::fmt::Display for PullRequestReviewCommentSide {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("LEFT"),
Self::Right => f.write_str("RIGHT"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewCommentSide {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"LEFT" => Ok(Self::Left),
"RIGHT" => Ok(Self::Right),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewCommentSide {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReviewCommentSide {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The side of the first line of the range for a multi-line comment."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewCommentStartSide {
#[serde(rename = "LEFT")]
Left,
#[serde(rename = "RIGHT")]
Right,
}
impl ::std::fmt::Display for PullRequestReviewCommentStartSide {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Left => f.write_str("LEFT"),
Self::Right => f.write_str("RIGHT"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewCommentStartSide {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"LEFT" => Ok(Self::Left),
"RIGHT" => Ok(Self::Right),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewCommentStartSide {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReviewCommentStartSide {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewDismissed`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewDismissed {
pub action: PullRequestReviewDismissedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: SimplePullRequest,
pub repository: Repository,
pub review: PullRequestReviewDismissedReview,
pub sender: User,
}
#[doc = "`PullRequestReviewDismissedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewDismissedAction {
#[serde(rename = "dismissed")]
Dismissed,
}
impl ::std::fmt::Display for PullRequestReviewDismissedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Dismissed => f.write_str("dismissed"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewDismissedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"dismissed" => Ok(Self::Dismissed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewDismissedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReviewDismissedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The review that was affected."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewDismissedReview {
pub author_association: AuthorAssociation,
#[doc = "The text of the review."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
#[doc = "A commit SHA for the review."]
pub commit_id: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the review"]
pub id: i64,
#[serde(rename = "_links")]
pub links: PullRequestReviewDismissedReviewLinks,
pub node_id: ::std::string::String,
pub pull_request_url: ::std::string::String,
pub state: PullRequestReviewDismissedReviewState,
pub submitted_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub user: User,
}
#[doc = "`PullRequestReviewDismissedReviewLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewDismissedReviewLinks {
pub html: Link,
pub pull_request: Link,
}
#[doc = "`PullRequestReviewDismissedReviewState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewDismissedReviewState {
#[serde(rename = "dismissed")]
Dismissed,
}
impl ::std::fmt::Display for PullRequestReviewDismissedReviewState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Dismissed => f.write_str("dismissed"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewDismissedReviewState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"dismissed" => Ok(Self::Dismissed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewDismissedReviewState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReviewDismissedReviewState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewEdited {
pub action: PullRequestReviewEditedAction,
pub changes: PullRequestReviewEditedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: SimplePullRequest,
pub repository: Repository,
pub review: PullRequestReviewEditedReview,
pub sender: User,
}
#[doc = "`PullRequestReviewEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for PullRequestReviewEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReviewEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewEditedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub body: ::std::option::Option<PullRequestReviewEditedChangesBody>,
}
#[doc = "`PullRequestReviewEditedChangesBody`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewEditedChangesBody {
#[doc = "The previous version of the body if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "The review that was affected."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewEditedReview {
pub author_association: AuthorAssociation,
#[doc = "The text of the review."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
#[doc = "A commit SHA for the review."]
pub commit_id: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the review"]
pub id: i64,
#[serde(rename = "_links")]
pub links: PullRequestReviewEditedReviewLinks,
pub node_id: ::std::string::String,
pub pull_request_url: ::std::string::String,
pub state: ::std::string::String,
pub submitted_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub user: User,
}
#[doc = "`PullRequestReviewEditedReviewLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewEditedReviewLinks {
pub html: Link,
pub pull_request: Link,
}
#[doc = "`PullRequestReviewEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum PullRequestReviewEvent {
Dismissed(PullRequestReviewDismissed),
Edited(PullRequestReviewEdited),
Submitted(PullRequestReviewSubmitted),
}
impl ::std::convert::From<PullRequestReviewDismissed> for PullRequestReviewEvent {
fn from(value: PullRequestReviewDismissed) -> Self {
Self::Dismissed(value)
}
}
impl ::std::convert::From<PullRequestReviewEdited> for PullRequestReviewEvent {
fn from(value: PullRequestReviewEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<PullRequestReviewSubmitted> for PullRequestReviewEvent {
fn from(value: PullRequestReviewSubmitted) -> Self {
Self::Submitted(value)
}
}
#[doc = "`PullRequestReviewRequestRemoved`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum PullRequestReviewRequestRemoved {
Variant0 {
action: PullRequestReviewRequestRemovedVariant0Action,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
organization: ::std::option::Option<Organization>,
pull_request: PullRequest,
repository: Repository,
requested_reviewer: User,
sender: User,
},
Variant1 {
action: PullRequestReviewRequestRemovedVariant1Action,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
organization: ::std::option::Option<Organization>,
pull_request: PullRequest,
repository: Repository,
requested_team: Team,
sender: User,
},
}
#[doc = "`PullRequestReviewRequestRemovedVariant0Action`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewRequestRemovedVariant0Action {
#[serde(rename = "review_request_removed")]
ReviewRequestRemoved,
}
impl ::std::fmt::Display for PullRequestReviewRequestRemovedVariant0Action {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::ReviewRequestRemoved => f.write_str("review_request_removed"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewRequestRemovedVariant0Action {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"review_request_removed" => Ok(Self::ReviewRequestRemoved),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewRequestRemovedVariant0Action {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestReviewRequestRemovedVariant0Action
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewRequestRemovedVariant1Action`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewRequestRemovedVariant1Action {
#[serde(rename = "review_request_removed")]
ReviewRequestRemoved,
}
impl ::std::fmt::Display for PullRequestReviewRequestRemovedVariant1Action {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::ReviewRequestRemoved => f.write_str("review_request_removed"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewRequestRemovedVariant1Action {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"review_request_removed" => Ok(Self::ReviewRequestRemoved),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewRequestRemovedVariant1Action {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String>
for PullRequestReviewRequestRemovedVariant1Action
{
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewRequested`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged, deny_unknown_fields)]
pub enum PullRequestReviewRequested {
Variant0 {
action: PullRequestReviewRequestedVariant0Action,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
organization: ::std::option::Option<Organization>,
pull_request: PullRequest,
repository: Repository,
requested_reviewer: User,
sender: User,
},
Variant1 {
action: PullRequestReviewRequestedVariant1Action,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
organization: ::std::option::Option<Organization>,
pull_request: PullRequest,
repository: Repository,
requested_team: Team,
sender: User,
},
}
#[doc = "`PullRequestReviewRequestedVariant0Action`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewRequestedVariant0Action {
#[serde(rename = "review_requested")]
ReviewRequested,
}
impl ::std::fmt::Display for PullRequestReviewRequestedVariant0Action {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::ReviewRequested => f.write_str("review_requested"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewRequestedVariant0Action {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"review_requested" => Ok(Self::ReviewRequested),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewRequestedVariant0Action {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReviewRequestedVariant0Action {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewRequestedVariant1Action`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewRequestedVariant1Action {
#[serde(rename = "review_requested")]
ReviewRequested,
}
impl ::std::fmt::Display for PullRequestReviewRequestedVariant1Action {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::ReviewRequested => f.write_str("review_requested"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewRequestedVariant1Action {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"review_requested" => Ok(Self::ReviewRequested),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewRequestedVariant1Action {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReviewRequestedVariant1Action {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestReviewSubmitted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewSubmitted {
pub action: PullRequestReviewSubmittedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: SimplePullRequest,
pub repository: Repository,
pub review: PullRequestReviewSubmittedReview,
pub sender: User,
}
#[doc = "`PullRequestReviewSubmittedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestReviewSubmittedAction {
#[serde(rename = "submitted")]
Submitted,
}
impl ::std::fmt::Display for PullRequestReviewSubmittedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Submitted => f.write_str("submitted"),
}
}
}
impl ::std::str::FromStr for PullRequestReviewSubmittedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"submitted" => Ok(Self::Submitted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestReviewSubmittedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestReviewSubmittedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The review that was affected."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewSubmittedReview {
pub author_association: AuthorAssociation,
#[doc = "The text of the review."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub body: ::std::option::Option<::std::string::String>,
#[doc = "A commit SHA for the review."]
pub commit_id: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the review"]
pub id: i64,
#[serde(rename = "_links")]
pub links: PullRequestReviewSubmittedReviewLinks,
pub node_id: ::std::string::String,
pub pull_request_url: ::std::string::String,
pub state: ::std::string::String,
pub submitted_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub user: User,
}
#[doc = "`PullRequestReviewSubmittedReviewLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestReviewSubmittedReviewLinks {
pub html: Link,
pub pull_request: Link,
}
#[doc = "State of this Pull Request. Either `open` or `closed`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for PullRequestState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for PullRequestState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestSynchronize`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestSynchronize {
pub action: PullRequestSynchronizeAction,
pub after: ::std::string::String,
pub before: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestSynchronizeAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestSynchronizeAction {
#[serde(rename = "synchronize")]
Synchronize,
}
impl ::std::fmt::Display for PullRequestSynchronizeAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Synchronize => f.write_str("synchronize"),
}
}
}
impl ::std::str::FromStr for PullRequestSynchronizeAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"synchronize" => Ok(Self::Synchronize),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestSynchronizeAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestSynchronizeAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestUnassigned`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestUnassigned {
pub action: PullRequestUnassignedAction,
pub assignee: User,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestUnassignedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestUnassignedAction {
#[serde(rename = "unassigned")]
Unassigned,
}
impl ::std::fmt::Display for PullRequestUnassignedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unassigned => f.write_str("unassigned"),
}
}
}
impl ::std::str::FromStr for PullRequestUnassignedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unassigned" => Ok(Self::Unassigned),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestUnassignedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestUnassignedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestUnlabeled`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestUnlabeled {
pub action: PullRequestUnlabeledAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub label: Label,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestUnlabeledAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestUnlabeledAction {
#[serde(rename = "unlabeled")]
Unlabeled,
}
impl ::std::fmt::Display for PullRequestUnlabeledAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unlabeled => f.write_str("unlabeled"),
}
}
}
impl ::std::str::FromStr for PullRequestUnlabeledAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unlabeled" => Ok(Self::Unlabeled),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestUnlabeledAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestUnlabeledAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PullRequestUnlocked`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PullRequestUnlocked {
pub action: PullRequestUnlockedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[doc = "The pull request number."]
pub number: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pull_request: PullRequest,
pub repository: Repository,
pub sender: User,
}
#[doc = "`PullRequestUnlockedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum PullRequestUnlockedAction {
#[serde(rename = "unlocked")]
Unlocked,
}
impl ::std::fmt::Display for PullRequestUnlockedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unlocked => f.write_str("unlocked"),
}
}
}
impl ::std::str::FromStr for PullRequestUnlockedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unlocked" => Ok(Self::Unlocked),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for PullRequestUnlockedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for PullRequestUnlockedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`PushEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct PushEvent {
#[doc = "The SHA of the most recent commit on `ref` after the push."]
pub after: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub base_ref: ::std::option::Option<::std::string::String>,
#[doc = "The SHA of the most recent commit on `ref` before the push."]
pub before: ::std::string::String,
#[doc = "An array of commit objects describing the pushed commits."]
pub commits: ::std::vec::Vec<Commit>,
pub compare: ::std::string::String,
pub created: bool,
pub deleted: bool,
pub forced: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub head_commit: ::std::option::Option<Commit>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub pusher: Committer,
#[doc = "The full git ref that was pushed. Example: `refs/heads/main`."]
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repository: Repository,
pub sender: User,
}
#[doc = "The [release](https://docs.github.com/en/rest/reference/repos/#get-a-release) object."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Release {
pub assets: ::std::vec::Vec<ReleaseAsset>,
pub assets_url: ::std::string::String,
pub author: User,
pub body: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[doc = "Wether the release is a draft or published"]
pub draft: bool,
pub html_url: ::std::string::String,
pub id: i64,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "Whether the release is identified as a prerelease or a full release."]
pub prerelease: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub published_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[doc = "The name of the tag."]
pub tag_name: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub tarball_url: ::std::option::Option<::std::string::String>,
#[doc = "Specifies the commitish value that determines where the Git tag is created from."]
pub target_commitish: ::std::string::String,
pub upload_url: ::std::string::String,
pub url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub zipball_url: ::std::option::Option<::std::string::String>,
}
#[doc = "Data related to a release."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleaseAsset {
pub browser_download_url: ::std::string::String,
pub content_type: ::std::string::String,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub download_count: i64,
pub id: i64,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub label: ::std::option::Option<::std::string::String>,
#[doc = "The file name of the asset."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub size: i64,
#[doc = "State of the release asset."]
pub state: ReleaseAssetState,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub uploader: ::std::option::Option<User>,
pub url: ::std::string::String,
}
#[doc = "State of the release asset."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ReleaseAssetState {
#[serde(rename = "uploaded")]
Uploaded,
}
impl ::std::fmt::Display for ReleaseAssetState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Uploaded => f.write_str("uploaded"),
}
}
}
impl ::std::str::FromStr for ReleaseAssetState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"uploaded" => Ok(Self::Uploaded),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ReleaseAssetState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ReleaseAssetState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ReleaseCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleaseCreated {
pub action: ReleaseCreatedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub release: Release,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ReleaseCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ReleaseCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for ReleaseCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for ReleaseCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ReleaseCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ReleaseCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ReleaseDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleaseDeleted {
pub action: ReleaseDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub release: Release,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ReleaseDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ReleaseDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for ReleaseDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for ReleaseDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ReleaseDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ReleaseDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ReleaseEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleaseEdited {
pub action: ReleaseEditedAction,
pub changes: ReleaseEditedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub release: Release,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ReleaseEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ReleaseEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for ReleaseEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for ReleaseEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ReleaseEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ReleaseEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ReleaseEditedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct ReleaseEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub body: ::std::option::Option<ReleaseEditedChangesBody>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<ReleaseEditedChangesName>,
}
#[doc = "`ReleaseEditedChangesBody`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleaseEditedChangesBody {
#[doc = "The previous version of the body if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`ReleaseEditedChangesName`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleaseEditedChangesName {
#[doc = "The previous version of the name if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`ReleaseEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum ReleaseEvent {
Created(ReleaseCreated),
Deleted(ReleaseDeleted),
Edited(ReleaseEdited),
Prereleased(ReleasePrereleased),
Published(ReleasePublished),
Released(ReleaseReleased),
Unpublished(ReleaseUnpublished),
}
impl ::std::convert::From<ReleaseCreated> for ReleaseEvent {
fn from(value: ReleaseCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<ReleaseDeleted> for ReleaseEvent {
fn from(value: ReleaseDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<ReleaseEdited> for ReleaseEvent {
fn from(value: ReleaseEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<ReleasePrereleased> for ReleaseEvent {
fn from(value: ReleasePrereleased) -> Self {
Self::Prereleased(value)
}
}
impl ::std::convert::From<ReleasePublished> for ReleaseEvent {
fn from(value: ReleasePublished) -> Self {
Self::Published(value)
}
}
impl ::std::convert::From<ReleaseReleased> for ReleaseEvent {
fn from(value: ReleaseReleased) -> Self {
Self::Released(value)
}
}
impl ::std::convert::From<ReleaseUnpublished> for ReleaseEvent {
fn from(value: ReleaseUnpublished) -> Self {
Self::Unpublished(value)
}
}
#[doc = "`ReleasePrereleased`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleasePrereleased {
pub action: ReleasePrereleasedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub release: ReleasePrereleasedRelease,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ReleasePrereleasedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ReleasePrereleasedAction {
#[serde(rename = "prereleased")]
Prereleased,
}
impl ::std::fmt::Display for ReleasePrereleasedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Prereleased => f.write_str("prereleased"),
}
}
}
impl ::std::str::FromStr for ReleasePrereleasedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"prereleased" => Ok(Self::Prereleased),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ReleasePrereleasedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ReleasePrereleasedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ReleasePrereleasedRelease`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleasePrereleasedRelease {
pub assets: ::std::vec::Vec<ReleaseAsset>,
pub assets_url: ::std::string::String,
pub author: User,
pub body: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[doc = "Wether the release is a draft or published"]
pub draft: bool,
pub html_url: ::std::string::String,
pub id: i64,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub prerelease: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub published_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[doc = "The name of the tag."]
pub tag_name: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub tarball_url: ::std::option::Option<::std::string::String>,
#[doc = "Specifies the commitish value that determines where the Git tag is created from."]
pub target_commitish: ::std::string::String,
pub upload_url: ::std::string::String,
pub url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub zipball_url: ::std::option::Option<::std::string::String>,
}
#[doc = "`ReleasePublished`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleasePublished {
pub action: ReleasePublishedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub release: ReleasePublishedRelease,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ReleasePublishedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ReleasePublishedAction {
#[serde(rename = "published")]
Published,
}
impl ::std::fmt::Display for ReleasePublishedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Published => f.write_str("published"),
}
}
}
impl ::std::str::FromStr for ReleasePublishedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"published" => Ok(Self::Published),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ReleasePublishedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ReleasePublishedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ReleasePublishedRelease`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleasePublishedRelease {
pub assets: ::std::vec::Vec<ReleaseAsset>,
pub assets_url: ::std::string::String,
pub author: User,
pub body: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[doc = "Wether the release is a draft or published"]
pub draft: bool,
pub html_url: ::std::string::String,
pub id: i64,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "Whether the release is identified as a prerelease or a full release."]
pub prerelease: bool,
pub published_at: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The name of the tag."]
pub tag_name: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub tarball_url: ::std::option::Option<::std::string::String>,
#[doc = "Specifies the commitish value that determines where the Git tag is created from."]
pub target_commitish: ::std::string::String,
pub upload_url: ::std::string::String,
pub url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub zipball_url: ::std::option::Option<::std::string::String>,
}
#[doc = "`ReleaseReleased`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleaseReleased {
pub action: ReleaseReleasedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub release: Release,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ReleaseReleasedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ReleaseReleasedAction {
#[serde(rename = "released")]
Released,
}
impl ::std::fmt::Display for ReleaseReleasedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Released => f.write_str("released"),
}
}
}
impl ::std::str::FromStr for ReleaseReleasedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"released" => Ok(Self::Released),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ReleaseReleasedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ReleaseReleasedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ReleaseUnpublished`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleaseUnpublished {
pub action: ReleaseUnpublishedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub release: ReleaseUnpublishedRelease,
pub repository: Repository,
pub sender: User,
}
#[doc = "`ReleaseUnpublishedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum ReleaseUnpublishedAction {
#[serde(rename = "unpublished")]
Unpublished,
}
impl ::std::fmt::Display for ReleaseUnpublishedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unpublished => f.write_str("unpublished"),
}
}
}
impl ::std::str::FromStr for ReleaseUnpublishedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unpublished" => Ok(Self::Unpublished),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for ReleaseUnpublishedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ReleaseUnpublishedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`ReleaseUnpublishedRelease`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct ReleaseUnpublishedRelease {
pub assets: ::std::vec::Vec<ReleaseAsset>,
pub assets_url: ::std::string::String,
pub author: User,
pub body: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
#[doc = "Wether the release is a draft or published"]
pub draft: bool,
pub html_url: ::std::string::String,
pub id: i64,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "Whether the release is identified as a prerelease or a full release."]
pub prerelease: bool,
pub published_at: (),
#[doc = "The name of the tag."]
pub tag_name: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub tarball_url: ::std::option::Option<::std::string::String>,
#[doc = "Specifies the commitish value that determines where the Git tag is created from."]
pub target_commitish: ::std::string::String,
pub upload_url: ::std::string::String,
pub url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub zipball_url: ::std::option::Option<::std::string::String>,
}
#[doc = "`RepoRef`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepoRef {
pub id: i64,
pub name: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "A git repository"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Repository {
#[doc = "Whether to allow auto-merge for pull requests."]
#[serde(default)]
pub allow_auto_merge: bool,
#[doc = "Whether to allow private forks"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub allow_forking: ::std::option::Option<bool>,
#[doc = "Whether to allow merge commits for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_merge_commit: bool,
#[doc = "Whether to allow rebase merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_rebase_merge: bool,
#[doc = "Whether to allow squash merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_squash_merge: bool,
pub archive_url: ::std::string::String,
#[doc = "Whether the repository is archived."]
pub archived: bool,
pub assignees_url: ::std::string::String,
pub blobs_url: ::std::string::String,
pub branches_url: ::std::string::String,
pub clone_url: ::std::string::String,
pub collaborators_url: ::std::string::String,
pub comments_url: ::std::string::String,
pub commits_url: ::std::string::String,
pub compare_url: ::std::string::String,
pub contents_url: ::std::string::String,
pub contributors_url: ::std::string::String,
pub created_at: RepositoryCreatedAt,
#[doc = "The default branch of the repository."]
pub default_branch: ::std::string::String,
#[doc = "Whether to delete head branches when pull requests are merged"]
#[serde(default)]
pub delete_branch_on_merge: bool,
pub deployments_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[doc = "Returns whether or not this repository is disabled."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub disabled: ::std::option::Option<bool>,
pub downloads_url: ::std::string::String,
pub events_url: ::std::string::String,
pub fork: bool,
pub forks: i64,
pub forks_count: i64,
pub forks_url: ::std::string::String,
pub full_name: ::std::string::String,
pub git_commits_url: ::std::string::String,
pub git_refs_url: ::std::string::String,
pub git_tags_url: ::std::string::String,
pub git_url: ::std::string::String,
#[doc = "Whether downloads are enabled."]
pub has_downloads: bool,
#[doc = "Whether issues are enabled."]
pub has_issues: bool,
pub has_pages: bool,
#[doc = "Whether projects are enabled."]
pub has_projects: bool,
#[doc = "Whether the wiki is enabled."]
pub has_wiki: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub homepage: ::std::option::Option<::std::string::String>,
pub hooks_url: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
pub issue_comment_url: ::std::string::String,
pub issue_events_url: ::std::string::String,
pub issues_url: ::std::string::String,
pub keys_url: ::std::string::String,
pub labels_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub language: ::std::option::Option<::std::string::String>,
pub languages_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub license: ::std::option::Option<License>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub master_branch: ::std::option::Option<::std::string::String>,
pub merges_url: ::std::string::String,
pub milestones_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mirror_url: ::std::option::Option<::std::string::String>,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub notifications_url: ::std::string::String,
pub open_issues: i64,
pub open_issues_count: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<::std::string::String>,
pub owner: User,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub permissions: ::std::option::Option<RepositoryPermissions>,
#[doc = "Whether the repository is private or public."]
pub private: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub public: ::std::option::Option<bool>,
pub pulls_url: ::std::string::String,
pub pushed_at: RepositoryPushedAt,
pub releases_url: ::std::string::String,
pub size: i64,
pub ssh_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub stargazers: ::std::option::Option<i64>,
pub stargazers_count: i64,
pub stargazers_url: ::std::string::String,
pub statuses_url: ::std::string::String,
pub subscribers_url: ::std::string::String,
pub subscription_url: ::std::string::String,
pub svn_url: ::std::string::String,
pub tags_url: ::std::string::String,
pub teams_url: ::std::string::String,
pub trees_url: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub watchers: i64,
pub watchers_count: i64,
}
#[doc = "`RepositoryArchived`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryArchived {
pub action: RepositoryArchivedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: RepositoryArchivedRepository,
pub sender: User,
}
#[doc = "`RepositoryArchivedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryArchivedAction {
#[serde(rename = "archived")]
Archived,
}
impl ::std::fmt::Display for RepositoryArchivedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Archived => f.write_str("archived"),
}
}
}
impl ::std::str::FromStr for RepositoryArchivedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"archived" => Ok(Self::Archived),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryArchivedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryArchivedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RepositoryArchivedRepository`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryArchivedRepository {
#[doc = "Whether to allow auto-merge for pull requests."]
#[serde(default)]
pub allow_auto_merge: bool,
#[doc = "Whether to allow private forks"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub allow_forking: ::std::option::Option<bool>,
#[doc = "Whether to allow merge commits for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_merge_commit: bool,
#[doc = "Whether to allow rebase merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_rebase_merge: bool,
#[doc = "Whether to allow squash merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_squash_merge: bool,
pub archive_url: ::std::string::String,
pub archived: bool,
pub assignees_url: ::std::string::String,
pub blobs_url: ::std::string::String,
pub branches_url: ::std::string::String,
pub clone_url: ::std::string::String,
pub collaborators_url: ::std::string::String,
pub comments_url: ::std::string::String,
pub commits_url: ::std::string::String,
pub compare_url: ::std::string::String,
pub contents_url: ::std::string::String,
pub contributors_url: ::std::string::String,
pub created_at: RepositoryArchivedRepositoryCreatedAt,
#[doc = "The default branch of the repository."]
pub default_branch: ::std::string::String,
#[doc = "Whether to delete head branches when pull requests are merged"]
#[serde(default)]
pub delete_branch_on_merge: bool,
pub deployments_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[doc = "Returns whether or not this repository is disabled."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub disabled: ::std::option::Option<bool>,
pub downloads_url: ::std::string::String,
pub events_url: ::std::string::String,
pub fork: bool,
pub forks: i64,
pub forks_count: i64,
pub forks_url: ::std::string::String,
pub full_name: ::std::string::String,
pub git_commits_url: ::std::string::String,
pub git_refs_url: ::std::string::String,
pub git_tags_url: ::std::string::String,
pub git_url: ::std::string::String,
#[doc = "Whether downloads are enabled."]
pub has_downloads: bool,
#[doc = "Whether issues are enabled."]
pub has_issues: bool,
pub has_pages: bool,
#[doc = "Whether projects are enabled."]
pub has_projects: bool,
#[doc = "Whether the wiki is enabled."]
pub has_wiki: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub homepage: ::std::option::Option<::std::string::String>,
pub hooks_url: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
pub issue_comment_url: ::std::string::String,
pub issue_events_url: ::std::string::String,
pub issues_url: ::std::string::String,
pub keys_url: ::std::string::String,
pub labels_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub language: ::std::option::Option<::std::string::String>,
pub languages_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub license: ::std::option::Option<License>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub master_branch: ::std::option::Option<::std::string::String>,
pub merges_url: ::std::string::String,
pub milestones_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mirror_url: ::std::option::Option<::std::string::String>,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub notifications_url: ::std::string::String,
pub open_issues: i64,
pub open_issues_count: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<::std::string::String>,
pub owner: User,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub permissions: ::std::option::Option<RepositoryArchivedRepositoryPermissions>,
#[doc = "Whether the repository is private or public."]
pub private: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub public: ::std::option::Option<bool>,
pub pulls_url: ::std::string::String,
pub pushed_at: RepositoryArchivedRepositoryPushedAt,
pub releases_url: ::std::string::String,
pub size: i64,
pub ssh_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub stargazers: ::std::option::Option<i64>,
pub stargazers_count: i64,
pub stargazers_url: ::std::string::String,
pub statuses_url: ::std::string::String,
pub subscribers_url: ::std::string::String,
pub subscription_url: ::std::string::String,
pub svn_url: ::std::string::String,
pub tags_url: ::std::string::String,
pub teams_url: ::std::string::String,
pub trees_url: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub watchers: i64,
pub watchers_count: i64,
}
#[doc = "`RepositoryArchivedRepositoryCreatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RepositoryArchivedRepositoryCreatedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
}
impl ::std::fmt::Display for RepositoryArchivedRepositoryCreatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Integer(x) => x.fmt(f),
Self::DateTime(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for RepositoryArchivedRepositoryCreatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryArchivedRepositoryCreatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryArchivedRepositoryCreatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<i64> for RepositoryArchivedRepositoryCreatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for RepositoryArchivedRepositoryCreatedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`RepositoryArchivedRepositoryPermissions`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryArchivedRepositoryPermissions {
pub admin: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub maintain: ::std::option::Option<bool>,
pub pull: bool,
pub push: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub triage: ::std::option::Option<bool>,
}
#[doc = "`RepositoryArchivedRepositoryPushedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RepositoryArchivedRepositoryPushedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Null,
}
impl ::std::convert::From<i64> for RepositoryArchivedRepositoryPushedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for RepositoryArchivedRepositoryPushedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`RepositoryCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryCreated {
pub action: RepositoryCreatedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`RepositoryCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for RepositoryCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for RepositoryCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RepositoryCreatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RepositoryCreatedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
}
impl ::std::fmt::Display for RepositoryCreatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Integer(x) => x.fmt(f),
Self::DateTime(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for RepositoryCreatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryCreatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryCreatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<i64> for RepositoryCreatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>> for RepositoryCreatedAt {
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`RepositoryDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryDeleted {
pub action: RepositoryDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`RepositoryDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for RepositoryDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for RepositoryDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RepositoryDispatchEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct RepositoryDispatchEvent(pub RepositoryDispatchOnDemandTest);
impl ::std::ops::Deref for RepositoryDispatchEvent {
type Target = RepositoryDispatchOnDemandTest;
fn deref(&self) -> &RepositoryDispatchOnDemandTest {
&self.0
}
}
impl ::std::convert::From<RepositoryDispatchEvent> for RepositoryDispatchOnDemandTest {
fn from(value: RepositoryDispatchEvent) -> Self {
value.0
}
}
impl ::std::convert::From<RepositoryDispatchOnDemandTest> for RepositoryDispatchEvent {
fn from(value: RepositoryDispatchOnDemandTest) -> Self {
Self(value)
}
}
#[doc = "`RepositoryDispatchOnDemandTest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryDispatchOnDemandTest {
pub action: RepositoryDispatchOnDemandTestAction,
pub branch: ::std::string::String,
pub client_payload: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
pub installation: InstallationLite,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`RepositoryDispatchOnDemandTestAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryDispatchOnDemandTestAction {
#[serde(rename = "on-demand-test")]
OnDemandTest,
}
impl ::std::fmt::Display for RepositoryDispatchOnDemandTestAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::OnDemandTest => f.write_str("on-demand-test"),
}
}
}
impl ::std::str::FromStr for RepositoryDispatchOnDemandTestAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"on-demand-test" => Ok(Self::OnDemandTest),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryDispatchOnDemandTestAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryDispatchOnDemandTestAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RepositoryEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryEdited {
pub action: RepositoryEditedAction,
pub changes: RepositoryEditedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`RepositoryEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for RepositoryEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for RepositoryEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RepositoryEditedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct RepositoryEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub default_branch: ::std::option::Option<RepositoryEditedChangesDefaultBranch>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub description: ::std::option::Option<RepositoryEditedChangesDescription>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub homepage: ::std::option::Option<RepositoryEditedChangesHomepage>,
}
#[doc = "`RepositoryEditedChangesDefaultBranch`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryEditedChangesDefaultBranch {
pub from: ::std::string::String,
}
#[doc = "`RepositoryEditedChangesDescription`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryEditedChangesDescription {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub from: ::std::option::Option<::std::string::String>,
}
#[doc = "`RepositoryEditedChangesHomepage`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryEditedChangesHomepage {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub from: ::std::option::Option<::std::string::String>,
}
#[doc = "`RepositoryEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RepositoryEvent {
Archived(RepositoryArchived),
Created(RepositoryCreated),
Deleted(RepositoryDeleted),
Edited(RepositoryEdited),
Privatized(RepositoryPrivatized),
Publicized(RepositoryPublicized),
Renamed(RepositoryRenamed),
Transferred(RepositoryTransferred),
Unarchived(RepositoryUnarchived),
}
impl ::std::convert::From<RepositoryArchived> for RepositoryEvent {
fn from(value: RepositoryArchived) -> Self {
Self::Archived(value)
}
}
impl ::std::convert::From<RepositoryCreated> for RepositoryEvent {
fn from(value: RepositoryCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<RepositoryDeleted> for RepositoryEvent {
fn from(value: RepositoryDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<RepositoryEdited> for RepositoryEvent {
fn from(value: RepositoryEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<RepositoryPrivatized> for RepositoryEvent {
fn from(value: RepositoryPrivatized) -> Self {
Self::Privatized(value)
}
}
impl ::std::convert::From<RepositoryPublicized> for RepositoryEvent {
fn from(value: RepositoryPublicized) -> Self {
Self::Publicized(value)
}
}
impl ::std::convert::From<RepositoryRenamed> for RepositoryEvent {
fn from(value: RepositoryRenamed) -> Self {
Self::Renamed(value)
}
}
impl ::std::convert::From<RepositoryTransferred> for RepositoryEvent {
fn from(value: RepositoryTransferred) -> Self {
Self::Transferred(value)
}
}
impl ::std::convert::From<RepositoryUnarchived> for RepositoryEvent {
fn from(value: RepositoryUnarchived) -> Self {
Self::Unarchived(value)
}
}
#[doc = "`RepositoryImportEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryImportEvent {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
pub status: RepositoryImportEventStatus,
}
#[doc = "`RepositoryImportEventStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryImportEventStatus {
#[serde(rename = "success")]
Success,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "failure")]
Failure,
}
impl ::std::fmt::Display for RepositoryImportEventStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Cancelled => f.write_str("cancelled"),
Self::Failure => f.write_str("failure"),
}
}
}
impl ::std::str::FromStr for RepositoryImportEventStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"cancelled" => Ok(Self::Cancelled),
"failure" => Ok(Self::Failure),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryImportEventStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryImportEventStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RepositoryLite`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryLite {
pub archive_url: ::std::string::String,
pub assignees_url: ::std::string::String,
pub blobs_url: ::std::string::String,
pub branches_url: ::std::string::String,
pub collaborators_url: ::std::string::String,
pub comments_url: ::std::string::String,
pub commits_url: ::std::string::String,
pub compare_url: ::std::string::String,
pub contents_url: ::std::string::String,
pub contributors_url: ::std::string::String,
pub deployments_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
pub downloads_url: ::std::string::String,
pub events_url: ::std::string::String,
pub fork: bool,
pub forks_url: ::std::string::String,
pub full_name: ::std::string::String,
pub git_commits_url: ::std::string::String,
pub git_refs_url: ::std::string::String,
pub git_tags_url: ::std::string::String,
pub hooks_url: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
pub issue_comment_url: ::std::string::String,
pub issue_events_url: ::std::string::String,
pub issues_url: ::std::string::String,
pub keys_url: ::std::string::String,
pub labels_url: ::std::string::String,
pub languages_url: ::std::string::String,
pub merges_url: ::std::string::String,
pub milestones_url: ::std::string::String,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub notifications_url: ::std::string::String,
pub owner: User,
#[doc = "Whether the repository is private or public."]
pub private: bool,
pub pulls_url: ::std::string::String,
pub releases_url: ::std::string::String,
pub stargazers_url: ::std::string::String,
pub statuses_url: ::std::string::String,
pub subscribers_url: ::std::string::String,
pub subscription_url: ::std::string::String,
pub tags_url: ::std::string::String,
pub teams_url: ::std::string::String,
pub trees_url: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`RepositoryPermissions`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryPermissions {
pub admin: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub maintain: ::std::option::Option<bool>,
pub pull: bool,
pub push: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub triage: ::std::option::Option<bool>,
}
#[doc = "`RepositoryPrivatized`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryPrivatized {
pub action: RepositoryPrivatizedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: RepositoryPrivatizedRepository,
pub sender: User,
}
#[doc = "`RepositoryPrivatizedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryPrivatizedAction {
#[serde(rename = "privatized")]
Privatized,
}
impl ::std::fmt::Display for RepositoryPrivatizedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Privatized => f.write_str("privatized"),
}
}
}
impl ::std::str::FromStr for RepositoryPrivatizedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"privatized" => Ok(Self::Privatized),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryPrivatizedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryPrivatizedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RepositoryPrivatizedRepository`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryPrivatizedRepository {
#[doc = "Whether to allow auto-merge for pull requests."]
#[serde(default)]
pub allow_auto_merge: bool,
#[doc = "Whether to allow private forks"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub allow_forking: ::std::option::Option<bool>,
#[doc = "Whether to allow merge commits for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_merge_commit: bool,
#[doc = "Whether to allow rebase merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_rebase_merge: bool,
#[doc = "Whether to allow squash merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_squash_merge: bool,
pub archive_url: ::std::string::String,
#[doc = "Whether the repository is archived."]
pub archived: bool,
pub assignees_url: ::std::string::String,
pub blobs_url: ::std::string::String,
pub branches_url: ::std::string::String,
pub clone_url: ::std::string::String,
pub collaborators_url: ::std::string::String,
pub comments_url: ::std::string::String,
pub commits_url: ::std::string::String,
pub compare_url: ::std::string::String,
pub contents_url: ::std::string::String,
pub contributors_url: ::std::string::String,
pub created_at: RepositoryPrivatizedRepositoryCreatedAt,
#[doc = "The default branch of the repository."]
pub default_branch: ::std::string::String,
#[doc = "Whether to delete head branches when pull requests are merged"]
#[serde(default)]
pub delete_branch_on_merge: bool,
pub deployments_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[doc = "Returns whether or not this repository is disabled."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub disabled: ::std::option::Option<bool>,
pub downloads_url: ::std::string::String,
pub events_url: ::std::string::String,
pub fork: bool,
pub forks: i64,
pub forks_count: i64,
pub forks_url: ::std::string::String,
pub full_name: ::std::string::String,
pub git_commits_url: ::std::string::String,
pub git_refs_url: ::std::string::String,
pub git_tags_url: ::std::string::String,
pub git_url: ::std::string::String,
#[doc = "Whether downloads are enabled."]
pub has_downloads: bool,
#[doc = "Whether issues are enabled."]
pub has_issues: bool,
pub has_pages: bool,
#[doc = "Whether projects are enabled."]
pub has_projects: bool,
#[doc = "Whether the wiki is enabled."]
pub has_wiki: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub homepage: ::std::option::Option<::std::string::String>,
pub hooks_url: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
pub issue_comment_url: ::std::string::String,
pub issue_events_url: ::std::string::String,
pub issues_url: ::std::string::String,
pub keys_url: ::std::string::String,
pub labels_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub language: ::std::option::Option<::std::string::String>,
pub languages_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub license: ::std::option::Option<License>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub master_branch: ::std::option::Option<::std::string::String>,
pub merges_url: ::std::string::String,
pub milestones_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mirror_url: ::std::option::Option<::std::string::String>,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub notifications_url: ::std::string::String,
pub open_issues: i64,
pub open_issues_count: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<::std::string::String>,
pub owner: User,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub permissions: ::std::option::Option<RepositoryPrivatizedRepositoryPermissions>,
pub private: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub public: ::std::option::Option<bool>,
pub pulls_url: ::std::string::String,
pub pushed_at: RepositoryPrivatizedRepositoryPushedAt,
pub releases_url: ::std::string::String,
pub size: i64,
pub ssh_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub stargazers: ::std::option::Option<i64>,
pub stargazers_count: i64,
pub stargazers_url: ::std::string::String,
pub statuses_url: ::std::string::String,
pub subscribers_url: ::std::string::String,
pub subscription_url: ::std::string::String,
pub svn_url: ::std::string::String,
pub tags_url: ::std::string::String,
pub teams_url: ::std::string::String,
pub trees_url: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub watchers: i64,
pub watchers_count: i64,
}
#[doc = "`RepositoryPrivatizedRepositoryCreatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RepositoryPrivatizedRepositoryCreatedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
}
impl ::std::fmt::Display for RepositoryPrivatizedRepositoryCreatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Integer(x) => x.fmt(f),
Self::DateTime(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for RepositoryPrivatizedRepositoryCreatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryPrivatizedRepositoryCreatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryPrivatizedRepositoryCreatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<i64> for RepositoryPrivatizedRepositoryCreatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for RepositoryPrivatizedRepositoryCreatedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`RepositoryPrivatizedRepositoryPermissions`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryPrivatizedRepositoryPermissions {
pub admin: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub maintain: ::std::option::Option<bool>,
pub pull: bool,
pub push: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub triage: ::std::option::Option<bool>,
}
#[doc = "`RepositoryPrivatizedRepositoryPushedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RepositoryPrivatizedRepositoryPushedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Null,
}
impl ::std::convert::From<i64> for RepositoryPrivatizedRepositoryPushedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for RepositoryPrivatizedRepositoryPushedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`RepositoryPublicized`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryPublicized {
pub action: RepositoryPublicizedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: RepositoryPublicizedRepository,
pub sender: User,
}
#[doc = "`RepositoryPublicizedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryPublicizedAction {
#[serde(rename = "publicized")]
Publicized,
}
impl ::std::fmt::Display for RepositoryPublicizedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Publicized => f.write_str("publicized"),
}
}
}
impl ::std::str::FromStr for RepositoryPublicizedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"publicized" => Ok(Self::Publicized),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryPublicizedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryPublicizedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RepositoryPublicizedRepository`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryPublicizedRepository {
#[doc = "Whether to allow auto-merge for pull requests."]
#[serde(default)]
pub allow_auto_merge: bool,
#[doc = "Whether to allow private forks"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub allow_forking: ::std::option::Option<bool>,
#[doc = "Whether to allow merge commits for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_merge_commit: bool,
#[doc = "Whether to allow rebase merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_rebase_merge: bool,
#[doc = "Whether to allow squash merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_squash_merge: bool,
pub archive_url: ::std::string::String,
#[doc = "Whether the repository is archived."]
pub archived: bool,
pub assignees_url: ::std::string::String,
pub blobs_url: ::std::string::String,
pub branches_url: ::std::string::String,
pub clone_url: ::std::string::String,
pub collaborators_url: ::std::string::String,
pub comments_url: ::std::string::String,
pub commits_url: ::std::string::String,
pub compare_url: ::std::string::String,
pub contents_url: ::std::string::String,
pub contributors_url: ::std::string::String,
pub created_at: RepositoryPublicizedRepositoryCreatedAt,
#[doc = "The default branch of the repository."]
pub default_branch: ::std::string::String,
#[doc = "Whether to delete head branches when pull requests are merged"]
#[serde(default)]
pub delete_branch_on_merge: bool,
pub deployments_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[doc = "Returns whether or not this repository is disabled."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub disabled: ::std::option::Option<bool>,
pub downloads_url: ::std::string::String,
pub events_url: ::std::string::String,
pub fork: bool,
pub forks: i64,
pub forks_count: i64,
pub forks_url: ::std::string::String,
pub full_name: ::std::string::String,
pub git_commits_url: ::std::string::String,
pub git_refs_url: ::std::string::String,
pub git_tags_url: ::std::string::String,
pub git_url: ::std::string::String,
#[doc = "Whether downloads are enabled."]
pub has_downloads: bool,
#[doc = "Whether issues are enabled."]
pub has_issues: bool,
pub has_pages: bool,
#[doc = "Whether projects are enabled."]
pub has_projects: bool,
#[doc = "Whether the wiki is enabled."]
pub has_wiki: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub homepage: ::std::option::Option<::std::string::String>,
pub hooks_url: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
pub issue_comment_url: ::std::string::String,
pub issue_events_url: ::std::string::String,
pub issues_url: ::std::string::String,
pub keys_url: ::std::string::String,
pub labels_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub language: ::std::option::Option<::std::string::String>,
pub languages_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub license: ::std::option::Option<License>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub master_branch: ::std::option::Option<::std::string::String>,
pub merges_url: ::std::string::String,
pub milestones_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mirror_url: ::std::option::Option<::std::string::String>,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub notifications_url: ::std::string::String,
pub open_issues: i64,
pub open_issues_count: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<::std::string::String>,
pub owner: User,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub permissions: ::std::option::Option<RepositoryPublicizedRepositoryPermissions>,
pub private: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub public: ::std::option::Option<bool>,
pub pulls_url: ::std::string::String,
pub pushed_at: RepositoryPublicizedRepositoryPushedAt,
pub releases_url: ::std::string::String,
pub size: i64,
pub ssh_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub stargazers: ::std::option::Option<i64>,
pub stargazers_count: i64,
pub stargazers_url: ::std::string::String,
pub statuses_url: ::std::string::String,
pub subscribers_url: ::std::string::String,
pub subscription_url: ::std::string::String,
pub svn_url: ::std::string::String,
pub tags_url: ::std::string::String,
pub teams_url: ::std::string::String,
pub trees_url: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub watchers: i64,
pub watchers_count: i64,
}
#[doc = "`RepositoryPublicizedRepositoryCreatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RepositoryPublicizedRepositoryCreatedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
}
impl ::std::fmt::Display for RepositoryPublicizedRepositoryCreatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Integer(x) => x.fmt(f),
Self::DateTime(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for RepositoryPublicizedRepositoryCreatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryPublicizedRepositoryCreatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryPublicizedRepositoryCreatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<i64> for RepositoryPublicizedRepositoryCreatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for RepositoryPublicizedRepositoryCreatedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`RepositoryPublicizedRepositoryPermissions`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryPublicizedRepositoryPermissions {
pub admin: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub maintain: ::std::option::Option<bool>,
pub pull: bool,
pub push: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub triage: ::std::option::Option<bool>,
}
#[doc = "`RepositoryPublicizedRepositoryPushedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RepositoryPublicizedRepositoryPushedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Null,
}
impl ::std::convert::From<i64> for RepositoryPublicizedRepositoryPushedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for RepositoryPublicizedRepositoryPushedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`RepositoryPushedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RepositoryPushedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Null,
}
impl ::std::convert::From<i64> for RepositoryPushedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>> for RepositoryPushedAt {
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`RepositoryRenamed`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryRenamed {
pub action: RepositoryRenamedAction,
pub changes: RepositoryRenamedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`RepositoryRenamedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryRenamedAction {
#[serde(rename = "renamed")]
Renamed,
}
impl ::std::fmt::Display for RepositoryRenamedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Renamed => f.write_str("renamed"),
}
}
}
impl ::std::str::FromStr for RepositoryRenamedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"renamed" => Ok(Self::Renamed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryRenamedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryRenamedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RepositoryRenamedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryRenamedChanges {
pub repository: RepositoryRenamedChangesRepository,
}
#[doc = "`RepositoryRenamedChangesRepository`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryRenamedChangesRepository {
pub name: RepositoryRenamedChangesRepositoryName,
}
#[doc = "`RepositoryRenamedChangesRepositoryName`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryRenamedChangesRepositoryName {
pub from: ::std::string::String,
}
#[doc = "`RepositoryTransferred`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryTransferred {
pub action: RepositoryTransferredAction,
pub changes: RepositoryTransferredChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`RepositoryTransferredAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryTransferredAction {
#[serde(rename = "transferred")]
Transferred,
}
impl ::std::fmt::Display for RepositoryTransferredAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Transferred => f.write_str("transferred"),
}
}
}
impl ::std::str::FromStr for RepositoryTransferredAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"transferred" => Ok(Self::Transferred),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryTransferredAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryTransferredAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RepositoryTransferredChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryTransferredChanges {
pub owner: RepositoryTransferredChangesOwner,
}
#[doc = "`RepositoryTransferredChangesOwner`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryTransferredChangesOwner {
pub from: RepositoryTransferredChangesOwnerFrom,
}
#[doc = "`RepositoryTransferredChangesOwnerFrom`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct RepositoryTransferredChangesOwnerFrom {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub user: ::std::option::Option<User>,
}
#[doc = "`RepositoryUnarchived`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryUnarchived {
pub action: RepositoryUnarchivedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: RepositoryUnarchivedRepository,
pub sender: User,
}
#[doc = "`RepositoryUnarchivedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryUnarchivedAction {
#[serde(rename = "unarchived")]
Unarchived,
}
impl ::std::fmt::Display for RepositoryUnarchivedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Unarchived => f.write_str("unarchived"),
}
}
}
impl ::std::str::FromStr for RepositoryUnarchivedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"unarchived" => Ok(Self::Unarchived),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryUnarchivedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryUnarchivedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`RepositoryUnarchivedRepository`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryUnarchivedRepository {
#[doc = "Whether to allow auto-merge for pull requests."]
#[serde(default)]
pub allow_auto_merge: bool,
#[doc = "Whether to allow private forks"]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub allow_forking: ::std::option::Option<bool>,
#[doc = "Whether to allow merge commits for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_merge_commit: bool,
#[doc = "Whether to allow rebase merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_rebase_merge: bool,
#[doc = "Whether to allow squash merges for pull requests."]
#[serde(default = "defaults::default_bool::<true>")]
pub allow_squash_merge: bool,
pub archive_url: ::std::string::String,
pub archived: bool,
pub assignees_url: ::std::string::String,
pub blobs_url: ::std::string::String,
pub branches_url: ::std::string::String,
pub clone_url: ::std::string::String,
pub collaborators_url: ::std::string::String,
pub comments_url: ::std::string::String,
pub commits_url: ::std::string::String,
pub compare_url: ::std::string::String,
pub contents_url: ::std::string::String,
pub contributors_url: ::std::string::String,
pub created_at: RepositoryUnarchivedRepositoryCreatedAt,
#[doc = "The default branch of the repository."]
pub default_branch: ::std::string::String,
#[doc = "Whether to delete head branches when pull requests are merged"]
#[serde(default)]
pub delete_branch_on_merge: bool,
pub deployments_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[doc = "Returns whether or not this repository is disabled."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub disabled: ::std::option::Option<bool>,
pub downloads_url: ::std::string::String,
pub events_url: ::std::string::String,
pub fork: bool,
pub forks: i64,
pub forks_count: i64,
pub forks_url: ::std::string::String,
pub full_name: ::std::string::String,
pub git_commits_url: ::std::string::String,
pub git_refs_url: ::std::string::String,
pub git_tags_url: ::std::string::String,
pub git_url: ::std::string::String,
#[doc = "Whether downloads are enabled."]
pub has_downloads: bool,
#[doc = "Whether issues are enabled."]
pub has_issues: bool,
pub has_pages: bool,
#[doc = "Whether projects are enabled."]
pub has_projects: bool,
#[doc = "Whether the wiki is enabled."]
pub has_wiki: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub homepage: ::std::option::Option<::std::string::String>,
pub hooks_url: ::std::string::String,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the repository"]
pub id: i64,
pub issue_comment_url: ::std::string::String,
pub issue_events_url: ::std::string::String,
pub issues_url: ::std::string::String,
pub keys_url: ::std::string::String,
pub labels_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub language: ::std::option::Option<::std::string::String>,
pub languages_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub license: ::std::option::Option<License>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub master_branch: ::std::option::Option<::std::string::String>,
pub merges_url: ::std::string::String,
pub milestones_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub mirror_url: ::std::option::Option<::std::string::String>,
#[doc = "The name of the repository."]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub notifications_url: ::std::string::String,
pub open_issues: i64,
pub open_issues_count: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<::std::string::String>,
pub owner: User,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub permissions: ::std::option::Option<RepositoryUnarchivedRepositoryPermissions>,
#[doc = "Whether the repository is private or public."]
pub private: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub public: ::std::option::Option<bool>,
pub pulls_url: ::std::string::String,
pub pushed_at: RepositoryUnarchivedRepositoryPushedAt,
pub releases_url: ::std::string::String,
pub size: i64,
pub ssh_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub stargazers: ::std::option::Option<i64>,
pub stargazers_count: i64,
pub stargazers_url: ::std::string::String,
pub statuses_url: ::std::string::String,
pub subscribers_url: ::std::string::String,
pub subscription_url: ::std::string::String,
pub svn_url: ::std::string::String,
pub tags_url: ::std::string::String,
pub teams_url: ::std::string::String,
pub trees_url: ::std::string::String,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub watchers: i64,
pub watchers_count: i64,
}
#[doc = "`RepositoryUnarchivedRepositoryCreatedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RepositoryUnarchivedRepositoryCreatedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
}
impl ::std::fmt::Display for RepositoryUnarchivedRepositoryCreatedAt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Integer(x) => x.fmt(f),
Self::DateTime(x) => x.fmt(f),
}
}
}
impl ::std::str::FromStr for RepositoryUnarchivedRepositoryCreatedAt {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
Ok(Self::Integer(v))
} else if let Ok(v) = value.parse() {
Ok(Self::DateTime(v))
} else {
Err("string conversion failed for all variants".into())
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryUnarchivedRepositoryCreatedAt {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryUnarchivedRepositoryCreatedAt {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::From<i64> for RepositoryUnarchivedRepositoryCreatedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for RepositoryUnarchivedRepositoryCreatedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`RepositoryUnarchivedRepositoryPermissions`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryUnarchivedRepositoryPermissions {
pub admin: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub maintain: ::std::option::Option<bool>,
pub pull: bool,
pub push: bool,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub triage: ::std::option::Option<bool>,
}
#[doc = "`RepositoryUnarchivedRepositoryPushedAt`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RepositoryUnarchivedRepositoryPushedAt {
Integer(i64),
DateTime(::chrono::DateTime<::chrono::offset::Utc>),
Null,
}
impl ::std::convert::From<i64> for RepositoryUnarchivedRepositoryPushedAt {
fn from(value: i64) -> Self {
Self::Integer(value)
}
}
impl ::std::convert::From<::chrono::DateTime<::chrono::offset::Utc>>
for RepositoryUnarchivedRepositoryPushedAt
{
fn from(value: ::chrono::DateTime<::chrono::offset::Utc>) -> Self {
Self::DateTime(value)
}
}
#[doc = "`RepositoryVulnerabilityAlertCreate`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryVulnerabilityAlertCreate {
pub action: RepositoryVulnerabilityAlertCreateAction,
pub alert: RepositoryVulnerabilityAlertCreateAlert,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`RepositoryVulnerabilityAlertCreateAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryVulnerabilityAlertCreateAction {
#[serde(rename = "create")]
Create,
}
impl ::std::fmt::Display for RepositoryVulnerabilityAlertCreateAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Create => f.write_str("create"),
}
}
}
impl ::std::str::FromStr for RepositoryVulnerabilityAlertCreateAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"create" => Ok(Self::Create),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryVulnerabilityAlertCreateAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryVulnerabilityAlertCreateAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The security alert of the vulnerable dependency."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryVulnerabilityAlertCreateAlert {
pub affected_package_name: ::std::string::String,
pub affected_range: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub created_at: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub dismiss_reason: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub dismissed_at: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub dismisser: ::std::option::Option<User>,
pub external_identifier: ::std::string::String,
pub external_reference: ::std::string::String,
pub fixed_in: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub ghsa_id: ::std::option::Option<::std::string::String>,
pub id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub severity: ::std::option::Option<::std::string::String>,
}
#[doc = "`RepositoryVulnerabilityAlertDismiss`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryVulnerabilityAlertDismiss {
pub action: RepositoryVulnerabilityAlertDismissAction,
pub alert: RepositoryVulnerabilityAlertDismissAlert,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`RepositoryVulnerabilityAlertDismissAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryVulnerabilityAlertDismissAction {
#[serde(rename = "dismiss")]
Dismiss,
}
impl ::std::fmt::Display for RepositoryVulnerabilityAlertDismissAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Dismiss => f.write_str("dismiss"),
}
}
}
impl ::std::str::FromStr for RepositoryVulnerabilityAlertDismissAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"dismiss" => Ok(Self::Dismiss),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryVulnerabilityAlertDismissAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryVulnerabilityAlertDismissAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The security alert of the vulnerable dependency."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryVulnerabilityAlertDismissAlert {
pub affected_package_name: ::std::string::String,
pub affected_range: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub created_at: ::std::option::Option<::std::string::String>,
pub dismiss_reason: ::std::string::String,
pub dismissed_at: ::std::string::String,
pub dismisser: User,
pub external_identifier: ::std::string::String,
pub external_reference: ::std::string::String,
pub fixed_in: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub ghsa_id: ::std::option::Option<::std::string::String>,
pub id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub severity: ::std::option::Option<::std::string::String>,
}
#[doc = "`RepositoryVulnerabilityAlertEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum RepositoryVulnerabilityAlertEvent {
Create(RepositoryVulnerabilityAlertCreate),
Dismiss(RepositoryVulnerabilityAlertDismiss),
Resolve(RepositoryVulnerabilityAlertResolve),
}
impl ::std::convert::From<RepositoryVulnerabilityAlertCreate>
for RepositoryVulnerabilityAlertEvent
{
fn from(value: RepositoryVulnerabilityAlertCreate) -> Self {
Self::Create(value)
}
}
impl ::std::convert::From<RepositoryVulnerabilityAlertDismiss>
for RepositoryVulnerabilityAlertEvent
{
fn from(value: RepositoryVulnerabilityAlertDismiss) -> Self {
Self::Dismiss(value)
}
}
impl ::std::convert::From<RepositoryVulnerabilityAlertResolve>
for RepositoryVulnerabilityAlertEvent
{
fn from(value: RepositoryVulnerabilityAlertResolve) -> Self {
Self::Resolve(value)
}
}
#[doc = "`RepositoryVulnerabilityAlertResolve`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryVulnerabilityAlertResolve {
pub action: RepositoryVulnerabilityAlertResolveAction,
pub alert: RepositoryVulnerabilityAlertResolveAlert,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`RepositoryVulnerabilityAlertResolveAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum RepositoryVulnerabilityAlertResolveAction {
#[serde(rename = "resolve")]
Resolve,
}
impl ::std::fmt::Display for RepositoryVulnerabilityAlertResolveAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolve => f.write_str("resolve"),
}
}
}
impl ::std::str::FromStr for RepositoryVulnerabilityAlertResolveAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolve" => Ok(Self::Resolve),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for RepositoryVulnerabilityAlertResolveAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for RepositoryVulnerabilityAlertResolveAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The security alert of the vulnerable dependency."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct RepositoryVulnerabilityAlertResolveAlert {
pub affected_package_name: ::std::string::String,
pub affected_range: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub created_at: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub dismiss_reason: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub dismissed_at: ::std::option::Option<::std::string::String>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub dismisser: ::std::option::Option<User>,
pub external_identifier: ::std::string::String,
pub external_reference: ::std::string::String,
pub fixed_in: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub ghsa_id: ::std::option::Option<::std::string::String>,
pub id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub severity: ::std::option::Option<::std::string::String>,
}
#[doc = "`SecretScanningAlertCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecretScanningAlertCreated {
pub action: SecretScanningAlertCreatedAction,
pub alert: SecretScanningAlertCreatedAlert,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
}
#[doc = "`SecretScanningAlertCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SecretScanningAlertCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for SecretScanningAlertCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for SecretScanningAlertCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SecretScanningAlertCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SecretScanningAlertCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The secret scanning alert involved in the event."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecretScanningAlertCreatedAlert {
pub number: i64,
pub resolution: (),
pub resolved_at: (),
pub resolved_by: (),
pub secret_type: ::std::string::String,
}
#[doc = "`SecretScanningAlertEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum SecretScanningAlertEvent {
Created(SecretScanningAlertCreated),
Reopened(SecretScanningAlertReopened),
Resolved(SecretScanningAlertResolved),
}
impl ::std::convert::From<SecretScanningAlertCreated> for SecretScanningAlertEvent {
fn from(value: SecretScanningAlertCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<SecretScanningAlertReopened> for SecretScanningAlertEvent {
fn from(value: SecretScanningAlertReopened) -> Self {
Self::Reopened(value)
}
}
impl ::std::convert::From<SecretScanningAlertResolved> for SecretScanningAlertEvent {
fn from(value: SecretScanningAlertResolved) -> Self {
Self::Resolved(value)
}
}
#[doc = "`SecretScanningAlertReopened`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecretScanningAlertReopened {
pub action: SecretScanningAlertReopenedAction,
pub alert: SecretScanningAlertReopenedAlert,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`SecretScanningAlertReopenedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SecretScanningAlertReopenedAction {
#[serde(rename = "reopened")]
Reopened,
}
impl ::std::fmt::Display for SecretScanningAlertReopenedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Reopened => f.write_str("reopened"),
}
}
}
impl ::std::str::FromStr for SecretScanningAlertReopenedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"reopened" => Ok(Self::Reopened),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SecretScanningAlertReopenedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SecretScanningAlertReopenedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The secret scanning alert involved in the event."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecretScanningAlertReopenedAlert {
pub number: i64,
pub resolution: (),
pub resolved_at: (),
pub resolved_by: (),
pub secret_type: ::std::string::String,
}
#[doc = "`SecretScanningAlertResolved`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecretScanningAlertResolved {
pub action: SecretScanningAlertResolvedAction,
pub alert: SecretScanningAlertResolvedAlert,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`SecretScanningAlertResolvedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SecretScanningAlertResolvedAction {
#[serde(rename = "resolved")]
Resolved,
}
impl ::std::fmt::Display for SecretScanningAlertResolvedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
}
}
}
impl ::std::str::FromStr for SecretScanningAlertResolvedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SecretScanningAlertResolvedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SecretScanningAlertResolvedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The secret scanning alert involved in the event."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecretScanningAlertResolvedAlert {
pub number: i64,
pub resolution: SecretScanningAlertResolvedAlertResolution,
pub resolved_at: ::std::string::String,
pub resolved_by: User,
pub secret_type: ::std::string::String,
}
#[doc = "`SecretScanningAlertResolvedAlertResolution`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SecretScanningAlertResolvedAlertResolution {
#[serde(rename = "false_positive")]
FalsePositive,
#[serde(rename = "wontfix")]
Wontfix,
#[serde(rename = "revoked")]
Revoked,
#[serde(rename = "used_in_tests")]
UsedInTests,
}
impl ::std::fmt::Display for SecretScanningAlertResolvedAlertResolution {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::FalsePositive => f.write_str("false_positive"),
Self::Wontfix => f.write_str("wontfix"),
Self::Revoked => f.write_str("revoked"),
Self::UsedInTests => f.write_str("used_in_tests"),
}
}
}
impl ::std::str::FromStr for SecretScanningAlertResolvedAlertResolution {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"false_positive" => Ok(Self::FalsePositive),
"wontfix" => Ok(Self::Wontfix),
"revoked" => Ok(Self::Revoked),
"used_in_tests" => Ok(Self::UsedInTests),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SecretScanningAlertResolvedAlertResolution {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SecretScanningAlertResolvedAlertResolution {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`SecurityAdvisoryEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum SecurityAdvisoryEvent {
Performed(SecurityAdvisoryPerformed),
Published(SecurityAdvisoryPublished),
Updated(SecurityAdvisoryUpdated),
Withdrawn(SecurityAdvisoryWithdrawn),
}
impl ::std::convert::From<SecurityAdvisoryPerformed> for SecurityAdvisoryEvent {
fn from(value: SecurityAdvisoryPerformed) -> Self {
Self::Performed(value)
}
}
impl ::std::convert::From<SecurityAdvisoryPublished> for SecurityAdvisoryEvent {
fn from(value: SecurityAdvisoryPublished) -> Self {
Self::Published(value)
}
}
impl ::std::convert::From<SecurityAdvisoryUpdated> for SecurityAdvisoryEvent {
fn from(value: SecurityAdvisoryUpdated) -> Self {
Self::Updated(value)
}
}
impl ::std::convert::From<SecurityAdvisoryWithdrawn> for SecurityAdvisoryEvent {
fn from(value: SecurityAdvisoryWithdrawn) -> Self {
Self::Withdrawn(value)
}
}
#[doc = "`SecurityAdvisoryPerformed`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPerformed {
pub action: SecurityAdvisoryPerformedAction,
pub security_advisory: SecurityAdvisoryPerformedSecurityAdvisory,
}
#[doc = "`SecurityAdvisoryPerformedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SecurityAdvisoryPerformedAction {
#[serde(rename = "performed")]
Performed,
}
impl ::std::fmt::Display for SecurityAdvisoryPerformedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Performed => f.write_str("performed"),
}
}
}
impl ::std::str::FromStr for SecurityAdvisoryPerformedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"performed" => Ok(Self::Performed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SecurityAdvisoryPerformedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SecurityAdvisoryPerformedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The details of the security advisory, including summary, description, and severity."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPerformedSecurityAdvisory {
pub cvss: SecurityAdvisoryPerformedSecurityAdvisoryCvss,
pub cwes: ::std::vec::Vec<SecurityAdvisoryPerformedSecurityAdvisoryCwesItem>,
pub description: ::std::string::String,
pub ghsa_id: ::std::string::String,
pub identifiers: ::std::vec::Vec<SecurityAdvisoryPerformedSecurityAdvisoryIdentifiersItem>,
pub published_at: ::std::string::String,
pub references: ::std::vec::Vec<SecurityAdvisoryPerformedSecurityAdvisoryReferencesItem>,
pub severity: ::std::string::String,
pub summary: ::std::string::String,
pub updated_at: ::std::string::String,
pub vulnerabilities:
::std::vec::Vec<SecurityAdvisoryPerformedSecurityAdvisoryVulnerabilitiesItem>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub withdrawn_at: ::std::option::Option<::std::string::String>,
}
#[doc = "`SecurityAdvisoryPerformedSecurityAdvisoryCvss`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPerformedSecurityAdvisoryCvss {
pub score: f64,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub vector_string: ::std::option::Option<::std::string::String>,
}
#[doc = "`SecurityAdvisoryPerformedSecurityAdvisoryCwesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPerformedSecurityAdvisoryCwesItem {
pub cwe_id: ::std::string::String,
pub name: ::std::string::String,
}
#[doc = "`SecurityAdvisoryPerformedSecurityAdvisoryIdentifiersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPerformedSecurityAdvisoryIdentifiersItem {
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub value: ::std::string::String,
}
#[doc = "`SecurityAdvisoryPerformedSecurityAdvisoryReferencesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPerformedSecurityAdvisoryReferencesItem {
pub url: ::std::string::String,
}
#[doc = "`SecurityAdvisoryPerformedSecurityAdvisoryVulnerabilitiesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPerformedSecurityAdvisoryVulnerabilitiesItem {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub first_patched_version: ::std::option::Option<
SecurityAdvisoryPerformedSecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion,
>,
pub package: SecurityAdvisoryPerformedSecurityAdvisoryVulnerabilitiesItemPackage,
pub severity: ::std::string::String,
pub vulnerable_version_range: ::std::string::String,
}
#[doc = "`SecurityAdvisoryPerformedSecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPerformedSecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion {
pub identifier: ::std::string::String,
}
#[doc = "`SecurityAdvisoryPerformedSecurityAdvisoryVulnerabilitiesItemPackage`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPerformedSecurityAdvisoryVulnerabilitiesItemPackage {
pub ecosystem: ::std::string::String,
pub name: ::std::string::String,
}
#[doc = "`SecurityAdvisoryPublished`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPublished {
pub action: SecurityAdvisoryPublishedAction,
pub security_advisory: SecurityAdvisoryPublishedSecurityAdvisory,
}
#[doc = "`SecurityAdvisoryPublishedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SecurityAdvisoryPublishedAction {
#[serde(rename = "published")]
Published,
}
impl ::std::fmt::Display for SecurityAdvisoryPublishedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Published => f.write_str("published"),
}
}
}
impl ::std::str::FromStr for SecurityAdvisoryPublishedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"published" => Ok(Self::Published),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SecurityAdvisoryPublishedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SecurityAdvisoryPublishedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The details of the security advisory, including summary, description, and severity."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPublishedSecurityAdvisory {
pub cvss: SecurityAdvisoryPublishedSecurityAdvisoryCvss,
pub cwes: ::std::vec::Vec<SecurityAdvisoryPublishedSecurityAdvisoryCwesItem>,
pub description: ::std::string::String,
pub ghsa_id: ::std::string::String,
pub identifiers: ::std::vec::Vec<SecurityAdvisoryPublishedSecurityAdvisoryIdentifiersItem>,
pub published_at: ::std::string::String,
pub references: ::std::vec::Vec<SecurityAdvisoryPublishedSecurityAdvisoryReferencesItem>,
pub severity: ::std::string::String,
pub summary: ::std::string::String,
pub updated_at: ::std::string::String,
pub vulnerabilities:
::std::vec::Vec<SecurityAdvisoryPublishedSecurityAdvisoryVulnerabilitiesItem>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub withdrawn_at: ::std::option::Option<::std::string::String>,
}
#[doc = "`SecurityAdvisoryPublishedSecurityAdvisoryCvss`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPublishedSecurityAdvisoryCvss {
pub score: f64,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub vector_string: ::std::option::Option<::std::string::String>,
}
#[doc = "`SecurityAdvisoryPublishedSecurityAdvisoryCwesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPublishedSecurityAdvisoryCwesItem {
pub cwe_id: ::std::string::String,
pub name: ::std::string::String,
}
#[doc = "`SecurityAdvisoryPublishedSecurityAdvisoryIdentifiersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPublishedSecurityAdvisoryIdentifiersItem {
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub value: ::std::string::String,
}
#[doc = "`SecurityAdvisoryPublishedSecurityAdvisoryReferencesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPublishedSecurityAdvisoryReferencesItem {
pub url: ::std::string::String,
}
#[doc = "`SecurityAdvisoryPublishedSecurityAdvisoryVulnerabilitiesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPublishedSecurityAdvisoryVulnerabilitiesItem {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub first_patched_version: ::std::option::Option<
SecurityAdvisoryPublishedSecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion,
>,
pub package: SecurityAdvisoryPublishedSecurityAdvisoryVulnerabilitiesItemPackage,
pub severity: ::std::string::String,
pub vulnerable_version_range: ::std::string::String,
}
#[doc = "`SecurityAdvisoryPublishedSecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPublishedSecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion {
pub identifier: ::std::string::String,
}
#[doc = "`SecurityAdvisoryPublishedSecurityAdvisoryVulnerabilitiesItemPackage`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryPublishedSecurityAdvisoryVulnerabilitiesItemPackage {
pub ecosystem: ::std::string::String,
pub name: ::std::string::String,
}
#[doc = "`SecurityAdvisoryUpdated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryUpdated {
pub action: SecurityAdvisoryUpdatedAction,
pub security_advisory: SecurityAdvisoryUpdatedSecurityAdvisory,
}
#[doc = "`SecurityAdvisoryUpdatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SecurityAdvisoryUpdatedAction {
#[serde(rename = "updated")]
Updated,
}
impl ::std::fmt::Display for SecurityAdvisoryUpdatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Updated => f.write_str("updated"),
}
}
}
impl ::std::str::FromStr for SecurityAdvisoryUpdatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"updated" => Ok(Self::Updated),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SecurityAdvisoryUpdatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SecurityAdvisoryUpdatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The details of the security advisory, including summary, description, and severity."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryUpdatedSecurityAdvisory {
pub cvss: SecurityAdvisoryUpdatedSecurityAdvisoryCvss,
pub cwes: ::std::vec::Vec<SecurityAdvisoryUpdatedSecurityAdvisoryCwesItem>,
pub description: ::std::string::String,
pub ghsa_id: ::std::string::String,
pub identifiers: ::std::vec::Vec<SecurityAdvisoryUpdatedSecurityAdvisoryIdentifiersItem>,
pub published_at: ::std::string::String,
pub references: ::std::vec::Vec<SecurityAdvisoryUpdatedSecurityAdvisoryReferencesItem>,
pub severity: ::std::string::String,
pub summary: ::std::string::String,
pub updated_at: ::std::string::String,
pub vulnerabilities:
::std::vec::Vec<SecurityAdvisoryUpdatedSecurityAdvisoryVulnerabilitiesItem>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub withdrawn_at: ::std::option::Option<::std::string::String>,
}
#[doc = "`SecurityAdvisoryUpdatedSecurityAdvisoryCvss`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryUpdatedSecurityAdvisoryCvss {
pub score: f64,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub vector_string: ::std::option::Option<::std::string::String>,
}
#[doc = "`SecurityAdvisoryUpdatedSecurityAdvisoryCwesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryUpdatedSecurityAdvisoryCwesItem {
pub cwe_id: ::std::string::String,
pub name: ::std::string::String,
}
#[doc = "`SecurityAdvisoryUpdatedSecurityAdvisoryIdentifiersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryUpdatedSecurityAdvisoryIdentifiersItem {
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub value: ::std::string::String,
}
#[doc = "`SecurityAdvisoryUpdatedSecurityAdvisoryReferencesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryUpdatedSecurityAdvisoryReferencesItem {
pub url: ::std::string::String,
}
#[doc = "`SecurityAdvisoryUpdatedSecurityAdvisoryVulnerabilitiesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryUpdatedSecurityAdvisoryVulnerabilitiesItem {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub first_patched_version: ::std::option::Option<
SecurityAdvisoryUpdatedSecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion,
>,
pub package: SecurityAdvisoryUpdatedSecurityAdvisoryVulnerabilitiesItemPackage,
pub severity: ::std::string::String,
pub vulnerable_version_range: ::std::string::String,
}
#[doc = "`SecurityAdvisoryUpdatedSecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryUpdatedSecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion {
pub identifier: ::std::string::String,
}
#[doc = "`SecurityAdvisoryUpdatedSecurityAdvisoryVulnerabilitiesItemPackage`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryUpdatedSecurityAdvisoryVulnerabilitiesItemPackage {
pub ecosystem: ::std::string::String,
pub name: ::std::string::String,
}
#[doc = "`SecurityAdvisoryWithdrawn`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryWithdrawn {
pub action: SecurityAdvisoryWithdrawnAction,
pub security_advisory: SecurityAdvisoryWithdrawnSecurityAdvisory,
}
#[doc = "`SecurityAdvisoryWithdrawnAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SecurityAdvisoryWithdrawnAction {
#[serde(rename = "withdrawn")]
Withdrawn,
}
impl ::std::fmt::Display for SecurityAdvisoryWithdrawnAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Withdrawn => f.write_str("withdrawn"),
}
}
}
impl ::std::str::FromStr for SecurityAdvisoryWithdrawnAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"withdrawn" => Ok(Self::Withdrawn),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SecurityAdvisoryWithdrawnAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SecurityAdvisoryWithdrawnAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The details of the security advisory, including summary, description, and severity."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryWithdrawnSecurityAdvisory {
pub cvss: SecurityAdvisoryWithdrawnSecurityAdvisoryCvss,
pub cwes: ::std::vec::Vec<SecurityAdvisoryWithdrawnSecurityAdvisoryCwesItem>,
pub description: ::std::string::String,
pub ghsa_id: ::std::string::String,
pub identifiers: ::std::vec::Vec<SecurityAdvisoryWithdrawnSecurityAdvisoryIdentifiersItem>,
pub published_at: ::std::string::String,
pub references: ::std::vec::Vec<SecurityAdvisoryWithdrawnSecurityAdvisoryReferencesItem>,
pub severity: ::std::string::String,
pub summary: ::std::string::String,
pub updated_at: ::std::string::String,
pub vulnerabilities:
::std::vec::Vec<SecurityAdvisoryWithdrawnSecurityAdvisoryVulnerabilitiesItem>,
pub withdrawn_at: ::std::string::String,
}
#[doc = "`SecurityAdvisoryWithdrawnSecurityAdvisoryCvss`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryWithdrawnSecurityAdvisoryCvss {
pub score: f64,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub vector_string: ::std::option::Option<::std::string::String>,
}
#[doc = "`SecurityAdvisoryWithdrawnSecurityAdvisoryCwesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryWithdrawnSecurityAdvisoryCwesItem {
pub cwe_id: ::std::string::String,
pub name: ::std::string::String,
}
#[doc = "`SecurityAdvisoryWithdrawnSecurityAdvisoryIdentifiersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryWithdrawnSecurityAdvisoryIdentifiersItem {
#[serde(rename = "type")]
pub type_: ::std::string::String,
pub value: ::std::string::String,
}
#[doc = "`SecurityAdvisoryWithdrawnSecurityAdvisoryReferencesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryWithdrawnSecurityAdvisoryReferencesItem {
pub url: ::std::string::String,
}
#[doc = "`SecurityAdvisoryWithdrawnSecurityAdvisoryVulnerabilitiesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryWithdrawnSecurityAdvisoryVulnerabilitiesItem {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub first_patched_version: ::std::option::Option<
SecurityAdvisoryWithdrawnSecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion,
>,
pub package: SecurityAdvisoryWithdrawnSecurityAdvisoryVulnerabilitiesItemPackage,
pub severity: ::std::string::String,
pub vulnerable_version_range: ::std::string::String,
}
#[doc = "`SecurityAdvisoryWithdrawnSecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryWithdrawnSecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion {
pub identifier: ::std::string::String,
}
#[doc = "`SecurityAdvisoryWithdrawnSecurityAdvisoryVulnerabilitiesItemPackage`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SecurityAdvisoryWithdrawnSecurityAdvisoryVulnerabilitiesItemPackage {
pub ecosystem: ::std::string::String,
pub name: ::std::string::String,
}
#[doc = "`SimplePullRequest`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SimplePullRequest {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub active_lock_reason: ::std::option::Option<SimplePullRequestActiveLockReason>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub assignee: ::std::option::Option<User>,
pub assignees: ::std::vec::Vec<User>,
pub author_association: AuthorAssociation,
pub auto_merge: (),
pub base: SimplePullRequestBase,
pub body: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub closed_at: ::std::option::Option<::std::string::String>,
pub comments_url: ::std::string::String,
pub commits_url: ::std::string::String,
pub created_at: ::std::string::String,
pub diff_url: ::std::string::String,
pub draft: bool,
pub head: SimplePullRequestHead,
pub html_url: ::std::string::String,
pub id: i64,
pub issue_url: ::std::string::String,
pub labels: ::std::vec::Vec<Label>,
#[serde(rename = "_links")]
pub links: SimplePullRequestLinks,
pub locked: bool,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merge_commit_sha: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub merged_at: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub milestone: ::std::option::Option<Milestone>,
pub node_id: ::std::string::String,
pub number: i64,
pub patch_url: ::std::string::String,
pub requested_reviewers: ::std::vec::Vec<SimplePullRequestRequestedReviewersItem>,
pub requested_teams: ::std::vec::Vec<Team>,
pub review_comment_url: ::std::string::String,
pub review_comments_url: ::std::string::String,
pub state: SimplePullRequestState,
pub statuses_url: ::std::string::String,
pub title: ::std::string::String,
pub updated_at: ::std::string::String,
pub url: ::std::string::String,
pub user: User,
}
#[doc = "`SimplePullRequestActiveLockReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SimplePullRequestActiveLockReason {
#[serde(rename = "resolved")]
Resolved,
#[serde(rename = "off-topic")]
OffTopic,
#[serde(rename = "too heated")]
TooHeated,
#[serde(rename = "spam")]
Spam,
}
impl ::std::fmt::Display for SimplePullRequestActiveLockReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Resolved => f.write_str("resolved"),
Self::OffTopic => f.write_str("off-topic"),
Self::TooHeated => f.write_str("too heated"),
Self::Spam => f.write_str("spam"),
}
}
}
impl ::std::str::FromStr for SimplePullRequestActiveLockReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"resolved" => Ok(Self::Resolved),
"off-topic" => Ok(Self::OffTopic),
"too heated" => Ok(Self::TooHeated),
"spam" => Ok(Self::Spam),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SimplePullRequestActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SimplePullRequestActiveLockReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`SimplePullRequestBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SimplePullRequestBase {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`SimplePullRequestHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SimplePullRequestHead {
pub label: ::std::string::String,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: Repository,
pub sha: ::std::string::String,
pub user: User,
}
#[doc = "`SimplePullRequestLinks`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SimplePullRequestLinks {
pub comments: Link,
pub commits: Link,
pub html: Link,
pub issue: Link,
pub review_comment: Link,
pub review_comments: Link,
#[serde(rename = "self")]
pub self_: Link,
pub statuses: Link,
}
#[doc = "`SimplePullRequestRequestedReviewersItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum SimplePullRequestRequestedReviewersItem {
User(User),
Team(Team),
}
impl ::std::convert::From<User> for SimplePullRequestRequestedReviewersItem {
fn from(value: User) -> Self {
Self::User(value)
}
}
impl ::std::convert::From<Team> for SimplePullRequestRequestedReviewersItem {
fn from(value: Team) -> Self {
Self::Team(value)
}
}
#[doc = "`SimplePullRequestState`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SimplePullRequestState {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl ::std::fmt::Display for SimplePullRequestState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
}
}
}
impl ::std::str::FromStr for SimplePullRequestState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SimplePullRequestState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SimplePullRequestState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`SponsorshipCancelled`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipCancelled {
pub action: SponsorshipCancelledAction,
pub sender: User,
pub sponsorship: SponsorshipCancelledSponsorship,
}
#[doc = "`SponsorshipCancelledAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SponsorshipCancelledAction {
#[serde(rename = "cancelled")]
Cancelled,
}
impl ::std::fmt::Display for SponsorshipCancelledAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Cancelled => f.write_str("cancelled"),
}
}
}
impl ::std::str::FromStr for SponsorshipCancelledAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"cancelled" => Ok(Self::Cancelled),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SponsorshipCancelledAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SponsorshipCancelledAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`SponsorshipCancelledSponsorship`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipCancelledSponsorship {
pub created_at: ::std::string::String,
pub node_id: ::std::string::String,
pub privacy_level: ::std::string::String,
pub sponsor: User,
pub sponsorable: User,
pub tier: SponsorshipTier,
}
#[doc = "`SponsorshipCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipCreated {
pub action: SponsorshipCreatedAction,
pub sender: User,
pub sponsorship: SponsorshipCreatedSponsorship,
}
#[doc = "`SponsorshipCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SponsorshipCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for SponsorshipCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for SponsorshipCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SponsorshipCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SponsorshipCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`SponsorshipCreatedSponsorship`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipCreatedSponsorship {
pub created_at: ::std::string::String,
pub node_id: ::std::string::String,
pub privacy_level: ::std::string::String,
pub sponsor: User,
pub sponsorable: User,
pub tier: SponsorshipTier,
}
#[doc = "`SponsorshipEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipEdited {
pub action: SponsorshipEditedAction,
pub changes: SponsorshipEditedChanges,
pub sender: User,
pub sponsorship: SponsorshipEditedSponsorship,
}
#[doc = "`SponsorshipEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SponsorshipEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for SponsorshipEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for SponsorshipEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SponsorshipEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SponsorshipEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`SponsorshipEditedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub privacy_level: ::std::option::Option<SponsorshipEditedChangesPrivacyLevel>,
}
#[doc = "`SponsorshipEditedChangesPrivacyLevel`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipEditedChangesPrivacyLevel {
#[doc = "The `edited` event types include the details about the change when someone edits a sponsorship to change the privacy."]
pub from: ::std::string::String,
}
#[doc = "`SponsorshipEditedSponsorship`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipEditedSponsorship {
pub created_at: ::std::string::String,
pub node_id: ::std::string::String,
pub privacy_level: ::std::string::String,
pub sponsor: User,
pub sponsorable: User,
pub tier: SponsorshipTier,
}
#[doc = "`SponsorshipEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum SponsorshipEvent {
Cancelled(SponsorshipCancelled),
Created(SponsorshipCreated),
Edited(SponsorshipEdited),
PendingCancellation(SponsorshipPendingCancellation),
PendingTierChange(SponsorshipPendingTierChange),
TierChanged(SponsorshipTierChanged),
}
impl ::std::convert::From<SponsorshipCancelled> for SponsorshipEvent {
fn from(value: SponsorshipCancelled) -> Self {
Self::Cancelled(value)
}
}
impl ::std::convert::From<SponsorshipCreated> for SponsorshipEvent {
fn from(value: SponsorshipCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<SponsorshipEdited> for SponsorshipEvent {
fn from(value: SponsorshipEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<SponsorshipPendingCancellation> for SponsorshipEvent {
fn from(value: SponsorshipPendingCancellation) -> Self {
Self::PendingCancellation(value)
}
}
impl ::std::convert::From<SponsorshipPendingTierChange> for SponsorshipEvent {
fn from(value: SponsorshipPendingTierChange) -> Self {
Self::PendingTierChange(value)
}
}
impl ::std::convert::From<SponsorshipTierChanged> for SponsorshipEvent {
fn from(value: SponsorshipTierChanged) -> Self {
Self::TierChanged(value)
}
}
#[doc = "`SponsorshipPendingCancellation`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipPendingCancellation {
pub action: SponsorshipPendingCancellationAction,
#[doc = "The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub effective_date: ::std::option::Option<::std::string::String>,
pub sender: User,
pub sponsorship: SponsorshipPendingCancellationSponsorship,
}
#[doc = "`SponsorshipPendingCancellationAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SponsorshipPendingCancellationAction {
#[serde(rename = "pending_cancellation")]
PendingCancellation,
}
impl ::std::fmt::Display for SponsorshipPendingCancellationAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::PendingCancellation => f.write_str("pending_cancellation"),
}
}
}
impl ::std::str::FromStr for SponsorshipPendingCancellationAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pending_cancellation" => Ok(Self::PendingCancellation),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SponsorshipPendingCancellationAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SponsorshipPendingCancellationAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`SponsorshipPendingCancellationSponsorship`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipPendingCancellationSponsorship {
pub created_at: ::std::string::String,
pub node_id: ::std::string::String,
pub privacy_level: ::std::string::String,
pub sponsor: User,
pub sponsorable: User,
pub tier: SponsorshipTier,
}
#[doc = "`SponsorshipPendingTierChange`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipPendingTierChange {
pub action: SponsorshipPendingTierChangeAction,
pub changes: SponsorshipPendingTierChangeChanges,
#[doc = "The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub effective_date: ::std::option::Option<::std::string::String>,
pub sender: User,
pub sponsorship: SponsorshipPendingTierChangeSponsorship,
}
#[doc = "`SponsorshipPendingTierChangeAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SponsorshipPendingTierChangeAction {
#[serde(rename = "pending_tier_change")]
PendingTierChange,
}
impl ::std::fmt::Display for SponsorshipPendingTierChangeAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::PendingTierChange => f.write_str("pending_tier_change"),
}
}
}
impl ::std::str::FromStr for SponsorshipPendingTierChangeAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pending_tier_change" => Ok(Self::PendingTierChange),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SponsorshipPendingTierChangeAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SponsorshipPendingTierChangeAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`SponsorshipPendingTierChangeChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipPendingTierChangeChanges {
pub tier: SponsorshipPendingTierChangeChangesTier,
}
#[doc = "`SponsorshipPendingTierChangeChangesTier`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipPendingTierChangeChangesTier {
pub from: SponsorshipTier,
}
#[doc = "`SponsorshipPendingTierChangeSponsorship`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipPendingTierChangeSponsorship {
pub created_at: ::std::string::String,
pub node_id: ::std::string::String,
pub privacy_level: ::std::string::String,
pub sponsor: User,
pub sponsorable: User,
pub tier: SponsorshipTier,
}
#[doc = "The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipTier {
pub created_at: ::std::string::String,
pub description: ::std::string::String,
pub is_custom_ammount: bool,
pub is_one_time: bool,
pub monthly_price_in_cents: i64,
pub monthly_price_in_dollars: i64,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
}
#[doc = "`SponsorshipTierChanged`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipTierChanged {
pub action: SponsorshipTierChangedAction,
pub changes: SponsorshipTierChangedChanges,
pub sender: User,
pub sponsorship: SponsorshipTierChangedSponsorship,
}
#[doc = "`SponsorshipTierChangedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum SponsorshipTierChangedAction {
#[serde(rename = "tier_changed")]
TierChanged,
}
impl ::std::fmt::Display for SponsorshipTierChangedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::TierChanged => f.write_str("tier_changed"),
}
}
}
impl ::std::str::FromStr for SponsorshipTierChangedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"tier_changed" => Ok(Self::TierChanged),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for SponsorshipTierChangedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for SponsorshipTierChangedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`SponsorshipTierChangedChanges`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipTierChangedChanges {
pub tier: SponsorshipTierChangedChangesTier,
}
#[doc = "`SponsorshipTierChangedChangesTier`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipTierChangedChangesTier {
pub from: SponsorshipTier,
}
#[doc = "`SponsorshipTierChangedSponsorship`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct SponsorshipTierChangedSponsorship {
pub created_at: ::std::string::String,
pub node_id: ::std::string::String,
pub privacy_level: ::std::string::String,
pub sponsor: User,
pub sponsorable: User,
pub tier: SponsorshipTier,
}
#[doc = "`StarCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StarCreated {
pub action: StarCreatedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
#[doc = "The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action."]
pub starred_at: ::std::string::String,
}
#[doc = "`StarCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum StarCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for StarCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for StarCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for StarCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for StarCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`StarDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StarDeleted {
pub action: StarDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
#[doc = "The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action."]
pub starred_at: (),
}
#[doc = "`StarDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum StarDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for StarDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for StarDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for StarDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for StarDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`StarEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum StarEvent {
Created(StarCreated),
Deleted(StarDeleted),
}
impl ::std::convert::From<StarCreated> for StarEvent {
fn from(value: StarCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<StarDeleted> for StarEvent {
fn from(value: StarDeleted) -> Self {
Self::Deleted(value)
}
}
#[doc = "`StatusEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StatusEvent {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub avatar_url: ::std::option::Option<::std::string::String>,
#[doc = "An array of branch objects containing the status' SHA. Each branch contains the given SHA, but the SHA may or may not be the head of the branch. The array includes a maximum of 10 branches."]
pub branches: ::std::vec::Vec<StatusEventBranchesItem>,
pub commit: StatusEventCommit,
pub context: ::std::string::String,
pub created_at: ::std::string::String,
#[doc = "The optional human-readable description added to the status."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
#[doc = "The unique identifier of the status."]
pub id: i64,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
#[doc = "The Commit SHA."]
pub sha: ::std::string::String,
#[doc = "The new state. Can be `pending`, `success`, `failure`, or `error`."]
pub state: StatusEventState,
#[doc = "The optional link added to the status."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub target_url: ::std::option::Option<::std::string::String>,
pub updated_at: ::std::string::String,
}
#[doc = "`StatusEventBranchesItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StatusEventBranchesItem {
pub commit: StatusEventBranchesItemCommit,
pub name: ::std::string::String,
pub protected: bool,
}
#[doc = "`StatusEventBranchesItemCommit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StatusEventBranchesItemCommit {
pub sha: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`StatusEventCommit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StatusEventCommit {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub author: ::std::option::Option<User>,
pub comments_url: ::std::string::String,
pub commit: StatusEventCommitCommit,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub committer: ::std::option::Option<User>,
pub html_url: ::std::string::String,
pub node_id: ::std::string::String,
pub parents: ::std::vec::Vec<StatusEventCommitParentsItem>,
pub sha: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`StatusEventCommitCommit`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StatusEventCommitCommit {
pub author: StatusEventCommitCommitAuthor,
pub comment_count: i64,
pub committer: StatusEventCommitCommitCommitter,
pub message: ::std::string::String,
pub tree: StatusEventCommitCommitTree,
pub url: ::std::string::String,
pub verification: StatusEventCommitCommitVerification,
}
#[doc = "`StatusEventCommitCommitAuthor`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StatusEventCommitCommitAuthor {
pub date: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The git author's email address."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub email: ::std::option::Option<::std::string::String>,
#[doc = "The git author's name."]
pub name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub username: ::std::option::Option<::std::string::String>,
}
#[doc = "`StatusEventCommitCommitCommitter`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StatusEventCommitCommitCommitter {
pub date: ::chrono::DateTime<::chrono::offset::Utc>,
#[doc = "The git author's email address."]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub email: ::std::option::Option<::std::string::String>,
#[doc = "The git author's name."]
pub name: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub username: ::std::option::Option<::std::string::String>,
}
#[doc = "`StatusEventCommitCommitTree`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StatusEventCommitCommitTree {
pub sha: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`StatusEventCommitCommitVerification`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StatusEventCommitCommitVerification {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub payload: ::std::option::Option<::std::string::String>,
pub reason: StatusEventCommitCommitVerificationReason,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub signature: ::std::option::Option<::std::string::String>,
pub verified: bool,
}
#[doc = "`StatusEventCommitCommitVerificationReason`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum StatusEventCommitCommitVerificationReason {
#[serde(rename = "expired_key")]
ExpiredKey,
#[serde(rename = "not_signing_key")]
NotSigningKey,
#[serde(rename = "gpgverify_error")]
GpgverifyError,
#[serde(rename = "gpgverify_unavailable")]
GpgverifyUnavailable,
#[serde(rename = "unsigned")]
Unsigned,
#[serde(rename = "unknown_signature_type")]
UnknownSignatureType,
#[serde(rename = "no_user")]
NoUser,
#[serde(rename = "unverified_email")]
UnverifiedEmail,
#[serde(rename = "bad_email")]
BadEmail,
#[serde(rename = "unknown_key")]
UnknownKey,
#[serde(rename = "malformed_signature")]
MalformedSignature,
#[serde(rename = "invalid")]
Invalid,
#[serde(rename = "valid")]
Valid,
}
impl ::std::fmt::Display for StatusEventCommitCommitVerificationReason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::ExpiredKey => f.write_str("expired_key"),
Self::NotSigningKey => f.write_str("not_signing_key"),
Self::GpgverifyError => f.write_str("gpgverify_error"),
Self::GpgverifyUnavailable => f.write_str("gpgverify_unavailable"),
Self::Unsigned => f.write_str("unsigned"),
Self::UnknownSignatureType => f.write_str("unknown_signature_type"),
Self::NoUser => f.write_str("no_user"),
Self::UnverifiedEmail => f.write_str("unverified_email"),
Self::BadEmail => f.write_str("bad_email"),
Self::UnknownKey => f.write_str("unknown_key"),
Self::MalformedSignature => f.write_str("malformed_signature"),
Self::Invalid => f.write_str("invalid"),
Self::Valid => f.write_str("valid"),
}
}
}
impl ::std::str::FromStr for StatusEventCommitCommitVerificationReason {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"expired_key" => Ok(Self::ExpiredKey),
"not_signing_key" => Ok(Self::NotSigningKey),
"gpgverify_error" => Ok(Self::GpgverifyError),
"gpgverify_unavailable" => Ok(Self::GpgverifyUnavailable),
"unsigned" => Ok(Self::Unsigned),
"unknown_signature_type" => Ok(Self::UnknownSignatureType),
"no_user" => Ok(Self::NoUser),
"unverified_email" => Ok(Self::UnverifiedEmail),
"bad_email" => Ok(Self::BadEmail),
"unknown_key" => Ok(Self::UnknownKey),
"malformed_signature" => Ok(Self::MalformedSignature),
"invalid" => Ok(Self::Invalid),
"valid" => Ok(Self::Valid),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for StatusEventCommitCommitVerificationReason {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for StatusEventCommitCommitVerificationReason {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`StatusEventCommitParentsItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct StatusEventCommitParentsItem {
pub html_url: ::std::string::String,
pub sha: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "The new state. Can be `pending`, `success`, `failure`, or `error`."]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum StatusEventState {
#[serde(rename = "pending")]
Pending,
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "error")]
Error,
}
impl ::std::fmt::Display for StatusEventState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Pending => f.write_str("pending"),
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Error => f.write_str("error"),
}
}
}
impl ::std::str::FromStr for StatusEventState {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"pending" => Ok(Self::Pending),
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"error" => Ok(Self::Error),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for StatusEventState {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for StatusEventState {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "Groups of organization members that gives permissions on specified repositories."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Team {
#[doc = "Description of the team"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the team"]
pub id: i64,
pub members_url: ::std::string::String,
#[doc = "Name of the team"]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub parent: ::std::option::Option<TeamParent>,
#[doc = "Permission that the team will have for its repositories"]
pub permission: ::std::string::String,
pub privacy: TeamPrivacy,
pub repositories_url: ::std::string::String,
pub slug: ::std::string::String,
#[doc = "URL for the team"]
pub url: ::std::string::String,
}
#[doc = "`TeamAddEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TeamAddEvent {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub organization: Organization,
pub repository: Repository,
pub sender: User,
pub team: Team,
}
#[doc = "`TeamAddedToRepository`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TeamAddedToRepository {
pub action: TeamAddedToRepositoryAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub organization: Organization,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository: ::std::option::Option<Repository>,
pub sender: User,
pub team: Team,
}
#[doc = "`TeamAddedToRepositoryAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TeamAddedToRepositoryAction {
#[serde(rename = "added_to_repository")]
AddedToRepository,
}
impl ::std::fmt::Display for TeamAddedToRepositoryAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::AddedToRepository => f.write_str("added_to_repository"),
}
}
}
impl ::std::str::FromStr for TeamAddedToRepositoryAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"added_to_repository" => Ok(Self::AddedToRepository),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TeamAddedToRepositoryAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TeamAddedToRepositoryAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TeamCreated`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TeamCreated {
pub action: TeamCreatedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub organization: Organization,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository: ::std::option::Option<Repository>,
pub sender: User,
pub team: Team,
}
#[doc = "`TeamCreatedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TeamCreatedAction {
#[serde(rename = "created")]
Created,
}
impl ::std::fmt::Display for TeamCreatedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Created => f.write_str("created"),
}
}
}
impl ::std::str::FromStr for TeamCreatedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"created" => Ok(Self::Created),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TeamCreatedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TeamCreatedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TeamDeleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TeamDeleted {
pub action: TeamDeletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub organization: Organization,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository: ::std::option::Option<Repository>,
pub sender: User,
pub team: Team,
}
#[doc = "`TeamDeletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TeamDeletedAction {
#[serde(rename = "deleted")]
Deleted,
}
impl ::std::fmt::Display for TeamDeletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Deleted => f.write_str("deleted"),
}
}
}
impl ::std::str::FromStr for TeamDeletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"deleted" => Ok(Self::Deleted),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TeamDeletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TeamDeletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TeamEdited`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TeamEdited {
pub action: TeamEditedAction,
pub changes: TeamEditedChanges,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub organization: Organization,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository: ::std::option::Option<Repository>,
pub sender: User,
pub team: Team,
}
#[doc = "`TeamEditedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TeamEditedAction {
#[serde(rename = "edited")]
Edited,
}
impl ::std::fmt::Display for TeamEditedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Edited => f.write_str("edited"),
}
}
}
impl ::std::str::FromStr for TeamEditedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"edited" => Ok(Self::Edited),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TeamEditedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TeamEditedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "The changes to the team if the action was `edited`."]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct TeamEditedChanges {
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub description: ::std::option::Option<TeamEditedChangesDescription>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<TeamEditedChangesName>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub privacy: ::std::option::Option<TeamEditedChangesPrivacy>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository: ::std::option::Option<TeamEditedChangesRepository>,
}
#[doc = "`TeamEditedChangesDescription`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TeamEditedChangesDescription {
#[doc = "The previous version of the description if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`TeamEditedChangesName`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TeamEditedChangesName {
#[doc = "The previous version of the name if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`TeamEditedChangesPrivacy`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TeamEditedChangesPrivacy {
#[doc = "The previous version of the team's privacy if the action was `edited`."]
pub from: ::std::string::String,
}
#[doc = "`TeamEditedChangesRepository`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TeamEditedChangesRepository {
pub permissions: TeamEditedChangesRepositoryPermissions,
}
#[doc = "`TeamEditedChangesRepositoryPermissions`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TeamEditedChangesRepositoryPermissions {
pub from: TeamEditedChangesRepositoryPermissionsFrom,
}
#[doc = "`TeamEditedChangesRepositoryPermissionsFrom`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct TeamEditedChangesRepositoryPermissionsFrom {
#[doc = "The previous version of the team member's `admin` permission on a repository, if the action was `edited`."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub admin: ::std::option::Option<bool>,
#[doc = "The previous version of the team member's `pull` permission on a repository, if the action was `edited`."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub pull: ::std::option::Option<bool>,
#[doc = "The previous version of the team member's `push` permission on a repository, if the action was `edited`."]
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub push: ::std::option::Option<bool>,
}
#[doc = "`TeamEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum TeamEvent {
AddedToRepository(TeamAddedToRepository),
Created(TeamCreated),
Deleted(TeamDeleted),
Edited(TeamEdited),
RemovedFromRepository(TeamRemovedFromRepository),
}
impl ::std::convert::From<TeamAddedToRepository> for TeamEvent {
fn from(value: TeamAddedToRepository) -> Self {
Self::AddedToRepository(value)
}
}
impl ::std::convert::From<TeamCreated> for TeamEvent {
fn from(value: TeamCreated) -> Self {
Self::Created(value)
}
}
impl ::std::convert::From<TeamDeleted> for TeamEvent {
fn from(value: TeamDeleted) -> Self {
Self::Deleted(value)
}
}
impl ::std::convert::From<TeamEdited> for TeamEvent {
fn from(value: TeamEdited) -> Self {
Self::Edited(value)
}
}
impl ::std::convert::From<TeamRemovedFromRepository> for TeamEvent {
fn from(value: TeamRemovedFromRepository) -> Self {
Self::RemovedFromRepository(value)
}
}
#[doc = "`TeamParent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TeamParent {
#[doc = "Description of the team"]
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub description: ::std::option::Option<::std::string::String>,
pub html_url: ::std::string::String,
#[doc = "Unique identifier of the team"]
pub id: i64,
pub members_url: ::std::string::String,
#[doc = "Name of the team"]
pub name: ::std::string::String,
pub node_id: ::std::string::String,
#[doc = "Permission that the team will have for its repositories"]
pub permission: ::std::string::String,
pub privacy: TeamParentPrivacy,
pub repositories_url: ::std::string::String,
pub slug: ::std::string::String,
#[doc = "URL for the team"]
pub url: ::std::string::String,
}
#[doc = "`TeamParentPrivacy`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TeamParentPrivacy {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
#[serde(rename = "secret")]
Secret,
}
impl ::std::fmt::Display for TeamParentPrivacy {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
Self::Secret => f.write_str("secret"),
}
}
}
impl ::std::str::FromStr for TeamParentPrivacy {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
"secret" => Ok(Self::Secret),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TeamParentPrivacy {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TeamParentPrivacy {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TeamPrivacy`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TeamPrivacy {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
#[serde(rename = "secret")]
Secret,
}
impl ::std::fmt::Display for TeamPrivacy {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Open => f.write_str("open"),
Self::Closed => f.write_str("closed"),
Self::Secret => f.write_str("secret"),
}
}
}
impl ::std::str::FromStr for TeamPrivacy {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"open" => Ok(Self::Open),
"closed" => Ok(Self::Closed),
"secret" => Ok(Self::Secret),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TeamPrivacy {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TeamPrivacy {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`TeamRemovedFromRepository`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct TeamRemovedFromRepository {
pub action: TeamRemovedFromRepositoryAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
pub organization: Organization,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub repository: ::std::option::Option<Repository>,
pub sender: User,
pub team: Team,
}
#[doc = "`TeamRemovedFromRepositoryAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum TeamRemovedFromRepositoryAction {
#[serde(rename = "removed_from_repository")]
RemovedFromRepository,
}
impl ::std::fmt::Display for TeamRemovedFromRepositoryAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::RemovedFromRepository => f.write_str("removed_from_repository"),
}
}
}
impl ::std::str::FromStr for TeamRemovedFromRepositoryAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"removed_from_repository" => Ok(Self::RemovedFromRepository),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for TeamRemovedFromRepositoryAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for TeamRemovedFromRepositoryAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`User`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct User {
pub avatar_url: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub email: ::std::option::Option<::std::string::String>,
pub events_url: ::std::string::String,
pub followers_url: ::std::string::String,
pub following_url: ::std::string::String,
pub gists_url: ::std::string::String,
pub gravatar_id: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub login: ::std::string::String,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub name: ::std::option::Option<::std::string::String>,
pub node_id: ::std::string::String,
pub organizations_url: ::std::string::String,
pub received_events_url: ::std::string::String,
pub repos_url: ::std::string::String,
pub site_admin: bool,
pub starred_url: ::std::string::String,
pub subscriptions_url: ::std::string::String,
#[serde(rename = "type")]
pub type_: UserType,
pub url: ::std::string::String,
}
#[doc = "`UserType`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum UserType {
Bot,
User,
Organization,
}
impl ::std::fmt::Display for UserType {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Bot => f.write_str("Bot"),
Self::User => f.write_str("User"),
Self::Organization => f.write_str("Organization"),
}
}
}
impl ::std::str::FromStr for UserType {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"Bot" => Ok(Self::Bot),
"User" => Ok(Self::User),
"Organization" => Ok(Self::Organization),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for UserType {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for UserType {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WatchEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct WatchEvent(pub WatchStarted);
impl ::std::ops::Deref for WatchEvent {
type Target = WatchStarted;
fn deref(&self) -> &WatchStarted {
&self.0
}
}
impl ::std::convert::From<WatchEvent> for WatchStarted {
fn from(value: WatchEvent) -> Self {
value.0
}
}
impl ::std::convert::From<WatchStarted> for WatchEvent {
fn from(value: WatchStarted) -> Self {
Self(value)
}
}
#[doc = "`WatchStarted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WatchStarted {
pub action: WatchStartedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
}
#[doc = "`WatchStartedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WatchStartedAction {
#[serde(rename = "started")]
Started,
}
impl ::std::fmt::Display for WatchStartedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Started => f.write_str("started"),
}
}
}
impl ::std::str::FromStr for WatchStartedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"started" => Ok(Self::Started),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WatchStartedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WatchStartedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WebhookEvents`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WebhookEvents {
Variant0(::std::vec::Vec<WebhookEventsVariant0Item>),
Variant1([::std::string::String; 1usize]),
}
impl ::std::convert::From<::std::vec::Vec<WebhookEventsVariant0Item>> for WebhookEvents {
fn from(value: ::std::vec::Vec<WebhookEventsVariant0Item>) -> Self {
Self::Variant0(value)
}
}
impl ::std::convert::From<[::std::string::String; 1usize]> for WebhookEvents {
fn from(value: [::std::string::String; 1usize]) -> Self {
Self::Variant1(value)
}
}
#[doc = "`WebhookEventsVariant0Item`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WebhookEventsVariant0Item {
#[serde(rename = "check_run")]
CheckRun,
#[serde(rename = "check_suite")]
CheckSuite,
#[serde(rename = "code_scanning_alert")]
CodeScanningAlert,
#[serde(rename = "commit_comment")]
CommitComment,
#[serde(rename = "content_reference")]
ContentReference,
#[serde(rename = "create")]
Create,
#[serde(rename = "delete")]
Delete,
#[serde(rename = "deployment")]
Deployment,
#[serde(rename = "deployment_review")]
DeploymentReview,
#[serde(rename = "deployment_status")]
DeploymentStatus,
#[serde(rename = "deploy_key")]
DeployKey,
#[serde(rename = "discussion")]
Discussion,
#[serde(rename = "discussion_comment")]
DiscussionComment,
#[serde(rename = "fork")]
Fork,
#[serde(rename = "gollum")]
Gollum,
#[serde(rename = "issues")]
Issues,
#[serde(rename = "issue_comment")]
IssueComment,
#[serde(rename = "label")]
Label,
#[serde(rename = "member")]
Member,
#[serde(rename = "membership")]
Membership,
#[serde(rename = "meta")]
Meta,
#[serde(rename = "milestone")]
Milestone,
#[serde(rename = "organization")]
Organization,
#[serde(rename = "org_block")]
OrgBlock,
#[serde(rename = "page_build")]
PageBuild,
#[serde(rename = "project")]
Project,
#[serde(rename = "project_card")]
ProjectCard,
#[serde(rename = "project_column")]
ProjectColumn,
#[serde(rename = "public")]
Public,
#[serde(rename = "pull_request")]
PullRequest,
#[serde(rename = "pull_request_review")]
PullRequestReview,
#[serde(rename = "pull_request_review_comment")]
PullRequestReviewComment,
#[serde(rename = "push")]
Push,
#[serde(rename = "registry_package")]
RegistryPackage,
#[serde(rename = "release")]
Release,
#[serde(rename = "repository")]
Repository,
#[serde(rename = "repository_dispatch")]
RepositoryDispatch,
#[serde(rename = "repository_import")]
RepositoryImport,
#[serde(rename = "repository_vulnerability_alert")]
RepositoryVulnerabilityAlert,
#[serde(rename = "secret_scanning_alert")]
SecretScanningAlert,
#[serde(rename = "star")]
Star,
#[serde(rename = "status")]
Status,
#[serde(rename = "team")]
Team,
#[serde(rename = "team_add")]
TeamAdd,
#[serde(rename = "watch")]
Watch,
#[serde(rename = "workflow_dispatch")]
WorkflowDispatch,
#[serde(rename = "workflow_run")]
WorkflowRun,
}
impl ::std::fmt::Display for WebhookEventsVariant0Item {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::CheckRun => f.write_str("check_run"),
Self::CheckSuite => f.write_str("check_suite"),
Self::CodeScanningAlert => f.write_str("code_scanning_alert"),
Self::CommitComment => f.write_str("commit_comment"),
Self::ContentReference => f.write_str("content_reference"),
Self::Create => f.write_str("create"),
Self::Delete => f.write_str("delete"),
Self::Deployment => f.write_str("deployment"),
Self::DeploymentReview => f.write_str("deployment_review"),
Self::DeploymentStatus => f.write_str("deployment_status"),
Self::DeployKey => f.write_str("deploy_key"),
Self::Discussion => f.write_str("discussion"),
Self::DiscussionComment => f.write_str("discussion_comment"),
Self::Fork => f.write_str("fork"),
Self::Gollum => f.write_str("gollum"),
Self::Issues => f.write_str("issues"),
Self::IssueComment => f.write_str("issue_comment"),
Self::Label => f.write_str("label"),
Self::Member => f.write_str("member"),
Self::Membership => f.write_str("membership"),
Self::Meta => f.write_str("meta"),
Self::Milestone => f.write_str("milestone"),
Self::Organization => f.write_str("organization"),
Self::OrgBlock => f.write_str("org_block"),
Self::PageBuild => f.write_str("page_build"),
Self::Project => f.write_str("project"),
Self::ProjectCard => f.write_str("project_card"),
Self::ProjectColumn => f.write_str("project_column"),
Self::Public => f.write_str("public"),
Self::PullRequest => f.write_str("pull_request"),
Self::PullRequestReview => f.write_str("pull_request_review"),
Self::PullRequestReviewComment => f.write_str("pull_request_review_comment"),
Self::Push => f.write_str("push"),
Self::RegistryPackage => f.write_str("registry_package"),
Self::Release => f.write_str("release"),
Self::Repository => f.write_str("repository"),
Self::RepositoryDispatch => f.write_str("repository_dispatch"),
Self::RepositoryImport => f.write_str("repository_import"),
Self::RepositoryVulnerabilityAlert => f.write_str("repository_vulnerability_alert"),
Self::SecretScanningAlert => f.write_str("secret_scanning_alert"),
Self::Star => f.write_str("star"),
Self::Status => f.write_str("status"),
Self::Team => f.write_str("team"),
Self::TeamAdd => f.write_str("team_add"),
Self::Watch => f.write_str("watch"),
Self::WorkflowDispatch => f.write_str("workflow_dispatch"),
Self::WorkflowRun => f.write_str("workflow_run"),
}
}
}
impl ::std::str::FromStr for WebhookEventsVariant0Item {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"check_run" => Ok(Self::CheckRun),
"check_suite" => Ok(Self::CheckSuite),
"code_scanning_alert" => Ok(Self::CodeScanningAlert),
"commit_comment" => Ok(Self::CommitComment),
"content_reference" => Ok(Self::ContentReference),
"create" => Ok(Self::Create),
"delete" => Ok(Self::Delete),
"deployment" => Ok(Self::Deployment),
"deployment_review" => Ok(Self::DeploymentReview),
"deployment_status" => Ok(Self::DeploymentStatus),
"deploy_key" => Ok(Self::DeployKey),
"discussion" => Ok(Self::Discussion),
"discussion_comment" => Ok(Self::DiscussionComment),
"fork" => Ok(Self::Fork),
"gollum" => Ok(Self::Gollum),
"issues" => Ok(Self::Issues),
"issue_comment" => Ok(Self::IssueComment),
"label" => Ok(Self::Label),
"member" => Ok(Self::Member),
"membership" => Ok(Self::Membership),
"meta" => Ok(Self::Meta),
"milestone" => Ok(Self::Milestone),
"organization" => Ok(Self::Organization),
"org_block" => Ok(Self::OrgBlock),
"page_build" => Ok(Self::PageBuild),
"project" => Ok(Self::Project),
"project_card" => Ok(Self::ProjectCard),
"project_column" => Ok(Self::ProjectColumn),
"public" => Ok(Self::Public),
"pull_request" => Ok(Self::PullRequest),
"pull_request_review" => Ok(Self::PullRequestReview),
"pull_request_review_comment" => Ok(Self::PullRequestReviewComment),
"push" => Ok(Self::Push),
"registry_package" => Ok(Self::RegistryPackage),
"release" => Ok(Self::Release),
"repository" => Ok(Self::Repository),
"repository_dispatch" => Ok(Self::RepositoryDispatch),
"repository_import" => Ok(Self::RepositoryImport),
"repository_vulnerability_alert" => Ok(Self::RepositoryVulnerabilityAlert),
"secret_scanning_alert" => Ok(Self::SecretScanningAlert),
"star" => Ok(Self::Star),
"status" => Ok(Self::Status),
"team" => Ok(Self::Team),
"team_add" => Ok(Self::TeamAdd),
"watch" => Ok(Self::Watch),
"workflow_dispatch" => Ok(Self::WorkflowDispatch),
"workflow_run" => Ok(Self::WorkflowRun),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WebhookEventsVariant0Item {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WebhookEventsVariant0Item {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`Workflow`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct Workflow {
pub badge_url: ::std::string::String,
pub created_at: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub path: ::std::string::String,
pub state: ::std::string::String,
pub updated_at: ::std::string::String,
pub url: ::std::string::String,
}
#[doc = "`WorkflowDispatchEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowDispatchEvent {
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub inputs:
::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repository: Repository,
pub sender: User,
pub workflow: ::std::string::String,
}
#[doc = "`WorkflowJob`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowJob {
pub check_run_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub completed_at: ::std::option::Option<::std::string::String>,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub conclusion: ::std::option::Option<WorkflowJobConclusion>,
pub head_sha: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub labels: ::std::vec::Vec<::std::string::String>,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub run_id: f64,
pub run_url: ::std::string::String,
pub started_at: ::std::string::String,
pub status: WorkflowJobStatus,
pub steps: ::std::vec::Vec<WorkflowStep>,
pub url: ::std::string::String,
}
#[doc = "`WorkflowJobCompleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowJobCompleted {
pub action: WorkflowJobCompletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
pub workflow_job: WorkflowJobCompletedWorkflowJob,
}
#[doc = "`WorkflowJobCompletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowJobCompletedAction {
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for WorkflowJobCompletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for WorkflowJobCompletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowJobCompletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowJobCompletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowJobCompletedWorkflowJob`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowJobCompletedWorkflowJob {
pub check_run_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub completed_at: ::std::option::Option<::std::string::String>,
pub conclusion: WorkflowJobCompletedWorkflowJobConclusion,
pub head_sha: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub labels: ::std::vec::Vec<::std::string::String>,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub run_id: f64,
pub run_url: ::std::string::String,
pub started_at: ::std::string::String,
pub status: WorkflowJobCompletedWorkflowJobStatus,
pub steps: ::std::vec::Vec<WorkflowStep>,
pub url: ::std::string::String,
}
#[doc = "`WorkflowJobCompletedWorkflowJobConclusion`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowJobCompletedWorkflowJobConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
}
impl ::std::fmt::Display for WorkflowJobCompletedWorkflowJobConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
}
}
}
impl ::std::str::FromStr for WorkflowJobCompletedWorkflowJobConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowJobCompletedWorkflowJobConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowJobCompletedWorkflowJobConclusion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowJobCompletedWorkflowJobStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowJobCompletedWorkflowJobStatus {
#[serde(rename = "queued")]
Queued,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for WorkflowJobCompletedWorkflowJobStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Queued => f.write_str("queued"),
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for WorkflowJobCompletedWorkflowJobStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"queued" => Ok(Self::Queued),
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowJobCompletedWorkflowJobStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowJobCompletedWorkflowJobStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowJobConclusion`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowJobConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
}
impl ::std::fmt::Display for WorkflowJobConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
}
}
}
impl ::std::str::FromStr for WorkflowJobConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowJobConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowJobConclusion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowJobEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WorkflowJobEvent {
Completed(WorkflowJobCompleted),
Queued(WorkflowJobQueued),
Started(WorkflowJobStarted),
}
impl ::std::convert::From<WorkflowJobCompleted> for WorkflowJobEvent {
fn from(value: WorkflowJobCompleted) -> Self {
Self::Completed(value)
}
}
impl ::std::convert::From<WorkflowJobQueued> for WorkflowJobEvent {
fn from(value: WorkflowJobQueued) -> Self {
Self::Queued(value)
}
}
impl ::std::convert::From<WorkflowJobStarted> for WorkflowJobEvent {
fn from(value: WorkflowJobStarted) -> Self {
Self::Started(value)
}
}
#[doc = "`WorkflowJobQueued`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowJobQueued {
pub action: WorkflowJobQueuedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
pub workflow_job: WorkflowJobQueuedWorkflowJob,
}
#[doc = "`WorkflowJobQueuedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowJobQueuedAction {
#[serde(rename = "queued")]
Queued,
}
impl ::std::fmt::Display for WorkflowJobQueuedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Queued => f.write_str("queued"),
}
}
}
impl ::std::str::FromStr for WorkflowJobQueuedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"queued" => Ok(Self::Queued),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowJobQueuedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowJobQueuedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowJobQueuedWorkflowJob`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowJobQueuedWorkflowJob {
pub check_run_url: ::std::string::String,
pub completed_at: (),
pub conclusion: (),
pub head_sha: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub labels: ::std::vec::Vec<::std::string::String>,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub run_id: f64,
pub run_url: ::std::string::String,
pub started_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub status: WorkflowJobQueuedWorkflowJobStatus,
pub steps: ::std::vec::Vec<WorkflowStep>,
pub url: ::std::string::String,
}
#[doc = "`WorkflowJobQueuedWorkflowJobStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowJobQueuedWorkflowJobStatus {
#[serde(rename = "queued")]
Queued,
}
impl ::std::fmt::Display for WorkflowJobQueuedWorkflowJobStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Queued => f.write_str("queued"),
}
}
}
impl ::std::str::FromStr for WorkflowJobQueuedWorkflowJobStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"queued" => Ok(Self::Queued),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowJobQueuedWorkflowJobStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowJobQueuedWorkflowJobStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowJobStarted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowJobStarted {
pub action: WorkflowJobStartedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
pub workflow_job: WorkflowJobStartedWorkflowJob,
}
#[doc = "`WorkflowJobStartedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowJobStartedAction {
#[serde(rename = "started")]
Started,
}
impl ::std::fmt::Display for WorkflowJobStartedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Started => f.write_str("started"),
}
}
}
impl ::std::str::FromStr for WorkflowJobStartedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"started" => Ok(Self::Started),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowJobStartedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowJobStartedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowJobStartedWorkflowJob`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowJobStartedWorkflowJob {
pub check_run_url: ::std::string::String,
pub completed_at: (),
pub conclusion: WorkflowJobStartedWorkflowJobConclusion,
pub head_sha: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub labels: ::std::vec::Vec<::std::string::String>,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub run_id: f64,
pub run_url: ::std::string::String,
pub started_at: ::std::string::String,
pub status: WorkflowJobStartedWorkflowJobStatus,
pub steps: [WorkflowStepInProgress; 1usize],
pub url: ::std::string::String,
}
#[doc = "`WorkflowJobStartedWorkflowJobConclusion`"]
#[derive(:: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct WorkflowJobStartedWorkflowJobConclusion(());
impl ::std::ops::Deref for WorkflowJobStartedWorkflowJobConclusion {
type Target = ();
fn deref(&self) -> &() {
&self.0
}
}
impl ::std::convert::From<WorkflowJobStartedWorkflowJobConclusion> for () {
fn from(value: WorkflowJobStartedWorkflowJobConclusion) -> Self {
value.0
}
}
impl ::std::convert::TryFrom<()> for WorkflowJobStartedWorkflowJobConclusion {
type Error = self::error::ConversionError;
fn try_from(value: ()) -> ::std::result::Result<Self, self::error::ConversionError> {
if ![()].contains(&value) {
Err("invalid value".into())
} else {
Ok(Self(value))
}
}
}
impl<'de> ::serde::Deserialize<'de> for WorkflowJobStartedWorkflowJobConclusion {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
Self::try_from(<()>::deserialize(deserializer)?)
.map_err(|e| <D::Error as ::serde::de::Error>::custom(e.to_string()))
}
}
#[doc = "`WorkflowJobStartedWorkflowJobStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowJobStartedWorkflowJobStatus {
#[serde(rename = "queued")]
Queued,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for WorkflowJobStartedWorkflowJobStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Queued => f.write_str("queued"),
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for WorkflowJobStartedWorkflowJobStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"queued" => Ok(Self::Queued),
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowJobStartedWorkflowJobStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowJobStartedWorkflowJobStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowJobStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowJobStatus {
#[serde(rename = "queued")]
Queued,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for WorkflowJobStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Queued => f.write_str("queued"),
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for WorkflowJobStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"queued" => Ok(Self::Queued),
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowJobStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowJobStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowRun`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowRun {
pub artifacts_url: ::std::string::String,
pub cancel_url: ::std::string::String,
pub check_suite_id: i64,
pub check_suite_node_id: ::std::string::String,
pub check_suite_url: ::std::string::String,
#[serde(deserialize_with = "::std::option::Option::deserialize")]
pub conclusion: ::std::option::Option<WorkflowRunConclusion>,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub event: ::std::string::String,
pub head_branch: ::std::string::String,
pub head_commit: CommitSimple,
pub head_repository: RepositoryLite,
pub head_sha: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub jobs_url: ::std::string::String,
pub logs_url: ::std::string::String,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub pull_requests: ::std::vec::Vec<WorkflowRunPullRequestsItem>,
pub repository: RepositoryLite,
pub rerun_url: ::std::string::String,
pub run_number: i64,
pub status: WorkflowRunStatus,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub workflow_id: i64,
pub workflow_url: ::std::string::String,
}
#[doc = "`WorkflowRunCompleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowRunCompleted {
pub action: WorkflowRunCompletedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
pub workflow: Workflow,
pub workflow_run: WorkflowRunCompletedWorkflowRun,
}
#[doc = "`WorkflowRunCompletedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowRunCompletedAction {
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for WorkflowRunCompletedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for WorkflowRunCompletedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowRunCompletedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowRunCompletedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowRunCompletedWorkflowRun`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowRunCompletedWorkflowRun {
pub artifacts_url: ::std::string::String,
pub cancel_url: ::std::string::String,
pub check_suite_id: i64,
pub check_suite_node_id: ::std::string::String,
pub check_suite_url: ::std::string::String,
pub conclusion: WorkflowRunCompletedWorkflowRunConclusion,
pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub event: ::std::string::String,
pub head_branch: ::std::string::String,
pub head_commit: CommitSimple,
pub head_repository: RepositoryLite,
pub head_sha: ::std::string::String,
pub html_url: ::std::string::String,
pub id: i64,
pub jobs_url: ::std::string::String,
pub logs_url: ::std::string::String,
pub name: ::std::string::String,
pub node_id: ::std::string::String,
pub pull_requests: ::std::vec::Vec<WorkflowRunCompletedWorkflowRunPullRequestsItem>,
pub repository: RepositoryLite,
pub rerun_url: ::std::string::String,
pub run_number: i64,
pub status: WorkflowRunCompletedWorkflowRunStatus,
pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
pub url: ::std::string::String,
pub workflow_id: i64,
pub workflow_url: ::std::string::String,
}
#[doc = "`WorkflowRunCompletedWorkflowRunConclusion`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowRunCompletedWorkflowRunConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
}
impl ::std::fmt::Display for WorkflowRunCompletedWorkflowRunConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
}
}
}
impl ::std::str::FromStr for WorkflowRunCompletedWorkflowRunConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowRunCompletedWorkflowRunConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowRunCompletedWorkflowRunConclusion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowRunCompletedWorkflowRunPullRequestsItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowRunCompletedWorkflowRunPullRequestsItem {
pub base: WorkflowRunCompletedWorkflowRunPullRequestsItemBase,
pub head: WorkflowRunCompletedWorkflowRunPullRequestsItemHead,
pub id: f64,
pub number: f64,
pub url: ::std::string::String,
}
#[doc = "`WorkflowRunCompletedWorkflowRunPullRequestsItemBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowRunCompletedWorkflowRunPullRequestsItemBase {
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: RepoRef,
pub sha: ::std::string::String,
}
#[doc = "`WorkflowRunCompletedWorkflowRunPullRequestsItemHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowRunCompletedWorkflowRunPullRequestsItemHead {
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: RepoRef,
pub sha: ::std::string::String,
}
#[doc = "`WorkflowRunCompletedWorkflowRunStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowRunCompletedWorkflowRunStatus {
#[serde(rename = "requested")]
Requested,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
#[serde(rename = "queued")]
Queued,
}
impl ::std::fmt::Display for WorkflowRunCompletedWorkflowRunStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Requested => f.write_str("requested"),
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
Self::Queued => f.write_str("queued"),
}
}
}
impl ::std::str::FromStr for WorkflowRunCompletedWorkflowRunStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"requested" => Ok(Self::Requested),
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
"queued" => Ok(Self::Queued),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowRunCompletedWorkflowRunStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowRunCompletedWorkflowRunStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowRunConclusion`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowRunConclusion {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "timed_out")]
TimedOut,
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "stale")]
Stale,
}
impl ::std::fmt::Display for WorkflowRunConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Success => f.write_str("success"),
Self::Failure => f.write_str("failure"),
Self::Neutral => f.write_str("neutral"),
Self::Cancelled => f.write_str("cancelled"),
Self::TimedOut => f.write_str("timed_out"),
Self::ActionRequired => f.write_str("action_required"),
Self::Stale => f.write_str("stale"),
}
}
}
impl ::std::str::FromStr for WorkflowRunConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"success" => Ok(Self::Success),
"failure" => Ok(Self::Failure),
"neutral" => Ok(Self::Neutral),
"cancelled" => Ok(Self::Cancelled),
"timed_out" => Ok(Self::TimedOut),
"action_required" => Ok(Self::ActionRequired),
"stale" => Ok(Self::Stale),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowRunConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowRunConclusion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowRunEvent`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WorkflowRunEvent {
Completed(WorkflowRunCompleted),
Requested(WorkflowRunRequested),
}
impl ::std::convert::From<WorkflowRunCompleted> for WorkflowRunEvent {
fn from(value: WorkflowRunCompleted) -> Self {
Self::Completed(value)
}
}
impl ::std::convert::From<WorkflowRunRequested> for WorkflowRunEvent {
fn from(value: WorkflowRunRequested) -> Self {
Self::Requested(value)
}
}
#[doc = "`WorkflowRunPullRequestsItem`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowRunPullRequestsItem {
pub base: WorkflowRunPullRequestsItemBase,
pub head: WorkflowRunPullRequestsItemHead,
pub id: f64,
pub number: f64,
pub url: ::std::string::String,
}
#[doc = "`WorkflowRunPullRequestsItemBase`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowRunPullRequestsItemBase {
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: RepoRef,
pub sha: ::std::string::String,
}
#[doc = "`WorkflowRunPullRequestsItemHead`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowRunPullRequestsItemHead {
#[serde(rename = "ref")]
pub ref_: ::std::string::String,
pub repo: RepoRef,
pub sha: ::std::string::String,
}
#[doc = "`WorkflowRunRequested`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowRunRequested {
pub action: WorkflowRunRequestedAction,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub installation: ::std::option::Option<InstallationLite>,
#[serde(skip_serializing_if = "::std::option::Option::is_none")]
pub organization: ::std::option::Option<Organization>,
pub repository: Repository,
pub sender: User,
pub workflow: Workflow,
pub workflow_run: WorkflowRun,
}
#[doc = "`WorkflowRunRequestedAction`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowRunRequestedAction {
#[serde(rename = "requested")]
Requested,
}
impl ::std::fmt::Display for WorkflowRunRequestedAction {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Requested => f.write_str("requested"),
}
}
}
impl ::std::str::FromStr for WorkflowRunRequestedAction {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"requested" => Ok(Self::Requested),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowRunRequestedAction {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowRunRequestedAction {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowRunStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowRunStatus {
#[serde(rename = "requested")]
Requested,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
#[serde(rename = "queued")]
Queued,
}
impl ::std::fmt::Display for WorkflowRunStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Requested => f.write_str("requested"),
Self::InProgress => f.write_str("in_progress"),
Self::Completed => f.write_str("completed"),
Self::Queued => f.write_str("queued"),
}
}
}
impl ::std::str::FromStr for WorkflowRunStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"requested" => Ok(Self::Requested),
"in_progress" => Ok(Self::InProgress),
"completed" => Ok(Self::Completed),
"queued" => Ok(Self::Queued),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowRunStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowRunStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowStep`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum WorkflowStep {
InProgress(WorkflowStepInProgress),
Completed(WorkflowStepCompleted),
}
impl ::std::convert::From<WorkflowStepInProgress> for WorkflowStep {
fn from(value: WorkflowStepInProgress) -> Self {
Self::InProgress(value)
}
}
impl ::std::convert::From<WorkflowStepCompleted> for WorkflowStep {
fn from(value: WorkflowStepCompleted) -> Self {
Self::Completed(value)
}
}
#[doc = "`WorkflowStepCompleted`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowStepCompleted {
pub completed_at: ::std::string::String,
pub conclusion: WorkflowStepCompletedConclusion,
pub name: ::std::string::String,
pub number: i64,
pub started_at: ::std::string::String,
pub status: WorkflowStepCompletedStatus,
}
#[doc = "`WorkflowStepCompletedConclusion`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowStepCompletedConclusion {
#[serde(rename = "failure")]
Failure,
#[serde(rename = "skipped")]
Skipped,
#[serde(rename = "success")]
Success,
}
impl ::std::fmt::Display for WorkflowStepCompletedConclusion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Failure => f.write_str("failure"),
Self::Skipped => f.write_str("skipped"),
Self::Success => f.write_str("success"),
}
}
}
impl ::std::str::FromStr for WorkflowStepCompletedConclusion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"failure" => Ok(Self::Failure),
"skipped" => Ok(Self::Skipped),
"success" => Ok(Self::Success),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowStepCompletedConclusion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowStepCompletedConclusion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowStepCompletedStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowStepCompletedStatus {
#[serde(rename = "completed")]
Completed,
}
impl ::std::fmt::Display for WorkflowStepCompletedStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::Completed => f.write_str("completed"),
}
}
}
impl ::std::str::FromStr for WorkflowStepCompletedStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"completed" => Ok(Self::Completed),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowStepCompletedStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowStepCompletedStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = "`WorkflowStepInProgress`"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
pub struct WorkflowStepInProgress {
pub completed_at: (),
pub conclusion: (),
pub name: ::std::string::String,
pub number: i64,
pub started_at: ::std::string::String,
pub status: WorkflowStepInProgressStatus,
}
#[doc = "`WorkflowStepInProgressStatus`"]
#[derive(
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Copy,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub enum WorkflowStepInProgressStatus {
#[serde(rename = "in_progress")]
InProgress,
}
impl ::std::fmt::Display for WorkflowStepInProgressStatus {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match *self {
Self::InProgress => f.write_str("in_progress"),
}
}
}
impl ::std::str::FromStr for WorkflowStepInProgressStatus {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
match value {
"in_progress" => Ok(Self::InProgress),
_ => Err("invalid value".into()),
}
}
}
impl ::std::convert::TryFrom<&str> for WorkflowStepInProgressStatus {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for WorkflowStepInProgressStatus {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
#[doc = " Generation of default values for serde."]
pub mod defaults {
pub(super) fn default_bool<const V: bool>() -> bool {
V
}
}
#[doc = " Error types."]
pub mod error {
#[doc = r" Error from a `TryFrom` or `FromStr` implementation."]
pub struct ConversionError(::std::borrow::Cow<'static, str>);
impl ::std::error::Error for ConversionError {}
impl ::std::fmt::Display for ConversionError {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
::std::fmt::Display::fmt(&self.0, f)
}
}
impl ::std::fmt::Debug for ConversionError {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
::std::fmt::Debug::fmt(&self.0, f)
}
}
impl From<&'static str> for ConversionError {
fn from(value: &'static str) -> Self {
Self(value.into())
}
}
impl From<String> for ConversionError {
fn from(value: String) -> Self {
Self(value.into())
}
}
}