Repository: oxidecomputer/typify
Pull request #275 (2023-05-01 14:03:06)

Bump clap from 4.2.4 to 4.2.5
Bumps [clap](https://github.com/clap-rs/clap) from 4.2.4 to 4.2.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/clap-rs/clap/releases">clap's releases</a>.</em></p>
<blockquote>
<h2>v4.2.5</h2>
<h2>[4.2.5] - 2023-04-27</h2>
<h3>Fixes</h3>
<ul>
<li>Improve panic when a group requires a non-existent ID</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's changelog</a>.</em></p>
<blockquote>
<h2>[4.2.5] - 2023-04-27</h2>
<h3>Fixes</h3>
<ul>
<li>Improve panic when a group requires a non-existent ID</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/clap-rs/clap/commit/fa57ed31236bfd79167e83f4c8704acef94041a3"><code>fa57ed3</code></a> chore: Release</li>
<li><a href="https://github.com/clap-rs/clap/commit/9f6067f644496496368d78482932abc3d021d885"><code>9f6067f</code></a> docs: Update changelog</li>
<li><a href="https://github.com/clap-rs/clap/commit/9eaf8996a45975233cf533ee8ac67cfbdcd23ff8"><code>9eaf899</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/4867">#4867</a> from epage/panic</li>
<li><a href="https://github.com/clap-rs/clap/commit/6b23edc36abd0e009434d94ad162355d00d98da6"><code>6b23edc</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/4864">#4864</a> from mattmadeofpasta/remove-redundant-test</li>
<li><a href="https://github.com/clap-rs/clap/commit/185729a7dc5043f75e3759e8e976183076dd50bd"><code>185729a</code></a> fix(builder): Assert earlier on bad requires/conflicts</li>
<li><a href="https://github.com/clap-rs/clap/commit/e02644b9c25ec2196d846ae216fff39168549aac"><code>e02644b</code></a> fix(usage): Provide more context in panic</li>
<li><a href="https://github.com/clap-rs/clap/commit/296fec9186e1e458e49c932c41ee63d008908138"><code>296fec9</code></a> test(help): Remove redundant test</li>
<li><a href="https://github.com/clap-rs/clap/commit/43591bc1ee051fde0835e7eb6995297932a759a7"><code>43591bc</code></a> chore: Release</li>
<li><a href="https://github.com/clap-rs/clap/commit/9bda2ac8a0442ae08487cd7c268eb6a884e444fa"><code>9bda2ac</code></a> docs: Update changelog</li>
<li><a href="https://github.com/clap-rs/clap/commit/c38b8ca66df9da4a499337cb64bdbbb9c3725ad6"><code>c38b8ca</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/4851">#4851</a> from ClementTsang/update_mut_arg_docs</li>
<li>Additional commits viewable in <a href="https://github.com/clap-rs/clap/compare/v4.2.4...v4.2.5">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.2.4&new-version=4.2.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index 3bad1ff..37f54ca 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -179,9 +179,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 
 [[package]]
 name = "clap"
-version = "4.2.4"
+version = "4.2.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "956ac1f6381d8d82ab4684768f89c0ea3afe66925ceadb4eeb3fc452ffc55d62"
+checksum = "8a1f23fa97e1d1641371b51f35535cb26959b8e27ab50d167a8b996b5bada819"
 dependencies = [
  "clap_builder",
  "clap_derive",
@@ -190,9 +190,9 @@ dependencies = [
 
 [[package]]
 name = "clap_builder"
-version = "4.2.4"
+version = "4.2.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84080e799e54cff944f4b4a4b0e71630b0e0443b25b985175c7dddc1a859b749"
+checksum = "0fdc5d93c358224b4d6867ef1356d740de2303e9892edc06c5340daeccd96bab"
 dependencies = [
  "anstream",
  "anstyle 1.0.0",
@@ -697,9 +697,9 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
 
 [[package]]
 name = "regress"
-version = "0.5.0"
+version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d995d590bd8ec096d1893f414bf3f5e8b0ee4c9eed9a5642b9766ef2c8e2e8e9"
+checksum = "82a9ecfa0cb04d0b04dddb99b8ccf4f66bc8dfd23df694b398570bd8ae3a50fb"
 dependencies = [
  "hashbrown",
  "memchr",
@@ -1174,9 +1174,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
 
 [[package]]
 name = "uuid"
-version = "1.3.1"
+version = "1.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb"
+checksum = "4dad5567ad0cf5b760e5665964bec1b47dfd077ba8a2544b513f3556d3d239a2"
 dependencies = [
  "serde",
 ]
diff --git a/cargo-typify/Cargo.toml b/cargo-typify/Cargo.toml
index 8b047c9..20918dc 100644
--- a/cargo-typify/Cargo.toml
+++ b/cargo-typify/Cargo.toml
@@ -14,7 +14,7 @@ default-run = "cargo-typify"
 [dependencies]
 typify = { version = "0.0.12-dev", path = "../typify" }
 
-clap = { version = "4.2.4", features = ["derive"] }
+clap = { version = "4.2.5", features = ["derive"] }
 color-eyre = "0.6"
 serde_json = "1.0.96"
 schemars = "0.8.12"
diff --git a/typify-impl/Cargo.toml b/typify-impl/Cargo.toml
index a6b78a9..1ced9b5 100644
--- a/typify-impl/Cargo.toml
+++ b/typify-impl/Cargo.toml
@@ -12,7 +12,7 @@ heck = "0.4.1"
 log = "0.4"
 proc-macro2 = "1.0"
 quote = "1.0"
-regress = "0.5.0"
+regress = "0.6.0"
 schemars = "0.8.12"
 serde_json = "1.0"
 syn = { version = "2.0", features = ["full"] }
@@ -26,4 +26,4 @@ rustfmt-wrapper = "0.2"
 schema = "0.1.0"
 schemars = { version = "0.8.12", features = ["uuid1"] }
 serde = "1.0"
-uuid = "1.3.1"
+uuid = "1.3.2"
diff --git a/typify-impl/src/convert.rs b/typify-impl/src/convert.rs
index 5c92262..12a9274 100644
--- a/typify-impl/src/convert.rs
+++ b/typify-impl/src/convert.rs
@@ -1008,7 +1008,7 @@ impl TypeSpace {
         &mut self,
         type_name: Name,
         metadata: &'a Option<Box<Metadata>>,
-        subschemas: &[Schema],
+        subschemas: &'a [Schema],
     ) -> Result<(TypeEntry, &'a Option<Box<Metadata>>)> {
         // Rust can emit "anyOf":[{"$ref":"#/definitions/C"},{"type":"null"}
         // for Option. We match this here because the mutual exclusion check
@@ -1095,7 +1095,7 @@ impl TypeSpace {
         &mut self,
         type_name: Name,
         metadata: &'a Option<Box<schemars::schema::Metadata>>,
-        subschemas: &[Schema],
+        subschemas: &'a [Schema],
     ) -> Result<(TypeEntry, &'a Option<Box<Metadata>>)> {
         let ty = self
             .maybe_option(type_name.clone(), metadata, subschemas)
diff --git a/typify-impl/src/enums.rs b/typify-impl/src/enums.rs
index f79eac5..37026fc 100644
--- a/typify-impl/src/enums.rs
+++ b/typify-impl/src/enums.rs
@@ -7,7 +7,6 @@ use proc_macro2::TokenStream;
 use quote::{format_ident, quote};
 use schemars::schema::{
     ArrayValidation, InstanceType, Metadata, ObjectValidation, Schema, SchemaObject, SingleOrVec,
-    SubschemaValidation,
 };
 
 use crate::{
@@ -15,8 +14,8 @@ use crate::{
     structs::generate_serde_attr,
     type_entry::{EnumTagType, TypeEntry, TypeEntryEnum, Variant, VariantDetails},
     util::{
-        constant_string_value, get_type_name, metadata_description, metadata_title_and_description,
-        none_or_single, recase, ref_key, schema_is_named, Case,
+        constant_string_value, get_object, get_type_name, metadata_description,
+        metadata_title_and_description, none_or_single, recase, schema_is_named, Case,
     },
     Name, Result, TypeSpace,
 };
@@ -57,7 +56,7 @@ impl TypeSpace {
     pub(crate) fn maybe_externally_tagged_enum(
         &mut self,
         type_name: Name,
-        metadata: &Option<Box<schemars::schema::Metadata>>,
+        enum_metadata: &Option<Box<schemars::schema::Metadata>>,
         subschemas: &[Schema],
     ) -> Option<TypeEntry> {
         enum ProtoVariant<'a> {
@@ -94,10 +93,10 @@ impl TypeSpace {
                         enum_values: Some(values),
                         const_value: None,
                         subschemas: None,
-                        number: None,
-                        string: None,
-                        array: None,
-                        object: None,
+                        number: _,
+                        string: _,
+                        array: _,
+                        object: _,
                         reference: None,
                         extensions: _,
                     }) if single.as_ref() == &InstanceType::String => {
@@ -114,57 +113,40 @@ impl TypeSpace {
                             })
                             .collect()
                     }
-
-                    // Objects must have a single required member. The type of
-                    // that lone member determines the type associated with the
-                    // variant.
-                    Schema::Object(SchemaObject {
-                        metadata,
-                        instance_type: Some(SingleOrVec::Single(single)),
-                        format: None,
-                        enum_values: None,
-                        const_value: None,
-                        subschemas: None,
-                        number: None,
-                        string: None,
-                        array: None,
-                        object: Some(validation),
-                        reference: None,
-                        extensions: _,
-                    }) if single.as_ref() == &InstanceType::Object => {
-                        if let ObjectValidation {
-                            max_properties: None,
-                            min_properties: None,
-                            required,
-                            properties,
-                            pattern_properties,
-                            additional_properties: _,
-                            property_names: None,
-                        } = validation.as_ref()
+                    other => match get_object(other) {
+                        // Objects must have a single property, and that
+                        // property must be required. The type of that lone
+                        // property determines the type associated with the
+                        // variant.
+                        Some((
+                            metadata,
+                            ObjectValidation {
+                                max_properties: None,
+                                min_properties: None,
+                                required,
+                                properties,
+                                pattern_properties,
+                                additional_properties: _,
+                                property_names: None,
+                            },
+                        )) if required.len() == 1
+                            && properties.len() == 1
+                            && pattern_properties.is_empty() =>
                         {
-                            if required.len() == 1
-                                && properties.len() == 1
-                                && pattern_properties.is_empty()
-                            {
-                                let (prop_name, prop_type) = properties.iter().next().unwrap();
-                                // If required and properties both have length 1
-                                // then this must be true for a well-constructed
-                                // schema.
-                                assert!(required.contains(prop_name));
-
-                                Some(vec![ProtoVariant::Typed {
-                                    name: prop_name,
-                                    schema: prop_type,
-                                    description: metadata_description(metadata),
-                                }])
-                            } else {
-                                None
-                            }
-                        } else {
-                            None
+                            let (prop_name, prop_type) = properties.first_key_value().unwrap();
+                            // If required and properties both have length 1
+                            // then the following must be true for a
+                            // well-constructed schema.
+                            assert!(required.contains(prop_name));
+
+                            Some(vec![ProtoVariant::Typed {
+                                name: prop_name,
+                                schema: prop_type,
+                                description: metadata_description(metadata),
+                            }])
                         }
-                    }
-                    _ => None,
+                        _ => None,
+                    },
                 }
             })
             .flat_map(|x| match x {
@@ -180,7 +162,7 @@ impl TypeSpace {
             })
             .collect::<HashSet<_>>();
 
-        // We can't have duplicate names in an enum.
+        // We can't have duplicate variant names in an enum.
         if variant_names.len() != proto_variants.len() {
             return None;
         }
@@ -228,7 +210,7 @@ impl TypeSpace {
         Some(TypeEntryEnum::from_metadata(
             self,
             type_name,
-            metadata,
+            enum_metadata,
             EnumTagType::External,
             variants,
             deny_unknown_fields,
@@ -386,39 +368,40 @@ impl TypeSpace {
         metadata: &Option<Box<Metadata>>,
         subschemas: &[Schema],
     ) -> Option<TypeEntry> {
-        // All subschemas must be objects and all objects must have a *fixed-value*
-        // required property in common. To detect this, we look at all such
-        // properties along with the specific values.
+        // All subschemas must be objects and all objects must have a
+        // required, *fixed-value* property in common. To detect this, we look
+        // at all such properties along with the specific values.
         let constant_value_properties_sets = subschemas
             .iter()
-            .map(
-                |schema| match get_object(type_name.clone(), schema, &self.definitions) {
-                    None => BTreeMap::<String, BTreeSet<String>>::new(),
-                    Some((_, _, validation)) => {
-                        validation
-                            .properties
-                            .iter()
-                            .filter_map(|(prop_name, prop_type)| {
-                                constant_string_value(prop_type).map(|value| {
-                                    // Tuple with the name and a set with a single value
-                                    (
-                                        prop_name.clone(),
-                                        [value.to_string()].iter().cloned().collect(),
-                                    )
-                                })
+            .map(|schema| match get_object(schema) {
+                Some((_, validation)) => {
+                    validation
+                        .properties
+                        .iter()
+                        .filter(|(prop_name, _)| validation.required.contains(*prop_name))
+                        .filter_map(|(prop_name, prop_type)| {
+                            constant_string_value(prop_type).map(|value| {
+                                // Tuple consisting of the name and a set
+                                // with a single value
+                                (prop_name.clone(), BTreeSet::from([value.to_string()]))
                             })
-                            .collect()
-                    }
-                },
-            )
+                        })
+                        .collect()
+                }
+
+                // For non-objects, there are no such properties; return
+                // the empty set. Note that in the next pass this will
+                // result in a None value and exiting the outer function.
+                None => BTreeMap::new(),
+            })
             // Reduce these sets down to those A. that are common among all
-            // subschemas and B. for which the values for each is unique.
+            // subschemas and B. for which the values are unique.
             .reduce(|a, b| {
                 a.into_iter()
                     .filter_map(|(prop, mut a_values)| match b.get(&prop) {
-                        // If the values are non-disjoint it means that there are
-                        // two subschemas that have constant values for a given
-                        // property but that those values are identical.
+                        // If the values are non-disjoint it means that there
+                        // are two subschemas that have constant values for a
+                        // given property but that those values are identical.
                         Some(b_values) if a_values.is_disjoint(b_values) => {
                             a_values.extend(b_values.iter().cloned());
                             Some((prop, a_values))
@@ -444,22 +427,21 @@ impl TypeSpace {
             .map(|schema| {
                 // We've already validated this; we just need to pluck out the
                 // pieces we need to construct the variant.
-                match get_object(type_name.clone(), schema, &self.definitions) {
-                    None => unreachable!(),
-                    Some((sub_type_name, metadata, validation)) => {
-                        match validation.additional_properties.as_ref().map(Box::as_ref) {
-                            Some(Schema::Bool(false)) => {
-                                deny_unknown_fields = true;
-                            }
-                            None => {}
-                            _ => unreachable!(),
-                        }
-                        // Release our borrow of self.
-                        let validation = validation.clone();
-                        let metadata = metadata.clone();
-                        Ok(self.internal_variant(sub_type_name, &metadata, &validation, tag)?)
+                let Some((metadata, validation)) =
+                    get_object(schema)
+                else {
+                    unreachable!();
+                };
+
+                match validation.additional_properties.as_ref().map(Box::as_ref) {
+                    Some(Schema::Bool(false)) => {
+                        deny_unknown_fields = true;
                     }
+                    None => (),
+                    _ => unreachable!(),
                 }
+
+                self.internal_variant(type_name.clone(), metadata, validation, tag)
             })
             .collect::<Result<Vec<_>>>()
             .ok()?;
@@ -476,7 +458,7 @@ impl TypeSpace {
 
     fn internal_variant(
         &mut self,
-        type_name: Name,
+        enum_type_name: Name,
         metadata: &Option<Box<schemars::schema::Metadata>>,
         validation: &ObjectValidation,
         tag: &str,
@@ -507,7 +489,8 @@ impl TypeSpace {
             new_validation.properties.remove(tag);
             new_validation.required.remove(tag);
 
-            let (properties, _) = self.struct_members(type_name.into_option(), &new_validation)?;
+            let (properties, _) =
+                self.struct_members(enum_type_name.into_option(), &new_validation)?;
             let variant = Variant {
                 name,
                 rename,
@@ -530,30 +513,28 @@ impl TypeSpace {
         // subschema.
         let prop_sets = subschemas
             .iter()
-            .map(
-                |schema| match get_object(type_name.clone(), schema, &self.definitions) {
-                    Some((_, _, validation))
-                        if validation.properties.len() == validation.required.len() =>
-                    {
-                        let constants = validation
-                            .properties
-                            .iter()
-                            .filter_map(|(prop_name, prop_type)| {
-                                constant_string_value(prop_type).map(|_| prop_name.clone())
-                            })
-                            .collect::<BTreeSet<_>>();
-                        let properties = validation
-                            .properties
-                            .keys()
-                            .cloned()
-                            .collect::<BTreeSet<_>>();
-
-                        Some((constants, properties))
-                    }
+            .map(|schema| match get_object(schema) {
+                Some((_, validation))
+                    if validation.properties.len() == validation.required.len() =>
+                {
+                    let constants = validation
+                        .properties
+                        .iter()
+                        .filter_map(|(prop_name, prop_type)| {
+                            constant_string_value(prop_type).map(|_| prop_name.clone())
+                        })
+                        .collect::<BTreeSet<_>>();
+                    let properties = validation
+                        .properties
+                        .keys()
+                        .cloned()
+                        .collect::<BTreeSet<_>>();
+
+                    Some((constants, properties))
+                }
 
-                    _ => None,
-                },
-            )
+                _ => None,
+            })
             .collect::<Option<Vec<_>>>()?;
 
         // We take the intersection of all tag properties and the union of all
@@ -585,22 +566,14 @@ impl TypeSpace {
             .map(|schema| {
                 // We've already validated this; we just need to pluck out the
                 // pieces we need to construct the variant.
-                match get_object(type_name.clone(), schema, &self.definitions) {
-                    None => unreachable!(),
-                    Some((sub_type_name, metadata, validation)) => {
-                        let metadata = metadata.clone();
-                        let validation = validation.clone();
-                        let (variant, deny) = self.adjacent_variant(
-                            sub_type_name,
-                            &metadata,
-                            &validation,
-                            &tag,
-                            &content,
-                        )?;
-                        deny_unknown_fields |= deny;
-                        Ok(variant)
-                    }
-                }
+                let Some((metadata, validation)) = get_object(schema)
+                else {
+                    unreachable!();
+                };
+                let (variant, deny) =
+                    self.adjacent_variant(type_name.clone(), metadata, validation, &tag, &content)?;
+                deny_unknown_fields |= deny;
+                Ok(variant)
             })
             .collect::<Result<Vec<_>>>()
             .ok()?;
@@ -617,7 +590,7 @@ impl TypeSpace {
 
     fn adjacent_variant(
         &mut self,
-        type_name: Name,
+        enum_type_name: Name,
         metadata: &Option<Box<schemars::schema::Metadata>>,
         validation: &ObjectValidation,
         tag: &str,
@@ -644,7 +617,7 @@ impl TypeSpace {
             let variant_name = constant_string_value(tag_schema).unwrap();
             let (name, rename) = recase(variant_name, Case::Pascal);
 
-            let sub_type_name = match type_name {
+            let sub_type_name = match enum_type_name {
                 // If the type name is known (required) we append the name of
                 // the content (i.e. the struct member); because this type is
                 // required (i.e. a named reference) it will be generated as a
@@ -712,17 +685,47 @@ impl TypeSpace {
     ) -> Result<TypeEntry> {
         let tmp_type_name = get_type_name(&type_name, metadata);
 
-        let mut names_from_variants = true;
-        let mut common_prefix = None;
-
         let mut deny_unknown_fields = false;
 
-        // Gather the variant details along with an Option of its "good" name.
+        let variant_names = subschemas
+            .iter()
+            // Try to get a good name for each variant. Note that this doesn't
+            // account for types such as Uuid whose names come from outside of
+            // the schema... but you can't win them all.
+            .map(schema_is_named)
+            .collect::<Option<Vec<_>>>()
+            // Prune the common prefixes from all variant names. If this
+            // results in any of them being empty, we don't use these names.
+            .and_then(|variant_names| {
+                let common_prefix = variant_names
+                    .iter()
+                    .cloned()
+                    .reduce(|a, b| get_common_prefix(&a, &b))
+                    .unwrap();
+                variant_names
+                    .into_iter()
+                    .map(|var_name| {
+                        let var_name = &var_name[common_prefix.len()..];
+                        if var_name.is_empty() {
+                            None
+                        } else {
+                            Some(var_name.to_string())
+                        }
+                    })
+                    .collect::<Option<Vec<_>>>()
+            })
+            // Fall back to `VariantN` naming.
+            .unwrap_or_else(|| {
+                (0..subschemas.len())
+                    .map(|idx| format!("Variant{}", idx))
+                    .collect()
+            });
+
+        // Gather the variant details along with its name.
         let variant_details = subschemas
             .iter()
-            .enumerate()
-            .map(|(idx, schema)| {
-                let variant_name = format!("Variant{}", idx);
+            .zip(variant_names)
+            .map(|(schema, variant_name)| {
                 // We provide a suggested name for the variant value's type
                 // simply by appending the variant name to the type name we've
                 // inferred for this enum.
@@ -731,44 +734,20 @@ impl TypeSpace {
                     None => Name::Unknown,
                 }
                 .append(&variant_name);
+
                 let (details, deny) = self.external_variant(prop_type_name, schema)?;
+                // Note that this is really only relevant for in-line schemas;
+                // referenced schemas will enforce their own policy on their
+                // generated types.
                 deny_unknown_fields |= deny;
-                let good_name = schema_is_named(schema);
-                match (&good_name, common_prefix.as_ref()) {
-                    (None, _) => {
-                        names_from_variants = false;
-                    }
-                    (Some(name), None) => {
-                        common_prefix = Some(name.clone());
-                    }
-                    (Some(name), Some(prefix)) => {
-                        common_prefix = Some(get_common_prefix(name, prefix));
-                        // If the common prefix is the whole name, we can't use
-                        // these names.
-                        if common_prefix.as_ref() == Some(name) {
-                            names_from_variants = false;
-                        }
-                    }
-                }
 
-                Ok((details, good_name))
+                Ok((details, variant_name))
             })
             .collect::<Result<Vec<_>>>()?;
 
-        let common_prefix_index = match &common_prefix {
-            Some(prefix) => prefix.len(),
-            None => 0,
-        };
-
         let variants = variant_details
             .into_iter()
-            .enumerate()
-            .map(|(idx, (details, good_name))| {
-                let name = if names_from_variants {
-                    good_name.unwrap()[common_prefix_index..].to_string()
-                } else {
-                    format!("Variant{}", idx)
-                };
+            .map(|(details, name)| {
                 assert!(!name.is_empty());
                 Variant {
                     name,
@@ -791,127 +770,6 @@ impl TypeSpace {
     }
 }
 
-/// Internally and adjacently tagged enums expect their subschemas to be
-/// objects. Return the object data or None if it's not an object (or reference
-/// to an object) or doesn't conform to the objects we know how to handle.
-pub(crate) fn get_object<'a>(
-    type_name: Name,
-    schema: &'a Schema,
-    definitions: &'a BTreeMap<String, Schema>,
-) -> Option<(Name, &'a Option<Box<Metadata>>, &'a ObjectValidation)> {
-    match schema {
-        // Objects
-        Schema::Object(SchemaObject {
-            metadata,
-            instance_type: Some(SingleOrVec::Single(single)),
-            format: None,
-            enum_values: None,
-            const_value: None,
-            subschemas: None,
-            number: None,
-            string: None,
-            array: None,
-            object: Some(validation),
-            reference: None,
-            extensions: _,
-        }) if single.as_ref() == &InstanceType::Object
-            && schema_none_or_false(&validation.additional_properties)
-            && validation.max_properties.is_none()
-            && validation.min_properties.is_none()
-            && validation.pattern_properties.is_empty()
-            && validation.property_names.is_none() =>
-        {
-            Some((type_name, metadata, validation.as_ref()))
-        }
-
-        // References
-        Schema::Object(SchemaObject {
-            metadata: None,
-            instance_type: None,
-            format: None,
-            enum_values: None,
-            const_value: None,
-            subschemas: None,
-            number: None,
-            string: None,
-            array: None,
-            object: None,
-            reference: Some(ref_name),
-            extensions: _,
-        }) => {
-            let ref_key = ref_key(ref_name);
-            get_object(
-                Name::Required(ref_key.to_string()),
-                definitions.get(ref_key).unwrap(),
-                definitions,
-            )
-        }
-
-        // Trivial (n == 1) subschemas
-        Schema::Object(SchemaObject {
-            metadata,
-            instance_type: _,
-            format: None,
-            enum_values: None,
-            const_value: None,
-            subschemas: Some(subschemas),
-            number: None,
-            string: None,
-            array: None,
-            object: None,
-            reference: None,
-            extensions: _,
-        }) => match subschemas.as_ref() {
-            SubschemaValidation {
-                all_of: Some(subschemas),
-                any_of: None,
-                one_of: None,
-                not: None,
-                if_schema: None,
-                then_schema: None,
-                else_schema: None,
-            } if subschemas.len() == 1 => subschemas.first(),
-            SubschemaValidation {
-                all_of: None,
-                any_of: Some(subschemas),
-                one_of: None,
-                not: None,
-                if_schema: None,
-                then_schema: None,
-                else_schema: None,
-            } if subschemas.len() == 1 => subschemas.first(),
-            SubschemaValidation {
-                all_of: None,
-                any_of: None,
-                one_of: Some(subschemas),
-                not: None,
-                if_schema: None,
-                then_schema: None,
-                else_schema: None,
-            } if subschemas.len() == 1 => subschemas.first(),
-            _ => None,
-        }
-        .and_then(|sub_schema| {
-            get_object(type_name, sub_schema, definitions).map(|(name, m, validation)| match m {
-                Some(_) => (name, metadata, validation),
-                None => (name, &None, validation),
-            })
-        }),
-
-        // None if the schema doesn't match the shape we expect.
-        _ => None,
-    }
-}
-
-// We infer from a Some(Schema::Bool(false)) or None value that either nothing
-// or nothing of importance is in the additional properties.
-fn schema_none_or_false(additional_properties: &Option<Box<Schema>>) -> bool {
-    matches!(
-        additional_properties.as_ref().map(Box::as_ref),
-        None | Some(Schema::Bool(false))
-    )
-}
-
 /// Get the string that represents the common prefix, considering only
 /// case-relevant boundaries.
 fn get_common_prefix(name: &str, prefix: &str) -> String {
@@ -1496,7 +1354,7 @@ mod tests {
     }
 
     #[test]
-    fn test_tricky_internally_tagged_enum() {
+    fn test_tricky_untagged_enum() {
         let schema_json = r##"
         {
             "definitions": {
@@ -1570,18 +1428,9 @@ mod tests {
 
         match &type_entry.details {
             TypeEntryDetails::Enum(TypeEntryEnum {
-                tag_type,
-                deny_unknown_fields,
+                tag_type: EnumTagType::Untagged,
                 ..
-            }) => {
-                assert_eq!(
-                    tag_type,
-                    &EnumTagType::Internal {
-                        tag: "status".to_string()
-                    }
-                );
-                assert_eq!(deny_unknown_fields, &true);
-            }
+            }) => {}
             _ => panic!("{:#?}", type_entry),
         }
     }
diff --git a/typify-impl/src/structs.rs b/typify-impl/src/structs.rs
index f7c1690..b80daa9 100644
--- a/typify-impl/src/structs.rs
+++ b/typify-impl/src/structs.rs
@@ -8,13 +8,12 @@ use schemars::schema::{
 };
 
 use crate::{
-    enums::get_object,
     output::{OutputSpace, OutputSpaceMod},
     type_entry::{
         StructProperty, StructPropertyRename, StructPropertyState, TypeEntry, TypeEntryStruct,
         WrappedValue,
     },
-    util::{get_type_name, metadata_description, recase, schema_is_named, Case},
+    util::{get_object_ref, get_type_name, metadata_description, recase, schema_is_named, Case},
     Name, Result, TypeEntryDetails, TypeId, TypeSpace,
 };
 
@@ -383,6 +382,10 @@ impl TypeSpace {
         let mut named = Vec::new();
         let mut unnamed = Vec::new();
         for schema in subschemas {
+            // TODO this might not be quite right since this will be true for
+            // schemas that have a title; we may want to look only for types
+            // with a mandatory name. Types with a title (optional name) are
+            // reasonable to inline generally.
             match schema_is_named(schema) {
                 Some(name) => named.push((schema, name)),
                 None => unnamed.push(schema),
@@ -396,7 +399,10 @@ impl TypeSpace {
         }
 
         let (named_schema, _) = named.first()?;
-        let (_, _, validation) = get_object(Name::Unknown, named_schema, &self.definitions)?;
+        let (a_name, _, validation) =
+            get_object_ref(Name::Unknown, named_schema, &self.definitions)?;
+
+        assert!(matches!(a_name, Name::Required(_)));
 
         // We need all unnamed schemas to be a subset of the named schema.
         if !unnamed
diff --git a/typify-impl/src/type_entry.rs b/typify-impl/src/type_entry.rs
index 8d2b911..ac16083 100644
--- a/typify-impl/src/type_entry.rs
+++ b/typify-impl/src/type_entry.rs
@@ -645,14 +645,15 @@ impl TypeEntry {
             .collect::<Vec<_>>();
 
         // It should not be possible to construct an untagged enum
-        // with more than one simple variants--it would not be usable.
-        if variants
-            .iter()
-            .filter(|variant| matches!(variant.details, VariantDetails::Simple))
-            .count()
-            > 1
-        {
-            assert!(tag_type != &EnumTagType::Untagged);
+        // with more than one simple variant--it would not be usable.
+        if tag_type == &EnumTagType::Untagged {
+            assert!(
+                variants
+                    .iter()
+                    .filter(|variant| matches!(variant.details, VariantDetails::Simple))
+                    .count()
+                    <= 1
+            )
         }
 
         // ToString and FromStr impls for enums that are made exclusively of
diff --git a/typify-impl/src/util.rs b/typify-impl/src/util.rs
index 358efd2..2d3126b 100644
--- a/typify-impl/src/util.rs
+++ b/typify-impl/src/util.rs
@@ -1,6 +1,6 @@
 // Copyright 2022 Oxide Computer Company
 
-use std::collections::{BTreeSet, HashSet};
+use std::collections::{BTreeMap, BTreeSet, HashSet};
 
 use schemars::schema::{
     ArrayValidation, InstanceType, Metadata, ObjectValidation, Schema, SchemaObject, SingleOrVec,
@@ -515,6 +515,7 @@ fn resolve<'a>(schema: &'a Schema, definitions: &'a schemars::Map<String, Schema
     }
 }
 
+/// Determine if a schema has a name (potentially).
 pub(crate) fn schema_is_named(schema: &Schema) -> Option<String> {
     let raw_name = match schema {
         Schema::Object(SchemaObject {
@@ -534,10 +535,12 @@ pub(crate) fn schema_is_named(schema: &Schema) -> Option<String> {
             let idx = reference.rfind('/')?;
             Some(reference[idx + 1..].to_string())
         }
+
         Schema::Object(SchemaObject {
             metadata: Some(metadata),
             ..
         }) if metadata.as_ref().title.is_some() => Some(metadata.as_ref().title.as_ref()?.clone()),
+
         Schema::Object(SchemaObject {
             metadata: _,
             instance_type: _,
@@ -551,42 +554,214 @@ pub(crate) fn schema_is_named(schema: &Schema) -> Option<String> {
             object: None,
             reference: None,
             extensions: _,
-        }) => match subschemas.as_ref() {
-            SubschemaValidation {
-                all_of: Some(subschemas),
-                any_of: None,
-                one_of: None,
-                not: None,
-                if_schema: None,
-                then_schema: None,
-                else_schema: None,
-            }
-            | SubschemaValidation {
-                all_of: None,
-                any_of: Some(subschemas),
-                one_of: None,
-                not: None,
-                if_schema: None,
-                then_schema: None,
-                else_schema: None,
-            }
-            | SubschemaValidation {
-                all_of: None,
-                any_of: None,
-                one_of: Some(subschemas),
-                not: None,
-                if_schema: None,
-                then_schema: None,
-                else_schema: None,
-            } if subschemas.len() == 1 => schema_is_named(subschemas.first()?),
-            _ => None,
-        },
+        }) => singleton_subschema(subschemas).and_then(schema_is_named),
+
         _ => None,
     }?;
 
     Some(sanitize(&raw_name, Case::Pascal))
 }
 
+/// Return the object data or None if it's not an object (or doesn't conform to
+/// the objects we know how to handle).
+pub(crate) fn get_object(schema: &Schema) -> Option<(&Option<Box<Metadata>>, &ObjectValidation)> {
+    match schema {
+        // Object
+        Schema::Object(SchemaObject {
+            metadata,
+            instance_type: Some(SingleOrVec::Single(single)),
+            format: None,
+            enum_values: None,
+            const_value: None,
+            subschemas: None,
+            number: _,
+            string: _,
+            array: _,
+            object: Some(validation),
+            reference: None,
+            extensions: _,
+        }) if single.as_ref() == &InstanceType::Object
+            && schema_none_or_false(&validation.additional_properties)
+            && validation.max_properties.is_none()
+            && validation.min_properties.is_none()
+            && validation.pattern_properties.is_empty()
+            && validation.property_names.is_none() =>
+        {
+            Some((metadata, validation.as_ref()))
+        }
+        // Object with no explicit type (but the proper validation)
+        Schema::Object(SchemaObject {
+            metadata,
+            instance_type: None,
+            format: None,
+            enum_values: None,
+            const_value: None,
+            subschemas: None,
+            number: None,
+            string: None,
+            array: None,
+            object: Some(validation),
+            reference: None,
+            extensions: _,
+        }) if schema_none_or_false(&validation.additional_properties)
+            && validation.max_properties.is_none()
+            && validation.min_properties.is_none()
+            && validation.pattern_properties.is_empty()
+            && validation.property_names.is_none() =>
+        {
+            Some((metadata, validation.as_ref()))
+        }
+
+        // Trivial (n == 1) subschemas
+        Schema::Object(SchemaObject {
+            metadata,
+            instance_type: _,
+            format: None,
+            enum_values: None,
+            const_value: None,
+            subschemas: Some(subschemas),
+            number: None,
+            string: None,
+            array: None,
+            object: None,
+            reference: None,
+            extensions: _,
+        }) => singleton_subschema(subschemas).and_then(|sub_schema| {
+            get_object(sub_schema).map(|(m, validation)| match m {
+                Some(_) => (metadata, validation),
+                None => (&None, validation),
+            })
+        }),
+
+        // None if the schema doesn't match the shape we expect.
+        _ => None,
+    }
+}
+/// Return the object data or None if it's not an object (or doesn't conform to
+/// the objects we know how to handle). Follow references if we find them.
+pub(crate) fn get_object_ref<'a>(
+    type_name: Name,
+    schema: &'a Schema,
+    definitions: &'a BTreeMap<String, Schema>,
+) -> Option<(Name, &'a Option<Box<Metadata>>, &'a ObjectValidation)> {
+    match schema {
+        // Objects
+        Schema::Object(SchemaObject {
+            metadata,
+            instance_type: Some(SingleOrVec::Single(single)),
+            format: None,
+            enum_values: None,
+            const_value: None,
+            subschemas: None,
+            number: None,
+            string: None,
+            array: None,
+            object: Some(validation),
+            reference: None,
+            extensions: _,
+        }) if single.as_ref() == &InstanceType::Object
+            && schema_none_or_false(&validation.additional_properties)
+            && validation.max_properties.is_none()
+            && validation.min_properties.is_none()
+            && validation.pattern_properties.is_empty()
+            && validation.property_names.is_none() =>
+        {
+            Some((type_name, metadata, validation.as_ref()))
+        }
+
+        // References
+        Schema::Object(SchemaObject {
+            metadata: None,
+            instance_type: None,
+            format: None,
+            enum_values: None,
+            const_value: None,
+            subschemas: None,
+            number: None,
+            string: None,
+            array: None,
+            object: None,
+            reference: Some(ref_name),
+            extensions: _,
+        }) => {
+            let ref_key = ref_key(ref_name);
+            get_object_ref(
+                Name::Required(ref_key.to_string()),
+                definitions.get(ref_key).unwrap(),
+                definitions,
+            )
+        }
+
+        // Trivial (n == 1) subschemas
+        Schema::Object(SchemaObject {
+            metadata,
+            instance_type: _,
+            format: None,
+            enum_values: None,
+            const_value: None,
+            subschemas: Some(subschemas),
+            number: None,
+            string: None,
+            array: None,
+            object: None,
+            reference: None,
+            extensions: _,
+        }) => singleton_subschema(subschemas).and_then(|sub_schema| {
+            get_object_ref(type_name, sub_schema, definitions).map(
+                |(name, m, validation)| match m {
+                    Some(_) => (name, metadata, validation),
+                    None => (name, &None, validation),
+                },
+            )
+        }),
+
+        // None if the schema doesn't match the shape we expect.
+        _ => None,
+    }
+}
+
+// We infer from a Some(Schema::Bool(false)) or None value that either nothing
+// or nothing of importance is in the additional properties.
+fn schema_none_or_false(additional_properties: &Option<Box<Schema>>) -> bool {
+    matches!(
+        additional_properties.as_ref().map(Box::as_ref),
+        None | Some(Schema::Bool(false))
+    )
+}
+
+pub(crate) fn singleton_subschema(subschemas: &SubschemaValidation) -> Option<&Schema> {
+    match subschemas {
+        SubschemaValidation {
+            all_of: Some(subschemas),
+            any_of: None,
+            one_of: None,
+            not: None,
+            if_schema: None,
+            then_schema: None,
+            else_schema: None,
+        }
+        | SubschemaValidation {
+            all_of: None,
+            any_of: Some(subschemas),
+            one_of: None,
+            not: None,
+            if_schema: None,
+            then_schema: None,
+            else_schema: None,
+        }
+        | SubschemaValidation {
+            all_of: None,
+            any_of: None,
+            one_of: Some(subschemas),
+            not: None,
+            if_schema: None,
+            then_schema: None,
+            else_schema: None,
+        } if subschemas.len() == 1 => subschemas.first(),
+        _ => None,
+    }
+}
+
 pub(crate) enum Case {
     Pascal,
     Snake,
diff --git a/typify/Cargo.toml b/typify/Cargo.toml
index 2973764..a98f72b 100644
--- a/typify/Cargo.toml
+++ b/typify/Cargo.toml
@@ -21,10 +21,10 @@ typify-impl = { version = "0.0.12-dev", path = "../typify-impl" }
 expectorate = "1.0.7"
 glob = "0.3.1"
 quote = "1.0.24"
-regress = "0.5.0"
+regress = "0.6.0"
 rustfmt-wrapper = "0.2.0"
 schemars = "0.8.12"
 serde = "1.0.160"
 serde_json = "1.0.96"
 trybuild = "1.0.80"
-uuid = { version = "1.3.1", features = ["serde"] }
+uuid = { version = "1.3.2", features = ["serde"] }


Test patch:
diff --git a/typify-impl/tests/github.out b/typify-impl/tests/github.out
index 772bb03..0542df4 100644
--- a/typify-impl/tests/github.out
+++ b/typify-impl/tests/github.out
@@ -2511,48 +2511,32 @@ impl From<&BranchProtectionRuleEditedChangesAuthorizedActorsOnly>
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum BranchProtectionRuleEvent {
-    #[doc = "branch protection rule created event\n\nActivity 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).\""]
-    #[serde(rename = "created")]
-    Created {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        rule: BranchProtectionRule,
-        sender: User,
-    },
-    #[doc = "branch protection rule deleted event\n\nActivity 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).\""]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        rule: BranchProtectionRule,
-        sender: User,
-    },
-    #[doc = "branch protection rule edited event\n\nActivity 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).\""]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: BranchProtectionRuleEditedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        rule: BranchProtectionRule,
-        sender: User,
-    },
+    Created(BranchProtectionRuleCreated),
+    Deleted(BranchProtectionRuleDeleted),
+    Edited(BranchProtectionRuleEdited),
 }
 impl From<&BranchProtectionRuleEvent> for BranchProtectionRuleEvent {
     fn from(value: &BranchProtectionRuleEvent) -> Self {
         value.clone()
     }
 }
+impl From<BranchProtectionRuleCreated> for BranchProtectionRuleEvent {
+    fn from(value: BranchProtectionRuleCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<BranchProtectionRuleDeleted> for BranchProtectionRuleEvent {
+    fn from(value: BranchProtectionRuleDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<BranchProtectionRuleEdited> for BranchProtectionRuleEvent {
+    fn from(value: BranchProtectionRuleEdited) -> Self {
+        Self::Edited(value)
+    }
+}
 #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
 pub enum BranchProtectionRuleLinearHistoryRequirementEnforcementLevel {
     #[serde(rename = "off")]
@@ -3757,68 +3741,38 @@ impl From<&CheckRunDeployment> for CheckRunDeployment {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum CheckRunEvent {
-    #[doc = "check_run completed event"]
-    #[serde(rename = "completed")]
-    Completed {
-        check_run: CheckRunCompletedCheckRun,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        #[doc = "The action requested by the user."]
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        requested_action: Option<CheckRunCompletedRequestedAction>,
-        sender: User,
-    },
-    #[doc = "check_run created event"]
-    #[serde(rename = "created")]
-    Created {
-        check_run: CheckRunCreatedCheckRun,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        #[doc = "The action requested by the user."]
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        requested_action: Option<CheckRunCreatedRequestedAction>,
-        sender: User,
-    },
-    #[doc = "check_run requested_action event"]
-    #[serde(rename = "requested_action")]
-    RequestedAction {
-        check_run: CheckRunRequestedActionCheckRun,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        requested_action: CheckRunRequestedActionRequestedAction,
-        sender: User,
-    },
-    #[doc = "check_run rerequested event"]
-    #[serde(rename = "rerequested")]
-    Rerequested {
-        check_run: CheckRunRerequestedCheckRun,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        #[doc = "The action requested by the user."]
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        requested_action: Option<CheckRunRerequestedRequestedAction>,
-        sender: User,
-    },
+    Completed(CheckRunCompleted),
+    Created(CheckRunCreated),
+    RequestedAction(CheckRunRequestedAction),
+    Rerequested(CheckRunRerequested),
 }
 impl From<&CheckRunEvent> for CheckRunEvent {
     fn from(value: &CheckRunEvent) -> Self {
         value.clone()
     }
 }
+impl From<CheckRunCompleted> for CheckRunEvent {
+    fn from(value: CheckRunCompleted) -> Self {
+        Self::Completed(value)
+    }
+}
+impl From<CheckRunCreated> for CheckRunEvent {
+    fn from(value: CheckRunCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<CheckRunRequestedAction> for CheckRunEvent {
+    fn from(value: CheckRunRequestedAction) -> Self {
+        Self::RequestedAction(value)
+    }
+}
+impl From<CheckRunRerequested> for CheckRunEvent {
+    fn from(value: CheckRunRerequested) -> Self {
+        Self::Rerequested(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct CheckRunPullRequest {
@@ -4875,47 +4829,32 @@ impl std::convert::TryFrom<String> for CheckSuiteCompletedCheckSuiteStatus {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum CheckSuiteEvent {
-    #[doc = "check_suite completed event"]
-    #[serde(rename = "completed")]
-    Completed {
-        check_suite: CheckSuiteCompletedCheckSuite,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "check_suite requested event"]
-    #[serde(rename = "requested")]
-    Requested {
-        check_suite: CheckSuiteRequestedCheckSuite,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "check_suite rerequested event"]
-    #[serde(rename = "rerequested")]
-    Rerequested {
-        check_suite: CheckSuiteRerequestedCheckSuite,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+    Completed(CheckSuiteCompleted),
+    Requested(CheckSuiteRequested),
+    Rerequested(CheckSuiteRerequested),
 }
 impl From<&CheckSuiteEvent> for CheckSuiteEvent {
     fn from(value: &CheckSuiteEvent) -> Self {
         value.clone()
     }
 }
+impl From<CheckSuiteCompleted> for CheckSuiteEvent {
+    fn from(value: CheckSuiteCompleted) -> Self {
+        Self::Completed(value)
+    }
+}
+impl From<CheckSuiteRequested> for CheckSuiteEvent {
+    fn from(value: CheckSuiteRequested) -> Self {
+        Self::Requested(value)
+    }
+}
+impl From<CheckSuiteRerequested> for CheckSuiteEvent {
+    fn from(value: CheckSuiteRerequested) -> Self {
+        Self::Rerequested(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct CheckSuiteRequested {
@@ -6186,110 +6125,50 @@ impl From<&CodeScanningAlertCreatedAlertTool> for CodeScanningAlertCreatedAlertT
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum CodeScanningAlertEvent {
-    #[doc = "code_scanning_alert appeared_in_branch event"]
-    #[serde(rename = "appeared_in_branch")]
-    AppearedInBranch {
-        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."]
-        commit_oid: String,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: 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")]
-        ref_: String,
-        repository: Repository,
-        sender: GithubOrg,
-    },
-    #[doc = "code_scanning_alert closed_by_user event"]
-    #[serde(rename = "closed_by_user")]
-    ClosedByUser {
-        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."]
-        commit_oid: String,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: 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")]
-        ref_: String,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "code_scanning_alert created event"]
-    #[serde(rename = "created")]
-    Created {
-        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."]
-        commit_oid: String,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: 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")]
-        ref_: String,
-        repository: Repository,
-        sender: GithubOrg,
-    },
-    #[doc = "code_scanning_alert fixed event"]
-    #[serde(rename = "fixed")]
-    Fixed {
-        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."]
-        commit_oid: String,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: 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")]
-        ref_: String,
-        repository: Repository,
-        sender: GithubOrg,
-    },
-    #[doc = "code_scanning_alert reopened event"]
-    #[serde(rename = "reopened")]
-    Reopened {
-        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."]
-        commit_oid: String,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: 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")]
-        ref_: String,
-        repository: Repository,
-        sender: GithubOrg,
-    },
-    #[doc = "code_scanning_alert reopened_by_user event"]
-    #[serde(rename = "reopened_by_user")]
-    ReopenedByUser {
-        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."]
-        commit_oid: String,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: 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")]
-        ref_: String,
-        repository: Repository,
-        sender: User,
-    },
+    AppearedInBranch(CodeScanningAlertAppearedInBranch),
+    ClosedByUser(CodeScanningAlertClosedByUser),
+    Created(CodeScanningAlertCreated),
+    Fixed(CodeScanningAlertFixed),
+    Reopened(CodeScanningAlertReopened),
+    ReopenedByUser(CodeScanningAlertReopenedByUser),
 }
 impl From<&CodeScanningAlertEvent> for CodeScanningAlertEvent {
     fn from(value: &CodeScanningAlertEvent) -> Self {
         value.clone()
     }
 }
+impl From<CodeScanningAlertAppearedInBranch> for CodeScanningAlertEvent {
+    fn from(value: CodeScanningAlertAppearedInBranch) -> Self {
+        Self::AppearedInBranch(value)
+    }
+}
+impl From<CodeScanningAlertClosedByUser> for CodeScanningAlertEvent {
+    fn from(value: CodeScanningAlertClosedByUser) -> Self {
+        Self::ClosedByUser(value)
+    }
+}
+impl From<CodeScanningAlertCreated> for CodeScanningAlertEvent {
+    fn from(value: CodeScanningAlertCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<CodeScanningAlertFixed> for CodeScanningAlertEvent {
+    fn from(value: CodeScanningAlertFixed) -> Self {
+        Self::Fixed(value)
+    }
+}
+impl From<CodeScanningAlertReopened> for CodeScanningAlertEvent {
+    fn from(value: CodeScanningAlertReopened) -> Self {
+        Self::Reopened(value)
+    }
+}
+impl From<CodeScanningAlertReopenedByUser> for CodeScanningAlertEvent {
+    fn from(value: CodeScanningAlertReopenedByUser) -> Self {
+        Self::ReopenedByUser(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct CodeScanningAlertFixed {
@@ -7178,25 +7057,28 @@ impl From<&CommitCommentCreatedComment> for CommitCommentCreatedComment {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
-pub enum CommitCommentEvent {
-    #[doc = "commit_comment created event\n\nA commit comment is created. The type of activity is specified in the `action` property. "]
-    #[serde(rename = "created")]
-    Created {
-        comment: CommitCommentCreatedComment,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+pub struct CommitCommentEvent(pub CommitCommentCreated);
+impl std::ops::Deref for CommitCommentEvent {
+    type Target = CommitCommentCreated;
+    fn deref(&self) -> &CommitCommentCreated {
+        &self.0
+    }
+}
+impl From<CommitCommentEvent> for CommitCommentCreated {
+    fn from(value: CommitCommentEvent) -> Self {
+        value.0
+    }
 }
 impl From<&CommitCommentEvent> for CommitCommentEvent {
     fn from(value: &CommitCommentEvent) -> Self {
         value.clone()
     }
 }
+impl From<CommitCommentCreated> for CommitCommentEvent {
+    fn from(value: CommitCommentCreated) -> Self {
+        Self(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct CommitSimple {
@@ -7303,24 +7185,28 @@ impl From<&ContentReferenceCreatedContentReference> for ContentReferenceCreatedC
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
-pub enum ContentReferenceEvent {
-    #[doc = "content_reference created event"]
-    #[serde(rename = "created")]
-    Created {
-        content_reference: ContentReferenceCreatedContentReference,
-        installation: InstallationLite,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+pub struct ContentReferenceEvent(pub ContentReferenceCreated);
+impl std::ops::Deref for ContentReferenceEvent {
+    type Target = ContentReferenceCreated;
+    fn deref(&self) -> &ContentReferenceCreated {
+        &self.0
+    }
+}
+impl From<ContentReferenceEvent> for ContentReferenceCreated {
+    fn from(value: ContentReferenceEvent) -> Self {
+        value.0
+    }
 }
 impl From<&ContentReferenceEvent> for ContentReferenceEvent {
     fn from(value: &ContentReferenceEvent) -> Self {
         value.clone()
     }
 }
+impl From<ContentReferenceCreated> for ContentReferenceEvent {
+    fn from(value: ContentReferenceCreated) -> Self {
+        Self(value)
+    }
+}
 #[doc = "A Git branch or tag is created."]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
@@ -7626,36 +7512,26 @@ impl From<&DeployKeyDeletedKey> for DeployKeyDeletedKey {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum DeployKeyEvent {
-    #[doc = "deploy_key created event"]
-    #[serde(rename = "created")]
-    Created {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        key: DeployKeyCreatedKey,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "deploy_key deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        key: DeployKeyDeletedKey,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+    Created(DeployKeyCreated),
+    Deleted(DeployKeyDeleted),
 }
 impl From<&DeployKeyEvent> for DeployKeyEvent {
     fn from(value: &DeployKeyEvent) -> Self {
         value.clone()
     }
 }
+impl From<DeployKeyCreated> for DeployKeyEvent {
+    fn from(value: DeployKeyCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<DeployKeyDeleted> for DeployKeyEvent {
+    fn from(value: DeployKeyDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct DeploymentCreated {
@@ -7756,27 +7632,28 @@ impl From<&DeploymentCreatedDeploymentPayload> for DeploymentCreatedDeploymentPa
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
-pub enum DeploymentEvent {
-    #[doc = "deployment created event"]
-    #[serde(rename = "created")]
-    Created {
-        deployment: DeploymentCreatedDeployment,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-        workflow: (),
-        workflow_run: (),
-    },
+pub struct DeploymentEvent(pub DeploymentCreated);
+impl std::ops::Deref for DeploymentEvent {
+    type Target = DeploymentCreated;
+    fn deref(&self) -> &DeploymentCreated {
+        &self.0
+    }
+}
+impl From<DeploymentEvent> for DeploymentCreated {
+    fn from(value: DeploymentEvent) -> Self {
+        value.0
+    }
 }
 impl From<&DeploymentEvent> for DeploymentEvent {
     fn from(value: &DeploymentEvent) -> Self {
         value.clone()
     }
 }
+impl From<DeploymentCreated> for DeploymentEvent {
+    fn from(value: DeploymentCreated) -> Self {
+        Self(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct DeploymentStatusCreated {
@@ -7902,26 +7779,28 @@ impl From<&DeploymentStatusCreatedDeploymentStatus> for DeploymentStatusCreatedD
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
-pub enum DeploymentStatusEvent {
-    #[doc = "deployment_status created event"]
-    #[serde(rename = "created")]
-    Created {
-        deployment: DeploymentStatusCreatedDeployment,
-        deployment_status: DeploymentStatusCreatedDeploymentStatus,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+pub struct DeploymentStatusEvent(pub DeploymentStatusCreated);
+impl std::ops::Deref for DeploymentStatusEvent {
+    type Target = DeploymentStatusCreated;
+    fn deref(&self) -> &DeploymentStatusCreated {
+        &self.0
+    }
+}
+impl From<DeploymentStatusEvent> for DeploymentStatusCreated {
+    fn from(value: DeploymentStatusEvent) -> Self {
+        value.0
+    }
 }
 impl From<&DeploymentStatusEvent> for DeploymentStatusEvent {
     fn from(value: &DeploymentStatusEvent) -> Self {
         value.clone()
     }
 }
+impl From<DeploymentStatusCreated> for DeploymentStatusEvent {
+    fn from(value: DeploymentStatusCreated) -> Self {
+        Self(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct Discussion {
@@ -8421,48 +8300,32 @@ impl From<&DiscussionCommentEditedComment> for DiscussionCommentEditedComment {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum DiscussionCommentEvent {
-    #[doc = "discussion_comment created event"]
-    #[serde(rename = "created")]
-    Created {
-        comment: DiscussionCommentCreatedComment,
-        discussion: Discussion,
-        installation: InstallationLite,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion_comment deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        comment: DiscussionCommentDeletedComment,
-        discussion: Discussion,
-        installation: InstallationLite,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion_comment edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: DiscussionCommentEditedChanges,
-        comment: DiscussionCommentEditedComment,
-        discussion: Discussion,
-        installation: InstallationLite,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+    Created(DiscussionCommentCreated),
+    Deleted(DiscussionCommentDeleted),
+    Edited(DiscussionCommentEdited),
 }
 impl From<&DiscussionCommentEvent> for DiscussionCommentEvent {
     fn from(value: &DiscussionCommentEvent) -> Self {
         value.clone()
     }
 }
+impl From<DiscussionCommentCreated> for DiscussionCommentEvent {
+    fn from(value: DiscussionCommentCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<DiscussionCommentDeleted> for DiscussionCommentEvent {
+    fn from(value: DiscussionCommentDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<DiscussionCommentEdited> for DiscussionCommentEvent {
+    fn from(value: DiscussionCommentEdited) -> Self {
+        Self::Edited(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct DiscussionCreated {
@@ -8682,165 +8545,92 @@ impl From<&DiscussionEditedChangesTitle> for DiscussionEditedChangesTitle {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum DiscussionEvent {
-    #[doc = "discussion answered event"]
-    #[serde(rename = "answered")]
-    Answered {
-        answer: DiscussionAnsweredAnswer,
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion category changed event"]
-    #[serde(rename = "category_changed")]
-    CategoryChanged {
-        changes: DiscussionCategoryChangedChanges,
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion created event"]
-    #[serde(rename = "created")]
-    Created {
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        changes: Option<DiscussionEditedChanges>,
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion labeled event"]
-    #[serde(rename = "labeled")]
-    Labeled {
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        label: Label,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion locked event"]
-    #[serde(rename = "locked")]
-    Locked {
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion pinned event"]
-    #[serde(rename = "pinned")]
-    Pinned {
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion transferred event"]
-    #[serde(rename = "transferred")]
-    Transferred {
-        changes: DiscussionTransferredChanges,
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion unanswered event"]
-    #[serde(rename = "unanswered")]
-    Unanswered {
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        old_answer: DiscussionUnansweredOldAnswer,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion unlabeled event"]
-    #[serde(rename = "unlabeled")]
-    Unlabeled {
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        label: Label,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion unlocked event"]
-    #[serde(rename = "unlocked")]
-    Unlocked {
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "discussion unpinned event"]
-    #[serde(rename = "unpinned")]
-    Unpinned {
-        discussion: Discussion,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+    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 From<&DiscussionEvent> for DiscussionEvent {
     fn from(value: &DiscussionEvent) -> Self {
         value.clone()
     }
 }
+impl From<DiscussionAnswered> for DiscussionEvent {
+    fn from(value: DiscussionAnswered) -> Self {
+        Self::Answered(value)
+    }
+}
+impl From<DiscussionCategoryChanged> for DiscussionEvent {
+    fn from(value: DiscussionCategoryChanged) -> Self {
+        Self::CategoryChanged(value)
+    }
+}
+impl From<DiscussionCreated> for DiscussionEvent {
+    fn from(value: DiscussionCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<DiscussionDeleted> for DiscussionEvent {
+    fn from(value: DiscussionDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<DiscussionEdited> for DiscussionEvent {
+    fn from(value: DiscussionEdited) -> Self {
+        Self::Edited(value)
+    }
+}
+impl From<DiscussionLabeled> for DiscussionEvent {
+    fn from(value: DiscussionLabeled) -> Self {
+        Self::Labeled(value)
+    }
+}
+impl From<DiscussionLocked> for DiscussionEvent {
+    fn from(value: DiscussionLocked) -> Self {
+        Self::Locked(value)
+    }
+}
+impl From<DiscussionPinned> for DiscussionEvent {
+    fn from(value: DiscussionPinned) -> Self {
+        Self::Pinned(value)
+    }
+}
+impl From<DiscussionTransferred> for DiscussionEvent {
+    fn from(value: DiscussionTransferred) -> Self {
+        Self::Transferred(value)
+    }
+}
+impl From<DiscussionUnanswered> for DiscussionEvent {
+    fn from(value: DiscussionUnanswered) -> Self {
+        Self::Unanswered(value)
+    }
+}
+impl From<DiscussionUnlabeled> for DiscussionEvent {
+    fn from(value: DiscussionUnlabeled) -> Self {
+        Self::Unlabeled(value)
+    }
+}
+impl From<DiscussionUnlocked> for DiscussionEvent {
+    fn from(value: DiscussionUnlocked) -> Self {
+        Self::Unlocked(value)
+    }
+}
+impl From<DiscussionUnpinned> for DiscussionEvent {
+    fn from(value: DiscussionUnpinned) -> Self {
+        Self::Unpinned(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct DiscussionLabeled {
@@ -9775,20 +9565,26 @@ impl From<&ForkEvent> for ForkEvent {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", content = "sender")]
-pub enum GithubAppAuthorizationEvent {
-    #[doc = "github_app_authorization revoked event"]
-    #[serde(rename = "revoked")]
-    Revoked(User),
+pub struct GithubAppAuthorizationEvent(pub GithubAppAuthorizationRevoked);
+impl std::ops::Deref for GithubAppAuthorizationEvent {
+    type Target = GithubAppAuthorizationRevoked;
+    fn deref(&self) -> &GithubAppAuthorizationRevoked {
+        &self.0
+    }
+}
+impl From<GithubAppAuthorizationEvent> for GithubAppAuthorizationRevoked {
+    fn from(value: GithubAppAuthorizationEvent) -> Self {
+        value.0
+    }
 }
 impl From<&GithubAppAuthorizationEvent> for GithubAppAuthorizationEvent {
     fn from(value: &GithubAppAuthorizationEvent) -> Self {
         value.clone()
     }
 }
-impl From<User> for GithubAppAuthorizationEvent {
-    fn from(value: User) -> Self {
-        Self::Revoked(value)
+impl From<GithubAppAuthorizationRevoked> for GithubAppAuthorizationEvent {
+    fn from(value: GithubAppAuthorizationRevoked) -> Self {
+        Self(value)
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
@@ -10216,69 +10012,44 @@ impl From<&InstallationDeletedRepositoriesItem> for InstallationDeletedRepositor
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum InstallationEvent {
-    #[doc = "installation created event"]
-    #[serde(rename = "created")]
-    Created {
-        installation: Installation,
-        #[doc = "An array of repository objects that the installation can access."]
-        #[serde(default, skip_serializing_if = "Vec::is_empty")]
-        repositories: Vec<InstallationCreatedRepositoriesItem>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        requester: Option<User>,
-        sender: User,
-    },
-    #[doc = "installation deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        installation: Installation,
-        #[doc = "An array of repository objects that the installation can access."]
-        #[serde(default, skip_serializing_if = "Vec::is_empty")]
-        repositories: Vec<InstallationDeletedRepositoriesItem>,
-        #[serde(default)]
-        requester: (),
-        sender: User,
-    },
-    #[doc = "installation new_permissions_accepted event"]
-    #[serde(rename = "new_permissions_accepted")]
-    NewPermissionsAccepted {
-        installation: Installation,
-        #[doc = "An array of repository objects that the installation can access."]
-        #[serde(default, skip_serializing_if = "Vec::is_empty")]
-        repositories: Vec<InstallationNewPermissionsAcceptedRepositoriesItem>,
-        #[serde(default)]
-        requester: (),
-        sender: User,
-    },
-    #[doc = "installation suspend event"]
-    #[serde(rename = "suspend")]
-    Suspend {
-        installation: Installation,
-        #[doc = "An array of repository objects that the installation can access."]
-        #[serde(default, skip_serializing_if = "Vec::is_empty")]
-        repositories: Vec<InstallationSuspendRepositoriesItem>,
-        #[serde(default)]
-        requester: (),
-        sender: User,
-    },
-    #[doc = "installation unsuspend event"]
-    #[serde(rename = "unsuspend")]
-    Unsuspend {
-        installation: Installation,
-        #[doc = "An array of repository objects that the installation can access."]
-        #[serde(default, skip_serializing_if = "Vec::is_empty")]
-        repositories: Vec<InstallationUnsuspendRepositoriesItem>,
-        #[serde(default)]
-        requester: (),
-        sender: User,
-    },
+    Created(InstallationCreated),
+    Deleted(InstallationDeleted),
+    NewPermissionsAccepted(InstallationNewPermissionsAccepted),
+    Suspend(InstallationSuspend),
+    Unsuspend(InstallationUnsuspend),
 }
 impl From<&InstallationEvent> for InstallationEvent {
     fn from(value: &InstallationEvent) -> Self {
         value.clone()
     }
 }
+impl From<InstallationCreated> for InstallationEvent {
+    fn from(value: InstallationCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<InstallationDeleted> for InstallationEvent {
+    fn from(value: InstallationDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<InstallationNewPermissionsAccepted> for InstallationEvent {
+    fn from(value: InstallationNewPermissionsAccepted) -> Self {
+        Self::NewPermissionsAccepted(value)
+    }
+}
+impl From<InstallationSuspend> for InstallationEvent {
+    fn from(value: InstallationSuspend) -> Self {
+        Self::Suspend(value)
+    }
+}
+impl From<InstallationUnsuspend> for InstallationEvent {
+    fn from(value: InstallationUnsuspend) -> Self {
+        Self::Unsuspend(value)
+    }
+}
 #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
 pub enum InstallationEventsItem {
     #[serde(rename = "check_run")]
@@ -12532,40 +12303,26 @@ impl std::convert::TryFrom<String> for InstallationRepositoriesAddedRepositorySe
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum InstallationRepositoriesEvent {
-    #[doc = "installation_repositories added event"]
-    #[serde(rename = "added")]
-    Added {
-        installation: Installation,
-        #[doc = "An array of repository objects, which were added to the installation."]
-        repositories_added: Vec<InstallationRepositoriesAddedRepositoriesAddedItem>,
-        #[doc = "An array of repository objects, which were removed from the installation."]
-        repositories_removed: Vec<InstallationRepositoriesAddedRepositoriesRemovedItem>,
-        #[doc = "Describe whether all repositories have been selected or there's a selection involved"]
-        repository_selection: InstallationRepositoriesAddedRepositorySelection,
-        requester: Option<User>,
-        sender: User,
-    },
-    #[doc = "installation_repositories removed event"]
-    #[serde(rename = "removed")]
-    Removed {
-        installation: Installation,
-        #[doc = "An array of repository objects, which were added to the installation."]
-        repositories_added: Vec<InstallationRepositoriesRemovedRepositoriesAddedItem>,
-        #[doc = "An array of repository objects, which were removed from the installation."]
-        repositories_removed: Vec<InstallationRepositoriesRemovedRepositoriesRemovedItem>,
-        #[doc = "Describe whether all repositories have been selected or there's a selection involved"]
-        repository_selection: InstallationRepositoriesRemovedRepositorySelection,
-        requester: Option<User>,
-        sender: User,
-    },
+    Added(InstallationRepositoriesAdded),
+    Removed(InstallationRepositoriesRemoved),
 }
 impl From<&InstallationRepositoriesEvent> for InstallationRepositoriesEvent {
     fn from(value: &InstallationRepositoriesEvent) -> Self {
         value.clone()
     }
 }
+impl From<InstallationRepositoriesAdded> for InstallationRepositoriesEvent {
+    fn from(value: InstallationRepositoriesAdded) -> Self {
+        Self::Added(value)
+    }
+}
+impl From<InstallationRepositoriesRemoved> for InstallationRepositoriesEvent {
+    fn from(value: InstallationRepositoriesRemoved) -> Self {
+        Self::Removed(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct InstallationRepositoriesRemoved {
@@ -13368,54 +13125,32 @@ impl From<&IssueCommentEditedChangesBody> for IssueCommentEditedChangesBody {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum IssueCommentEvent {
-    #[doc = "issue_comment created event"]
-    #[serde(rename = "created")]
-    Created {
-        comment: IssueComment,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[doc = "The [issue](https://docs.github.com/en/rest/reference/issues) the comment belongs to."]
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issue_comment deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        comment: IssueComment,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[doc = "The [issue](https://docs.github.com/en/rest/reference/issues) the comment belongs to."]
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issue_comment edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: IssueCommentEditedChanges,
-        comment: IssueComment,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[doc = "The [issue](https://docs.github.com/en/rest/reference/issues) the comment belongs to."]
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+    Created(IssueCommentCreated),
+    Deleted(IssueCommentDeleted),
+    Edited(IssueCommentEdited),
 }
 impl From<&IssueCommentEvent> for IssueCommentEvent {
     fn from(value: &IssueCommentEvent) -> Self {
         value.clone()
     }
 }
+impl From<IssueCommentCreated> for IssueCommentEvent {
+    fn from(value: IssueCommentCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<IssueCommentDeleted> for IssueCommentEvent {
+    fn from(value: IssueCommentDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<IssueCommentEdited> for IssueCommentEvent {
+    fn from(value: IssueCommentEdited) -> Self {
+        Self::Edited(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct IssuePullRequest {
@@ -13837,211 +13572,110 @@ impl From<&IssuesEditedChangesTitle> for IssuesEditedChangesTitle {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum IssuesEvent {
-    #[doc = "issues assigned event\n\nActivity related to an issue. The type of activity is specified in the action property."]
-    #[serde(rename = "assigned")]
-    Assigned {
-        #[doc = "The optional user who was assigned or unassigned from the issue."]
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        assignee: Option<User>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues closed event"]
-    #[serde(rename = "closed")]
-    Closed {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[doc = "The [issue](https://docs.github.com/en/rest/reference/issues) itself."]
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues demilestoned event"]
-    #[serde(rename = "demilestoned")]
-    Demilestoned {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        milestone: Milestone,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: IssuesEditedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        label: Option<Label>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues labeled event"]
-    #[serde(rename = "labeled")]
-    Labeled {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[doc = "The label that was added to the issue."]
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        label: Option<Label>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues locked event"]
-    #[serde(rename = "locked")]
-    Locked {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues milestoned event"]
-    #[serde(rename = "milestoned")]
-    Milestoned {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        milestone: Milestone,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues opened event"]
-    #[serde(rename = "opened")]
-    Opened {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        changes: Option<IssuesOpenedChanges>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues pinned event"]
-    #[serde(rename = "pinned")]
-    Pinned {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues reopened event"]
-    #[serde(rename = "reopened")]
-    Reopened {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues transferred event"]
-    #[serde(rename = "transferred")]
-    Transferred {
-        changes: IssuesTransferredChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues unassigned event"]
-    #[serde(rename = "unassigned")]
-    Unassigned {
-        #[doc = "The optional user who was assigned or unassigned from the issue."]
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        assignee: Option<User>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues unlabeled event"]
-    #[serde(rename = "unlabeled")]
-    Unlabeled {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[doc = "The label that was removed from the issue."]
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        label: Option<Label>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues unlocked event"]
-    #[serde(rename = "unlocked")]
-    Unlocked {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "issues unpinned event"]
-    #[serde(rename = "unpinned")]
-    Unpinned {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        issue: Issue,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+    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 From<&IssuesEvent> for IssuesEvent {
     fn from(value: &IssuesEvent) -> Self {
         value.clone()
     }
 }
+impl From<IssuesAssigned> for IssuesEvent {
+    fn from(value: IssuesAssigned) -> Self {
+        Self::Assigned(value)
+    }
+}
+impl From<IssuesClosed> for IssuesEvent {
+    fn from(value: IssuesClosed) -> Self {
+        Self::Closed(value)
+    }
+}
+impl From<IssuesDeleted> for IssuesEvent {
+    fn from(value: IssuesDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<IssuesDemilestoned> for IssuesEvent {
+    fn from(value: IssuesDemilestoned) -> Self {
+        Self::Demilestoned(value)
+    }
+}
+impl From<IssuesEdited> for IssuesEvent {
+    fn from(value: IssuesEdited) -> Self {
+        Self::Edited(value)
+    }
+}
+impl From<IssuesLabeled> for IssuesEvent {
+    fn from(value: IssuesLabeled) -> Self {
+        Self::Labeled(value)
+    }
+}
+impl From<IssuesLocked> for IssuesEvent {
+    fn from(value: IssuesLocked) -> Self {
+        Self::Locked(value)
+    }
+}
+impl From<IssuesMilestoned> for IssuesEvent {
+    fn from(value: IssuesMilestoned) -> Self {
+        Self::Milestoned(value)
+    }
+}
+impl From<IssuesOpened> for IssuesEvent {
+    fn from(value: IssuesOpened) -> Self {
+        Self::Opened(value)
+    }
+}
+impl From<IssuesPinned> for IssuesEvent {
+    fn from(value: IssuesPinned) -> Self {
+        Self::Pinned(value)
+    }
+}
+impl From<IssuesReopened> for IssuesEvent {
+    fn from(value: IssuesReopened) -> Self {
+        Self::Reopened(value)
+    }
+}
+impl From<IssuesTransferred> for IssuesEvent {
+    fn from(value: IssuesTransferred) -> Self {
+        Self::Transferred(value)
+    }
+}
+impl From<IssuesUnassigned> for IssuesEvent {
+    fn from(value: IssuesUnassigned) -> Self {
+        Self::Unassigned(value)
+    }
+}
+impl From<IssuesUnlabeled> for IssuesEvent {
+    fn from(value: IssuesUnlabeled) -> Self {
+        Self::Unlabeled(value)
+    }
+}
+impl From<IssuesUnlocked> for IssuesEvent {
+    fn from(value: IssuesUnlocked) -> Self {
+        Self::Unlocked(value)
+    }
+}
+impl From<IssuesUnpinned> for IssuesEvent {
+    fn from(value: IssuesUnpinned) -> Self {
+        Self::Unpinned(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct IssuesLabeled {
@@ -15007,52 +14641,32 @@ impl From<&LabelEditedChangesName> for LabelEditedChangesName {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum LabelEvent {
-    #[doc = "label created event"]
-    #[serde(rename = "created")]
-    Created {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[doc = "The label that was added."]
-        label: Label,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "label deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[doc = "The label that was removed."]
-        label: Label,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "label edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        changes: Option<LabelEditedChanges>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[doc = "The label that was edited."]
-        label: Label,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+    Created(LabelCreated),
+    Deleted(LabelDeleted),
+    Edited(LabelEdited),
 }
 impl From<&LabelEvent> for LabelEvent {
     fn from(value: &LabelEvent) -> Self {
         value.clone()
     }
 }
+impl From<LabelCreated> for LabelEvent {
+    fn from(value: LabelCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<LabelDeleted> for LabelEvent {
+    fn from(value: LabelDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<LabelEdited> for LabelEvent {
+    fn from(value: LabelEdited) -> Self {
+        Self::Edited(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct License {
@@ -15284,59 +14898,44 @@ impl From<&MarketplacePurchaseChangedSender> for MarketplacePurchaseChangedSende
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum MarketplacePurchaseEvent {
-    #[doc = "marketplace_purchase cancelled event"]
-    #[serde(rename = "cancelled")]
-    Cancelled {
-        effective_date: String,
-        marketplace_purchase: MarketplacePurchase,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        previous_marketplace_purchase: Option<MarketplacePurchase>,
-        sender: MarketplacePurchaseCancelledSender,
-    },
-    #[doc = "marketplace_purchase changed event"]
-    #[serde(rename = "changed")]
-    Changed {
-        effective_date: String,
-        marketplace_purchase: MarketplacePurchase,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        previous_marketplace_purchase: Option<MarketplacePurchase>,
-        sender: MarketplacePurchaseChangedSender,
-    },
-    #[doc = "marketplace_purchase pending_change event"]
-    #[serde(rename = "pending_change")]
-    PendingChange {
-        effective_date: String,
-        marketplace_purchase: MarketplacePurchase,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        previous_marketplace_purchase: Option<MarketplacePurchase>,
-        sender: MarketplacePurchasePendingChangeSender,
-    },
-    #[doc = "marketplace_purchase pending_change_cancelled event"]
-    #[serde(rename = "pending_change_cancelled")]
-    PendingChangeCancelled {
-        effective_date: String,
-        marketplace_purchase: MarketplacePurchase,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        previous_marketplace_purchase: Option<MarketplacePurchase>,
-        sender: MarketplacePurchasePendingChangeCancelledSender,
-    },
-    #[doc = "marketplace_purchase purchased event"]
-    #[serde(rename = "purchased")]
-    Purchased {
-        effective_date: String,
-        marketplace_purchase: MarketplacePurchase,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        previous_marketplace_purchase: Option<MarketplacePurchase>,
-        sender: MarketplacePurchasePurchasedSender,
-    },
+    Cancelled(MarketplacePurchaseCancelled),
+    Changed(MarketplacePurchaseChanged),
+    PendingChange(MarketplacePurchasePendingChange),
+    PendingChangeCancelled(MarketplacePurchasePendingChangeCancelled),
+    Purchased(MarketplacePurchasePurchased),
 }
 impl From<&MarketplacePurchaseEvent> for MarketplacePurchaseEvent {
     fn from(value: &MarketplacePurchaseEvent) -> Self {
         value.clone()
     }
 }
+impl From<MarketplacePurchaseCancelled> for MarketplacePurchaseEvent {
+    fn from(value: MarketplacePurchaseCancelled) -> Self {
+        Self::Cancelled(value)
+    }
+}
+impl From<MarketplacePurchaseChanged> for MarketplacePurchaseEvent {
+    fn from(value: MarketplacePurchaseChanged) -> Self {
+        Self::Changed(value)
+    }
+}
+impl From<MarketplacePurchasePendingChange> for MarketplacePurchaseEvent {
+    fn from(value: MarketplacePurchasePendingChange) -> Self {
+        Self::PendingChange(value)
+    }
+}
+impl From<MarketplacePurchasePendingChangeCancelled> for MarketplacePurchaseEvent {
+    fn from(value: MarketplacePurchasePendingChangeCancelled) -> Self {
+        Self::PendingChangeCancelled(value)
+    }
+}
+impl From<MarketplacePurchasePurchased> for MarketplacePurchaseEvent {
+    fn from(value: MarketplacePurchasePurchased) -> Self {
+        Self::Purchased(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct MarketplacePurchasePendingChange {
@@ -15838,47 +15437,32 @@ impl From<&MemberEditedChangesOldPermission> for MemberEditedChangesOldPermissio
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum MemberEvent {
-    #[doc = "member added event\n\nActivity related to repository collaborators. The type of activity is specified in the action property."]
-    #[serde(rename = "added")]
-    Added {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        changes: Option<MemberAddedChanges>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[doc = "The user that was added."]
-        member: User,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "member edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: MemberEditedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[doc = "The user who's permissions are changed."]
-        member: User,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "member removed event"]
-    #[serde(rename = "removed")]
-    Removed {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[doc = "The user that was removed."]
-        member: User,
-        repository: Repository,
-        sender: User,
-    },
+    Added(MemberAdded),
+    Edited(MemberEdited),
+    Removed(MemberRemoved),
 }
 impl From<&MemberEvent> for MemberEvent {
     fn from(value: &MemberEvent) -> Self {
         value.clone()
     }
 }
+impl From<MemberAdded> for MemberEvent {
+    fn from(value: MemberAdded) -> Self {
+        Self::Added(value)
+    }
+}
+impl From<MemberEdited> for MemberEvent {
+    fn from(value: MemberEdited) -> Self {
+        Self::Edited(value)
+    }
+}
+impl From<MemberRemoved> for MemberEvent {
+    fn from(value: MemberRemoved) -> Self {
+        Self::Removed(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct MemberRemoved {
@@ -16064,42 +15648,26 @@ impl std::convert::TryFrom<String> for MembershipAddedScope {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum MembershipEvent {
-    #[doc = "membership added event"]
-    #[serde(rename = "added")]
-    Added {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[doc = "The [user](https://docs.github.com/en/rest/reference/users) that was added or removed."]
-        member: User,
-        organization: Organization,
-        #[doc = "The scope of the membership. Currently, can only be `team`."]
-        scope: MembershipAddedScope,
-        sender: User,
-        #[doc = "The [team](https://docs.github.com/en/rest/reference/teams) for the membership."]
-        team: Team,
-    },
-    #[doc = "membership removed event"]
-    #[serde(rename = "removed")]
-    Removed {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[doc = "The [user](https://docs.github.com/en/rest/reference/users) that was added or removed."]
-        member: User,
-        organization: Organization,
-        #[doc = "The scope of the membership. Currently, can only be `team`."]
-        scope: MembershipRemovedScope,
-        sender: User,
-        #[doc = "The [team](https://docs.github.com/en/rest/reference/teams) for the membership."]
-        team: MembershipRemovedTeam,
-    },
+    Added(MembershipAdded),
+    Removed(MembershipRemoved),
 }
 impl From<&MembershipEvent> for MembershipEvent {
     fn from(value: &MembershipEvent) -> Self {
         value.clone()
     }
 }
+impl From<MembershipAdded> for MembershipEvent {
+    fn from(value: MembershipAdded) -> Self {
+        Self::Added(value)
+    }
+}
+impl From<MembershipRemoved> for MembershipEvent {
+    fn from(value: MembershipRemoved) -> Self {
+        Self::Removed(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct MembershipRemoved {
@@ -16374,23 +15942,28 @@ impl std::convert::TryFrom<String> for MetaDeletedHookConfigContentType {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
-pub enum MetaEvent {
-    #[doc = "meta deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        hook: MetaDeletedHook,
-        #[doc = "The id of the modified webhook."]
-        hook_id: i64,
-        repository: Repository,
-        sender: User,
-    },
+pub struct MetaEvent(pub MetaDeleted);
+impl std::ops::Deref for MetaEvent {
+    type Target = MetaDeleted;
+    fn deref(&self) -> &MetaDeleted {
+        &self.0
+    }
+}
+impl From<MetaEvent> for MetaDeleted {
+    fn from(value: MetaEvent) -> Self {
+        value.0
+    }
 }
 impl From<&MetaEvent> for MetaEvent {
     fn from(value: &MetaEvent) -> Self {
         value.clone()
     }
 }
+impl From<MetaDeleted> for MetaEvent {
+    fn from(value: MetaDeleted) -> Self {
+        Self(value)
+    }
+}
 #[doc = "A collection of related issues and pull requests."]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
@@ -16715,70 +16288,44 @@ impl From<&MilestoneEditedChangesTitle> for MilestoneEditedChangesTitle {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum MilestoneEvent {
-    #[doc = "milestone closed event"]
-    #[serde(rename = "closed")]
-    Closed {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        milestone: Milestone,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "milestone created event"]
-    #[serde(rename = "created")]
-    Created {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        milestone: Milestone,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "milestone deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        milestone: Milestone,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "milestone edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: MilestoneEditedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        milestone: Milestone,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "milestone opened event"]
-    #[serde(rename = "opened")]
-    Opened {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        milestone: Milestone,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+    Closed(MilestoneClosed),
+    Created(MilestoneCreated),
+    Deleted(MilestoneDeleted),
+    Edited(MilestoneEdited),
+    Opened(MilestoneOpened),
 }
 impl From<&MilestoneEvent> for MilestoneEvent {
     fn from(value: &MilestoneEvent) -> Self {
         value.clone()
     }
 }
+impl From<MilestoneClosed> for MilestoneEvent {
+    fn from(value: MilestoneClosed) -> Self {
+        Self::Closed(value)
+    }
+}
+impl From<MilestoneCreated> for MilestoneEvent {
+    fn from(value: MilestoneCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<MilestoneDeleted> for MilestoneEvent {
+    fn from(value: MilestoneDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<MilestoneEdited> for MilestoneEvent {
+    fn from(value: MilestoneEdited) -> Self {
+        Self::Edited(value)
+    }
+}
+impl From<MilestoneOpened> for MilestoneEvent {
+    fn from(value: MilestoneOpened) -> Self {
+        Self::Opened(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct MilestoneOpened {
@@ -16950,34 +16497,26 @@ impl std::convert::TryFrom<String> for OrgBlockBlockedAction {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum OrgBlockEvent {
-    #[doc = "org_block blocked event"]
-    #[serde(rename = "blocked")]
-    Blocked {
-        #[doc = "Information about the user that was blocked or unblocked."]
-        blocked_user: User,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        organization: Organization,
-        sender: User,
-    },
-    #[doc = "org_block unblocked event"]
-    #[serde(rename = "unblocked")]
-    Unblocked {
-        #[doc = "Information about the user that was blocked or unblocked."]
-        blocked_user: User,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        organization: Organization,
-        sender: User,
-    },
+    Blocked(OrgBlockBlocked),
+    Unblocked(OrgBlockUnblocked),
 }
 impl From<&OrgBlockEvent> for OrgBlockEvent {
     fn from(value: &OrgBlockEvent) -> Self {
         value.clone()
     }
 }
+impl From<OrgBlockBlocked> for OrgBlockEvent {
+    fn from(value: OrgBlockBlocked) -> Self {
+        Self::Blocked(value)
+    }
+}
+impl From<OrgBlockUnblocked> for OrgBlockEvent {
+    fn from(value: OrgBlockUnblocked) -> Self {
+        Self::Unblocked(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct OrgBlockUnblocked {
@@ -17121,60 +16660,44 @@ impl std::convert::TryFrom<String> for OrganizationDeletedAction {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum OrganizationEvent {
-    #[doc = "organization deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        membership: Membership,
-        organization: Organization,
-        sender: User,
-    },
-    #[doc = "organization member_added event"]
-    #[serde(rename = "member_added")]
-    MemberAdded {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        membership: Membership,
-        organization: Organization,
-        sender: User,
-    },
-    #[doc = "organization member_invited event"]
-    #[serde(rename = "member_invited")]
-    MemberInvited {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        invitation: OrganizationMemberInvitedInvitation,
-        organization: Organization,
-        sender: User,
-        user: User,
-    },
-    #[doc = "organization member_removed event"]
-    #[serde(rename = "member_removed")]
-    MemberRemoved {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        membership: Membership,
-        organization: Organization,
-        sender: User,
-    },
-    #[doc = "organization renamed event"]
-    #[serde(rename = "renamed")]
-    Renamed {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        membership: Membership,
-        organization: Organization,
-        sender: User,
-    },
+    Deleted(OrganizationDeleted),
+    MemberAdded(OrganizationMemberAdded),
+    MemberInvited(OrganizationMemberInvited),
+    MemberRemoved(OrganizationMemberRemoved),
+    Renamed(OrganizationRenamed),
 }
 impl From<&OrganizationEvent> for OrganizationEvent {
     fn from(value: &OrganizationEvent) -> Self {
         value.clone()
     }
 }
+impl From<OrganizationDeleted> for OrganizationEvent {
+    fn from(value: OrganizationDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<OrganizationMemberAdded> for OrganizationEvent {
+    fn from(value: OrganizationMemberAdded) -> Self {
+        Self::MemberAdded(value)
+    }
+}
+impl From<OrganizationMemberInvited> for OrganizationEvent {
+    fn from(value: OrganizationMemberInvited) -> Self {
+        Self::MemberInvited(value)
+    }
+}
+impl From<OrganizationMemberRemoved> for OrganizationEvent {
+    fn from(value: OrganizationMemberRemoved) -> Self {
+        Self::MemberRemoved(value)
+    }
+}
+impl From<OrganizationRenamed> for OrganizationEvent {
+    fn from(value: OrganizationRenamed) -> Self {
+        Self::Renamed(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct OrganizationMemberAdded {
@@ -17434,32 +16957,26 @@ impl std::convert::TryFrom<String> for OrganizationRenamedAction {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum PackageEvent {
-    #[doc = "package published event"]
-    #[serde(rename = "published")]
-    Published {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        package: PackagePublishedPackage,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "package updated event"]
-    #[serde(rename = "updated")]
-    Updated {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        package: PackageUpdatedPackage,
-        repository: Repository,
-        sender: User,
-    },
+    Published(PackagePublished),
+    Updated(PackageUpdated),
 }
 impl From<&PackageEvent> for PackageEvent {
     fn from(value: &PackageEvent) -> Self {
         value.clone()
     }
 }
+impl From<PackagePublished> for PackageEvent {
+    fn from(value: PackagePublished) -> Self {
+        Self::Published(value)
+    }
+}
+impl From<PackageUpdated> for PackageEvent {
+    fn from(value: PackageUpdated) -> Self {
+        Self::Updated(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct PackagePublished {
@@ -18309,72 +17826,44 @@ impl From<&ProjectCardEditedChangesNote> for ProjectCardEditedChangesNote {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum ProjectCardEvent {
-    #[doc = "project_card converted event"]
-    #[serde(rename = "converted")]
-    Converted {
-        changes: ProjectCardConvertedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project_card: ProjectCard,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "project_card created event"]
-    #[serde(rename = "created")]
-    Created {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project_card: ProjectCard,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "project_card deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project_card: ProjectCard,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "project_card edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: ProjectCardEditedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project_card: ProjectCard,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "project_card moved event"]
-    #[serde(rename = "moved")]
-    Moved {
-        changes: ProjectCardMovedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project_card: ProjectCard,
-        repository: Repository,
-        sender: User,
-    },
+    Converted(ProjectCardConverted),
+    Created(ProjectCardCreated),
+    Deleted(ProjectCardDeleted),
+    Edited(ProjectCardEdited),
+    Moved(ProjectCardMoved),
 }
 impl From<&ProjectCardEvent> for ProjectCardEvent {
     fn from(value: &ProjectCardEvent) -> Self {
         value.clone()
     }
 }
+impl From<ProjectCardConverted> for ProjectCardEvent {
+    fn from(value: ProjectCardConverted) -> Self {
+        Self::Converted(value)
+    }
+}
+impl From<ProjectCardCreated> for ProjectCardEvent {
+    fn from(value: ProjectCardCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<ProjectCardDeleted> for ProjectCardEvent {
+    fn from(value: ProjectCardDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<ProjectCardEdited> for ProjectCardEvent {
+    fn from(value: ProjectCardEdited) -> Self {
+        Self::Edited(value)
+    }
+}
+impl From<ProjectCardMoved> for ProjectCardEvent {
+    fn from(value: ProjectCardMoved) -> Self {
+        Self::Moved(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct ProjectCardMoved {
@@ -18743,59 +18232,38 @@ impl From<&ProjectColumnEditedChangesName> for ProjectColumnEditedChangesName {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum ProjectColumnEvent {
-    #[doc = "project_column created event"]
-    #[serde(rename = "created")]
-    Created {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project_column: ProjectColumn,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "project_column deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project_column: ProjectColumn,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "project_column edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: ProjectColumnEditedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project_column: ProjectColumn,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "project_column moved event"]
-    #[serde(rename = "moved")]
-    Moved {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project_column: ProjectColumn,
-        repository: Repository,
-        sender: User,
-    },
+    Created(ProjectColumnCreated),
+    Deleted(ProjectColumnDeleted),
+    Edited(ProjectColumnEdited),
+    Moved(ProjectColumnMoved),
 }
 impl From<&ProjectColumnEvent> for ProjectColumnEvent {
     fn from(value: &ProjectColumnEvent) -> Self {
         value.clone()
     }
 }
+impl From<ProjectColumnCreated> for ProjectColumnEvent {
+    fn from(value: ProjectColumnCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<ProjectColumnDeleted> for ProjectColumnEvent {
+    fn from(value: ProjectColumnDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<ProjectColumnEdited> for ProjectColumnEvent {
+    fn from(value: ProjectColumnEdited) -> Self {
+        Self::Edited(value)
+    }
+}
+impl From<ProjectColumnMoved> for ProjectColumnEvent {
+    fn from(value: ProjectColumnMoved) -> Self {
+        Self::Moved(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct ProjectColumnMoved {
@@ -19059,89 +18527,63 @@ impl From<&ProjectEditedChanges> for ProjectEditedChanges {
 #[serde(deny_unknown_fields)]
 pub struct ProjectEditedChangesBody {
     #[doc = "The previous version of the body if the action was `edited`."]
-    pub from: String,
-}
-impl From<&ProjectEditedChangesBody> for ProjectEditedChangesBody {
-    fn from(value: &ProjectEditedChangesBody) -> Self {
-        value.clone()
-    }
-}
-#[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(deny_unknown_fields)]
-pub struct ProjectEditedChangesName {
-    #[doc = "The changes to the project if the action was `edited`."]
-    pub from: String,
-}
-impl From<&ProjectEditedChangesName> for ProjectEditedChangesName {
-    fn from(value: &ProjectEditedChangesName) -> Self {
-        value.clone()
-    }
-}
-#[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
-pub enum ProjectEvent {
-    #[doc = "project closed event"]
-    #[serde(rename = "closed")]
-    Closed {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project: Project,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "project created event"]
-    #[serde(rename = "created")]
-    Created {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project: Project,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "project deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project: Project,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "project edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: ProjectEditedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project: Project,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "project reopened event"]
-    #[serde(rename = "reopened")]
-    Reopened {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        project: Project,
-        repository: Repository,
-        sender: User,
-    },
+    pub from: String,
+}
+impl From<&ProjectEditedChangesBody> for ProjectEditedChangesBody {
+    fn from(value: &ProjectEditedChangesBody) -> Self {
+        value.clone()
+    }
+}
+#[derive(Clone, Debug, Deserialize, Serialize)]
+#[serde(deny_unknown_fields)]
+pub struct ProjectEditedChangesName {
+    #[doc = "The changes to the project if the action was `edited`."]
+    pub from: String,
+}
+impl From<&ProjectEditedChangesName> for ProjectEditedChangesName {
+    fn from(value: &ProjectEditedChangesName) -> Self {
+        value.clone()
+    }
+}
+#[derive(Clone, Debug, Deserialize, Serialize)]
+#[serde(untagged)]
+pub enum ProjectEvent {
+    Closed(ProjectClosed),
+    Created(ProjectCreated),
+    Deleted(ProjectDeleted),
+    Edited(ProjectEdited),
+    Reopened(ProjectReopened),
 }
 impl From<&ProjectEvent> for ProjectEvent {
     fn from(value: &ProjectEvent) -> Self {
         value.clone()
     }
 }
+impl From<ProjectClosed> for ProjectEvent {
+    fn from(value: ProjectClosed) -> Self {
+        Self::Closed(value)
+    }
+}
+impl From<ProjectCreated> for ProjectEvent {
+    fn from(value: ProjectCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<ProjectDeleted> for ProjectEvent {
+    fn from(value: ProjectDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<ProjectEdited> for ProjectEvent {
+    fn from(value: ProjectEdited) -> Self {
+        Self::Edited(value)
+    }
+}
+impl From<ProjectReopened> for ProjectEvent {
+    fn from(value: ProjectReopened) -> Self {
+        Self::Reopened(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct ProjectReopened {
@@ -21272,51 +20714,32 @@ impl std::convert::TryFrom<String> for PullRequestReviewCommentEditedPullRequest
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum PullRequestReviewCommentEvent {
-    #[doc = "pull_request_review_comment created event"]
-    #[serde(rename = "created")]
-    Created {
-        comment: PullRequestReviewComment,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        pull_request: PullRequestReviewCommentCreatedPullRequest,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "pull_request_review_comment deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        comment: PullRequestReviewComment,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        pull_request: PullRequestReviewCommentDeletedPullRequest,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "pull_request_review_comment edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: PullRequestReviewCommentEditedChanges,
-        comment: PullRequestReviewComment,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        pull_request: PullRequestReviewCommentEditedPullRequest,
-        repository: Repository,
-        sender: User,
-    },
+    Created(PullRequestReviewCommentCreated),
+    Deleted(PullRequestReviewCommentDeleted),
+    Edited(PullRequestReviewCommentEdited),
 }
 impl From<&PullRequestReviewCommentEvent> for PullRequestReviewCommentEvent {
     fn from(value: &PullRequestReviewCommentEvent) -> Self {
         value.clone()
     }
 }
+impl From<PullRequestReviewCommentCreated> for PullRequestReviewCommentEvent {
+    fn from(value: PullRequestReviewCommentCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<PullRequestReviewCommentDeleted> for PullRequestReviewCommentEvent {
+    fn from(value: PullRequestReviewCommentDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<PullRequestReviewCommentEdited> for PullRequestReviewCommentEvent {
+    fn from(value: PullRequestReviewCommentEdited) -> Self {
+        Self::Edited(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct PullRequestReviewCommentLinks {
@@ -21692,51 +21115,32 @@ impl From<&PullRequestReviewEditedReviewLinks> for PullRequestReviewEditedReview
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum PullRequestReviewEvent {
-    #[doc = "pull_request_review dismissed event"]
-    #[serde(rename = "dismissed")]
-    Dismissed {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        pull_request: SimplePullRequest,
-        repository: Repository,
-        review: PullRequestReviewDismissedReview,
-        sender: User,
-    },
-    #[doc = "pull_request_review edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: PullRequestReviewEditedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        pull_request: SimplePullRequest,
-        repository: Repository,
-        review: PullRequestReviewEditedReview,
-        sender: User,
-    },
-    #[doc = "pull_request_review submitted event"]
-    #[serde(rename = "submitted")]
-    Submitted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        pull_request: SimplePullRequest,
-        repository: Repository,
-        review: PullRequestReviewSubmittedReview,
-        sender: User,
-    },
+    Dismissed(PullRequestReviewDismissed),
+    Edited(PullRequestReviewEdited),
+    Submitted(PullRequestReviewSubmitted),
 }
 impl From<&PullRequestReviewEvent> for PullRequestReviewEvent {
     fn from(value: &PullRequestReviewEvent) -> Self {
         value.clone()
     }
 }
+impl From<PullRequestReviewDismissed> for PullRequestReviewEvent {
+    fn from(value: PullRequestReviewDismissed) -> Self {
+        Self::Dismissed(value)
+    }
+}
+impl From<PullRequestReviewEdited> for PullRequestReviewEvent {
+    fn from(value: PullRequestReviewEdited) -> Self {
+        Self::Edited(value)
+    }
+}
+impl From<PullRequestReviewSubmitted> for PullRequestReviewEvent {
+    fn from(value: PullRequestReviewSubmitted) -> Self {
+        Self::Submitted(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged, deny_unknown_fields)]
 pub enum PullRequestReviewRequestRemoved {
@@ -22744,92 +22148,56 @@ impl From<&ReleaseEditedChangesName> for ReleaseEditedChangesName {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum ReleaseEvent {
-    #[doc = "release created event"]
-    #[serde(rename = "created")]
-    Created {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        release: Release,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "release deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        release: Release,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "release edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: ReleaseEditedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        release: Release,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "release prereleased event"]
-    #[serde(rename = "prereleased")]
-    Prereleased {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        release: Release,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "release published event"]
-    #[serde(rename = "published")]
-    Published {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        release: Release,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "release released event"]
-    #[serde(rename = "released")]
-    Released {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        release: Release,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "release unpublished event"]
-    #[serde(rename = "unpublished")]
-    Unpublished {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        release: Release,
-        repository: Repository,
-        sender: User,
-    },
+    Created(ReleaseCreated),
+    Deleted(ReleaseDeleted),
+    Edited(ReleaseEdited),
+    Prereleased(ReleasePrereleased),
+    Published(ReleasePublished),
+    Released(ReleaseReleased),
+    Unpublished(ReleaseUnpublished),
 }
 impl From<&ReleaseEvent> for ReleaseEvent {
     fn from(value: &ReleaseEvent) -> Self {
         value.clone()
     }
 }
+impl From<ReleaseCreated> for ReleaseEvent {
+    fn from(value: ReleaseCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<ReleaseDeleted> for ReleaseEvent {
+    fn from(value: ReleaseDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<ReleaseEdited> for ReleaseEvent {
+    fn from(value: ReleaseEdited) -> Self {
+        Self::Edited(value)
+    }
+}
+impl From<ReleasePrereleased> for ReleaseEvent {
+    fn from(value: ReleasePrereleased) -> Self {
+        Self::Prereleased(value)
+    }
+}
+impl From<ReleasePublished> for ReleaseEvent {
+    fn from(value: ReleasePublished) -> Self {
+        Self::Published(value)
+    }
+}
+impl From<ReleaseReleased> for ReleaseEvent {
+    fn from(value: ReleaseReleased) -> Self {
+        Self::Released(value)
+    }
+}
+impl From<ReleaseUnpublished> for ReleaseEvent {
+    fn from(value: ReleaseUnpublished) -> Self {
+        Self::Unpublished(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct ReleasePrereleased {
@@ -23448,25 +22816,28 @@ impl std::convert::TryFrom<String> for RepositoryDeletedAction {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
-pub enum RepositoryDispatchEvent {
-    #[doc = "repository_dispatch on-demand-test event"]
-    #[serde(rename = "on-demand-test")]
-    OnDemandTest {
-        branch: String,
-        client_payload: std::collections::HashMap<String, serde_json::Value>,
-        installation: InstallationLite,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+pub struct RepositoryDispatchEvent(pub RepositoryDispatchOnDemandTest);
+impl std::ops::Deref for RepositoryDispatchEvent {
+    type Target = RepositoryDispatchOnDemandTest;
+    fn deref(&self) -> &RepositoryDispatchOnDemandTest {
+        &self.0
+    }
+}
+impl From<RepositoryDispatchEvent> for RepositoryDispatchOnDemandTest {
+    fn from(value: RepositoryDispatchEvent) -> Self {
+        value.0
+    }
 }
 impl From<&RepositoryDispatchEvent> for RepositoryDispatchEvent {
     fn from(value: &RepositoryDispatchEvent) -> Self {
         value.clone()
     }
 }
+impl From<RepositoryDispatchOnDemandTest> for RepositoryDispatchEvent {
+    fn from(value: RepositoryDispatchOnDemandTest) -> Self {
+        Self(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct RepositoryDispatchOnDemandTest {
@@ -23635,107 +23006,68 @@ impl From<&RepositoryEditedChangesHomepage> for RepositoryEditedChangesHomepage
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum RepositoryEvent {
-    #[doc = "repository archived event"]
-    #[serde(rename = "archived")]
-    Archived {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "repository created event"]
-    #[serde(rename = "created")]
-    Created {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "repository deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "repository edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: RepositoryEditedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "repository privatized event"]
-    #[serde(rename = "privatized")]
-    Privatized {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "repository publicized event"]
-    #[serde(rename = "publicized")]
-    Publicized {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "repository renamed event"]
-    #[serde(rename = "renamed")]
-    Renamed {
-        changes: RepositoryRenamedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "repository transferred event"]
-    #[serde(rename = "transferred")]
-    Transferred {
-        changes: RepositoryTransferredChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "repository unarchived event"]
-    #[serde(rename = "unarchived")]
-    Unarchived {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+    Archived(RepositoryArchived),
+    Created(RepositoryCreated),
+    Deleted(RepositoryDeleted),
+    Edited(RepositoryEdited),
+    Privatized(RepositoryPrivatized),
+    Publicized(RepositoryPublicized),
+    Renamed(RepositoryRenamed),
+    Transferred(RepositoryTransferred),
+    Unarchived(RepositoryUnarchived),
 }
 impl From<&RepositoryEvent> for RepositoryEvent {
     fn from(value: &RepositoryEvent) -> Self {
         value.clone()
     }
 }
+impl From<RepositoryArchived> for RepositoryEvent {
+    fn from(value: RepositoryArchived) -> Self {
+        Self::Archived(value)
+    }
+}
+impl From<RepositoryCreated> for RepositoryEvent {
+    fn from(value: RepositoryCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<RepositoryDeleted> for RepositoryEvent {
+    fn from(value: RepositoryDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<RepositoryEdited> for RepositoryEvent {
+    fn from(value: RepositoryEdited) -> Self {
+        Self::Edited(value)
+    }
+}
+impl From<RepositoryPrivatized> for RepositoryEvent {
+    fn from(value: RepositoryPrivatized) -> Self {
+        Self::Privatized(value)
+    }
+}
+impl From<RepositoryPublicized> for RepositoryEvent {
+    fn from(value: RepositoryPublicized) -> Self {
+        Self::Publicized(value)
+    }
+}
+impl From<RepositoryRenamed> for RepositoryEvent {
+    fn from(value: RepositoryRenamed) -> Self {
+        Self::Renamed(value)
+    }
+}
+impl From<RepositoryTransferred> for RepositoryEvent {
+    fn from(value: RepositoryTransferred) -> Self {
+        Self::Transferred(value)
+    }
+}
+impl From<RepositoryUnarchived> for RepositoryEvent {
+    fn from(value: RepositoryUnarchived) -> Self {
+        Self::Unarchived(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct RepositoryImportEvent {
@@ -24437,41 +23769,32 @@ impl From<&RepositoryVulnerabilityAlertDismissAlert> for RepositoryVulnerability
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum RepositoryVulnerabilityAlertEvent {
-    #[doc = "repository_vulnerability_alert create event"]
-    #[serde(rename = "create")]
-    Create {
-        alert: RepositoryVulnerabilityAlertCreateAlert,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "repository_vulnerability_alert dismiss event"]
-    #[serde(rename = "dismiss")]
-    Dismiss {
-        alert: RepositoryVulnerabilityAlertDismissAlert,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "repository_vulnerability_alert resolve event"]
-    #[serde(rename = "resolve")]
-    Resolve {
-        alert: RepositoryVulnerabilityAlertResolveAlert,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+    Create(RepositoryVulnerabilityAlertCreate),
+    Dismiss(RepositoryVulnerabilityAlertDismiss),
+    Resolve(RepositoryVulnerabilityAlertResolve),
 }
 impl From<&RepositoryVulnerabilityAlertEvent> for RepositoryVulnerabilityAlertEvent {
     fn from(value: &RepositoryVulnerabilityAlertEvent) -> Self {
         value.clone()
     }
 }
+impl From<RepositoryVulnerabilityAlertCreate> for RepositoryVulnerabilityAlertEvent {
+    fn from(value: RepositoryVulnerabilityAlertCreate) -> Self {
+        Self::Create(value)
+    }
+}
+impl From<RepositoryVulnerabilityAlertDismiss> for RepositoryVulnerabilityAlertEvent {
+    fn from(value: RepositoryVulnerabilityAlertDismiss) -> Self {
+        Self::Dismiss(value)
+    }
+}
+impl From<RepositoryVulnerabilityAlertResolve> for RepositoryVulnerabilityAlertEvent {
+    fn from(value: RepositoryVulnerabilityAlertResolve) -> Self {
+        Self::Resolve(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct RepositoryVulnerabilityAlertResolve {
@@ -24637,46 +23960,32 @@ impl From<&SecretScanningAlertCreatedAlert> for SecretScanningAlertCreatedAlert
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum SecretScanningAlertEvent {
-    #[doc = "secret_scanning_alert created event"]
-    #[serde(rename = "created")]
-    Created {
-        alert: SecretScanningAlertCreatedAlert,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-    },
-    #[doc = "secret_scanning_alert reopened event"]
-    #[serde(rename = "reopened")]
-    Reopened {
-        alert: SecretScanningAlertReopenedAlert,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
-    #[doc = "secret_scanning_alert resolved event"]
-    #[serde(rename = "resolved")]
-    Resolved {
-        alert: SecretScanningAlertResolvedAlert,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+    Created(SecretScanningAlertCreated),
+    Reopened(SecretScanningAlertReopened),
+    Resolved(SecretScanningAlertResolved),
 }
 impl From<&SecretScanningAlertEvent> for SecretScanningAlertEvent {
     fn from(value: &SecretScanningAlertEvent) -> Self {
         value.clone()
     }
 }
+impl From<SecretScanningAlertCreated> for SecretScanningAlertEvent {
+    fn from(value: SecretScanningAlertCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<SecretScanningAlertReopened> for SecretScanningAlertEvent {
+    fn from(value: SecretScanningAlertReopened) -> Self {
+        Self::Reopened(value)
+    }
+}
+impl From<SecretScanningAlertResolved> for SecretScanningAlertEvent {
+    fn from(value: SecretScanningAlertResolved) -> Self {
+        Self::Resolved(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct SecretScanningAlertReopened {
@@ -24888,43 +24197,35 @@ impl std::convert::TryFrom<String> for SecretScanningAlertResolvedAlertResolutio
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", content = "security_advisory")]
+#[serde(untagged)]
 pub enum SecurityAdvisoryEvent {
-    #[doc = "security_advisory performed event"]
-    #[serde(rename = "performed")]
-    Performed(SecurityAdvisoryPerformedSecurityAdvisory),
-    #[doc = "security_advisory published event"]
-    #[serde(rename = "published")]
-    Published(SecurityAdvisoryPublishedSecurityAdvisory),
-    #[doc = "security_advisory updated event"]
-    #[serde(rename = "updated")]
-    Updated(SecurityAdvisoryUpdatedSecurityAdvisory),
-    #[doc = "security_advisory withdrawn event"]
-    #[serde(rename = "withdrawn")]
-    Withdrawn(SecurityAdvisoryWithdrawnSecurityAdvisory),
+    Performed(SecurityAdvisoryPerformed),
+    Published(SecurityAdvisoryPublished),
+    Updated(SecurityAdvisoryUpdated),
+    Withdrawn(SecurityAdvisoryWithdrawn),
 }
 impl From<&SecurityAdvisoryEvent> for SecurityAdvisoryEvent {
     fn from(value: &SecurityAdvisoryEvent) -> Self {
         value.clone()
     }
 }
-impl From<SecurityAdvisoryPerformedSecurityAdvisory> for SecurityAdvisoryEvent {
-    fn from(value: SecurityAdvisoryPerformedSecurityAdvisory) -> Self {
+impl From<SecurityAdvisoryPerformed> for SecurityAdvisoryEvent {
+    fn from(value: SecurityAdvisoryPerformed) -> Self {
         Self::Performed(value)
     }
 }
-impl From<SecurityAdvisoryPublishedSecurityAdvisory> for SecurityAdvisoryEvent {
-    fn from(value: SecurityAdvisoryPublishedSecurityAdvisory) -> Self {
+impl From<SecurityAdvisoryPublished> for SecurityAdvisoryEvent {
+    fn from(value: SecurityAdvisoryPublished) -> Self {
         Self::Published(value)
     }
 }
-impl From<SecurityAdvisoryUpdatedSecurityAdvisory> for SecurityAdvisoryEvent {
-    fn from(value: SecurityAdvisoryUpdatedSecurityAdvisory) -> Self {
+impl From<SecurityAdvisoryUpdated> for SecurityAdvisoryEvent {
+    fn from(value: SecurityAdvisoryUpdated) -> Self {
         Self::Updated(value)
     }
 }
-impl From<SecurityAdvisoryWithdrawnSecurityAdvisory> for SecurityAdvisoryEvent {
-    fn from(value: SecurityAdvisoryWithdrawnSecurityAdvisory) -> Self {
+impl From<SecurityAdvisoryWithdrawn> for SecurityAdvisoryEvent {
+    fn from(value: SecurityAdvisoryWithdrawn) -> Self {
         Self::Withdrawn(value)
     }
 }
@@ -26078,59 +25379,50 @@ impl From<&SponsorshipEditedSponsorship> for SponsorshipEditedSponsorship {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum SponsorshipEvent {
-    #[doc = "sponsorship cancelled event"]
-    #[serde(rename = "cancelled")]
-    Cancelled {
-        sender: User,
-        sponsorship: SponsorshipCancelledSponsorship,
-    },
-    #[doc = "sponsorship created event"]
-    #[serde(rename = "created")]
-    Created {
-        sender: User,
-        sponsorship: SponsorshipCreatedSponsorship,
-    },
-    #[doc = "sponsorship edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: SponsorshipEditedChanges,
-        sender: User,
-        sponsorship: SponsorshipEditedSponsorship,
-    },
-    #[doc = "sponsorship pending_cancellation event"]
-    #[serde(rename = "pending_cancellation")]
-    PendingCancellation {
-        #[doc = "The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect."]
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        effective_date: Option<String>,
-        sender: User,
-        sponsorship: SponsorshipPendingCancellationSponsorship,
-    },
-    #[doc = "sponsorship pending_tier_change event"]
-    #[serde(rename = "pending_tier_change")]
-    PendingTierChange {
-        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(default, skip_serializing_if = "Option::is_none")]
-        effective_date: Option<String>,
-        sender: User,
-        sponsorship: SponsorshipPendingTierChangeSponsorship,
-    },
-    #[doc = "sponsorship tier_changed event"]
-    #[serde(rename = "tier_changed")]
-    TierChanged {
-        changes: SponsorshipTierChangedChanges,
-        sender: User,
-        sponsorship: SponsorshipTierChangedSponsorship,
-    },
+    Cancelled(SponsorshipCancelled),
+    Created(SponsorshipCreated),
+    Edited(SponsorshipEdited),
+    PendingCancellation(SponsorshipPendingCancellation),
+    PendingTierChange(SponsorshipPendingTierChange),
+    TierChanged(SponsorshipTierChanged),
 }
 impl From<&SponsorshipEvent> for SponsorshipEvent {
     fn from(value: &SponsorshipEvent) -> Self {
         value.clone()
     }
 }
+impl From<SponsorshipCancelled> for SponsorshipEvent {
+    fn from(value: SponsorshipCancelled) -> Self {
+        Self::Cancelled(value)
+    }
+}
+impl From<SponsorshipCreated> for SponsorshipEvent {
+    fn from(value: SponsorshipCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<SponsorshipEdited> for SponsorshipEvent {
+    fn from(value: SponsorshipEdited) -> Self {
+        Self::Edited(value)
+    }
+}
+impl From<SponsorshipPendingCancellation> for SponsorshipEvent {
+    fn from(value: SponsorshipPendingCancellation) -> Self {
+        Self::PendingCancellation(value)
+    }
+}
+impl From<SponsorshipPendingTierChange> for SponsorshipEvent {
+    fn from(value: SponsorshipPendingTierChange) -> Self {
+        Self::PendingTierChange(value)
+    }
+}
+impl From<SponsorshipTierChanged> for SponsorshipEvent {
+    fn from(value: SponsorshipTierChanged) -> Self {
+        Self::TierChanged(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct SponsorshipPendingCancellation {
@@ -26537,38 +25829,26 @@ impl std::convert::TryFrom<String> for StarDeletedAction {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum StarEvent {
-    #[doc = "star created event"]
-    #[serde(rename = "created")]
-    Created {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        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."]
-        starred_at: String,
-    },
-    #[doc = "star deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        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."]
-        starred_at: (),
-    },
+    Created(StarCreated),
+    Deleted(StarDeleted),
 }
 impl From<&StarEvent> for StarEvent {
     fn from(value: &StarEvent) -> Self {
         value.clone()
     }
 }
+impl From<StarCreated> for StarEvent {
+    fn from(value: StarCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<StarDeleted> for StarEvent {
+    fn from(value: StarDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct StatusEvent {
@@ -27227,70 +26507,44 @@ impl From<&TeamEditedChangesRepositoryPermissionsFrom>
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum TeamEvent {
-    #[doc = "team added_to_repository event"]
-    #[serde(rename = "added_to_repository")]
-    AddedToRepository {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        organization: Organization,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        repository: Option<Repository>,
-        sender: User,
-        team: Team,
-    },
-    #[doc = "team created event"]
-    #[serde(rename = "created")]
-    Created {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        organization: Organization,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        repository: Option<Repository>,
-        sender: User,
-        team: Team,
-    },
-    #[doc = "team deleted event"]
-    #[serde(rename = "deleted")]
-    Deleted {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        organization: Organization,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        repository: Option<Repository>,
-        sender: User,
-        team: Team,
-    },
-    #[doc = "team edited event"]
-    #[serde(rename = "edited")]
-    Edited {
-        changes: TeamEditedChanges,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        organization: Organization,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        repository: Option<Repository>,
-        sender: User,
-        team: Team,
-    },
-    #[doc = "team removed_from_repository event"]
-    #[serde(rename = "removed_from_repository")]
-    RemovedFromRepository {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        organization: Organization,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        repository: Option<Repository>,
-        sender: User,
-        team: Team,
-    },
+    AddedToRepository(TeamAddedToRepository),
+    Created(TeamCreated),
+    Deleted(TeamDeleted),
+    Edited(TeamEdited),
+    RemovedFromRepository(TeamRemovedFromRepository),
 }
 impl From<&TeamEvent> for TeamEvent {
     fn from(value: &TeamEvent) -> Self {
         value.clone()
     }
 }
+impl From<TeamAddedToRepository> for TeamEvent {
+    fn from(value: TeamAddedToRepository) -> Self {
+        Self::AddedToRepository(value)
+    }
+}
+impl From<TeamCreated> for TeamEvent {
+    fn from(value: TeamCreated) -> Self {
+        Self::Created(value)
+    }
+}
+impl From<TeamDeleted> for TeamEvent {
+    fn from(value: TeamDeleted) -> Self {
+        Self::Deleted(value)
+    }
+}
+impl From<TeamEdited> for TeamEvent {
+    fn from(value: TeamEdited) -> Self {
+        Self::Edited(value)
+    }
+}
+impl From<TeamRemovedFromRepository> for TeamEvent {
+    fn from(value: TeamRemovedFromRepository) -> Self {
+        Self::RemovedFromRepository(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct TeamParent {
@@ -27563,24 +26817,28 @@ impl std::convert::TryFrom<String> for UserType {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
-pub enum WatchEvent {
-    #[doc = "watch started event"]
-    #[serde(rename = "started")]
-    Started {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-    },
+pub struct WatchEvent(pub WatchStarted);
+impl std::ops::Deref for WatchEvent {
+    type Target = WatchStarted;
+    fn deref(&self) -> &WatchStarted {
+        &self.0
+    }
+}
+impl From<WatchEvent> for WatchStarted {
+    fn from(value: WatchEvent) -> Self {
+        value.0
+    }
 }
 impl From<&WatchEvent> for WatchEvent {
     fn from(value: &WatchEvent) -> Self {
         value.clone()
     }
 }
+impl From<WatchStarted> for WatchEvent {
+    fn from(value: WatchStarted) -> Self {
+        Self(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct WatchStarted {
@@ -28062,47 +27320,32 @@ impl std::convert::TryFrom<String> for WorkflowJobConclusion {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum WorkflowJobEvent {
-    #[doc = "workflow_job completed event"]
-    #[serde(rename = "completed")]
-    Completed {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-        workflow_job: WorkflowJob,
-    },
-    #[doc = "workflow_job queued event"]
-    #[serde(rename = "queued")]
-    Queued {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-        workflow_job: WorkflowJobQueuedWorkflowJob,
-    },
-    #[doc = "workflow_job started event"]
-    #[serde(rename = "started")]
-    Started {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-        workflow_job: WorkflowJob,
-    },
+    Completed(WorkflowJobCompleted),
+    Queued(WorkflowJobQueued),
+    Started(WorkflowJobStarted),
 }
 impl From<&WorkflowJobEvent> for WorkflowJobEvent {
     fn from(value: &WorkflowJobEvent) -> Self {
         value.clone()
     }
 }
+impl From<WorkflowJobCompleted> for WorkflowJobEvent {
+    fn from(value: WorkflowJobCompleted) -> Self {
+        Self::Completed(value)
+    }
+}
+impl From<WorkflowJobQueued> for WorkflowJobEvent {
+    fn from(value: WorkflowJobQueued) -> Self {
+        Self::Queued(value)
+    }
+}
+impl From<WorkflowJobStarted> for WorkflowJobEvent {
+    fn from(value: WorkflowJobStarted) -> Self {
+        Self::Started(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct WorkflowJobQueued {
@@ -28512,38 +27755,26 @@ impl std::convert::TryFrom<String> for WorkflowRunConclusion {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "action", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum WorkflowRunEvent {
-    #[doc = "workflow_run completed event"]
-    #[serde(rename = "completed")]
-    Completed {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-        workflow: Workflow,
-        workflow_run: WorkflowRun,
-    },
-    #[doc = "workflow_run requested event"]
-    #[serde(rename = "requested")]
-    Requested {
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        installation: Option<InstallationLite>,
-        #[serde(default, skip_serializing_if = "Option::is_none")]
-        organization: Option<Organization>,
-        repository: Repository,
-        sender: User,
-        workflow: Workflow,
-        workflow_run: WorkflowRun,
-    },
+    Completed(WorkflowRunCompleted),
+    Requested(WorkflowRunRequested),
 }
 impl From<&WorkflowRunEvent> for WorkflowRunEvent {
     fn from(value: &WorkflowRunEvent) -> Self {
         value.clone()
     }
 }
+impl From<WorkflowRunCompleted> for WorkflowRunEvent {
+    fn from(value: WorkflowRunCompleted) -> Self {
+        Self::Completed(value)
+    }
+}
+impl From<WorkflowRunRequested> for WorkflowRunEvent {
+    fn from(value: WorkflowRunRequested) -> Self {
+        Self::Requested(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct WorkflowRunPullRequestsItem {
@@ -28703,32 +27934,26 @@ impl std::convert::TryFrom<String> for WorkflowRunStatus {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(tag = "status", deny_unknown_fields)]
+#[serde(untagged)]
 pub enum WorkflowStep {
-    #[doc = "Workflow Step (In Progress)"]
-    #[serde(rename = "in_progress")]
-    InProgress {
-        completed_at: (),
-        conclusion: (),
-        name: String,
-        number: i64,
-        started_at: String,
-    },
-    #[doc = "Workflow Step (Completed)"]
-    #[serde(rename = "completed")]
-    Completed {
-        completed_at: String,
-        conclusion: WorkflowStepCompletedConclusion,
-        name: String,
-        number: i64,
-        started_at: String,
-    },
+    InProgress(WorkflowStepInProgress),
+    Completed(WorkflowStepCompleted),
 }
 impl From<&WorkflowStep> for WorkflowStep {
     fn from(value: &WorkflowStep) -> Self {
         value.clone()
     }
 }
+impl From<WorkflowStepInProgress> for WorkflowStep {
+    fn from(value: WorkflowStepInProgress) -> Self {
+        Self::InProgress(value)
+    }
+}
+impl From<WorkflowStepCompleted> for WorkflowStep {
+    fn from(value: WorkflowStepCompleted) -> Self {
+        Self::Completed(value)
+    }
+}
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(deny_unknown_fields)]
 pub struct WorkflowStepCompleted {
diff --git a/typify-test/Cargo.toml b/typify-test/Cargo.toml
index 8456667..c824ed6 100644
--- a/typify-test/Cargo.toml
+++ b/typify-test/Cargo.toml
@@ -4,7 +4,7 @@ version = "0.0.0"
 edition = "2021"
 
 [dependencies]
-regress = "0.5.0"
+regress = "0.6.0"
 serde = "1.0.160"
 serde_json = "1.0.96"
 
diff --git a/typify/tests/schemas/id-or-name.json b/typify/tests/schemas/id-or-name.json
index e2a6d10..886c586 100644
--- a/typify/tests/schemas/id-or-name.json
+++ b/typify/tests/schemas/id-or-name.json
@@ -22,6 +22,28 @@
         }
       ]
     },
+    "IdOrYolo": {
+      "oneOf": [
+        {
+          "title": "Id",
+          "allOf": [
+            {
+              "type": "string",
+              "format": "uuid"
+            }
+          ]
+        },
+        {
+          "title": "Yolo",
+          "allOf": [
+            {
+              "type": "string",
+              "pattern": ".*"
+            }
+          ]
+        }
+      ]
+    },
     "Name": {
       "title": "A name unique within the parent collection",
       "description": "Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID though they may contain a UUID.",
diff --git a/typify/tests/schemas/id-or-name.rs b/typify/tests/schemas/id-or-name.rs
index faa47f2..accec50 100644
--- a/typify/tests/schemas/id-or-name.rs
+++ b/typify/tests/schemas/id-or-name.rs
@@ -118,6 +118,120 @@ impl From<Name> for IdOrNameRedundant {
         Self::Variant1(value)
     }
 }
+#[derive(Clone, Debug, Deserialize, Serialize)]
+#[serde(untagged)]
+pub enum IdOrYolo {
+    Id(uuid::Uuid),
+    Yolo(IdOrYoloYolo),
+}
+impl From<&IdOrYolo> for IdOrYolo {
+    fn from(value: &IdOrYolo) -> Self {
+        value.clone()
+    }
+}
+impl std::str::FromStr for IdOrYolo {
+    type Err = &'static str;
+    fn from_str(value: &str) -> Result<Self, &'static str> {
+        if let Ok(v) = value.parse() {
+            Ok(Self::Id(v))
+        } else if let Ok(v) = value.parse() {
+            Ok(Self::Yolo(v))
+        } else {
+            Err("string conversion failed for all variants")
+        }
+    }
+}
+impl std::convert::TryFrom<&str> for IdOrYolo {
+    type Error = &'static str;
+    fn try_from(value: &str) -> Result<Self, &'static str> {
+        value.parse()
+    }
+}
+impl std::convert::TryFrom<&String> for IdOrYolo {
+    type Error = &'static str;
+    fn try_from(value: &String) -> Result<Self, &'static str> {
+        value.parse()
+    }
+}
+impl std::convert::TryFrom<String> for IdOrYolo {
+    type Error = &'static str;
+    fn try_from(value: String) -> Result<Self, &'static str> {
+        value.parse()
+    }
+}
+impl ToString for IdOrYolo {
+    fn to_string(&self) -> String {
+        match self {
+            Self::Id(x) => x.to_string(),
+            Self::Yolo(x) => x.to_string(),
+        }
+    }
+}
+impl From<uuid::Uuid> for IdOrYolo {
+    fn from(value: uuid::Uuid) -> Self {
+        Self::Id(value)
+    }
+}
+impl From<IdOrYoloYolo> for IdOrYolo {
+    fn from(value: IdOrYoloYolo) -> Self {
+        Self::Yolo(value)
+    }
+}
+#[derive(Clone, Debug, Serialize)]
+pub struct IdOrYoloYolo(String);
+impl std::ops::Deref for IdOrYoloYolo {
+    type Target = String;
+    fn deref(&self) -> &String {
+        &self.0
+    }
+}
+impl From<IdOrYoloYolo> for String {
+    fn from(value: IdOrYoloYolo) -> Self {
+        value.0
+    }
+}
+impl From<&IdOrYoloYolo> for IdOrYoloYolo {
+    fn from(value: &IdOrYoloYolo) -> Self {
+        value.clone()
+    }
+}
+impl std::str::FromStr for IdOrYoloYolo {
+    type Err = &'static str;
+    fn from_str(value: &str) -> Result<Self, &'static str> {
+        if regress::Regex::new(".*").unwrap().find(value).is_none() {
+            return Err("doesn't match pattern \".*\"");
+        }
+        Ok(Self(value.to_string()))
+    }
+}
+impl std::convert::TryFrom<&str> for IdOrYoloYolo {
+    type Error = &'static str;
+    fn try_from(value: &str) -> Result<Self, &'static str> {
+        value.parse()
+    }
+}
+impl std::convert::TryFrom<&String> for IdOrYoloYolo {
+    type Error = &'static str;
+    fn try_from(value: &String) -> Result<Self, &'static str> {
+        value.parse()
+    }
+}
+impl std::convert::TryFrom<String> for IdOrYoloYolo {
+    type Error = &'static str;
+    fn try_from(value: String) -> Result<Self, &'static str> {
+        value.parse()
+    }
+}
+impl<'de> serde::Deserialize<'de> for IdOrYoloYolo {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: serde::Deserializer<'de>,
+    {
+        String::deserialize(deserializer)?
+            .parse()
+            .map_err(|e: &'static str| <D::Error as serde::de::Error>::custom(e.to_string()))
+    }
+}
 #[doc = "Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID though they may contain a UUID."]
 #[derive(Clone, Debug, Serialize)]
 pub struct Name(String);
diff --git a/typify/tests/schemas/various-enums.rs b/typify/tests/schemas/various-enums.rs
index 192e638..46f09ff 100644
--- a/typify/tests/schemas/various-enums.rs
+++ b/typify/tests/schemas/various-enums.rs
@@ -348,14 +348,20 @@ impl std::convert::TryFrom<String> for NullStringEnumWithUnknownFormatInner {
     }
 }
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(untagged)]
 pub enum OneOfTypes {
-    Variant0 { bar: i64 },
-    Variant1 { foo: String },
+    #[serde(rename = "bar")]
+    Bar(i64),
+    #[serde(rename = "foo")]
+    Foo(String),
 }
 impl From<&OneOfTypes> for OneOfTypes {
     fn from(value: &OneOfTypes) -> Self {
         value.clone()
     }
 }
+impl From<i64> for OneOfTypes {
+    fn from(value: i64) -> Self {
+        Self::Bar(value)
+    }
+}
 fn main() {}