diff --git a/.spi.yml b/.spi.yml index 7ce45f7db18..44c3facca84 100644 --- a/.spi.yml +++ b/.spi.yml @@ -14,6 +14,7 @@ builder: - GitHubRestAPICodes_Of_Conduct - GitHubRestAPICodespaces - GitHubRestAPICopilot + - GitHubRestAPICredentials - GitHubRestAPIDependabot - GitHubRestAPIDependency_Graph - GitHubRestAPIDesktop diff --git a/Mintfile b/Mintfile index 2f3aaf0b8b9..9beb12ae401 100644 --- a/Mintfile +++ b/Mintfile @@ -1,2 +1,2 @@ yonaskolb/Mint@0.17.5 -apple/swift-openapi-generator@1.2.1 +apple/swift-openapi-generator@1.7.2 diff --git a/Package.swift b/Package.swift index 6306bada50c..36b9524d022 100644 --- a/Package.swift +++ b/Package.swift @@ -23,6 +23,7 @@ let package = Package( .library(name: "GitHubRestAPICodes_Of_Conduct", targets: ["GitHubRestAPICodes_Of_Conduct"]), .library(name: "GitHubRestAPICodespaces", targets: ["GitHubRestAPICodespaces"]), .library(name: "GitHubRestAPICopilot", targets: ["GitHubRestAPICopilot"]), + .library(name: "GitHubRestAPICredentials", targets: ["GitHubRestAPICredentials"]), .library(name: "GitHubRestAPIDependabot", targets: ["GitHubRestAPIDependabot"]), .library(name: "GitHubRestAPIDependency_Graph", targets: ["GitHubRestAPIDependency_Graph"]), .library(name: "GitHubRestAPIDesktop", targets: ["GitHubRestAPIDesktop"]), @@ -155,6 +156,14 @@ let package = Package( ], path: "Sources/copilot" ), + .target( + name: "GitHubRestAPICredentials", + dependencies: [ + .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"), + .product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"), + ], + path: "Sources/credentials" + ), .target( name: "GitHubRestAPIDependabot", dependencies: [ diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index e3a45d02a04..c2e0eab2bc4 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -4317,6 +4317,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -5127,7 +5136,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -5145,7 +5154,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -5164,7 +5173,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -5182,7 +5191,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -5767,23 +5776,23 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - issues = try container.decodeIfPresent( + self.issues = try container.decodeIfPresent( Swift.String.self, forKey: .issues ) - checks = try container.decodeIfPresent( + self.checks = try container.decodeIfPresent( Swift.String.self, forKey: .checks ) - metadata = try container.decodeIfPresent( + self.metadata = try container.decodeIfPresent( Swift.String.self, forKey: .metadata ) - contents = try container.decodeIfPresent( + self.contents = try container.decodeIfPresent( Swift.String.self, forKey: .contents ) - deployments = try container.decodeIfPresent( + self.deployments = try container.decodeIfPresent( Swift.String.self, forKey: .deployments ) @@ -5798,23 +5807,23 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - issues, + self.issues, forKey: .issues ) try container.encodeIfPresent( - checks, + self.checks, forKey: .checks ) try container.encodeIfPresent( - metadata, + self.metadata, forKey: .metadata ) try container.encodeIfPresent( - contents, + self.contents, forKey: .contents ) try container.encodeIfPresent( - deployments, + self.deployments, forKey: .deployments ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -5920,7 +5929,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. public struct advanced_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -5942,7 +5951,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security`. public struct code_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -5968,7 +5977,7 @@ public enum Components { /// The enablement status of Dependabot security updates for the repository. /// /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -5994,7 +6003,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. public struct secret_scanningPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -6016,7 +6025,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -6038,7 +6047,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -6060,7 +6069,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -6818,7 +6827,7 @@ public enum Components { /// The image provider. /// /// - Remark: Generated from `#/components/schemas/nullable-actions-hosted-runner-pool-image/source`. - @frozen public enum sourcePayload: String, Codable, Hashable, Sendable { + @frozen public enum sourcePayload: String, Codable, Hashable, Sendable, CaseIterable { case github = "github" case partner = "partner" case custom = "custom" @@ -6957,7 +6966,7 @@ public enum Components { /// The status of the runner. /// /// - Remark: Generated from `#/components/schemas/actions-hosted-runner/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case Ready = "Ready" case Provisioning = "Provisioning" case Shutdown = "Shutdown" @@ -7064,7 +7073,7 @@ public enum Components { /// The image provider. /// /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-image/source`. - @frozen public enum sourcePayload: String, Codable, Hashable, Sendable { + @frozen public enum sourcePayload: String, Codable, Hashable, Sendable, CaseIterable { case github = "github" case partner = "partner" case custom = "custom" @@ -7161,7 +7170,7 @@ public enum Components { /// The policy that controls the repositories in the organization that are allowed to run GitHub Actions. /// /// - Remark: Generated from `#/components/schemas/enabled-repositories`. - @frozen public enum enabled_hyphen_repositories: String, Codable, Hashable, Sendable { + @frozen public enum enabled_hyphen_repositories: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case none = "none" case selected = "selected" @@ -7169,7 +7178,7 @@ public enum Components { /// The permissions policy that controls the actions and reusable workflows that are allowed to run. /// /// - Remark: Generated from `#/components/schemas/allowed-actions`. - @frozen public enum allowed_hyphen_actions: String, Codable, Hashable, Sendable { + @frozen public enum allowed_hyphen_actions: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case local_only = "local_only" case selected = "selected" @@ -7256,7 +7265,7 @@ public enum Components { /// The default workflow permissions granted to the GITHUB_TOKEN when running workflows. /// /// - Remark: Generated from `#/components/schemas/actions-default-workflow-permissions`. - @frozen public enum actions_hyphen_default_hyphen_workflow_hyphen_permissions: String, Codable, Hashable, Sendable { + @frozen public enum actions_hyphen_default_hyphen_workflow_hyphen_permissions: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -7430,7 +7439,7 @@ public enum Components { /// The type of label. Read-only labels are applied automatically when the runner is configured. /// /// - Remark: Generated from `#/components/schemas/runner-label/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case read_hyphen_only = "read-only" case custom = "custom" } @@ -7604,7 +7613,7 @@ public enum Components { /// Describe whether all repositories have been selected or there's a selection involved /// /// - Remark: Generated from `#/components/schemas/authentication-token/repository_selection`. - @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case selected = "selected" } @@ -7660,7 +7669,7 @@ public enum Components { /// Visibility of a secret /// /// - Remark: Generated from `#/components/schemas/organization-actions-secret/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -7776,7 +7785,7 @@ public enum Components { /// Visibility of a variable /// /// - Remark: Generated from `#/components/schemas/organization-actions-variable/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -8316,7 +8325,7 @@ public enum Components { /// The phase of the lifecycle that the job is currently in. /// /// - Remark: Generated from `#/components/schemas/job/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case queued = "queued" case in_progress = "in_progress" case completed = "completed" @@ -8331,7 +8340,7 @@ public enum Components { /// The outcome of the job. /// /// - Remark: Generated from `#/components/schemas/job/conclusion`. - @frozen public enum conclusionPayload: String, Codable, Hashable, Sendable { + @frozen public enum conclusionPayload: String, Codable, Hashable, Sendable, CaseIterable { case success = "success" case failure = "failure" case neutral = "neutral" @@ -8365,7 +8374,7 @@ public enum Components { /// The phase of the lifecycle that the job is currently in. /// /// - Remark: Generated from `#/components/schemas/job/stepsPayload/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case queued = "queued" case in_progress = "in_progress" case completed = "completed" @@ -8710,7 +8719,7 @@ public enum Components { /// `none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repositories only. `organization` level access allows sharing across the organization. /// /// - Remark: Generated from `#/components/schemas/actions-workflow-access-to-repository/access_level`. - @frozen public enum access_levelPayload: String, Codable, Hashable, Sendable { + @frozen public enum access_levelPayload: String, Codable, Hashable, Sendable, CaseIterable { case none = "none" case user = "user" case organization = "organization" @@ -9387,7 +9396,7 @@ public enum Components { /// Whether deployment to the environment(s) was approved or rejected or pending (with comments) /// /// - Remark: Generated from `#/components/schemas/environment-approvals/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case approved = "approved" case rejected = "rejected" case pending = "pending" @@ -9463,7 +9472,7 @@ public enum Components { /// Whether to approve or reject deployment to the specified environments. /// /// - Remark: Generated from `#/components/schemas/review-custom-gates-state-required/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case approved = "approved" case rejected = "rejected" } @@ -9499,7 +9508,7 @@ public enum Components { /// The type of reviewer. /// /// - Remark: Generated from `#/components/schemas/deployment-reviewer-type`. - @frozen public enum deployment_hyphen_reviewer_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum deployment_hyphen_reviewer_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case User = "User" case Team = "Team" } @@ -9591,19 +9600,19 @@ public enum Components { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -9611,8 +9620,8 @@ public enum Components { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/pending-deployment/reviewersPayload/reviewer`. @@ -10086,7 +10095,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/workflow/path`. public var path: Swift.String /// - Remark: Generated from `#/components/schemas/workflow/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case active = "active" case deleted = "deleted" case disabled_fork = "disabled_fork" @@ -10257,7 +10266,7 @@ public enum Components { /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -10336,7 +10345,7 @@ public enum Components { /// The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. /// /// - Remark: Generated from `#/components/parameters/actions-cache-list-sort`. - @frozen public enum actions_hyphen_cache_hyphen_list_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum actions_hyphen_cache_hyphen_list_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created_at = "created_at" case last_accessed_at = "last_accessed_at" case size_in_bytes = "size_in_bytes" @@ -10368,7 +10377,7 @@ public enum Components { /// Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`. /// /// - Remark: Generated from `#/components/parameters/workflow-run-status`. - @frozen public enum workflow_hyphen_run_hyphen_status: String, Codable, Hashable, Sendable { + @frozen public enum workflow_hyphen_run_hyphen_status: String, Codable, Hashable, Sendable, CaseIterable { case completed = "completed" case action_required = "action_required" case cancelled = "cancelled" @@ -10590,10 +10599,10 @@ public enum Components { self.body = body } } - public struct conflict: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/conflict/content`. + public struct internal_error: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/conflict/content/application\/json`. + /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. case json(Components.Schemas.basic_hyphen_error) /// The associated value of the enum case if `self` is `.json`. /// @@ -10609,19 +10618,19 @@ public enum Components { } } /// Received HTTP response body - public var body: Components.Responses.conflict.Body - /// Creates a new `conflict`. + public var body: Components.Responses.internal_error.Body + /// Creates a new `internal_error`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Components.Responses.conflict.Body) { + public init(body: Components.Responses.internal_error.Body) { self.body = body } } - public struct internal_error: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content`. + public struct conflict: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/conflict/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. + /// - Remark: Generated from `#/components/responses/conflict/content/application\/json`. case json(Components.Schemas.basic_hyphen_error) /// The associated value of the enum case if `self` is `.json`. /// @@ -10637,12 +10646,12 @@ public enum Components { } } /// Received HTTP response body - public var body: Components.Responses.internal_error.Body - /// Creates a new `internal_error`. + public var body: Components.Responses.conflict.Body + /// Creates a new `conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Components.Responses.internal_error.Body) { + public init(body: Components.Responses.conflict.Body) { self.body = body } } @@ -11458,7 +11467,7 @@ public enum Operations { /// The source of the runner image. /// /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/POST/requestBody/json/image/source`. - @frozen public enum sourcePayload: String, Codable, Hashable, Sendable { + @frozen public enum sourcePayload: String, Codable, Hashable, Sendable, CaseIterable { case github = "github" case partner = "partner" case custom = "custom" @@ -13102,6 +13111,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_set_hyphen_github_hyphen_actions_hyphen_permissions_hyphen_organization.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/permissions/put(actions/set-github-actions-permissions-organization)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -13383,6 +13400,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_set_hyphen_selected_hyphen_repositories_hyphen_enabled_hyphen_github_hyphen_actions_hyphen_organization.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/permissions/repositories/put(actions/set-selected-repositories-enabled-github-actions-organization)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -13460,6 +13485,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_enable_hyphen_selected_hyphen_repository_hyphen_github_hyphen_actions_hyphen_organization.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/permissions/repositories/{repository_id}/put(actions/enable-selected-repository-github-actions-organization)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -13537,6 +13570,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_disable_hyphen_selected_hyphen_repository_hyphen_github_hyphen_actions_hyphen_organization.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/permissions/repositories/{repository_id}/delete(actions/disable-selected-repository-github-actions-organization)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -13750,6 +13791,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_set_hyphen_allowed_hyphen_actions_hyphen_organization.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/permissions/selected-actions/put(actions/set-allowed-actions-organization)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -13967,6 +14016,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_set_hyphen_github_hyphen_actions_hyphen_default_hyphen_workflow_hyphen_permissions_hyphen_organization.Output.NoContent) + /// Success response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/permissions/workflow/put(actions/set-github-actions-default-workflow-permissions-organization)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -14230,7 +14287,7 @@ public enum Operations { /// Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. /// /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/POST/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case selected = "selected" case all = "all" case _private = "private" @@ -14608,7 +14665,7 @@ public enum Operations { /// Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. /// /// - Remark: Generated from `#/paths/orgs/{org}/actions/runner-groups/{runner_group_id}/PATCH/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case selected = "selected" case all = "all" case _private = "private" @@ -14823,6 +14880,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_from_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/delete(actions/delete-self-hosted-runner-group-from-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15333,6 +15398,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_set_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/put(actions/set-repo-access-to-self-hosted-runner-group-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15417,6 +15490,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_add_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/put(actions/add-repo-access-to-self-hosted-runner-group-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15501,6 +15582,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_remove_hyphen_repo_hyphen_access_hyphen_to_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_group_hyphen_in_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}/delete(actions/remove-repo-access-to-self-hosted-runner-group-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15818,6 +15907,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_set_hyphen_self_hyphen_hosted_hyphen_runners_hyphen_in_hyphen_group_hyphen_for_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/put(actions/set-self-hosted-runners-in-group-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15902,6 +15999,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_add_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_to_hyphen_group_hyphen_for_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/put(actions/add-self-hosted-runner-to-group-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15986,6 +16091,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_remove_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_group_hyphen_for_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}/delete(actions/remove-self-hosted-runner-from-group-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -17071,6 +17184,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/runners/{runner_id}/delete(actions/delete-self-hosted-runner-from-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -18481,7 +18602,7 @@ public enum Operations { /// Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. /// /// - Remark: Generated from `#/paths/orgs/{org}/actions/secrets/{secret_name}/PUT/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -18601,6 +18722,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_create_hyphen_or_hyphen_update_hyphen_org_hyphen_secret.Output.NoContent) + /// Response when updating a secret + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/secrets/{secret_name}/put(actions/create-or-update-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -18705,6 +18834,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_org_hyphen_secret.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/secrets/{secret_name}/delete(actions/delete-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -19010,6 +19147,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_set_hyphen_selected_hyphen_repos_hyphen_for_hyphen_org_hyphen_secret.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/secrets/{secret_name}/repositories/put(actions/set-selected-repos-for-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -19096,6 +19241,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_add_hyphen_selected_hyphen_repo_hyphen_to_hyphen_org_hyphen_secret.Output.NoContent) + /// No Content when repository was added to the selected list + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}/put(actions/add-selected-repo-to-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -19123,6 +19276,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.actions_sol_add_hyphen_selected_hyphen_repo_hyphen_to_hyphen_org_hyphen_secret.Output.Conflict) + /// Conflict when visibility type is not set to selected + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}/put(actions/add-selected-repo-to-org-secret)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -19209,6 +19370,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_remove_hyphen_selected_hyphen_repo_hyphen_from_hyphen_org_hyphen_secret.Output.NoContent) + /// Response when repository was removed from the selected list + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}/delete(actions/remove-selected-repo-from-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -19236,6 +19405,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.actions_sol_remove_hyphen_selected_hyphen_repo_hyphen_from_hyphen_org_hyphen_secret.Output.Conflict) + /// Conflict when visibility type not set to selected + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}/delete(actions/remove-selected-repo-from-org-secret)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -19519,7 +19696,7 @@ public enum Operations { /// The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. /// /// - Remark: Generated from `#/paths/orgs/{org}/actions/variables/POST/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -19857,7 +20034,7 @@ public enum Operations { /// The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. /// /// - Remark: Generated from `#/paths/orgs/{org}/actions/variables/{name}/PATCH/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -19923,6 +20100,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_update_hyphen_org_hyphen_variable.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/variables/{name}/patch(actions/update-org-variable)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -20002,6 +20187,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_org_hyphen_variable.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/variables/{name}/delete(actions/delete-org-variable)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -20200,6 +20393,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.actions_sol_list_hyphen_selected_hyphen_repos_hyphen_for_hyphen_org_hyphen_variable.Output.Conflict) + /// Response when the visibility of the variable is not set to `selected` + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/variables/{name}/repositories/get(actions/list-selected-repos-for-org-variable)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -20334,6 +20535,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_set_hyphen_selected_hyphen_repos_hyphen_for_hyphen_org_hyphen_variable.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/variables/{name}/repositories/put(actions/set-selected-repos-for-org-variable)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -20361,6 +20570,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.actions_sol_set_hyphen_selected_hyphen_repos_hyphen_for_hyphen_org_hyphen_variable.Output.Conflict) + /// Response when the visibility of the variable is not set to `selected` + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/variables/{name}/repositories/put(actions/set-selected-repos-for-org-variable)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -20446,6 +20663,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_add_hyphen_selected_hyphen_repo_hyphen_to_hyphen_org_hyphen_variable.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/variables/{name}/repositories/{repository_id}/put(actions/add-selected-repo-to-org-variable)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -20473,6 +20698,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.actions_sol_add_hyphen_selected_hyphen_repo_hyphen_to_hyphen_org_hyphen_variable.Output.Conflict) + /// Response when the visibility of the variable is not set to `selected` + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/variables/{name}/repositories/{repository_id}/put(actions/add-selected-repo-to-org-variable)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -20559,6 +20792,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_remove_hyphen_selected_hyphen_repo_hyphen_from_hyphen_org_hyphen_variable.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/variables/{name}/repositories/{repository_id}/delete(actions/remove-selected-repo-from-org-variable)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -20586,6 +20827,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.actions_sol_remove_hyphen_selected_hyphen_repo_hyphen_from_hyphen_org_hyphen_variable.Output.Conflict) + /// Response when the visibility of the variable is not set to `selected` + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/variables/{name}/repositories/{repository_id}/delete(actions/remove-selected-repo-from-org-variable)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -21042,6 +21291,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_artifact.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/artifacts/{artifact_id}/delete(actions/delete-artifact)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -21439,7 +21696,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/caches/GET/query/key`. public var key: Components.Parameters.actions_hyphen_cache_hyphen_key? /// - Remark: Generated from `#/components/parameters/actions-cache-list-sort`. - @frozen public enum actions_hyphen_cache_hyphen_list_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum actions_hyphen_cache_hyphen_list_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created_at = "created_at" case last_accessed_at = "last_accessed_at" case size_in_bytes = "size_in_bytes" @@ -21449,7 +21706,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/caches/GET/query/sort`. public var sort: Components.Parameters.actions_hyphen_cache_hyphen_list_hyphen_sort? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -21844,6 +22101,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_actions_hyphen_cache_hyphen_by_hyphen_id.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/caches/{cache_id}/delete(actions/delete-actions-cache-by-id)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -23435,6 +23700,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_set_hyphen_github_hyphen_actions_hyphen_permissions_hyphen_repository.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/permissions/put(actions/set-github-actions-permissions-repository)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -23670,6 +23943,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_set_hyphen_workflow_hyphen_access_hyphen_to_hyphen_repository.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/permissions/access/put(actions/set-workflow-access-to-repository)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -23901,6 +24182,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_set_hyphen_allowed_hyphen_actions_hyphen_repository.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/permissions/selected-actions/put(actions/set-allowed-actions-repository)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -24136,6 +24425,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_set_hyphen_github_hyphen_actions_hyphen_default_hyphen_workflow_hyphen_permissions_hyphen_repository.Output.NoContent) + /// Success response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/permissions/workflow/put(actions/set-github-actions-default-workflow-permissions-repository)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -24163,6 +24460,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.actions_sol_set_hyphen_github_hyphen_actions_hyphen_default_hyphen_workflow_hyphen_permissions_hyphen_repository.Output.Conflict) + /// Conflict response when changing a setting is prevented by the owning organization + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/permissions/workflow/put(actions/set-github-actions-default-workflow-permissions-repository)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -25307,6 +25612,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_self_hyphen_hosted_hyphen_runner_hyphen_from_hyphen_repo.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/runners/{runner_id}/delete(actions/delete-self-hosted-runner-from-repo)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -26253,7 +26566,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/runs/GET/query/event`. public var event: Components.Parameters.event? /// - Remark: Generated from `#/components/parameters/workflow-run-status`. - @frozen public enum workflow_hyphen_run_hyphen_status: String, Codable, Hashable, Sendable { + @frozen public enum workflow_hyphen_run_hyphen_status: String, Codable, Hashable, Sendable, CaseIterable { case completed = "completed" case action_required = "action_required" case cancelled = "cancelled" @@ -26721,6 +27034,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_workflow_hyphen_run.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/runs/{run_id}/delete(actions/delete-workflow-run)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -28101,19 +28422,19 @@ public enum Operations { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -28121,8 +28442,8 @@ public enum Operations { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule/POST/requestBody/content/application\/json`. @@ -28153,6 +28474,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_review_hyphen_custom_hyphen_gates_hyphen_for_hyphen_run.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule/post(actions/review-custom-gates-for-run)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -28398,7 +28727,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/runs/{run_id}/jobs/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/runs/{run_id}/jobs/GET/query/filter`. - @frozen public enum filterPayload: String, Codable, Hashable, Sendable { + @frozen public enum filterPayload: String, Codable, Hashable, Sendable, CaseIterable { case latest = "latest" case all = "all" } @@ -28768,6 +29097,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_workflow_hyphen_run_hyphen_logs.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/runs/{run_id}/logs/delete(actions/delete-workflow-run-logs)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -29081,7 +29418,7 @@ public enum Operations { /// Whether to approve or reject deployment to the specified environments. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments/POST/requestBody/json/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case approved = "approved" case rejected = "rejected" } @@ -30405,6 +30742,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_create_hyphen_or_hyphen_update_hyphen_repo_hyphen_secret.Output.NoContent) + /// Response when updating a secret + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/secrets/{secret_name}/put(actions/create-or-update-repo-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -30516,6 +30861,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_repo_hyphen_secret.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/secrets/{secret_name}/delete(actions/delete-repo-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -31187,6 +31540,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_update_hyphen_repo_hyphen_variable.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/variables/{name}/patch(actions/update-repo-variable)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -31273,6 +31634,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_repo_hyphen_variable.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/variables/{name}/delete(actions/delete-repo-variable)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -31794,6 +32163,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_disable_hyphen_workflow.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable/put(actions/disable-workflow)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -31973,6 +32350,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_create_hyphen_workflow_hyphen_dispatch.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches/post(actions/create-workflow-dispatch)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -32092,6 +32477,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_enable_hyphen_workflow.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable/put(actions/enable-workflow)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -32211,7 +32604,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs/GET/query/event`. public var event: Components.Parameters.event? /// - Remark: Generated from `#/components/parameters/workflow-run-status`. - @frozen public enum workflow_hyphen_run_hyphen_status: String, Codable, Hashable, Sendable { + @frozen public enum workflow_hyphen_run_hyphen_status: String, Codable, Hashable, Sendable, CaseIterable { case completed = "completed" case action_required = "action_required" case cancelled = "cancelled" @@ -33347,6 +33740,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_create_hyphen_or_hyphen_update_hyphen_environment_hyphen_secret.Output.NoContent) + /// Response when updating a secret + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}/put(actions/create-or-update-environment-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -33465,6 +33866,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_environment_hyphen_secret.Output.NoContent) + /// Default response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}/delete(actions/delete-environment-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -34164,6 +34573,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_update_hyphen_environment_hyphen_variable.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/environments/{environment_name}/variables/{name}/patch(actions/update-environment-variable)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -34257,6 +34674,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.actions_sol_delete_hyphen_environment_hyphen_variable.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/environments/{environment_name}/variables/{name}/delete(actions/delete-environment-variable)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index 6f47ce2a5da..8b22055871c 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -831,6 +831,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1686,7 +1695,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -1704,7 +1713,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -1723,7 +1732,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -1741,7 +1750,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -2280,7 +2289,7 @@ public enum Components { /// The state of the milestone. /// /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" } @@ -2404,7 +2413,7 @@ public enum Components { /// The color of the issue type. /// /// - Remark: Generated from `#/components/schemas/issue-type/color`. - @frozen public enum colorPayload: String, Codable, Hashable, Sendable { + @frozen public enum colorPayload: String, Codable, Hashable, Sendable, CaseIterable { case gray = "gray" case blue = "blue" case green = "green" @@ -2587,23 +2596,23 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - issues = try container.decodeIfPresent( + self.issues = try container.decodeIfPresent( Swift.String.self, forKey: .issues ) - checks = try container.decodeIfPresent( + self.checks = try container.decodeIfPresent( Swift.String.self, forKey: .checks ) - metadata = try container.decodeIfPresent( + self.metadata = try container.decodeIfPresent( Swift.String.self, forKey: .metadata ) - contents = try container.decodeIfPresent( + self.contents = try container.decodeIfPresent( Swift.String.self, forKey: .contents ) - deployments = try container.decodeIfPresent( + self.deployments = try container.decodeIfPresent( Swift.String.self, forKey: .deployments ) @@ -2618,23 +2627,23 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - issues, + self.issues, forKey: .issues ) try container.encodeIfPresent( - checks, + self.checks, forKey: .checks ) try container.encodeIfPresent( - metadata, + self.metadata, forKey: .metadata ) try container.encodeIfPresent( - contents, + self.contents, forKey: .contents ) try container.encodeIfPresent( - deployments, + self.deployments, forKey: .deployments ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -2738,7 +2747,7 @@ public enum Components { /// How the author is associated with the repository. /// /// - Remark: Generated from `#/components/schemas/author-association`. - @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable { + @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable, CaseIterable { case COLLABORATOR = "COLLABORATOR" case CONTRIBUTOR = "CONTRIBUTOR" case FIRST_TIMER = "FIRST_TIMER" @@ -2881,7 +2890,7 @@ public enum Components { /// The reason for the current state /// /// - Remark: Generated from `#/components/schemas/issue/state_reason`. - @frozen public enum state_reasonPayload: String, Codable, Hashable, Sendable { + @frozen public enum state_reasonPayload: String, Codable, Hashable, Sendable, CaseIterable { case completed = "completed" case reopened = "reopened" case not_planned = "not_planned" @@ -3693,7 +3702,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. public struct advanced_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -3715,7 +3724,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security`. public struct code_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -3741,7 +3750,7 @@ public enum Components { /// The enablement status of Dependabot security updates for the repository. /// /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -3767,7 +3776,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. public struct secret_scanningPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -3789,7 +3798,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -3811,7 +3820,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -3833,7 +3842,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -4774,7 +4783,7 @@ public enum Components { /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -4825,7 +4834,7 @@ public enum Components { /// The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. /// /// - Remark: Generated from `#/components/parameters/sort-starred`. - @frozen public enum sort_hyphen_starred: String, Codable, Hashable, Sendable { + @frozen public enum sort_hyphen_starred: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -5162,6 +5171,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//events/get(activity/list-public-events)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5571,6 +5588,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//networks/{owner}/{repo}/events/get(activity/list-public-events-for-repo-network)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5805,6 +5830,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//notifications/get(activity/list-notifications-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6066,6 +6099,14 @@ public enum Operations { /// /// HTTP response code: `205 resetContent`. case resetContent(Operations.activity_sol_mark_hyphen_notifications_hyphen_as_hyphen_read.Output.ResetContent) + /// Reset Content + /// + /// - Remark: Generated from `#/paths//notifications/put(activity/mark-notifications-as-read)/responses/205`. + /// + /// HTTP response code: `205 resetContent`. + public static var resetContent: Self { + .resetContent(.init()) + } /// The associated value of the enum case if `self` is `.resetContent`. /// /// - Throws: An error if `self` is not `.resetContent`. @@ -6089,6 +6130,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//notifications/put(activity/mark-notifications-as-read)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6290,6 +6339,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/get(activity/get-thread)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6444,6 +6501,14 @@ public enum Operations { /// /// HTTP response code: `205 resetContent`. case resetContent(Operations.activity_sol_mark_hyphen_thread_hyphen_as_hyphen_read.Output.ResetContent) + /// Reset Content + /// + /// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/patch(activity/mark-thread-as-read)/responses/205`. + /// + /// HTTP response code: `205 resetContent`. + public static var resetContent: Self { + .resetContent(.init()) + } /// The associated value of the enum case if `self` is `.resetContent`. /// /// - Throws: An error if `self` is not `.resetContent`. @@ -6467,6 +6532,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/patch(activity/mark-thread-as-read)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6581,6 +6654,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.activity_sol_mark_hyphen_thread_hyphen_as_hyphen_done.Output.NoContent) + /// No content + /// + /// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/delete(activity/mark-thread-as-done)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6713,6 +6794,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/subscription/get(activity/get-thread-subscription-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6944,6 +7033,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/subscription/put(activity/set-thread-subscription)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7098,6 +7195,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.activity_sol_delete_hyphen_thread_hyphen_subscription.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/subscription/delete(activity/delete-thread-subscription)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7121,6 +7226,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/subscription/delete(activity/delete-thread-subscription)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7928,6 +8041,14 @@ public enum Operations { /// /// HTTP response code: `205 resetContent`. case resetContent(Operations.activity_sol_mark_hyphen_repo_hyphen_notifications_hyphen_as_hyphen_read.Output.ResetContent) + /// Reset Content + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/notifications/put(activity/mark-repo-notifications-as-read)/responses/205`. + /// + /// HTTP response code: `205 resetContent`. + public static var resetContent: Self { + .resetContent(.init()) + } /// The associated value of the enum case if `self` is `.resetContent`. /// /// - Throws: An error if `self` is not `.resetContent`. @@ -8104,19 +8225,19 @@ public enum Operations { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try decoder.decodeFromSingleValueContainer() + self.value1 = try decoder.decodeFromSingleValueContainer() } catch { errors.append(error) } do { - value2 = try decoder.decodeFromSingleValueContainer() + self.value2 = try decoder.decodeFromSingleValueContainer() } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -8125,8 +8246,8 @@ public enum Operations { } public func encode(to encoder: any Encoder) throws { try encoder.encodeFirstNonNilValueToSingleValueContainer([ - value1, - value2 + self.value1, + self.value2 ]) } } @@ -8544,6 +8665,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.activity_sol_get_hyphen_repo_hyphen_subscription.Output.NotFound) + /// Not Found if you don't subscribe to the repository + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/subscription/get(activity/get-repo-subscription)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -8844,6 +8973,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.activity_sol_delete_hyphen_repo_hyphen_subscription.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/subscription/delete(activity/delete-repo-subscription)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -8883,7 +9020,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/starred/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/sort-starred`. - @frozen public enum sort_hyphen_starred: String, Codable, Hashable, Sendable { + @frozen public enum sort_hyphen_starred: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -8892,7 +9029,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/starred/GET/query/sort`. public var sort: Components.Parameters.sort_hyphen_starred? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -9054,6 +9191,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/starred/get(activity/list-repos-starred-by-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -9223,6 +9368,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.activity_sol_check_hyphen_repo_hyphen_is_hyphen_starred_hyphen_by_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response if this repository is starred by you + /// + /// - Remark: Generated from `#/paths//user/starred/{owner}/{repo}/get(activity/check-repo-is-starred-by-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -9320,6 +9473,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/starred/{owner}/{repo}/get(activity/check-repo-is-starred-by-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -9460,6 +9621,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.activity_sol_star_hyphen_repo_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/starred/{owner}/{repo}/put(activity/star-repo-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -9552,6 +9721,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/starred/{owner}/{repo}/put(activity/star-repo-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -9669,6 +9846,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.activity_sol_unstar_hyphen_repo_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/starred/{owner}/{repo}/delete(activity/unstar-repo-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -9738,6 +9923,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/starred/{owner}/{repo}/delete(activity/unstar-repo-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -9944,6 +10137,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/subscriptions/get(activity/list-watched-repos-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -10885,7 +11086,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/starred/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/sort-starred`. - @frozen public enum sort_hyphen_starred: String, Codable, Hashable, Sendable { + @frozen public enum sort_hyphen_starred: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -10894,7 +11095,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/starred/GET/query/sort`. public var sort: Components.Parameters.sort_hyphen_starred? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -10997,19 +11198,19 @@ public enum Operations { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try decoder.decodeFromSingleValueContainer() + self.value1 = try decoder.decodeFromSingleValueContainer() } catch { errors.append(error) } do { - value2 = try decoder.decodeFromSingleValueContainer() + self.value2 = try decoder.decodeFromSingleValueContainer() } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -11018,8 +11219,8 @@ public enum Operations { } public func encode(to encoder: any Encoder) throws { try encoder.encodeFirstNonNilValueToSingleValueContainer([ - value1, - value2 + self.value1, + self.value2 ]) } } diff --git a/Sources/apps/Types.swift b/Sources/apps/Types.swift index 11643af50bb..cdcf1c6de6b 100644 --- a/Sources/apps/Types.swift +++ b/Sources/apps/Types.swift @@ -965,6 +965,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1389,23 +1398,23 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - issues = try container.decodeIfPresent( + self.issues = try container.decodeIfPresent( Swift.String.self, forKey: .issues ) - checks = try container.decodeIfPresent( + self.checks = try container.decodeIfPresent( Swift.String.self, forKey: .checks ) - metadata = try container.decodeIfPresent( + self.metadata = try container.decodeIfPresent( Swift.String.self, forKey: .metadata ) - contents = try container.decodeIfPresent( + self.contents = try container.decodeIfPresent( Swift.String.self, forKey: .contents ) - deployments = try container.decodeIfPresent( + self.deployments = try container.decodeIfPresent( Swift.String.self, forKey: .deployments ) @@ -1420,23 +1429,23 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - issues, + self.issues, forKey: .issues ) try container.encodeIfPresent( - checks, + self.checks, forKey: .checks ) try container.encodeIfPresent( - metadata, + self.metadata, forKey: .metadata ) try container.encodeIfPresent( - contents, + self.contents, forKey: .contents ) try container.encodeIfPresent( - deployments, + self.deployments, forKey: .deployments ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -2180,19 +2189,19 @@ public enum Components { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -2200,8 +2209,8 @@ public enum Components { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/integration-installation-request/account`. @@ -2246,7 +2255,7 @@ public enum Components { /// The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. /// /// - Remark: Generated from `#/components/schemas/app-permissions/actions`. - @frozen public enum actionsPayload: String, Codable, Hashable, Sendable { + @frozen public enum actionsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2257,7 +2266,7 @@ public enum Components { /// The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. /// /// - Remark: Generated from `#/components/schemas/app-permissions/administration`. - @frozen public enum administrationPayload: String, Codable, Hashable, Sendable { + @frozen public enum administrationPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2268,7 +2277,7 @@ public enum Components { /// The level of permission to grant the access token for checks on code. /// /// - Remark: Generated from `#/components/schemas/app-permissions/checks`. - @frozen public enum checksPayload: String, Codable, Hashable, Sendable { + @frozen public enum checksPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2279,7 +2288,7 @@ public enum Components { /// The level of permission to grant the access token to create, edit, delete, and list Codespaces. /// /// - Remark: Generated from `#/components/schemas/app-permissions/codespaces`. - @frozen public enum codespacesPayload: String, Codable, Hashable, Sendable { + @frozen public enum codespacesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2290,7 +2299,7 @@ public enum Components { /// The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. /// /// - Remark: Generated from `#/components/schemas/app-permissions/contents`. - @frozen public enum contentsPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2301,7 +2310,7 @@ public enum Components { /// The level of permission to grant the access token to manage Dependabot secrets. /// /// - Remark: Generated from `#/components/schemas/app-permissions/dependabot_secrets`. - @frozen public enum dependabot_secretsPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_secretsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2312,7 +2321,7 @@ public enum Components { /// The level of permission to grant the access token for deployments and deployment statuses. /// /// - Remark: Generated from `#/components/schemas/app-permissions/deployments`. - @frozen public enum deploymentsPayload: String, Codable, Hashable, Sendable { + @frozen public enum deploymentsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2323,7 +2332,7 @@ public enum Components { /// The level of permission to grant the access token for managing repository environments. /// /// - Remark: Generated from `#/components/schemas/app-permissions/environments`. - @frozen public enum environmentsPayload: String, Codable, Hashable, Sendable { + @frozen public enum environmentsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2334,7 +2343,7 @@ public enum Components { /// The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. /// /// - Remark: Generated from `#/components/schemas/app-permissions/issues`. - @frozen public enum issuesPayload: String, Codable, Hashable, Sendable { + @frozen public enum issuesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2345,7 +2354,7 @@ public enum Components { /// The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. /// /// - Remark: Generated from `#/components/schemas/app-permissions/metadata`. - @frozen public enum metadataPayload: String, Codable, Hashable, Sendable { + @frozen public enum metadataPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2356,7 +2365,7 @@ public enum Components { /// The level of permission to grant the access token for packages published to GitHub Packages. /// /// - Remark: Generated from `#/components/schemas/app-permissions/packages`. - @frozen public enum packagesPayload: String, Codable, Hashable, Sendable { + @frozen public enum packagesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2367,7 +2376,7 @@ public enum Components { /// The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. /// /// - Remark: Generated from `#/components/schemas/app-permissions/pages`. - @frozen public enum pagesPayload: String, Codable, Hashable, Sendable { + @frozen public enum pagesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2378,7 +2387,7 @@ public enum Components { /// The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. /// /// - Remark: Generated from `#/components/schemas/app-permissions/pull_requests`. - @frozen public enum pull_requestsPayload: String, Codable, Hashable, Sendable { + @frozen public enum pull_requestsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2389,7 +2398,7 @@ public enum Components { /// The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. /// /// - Remark: Generated from `#/components/schemas/app-permissions/repository_custom_properties`. - @frozen public enum repository_custom_propertiesPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_custom_propertiesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2400,7 +2409,7 @@ public enum Components { /// The level of permission to grant the access token to manage the post-receive hooks for a repository. /// /// - Remark: Generated from `#/components/schemas/app-permissions/repository_hooks`. - @frozen public enum repository_hooksPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_hooksPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2411,7 +2420,7 @@ public enum Components { /// The level of permission to grant the access token to manage repository projects, columns, and cards. /// /// - Remark: Generated from `#/components/schemas/app-permissions/repository_projects`. - @frozen public enum repository_projectsPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_projectsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -2423,7 +2432,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage secret scanning alerts. /// /// - Remark: Generated from `#/components/schemas/app-permissions/secret_scanning_alerts`. - @frozen public enum secret_scanning_alertsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_alertsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2434,7 +2443,7 @@ public enum Components { /// The level of permission to grant the access token to manage repository secrets. /// /// - Remark: Generated from `#/components/schemas/app-permissions/secrets`. - @frozen public enum secretsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secretsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2445,7 +2454,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage security events like code scanning alerts. /// /// - Remark: Generated from `#/components/schemas/app-permissions/security_events`. - @frozen public enum security_eventsPayload: String, Codable, Hashable, Sendable { + @frozen public enum security_eventsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2456,7 +2465,7 @@ public enum Components { /// The level of permission to grant the access token to manage just a single file. /// /// - Remark: Generated from `#/components/schemas/app-permissions/single_file`. - @frozen public enum single_filePayload: String, Codable, Hashable, Sendable { + @frozen public enum single_filePayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2467,7 +2476,7 @@ public enum Components { /// The level of permission to grant the access token for commit statuses. /// /// - Remark: Generated from `#/components/schemas/app-permissions/statuses`. - @frozen public enum statusesPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2478,7 +2487,7 @@ public enum Components { /// The level of permission to grant the access token to manage Dependabot alerts. /// /// - Remark: Generated from `#/components/schemas/app-permissions/vulnerability_alerts`. - @frozen public enum vulnerability_alertsPayload: String, Codable, Hashable, Sendable { + @frozen public enum vulnerability_alertsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2489,7 +2498,7 @@ public enum Components { /// The level of permission to grant the access token to update GitHub Actions workflow files. /// /// - Remark: Generated from `#/components/schemas/app-permissions/workflows`. - @frozen public enum workflowsPayload: String, Codable, Hashable, Sendable { + @frozen public enum workflowsPayload: String, Codable, Hashable, Sendable, CaseIterable { case write = "write" } /// The level of permission to grant the access token to update GitHub Actions workflow files. @@ -2499,7 +2508,7 @@ public enum Components { /// The level of permission to grant the access token for organization teams and members. /// /// - Remark: Generated from `#/components/schemas/app-permissions/members`. - @frozen public enum membersPayload: String, Codable, Hashable, Sendable { + @frozen public enum membersPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2510,7 +2519,7 @@ public enum Components { /// The level of permission to grant the access token to manage access to an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_administration`. - @frozen public enum organization_administrationPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_administrationPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2521,7 +2530,7 @@ public enum Components { /// The level of permission to grant the access token for custom repository roles management. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_roles`. - @frozen public enum organization_custom_rolesPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_custom_rolesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2532,7 +2541,7 @@ public enum Components { /// The level of permission to grant the access token for custom organization roles management. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_org_roles`. - @frozen public enum organization_custom_org_rolesPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_custom_org_rolesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2543,7 +2552,7 @@ public enum Components { /// The level of permission to grant the access token for custom property management. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_properties`. - @frozen public enum organization_custom_propertiesPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_custom_propertiesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -2555,7 +2564,7 @@ public enum Components { /// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_copilot_seat_management`. - @frozen public enum organization_copilot_seat_managementPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_copilot_seat_managementPayload: String, Codable, Hashable, Sendable, CaseIterable { case write = "write" } /// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change. @@ -2565,7 +2574,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage announcement banners for an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_announcement_banners`. - @frozen public enum organization_announcement_bannersPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_announcement_bannersPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2576,7 +2585,7 @@ public enum Components { /// The level of permission to grant the access token to view events triggered by an activity in an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_events`. - @frozen public enum organization_eventsPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_eventsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" } /// The level of permission to grant the access token to view events triggered by an activity in an organization. @@ -2586,7 +2595,7 @@ public enum Components { /// The level of permission to grant the access token to manage the post-receive hooks for an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_hooks`. - @frozen public enum organization_hooksPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_hooksPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2597,7 +2606,7 @@ public enum Components { /// The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_personal_access_tokens`. - @frozen public enum organization_personal_access_tokensPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_personal_access_tokensPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2608,7 +2617,7 @@ public enum Components { /// The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_personal_access_token_requests`. - @frozen public enum organization_personal_access_token_requestsPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_personal_access_token_requestsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2619,7 +2628,7 @@ public enum Components { /// The level of permission to grant the access token for viewing an organization's plan. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_plan`. - @frozen public enum organization_planPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_planPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" } /// The level of permission to grant the access token for viewing an organization's plan. @@ -2629,7 +2638,7 @@ public enum Components { /// The level of permission to grant the access token to manage organization projects and projects public preview (where available). /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_projects`. - @frozen public enum organization_projectsPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_projectsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -2641,7 +2650,7 @@ public enum Components { /// The level of permission to grant the access token for organization packages published to GitHub Packages. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_packages`. - @frozen public enum organization_packagesPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_packagesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2652,7 +2661,7 @@ public enum Components { /// The level of permission to grant the access token to manage organization secrets. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_secrets`. - @frozen public enum organization_secretsPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_secretsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2663,7 +2672,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_self_hosted_runners`. - @frozen public enum organization_self_hosted_runnersPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_self_hosted_runnersPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2674,7 +2683,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage users blocked by the organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_user_blocking`. - @frozen public enum organization_user_blockingPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_user_blockingPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2685,7 +2694,7 @@ public enum Components { /// The level of permission to grant the access token to manage team discussions and related comments. /// /// - Remark: Generated from `#/components/schemas/app-permissions/team_discussions`. - @frozen public enum team_discussionsPayload: String, Codable, Hashable, Sendable { + @frozen public enum team_discussionsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2696,7 +2705,7 @@ public enum Components { /// The level of permission to grant the access token to manage the email addresses belonging to a user. /// /// - Remark: Generated from `#/components/schemas/app-permissions/email_addresses`. - @frozen public enum email_addressesPayload: String, Codable, Hashable, Sendable { + @frozen public enum email_addressesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2707,7 +2716,7 @@ public enum Components { /// The level of permission to grant the access token to manage the followers belonging to a user. /// /// - Remark: Generated from `#/components/schemas/app-permissions/followers`. - @frozen public enum followersPayload: String, Codable, Hashable, Sendable { + @frozen public enum followersPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2718,7 +2727,7 @@ public enum Components { /// The level of permission to grant the access token to manage git SSH keys. /// /// - Remark: Generated from `#/components/schemas/app-permissions/git_ssh_keys`. - @frozen public enum git_ssh_keysPayload: String, Codable, Hashable, Sendable { + @frozen public enum git_ssh_keysPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2729,7 +2738,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage GPG keys belonging to a user. /// /// - Remark: Generated from `#/components/schemas/app-permissions/gpg_keys`. - @frozen public enum gpg_keysPayload: String, Codable, Hashable, Sendable { + @frozen public enum gpg_keysPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2740,7 +2749,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage interaction limits on a repository. /// /// - Remark: Generated from `#/components/schemas/app-permissions/interaction_limits`. - @frozen public enum interaction_limitsPayload: String, Codable, Hashable, Sendable { + @frozen public enum interaction_limitsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -2751,7 +2760,7 @@ public enum Components { /// The level of permission to grant the access token to manage the profile settings belonging to a user. /// /// - Remark: Generated from `#/components/schemas/app-permissions/profile`. - @frozen public enum profilePayload: String, Codable, Hashable, Sendable { + @frozen public enum profilePayload: String, Codable, Hashable, Sendable, CaseIterable { case write = "write" } /// The level of permission to grant the access token to manage the profile settings belonging to a user. @@ -2761,7 +2770,7 @@ public enum Components { /// The level of permission to grant the access token to list and manage repositories a user is starring. /// /// - Remark: Generated from `#/components/schemas/app-permissions/starring`. - @frozen public enum starringPayload: String, Codable, Hashable, Sendable { + @frozen public enum starringPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3144,19 +3153,19 @@ public enum Components { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -3164,8 +3173,8 @@ public enum Components { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/installation/account`. @@ -3173,7 +3182,7 @@ public enum Components { /// Describe whether all repositories have been selected or there's a selection involved /// /// - Remark: Generated from `#/components/schemas/installation/repository_selection`. - @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case selected = "selected" } @@ -3614,7 +3623,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -3632,7 +3641,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -3651,7 +3660,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -3669,7 +3678,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -4106,7 +4115,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/installation-token/permissions`. public var permissions: Components.Schemas.app_hyphen_permissions? /// - Remark: Generated from `#/components/schemas/installation-token/repository_selection`. - @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case selected = "selected" } @@ -4168,7 +4177,7 @@ public enum Components { /// Describe whether all repositories have been selected or there's a selection involved /// /// - Remark: Generated from `#/components/schemas/nullable-scoped-installation/repository_selection`. - @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case selected = "selected" } @@ -4378,7 +4387,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/marketplace-listing-plan/yearly_price_in_cents`. public var yearly_price_in_cents: Swift.Int /// - Remark: Generated from `#/components/schemas/marketplace-listing-plan/price_model`. - @frozen public enum price_modelPayload: String, Codable, Hashable, Sendable { + @frozen public enum price_modelPayload: String, Codable, Hashable, Sendable, CaseIterable { case FREE = "FREE" case FLAT_RATE = "FLAT_RATE" case PER_UNIT = "PER_UNIT" @@ -4771,7 +4780,7 @@ public enum Components { /// The property to sort the results by. /// /// - Remark: Generated from `#/components/parameters/sort`. - @frozen public enum sort: String, Codable, Hashable, Sendable { + @frozen public enum sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -5272,19 +5281,19 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - client_id = try container.decode( + self.client_id = try container.decode( Swift.String.self, forKey: .client_id ) - client_secret = try container.decode( + self.client_secret = try container.decode( Swift.String.self, forKey: .client_secret ) - webhook_secret = try container.decodeIfPresent( + self.webhook_secret = try container.decodeIfPresent( Swift.String.self, forKey: .webhook_secret ) - pem = try container.decode( + self.pem = try container.decode( Swift.String.self, forKey: .pem ) @@ -5298,19 +5307,19 @@ public enum Operations { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode( - client_id, + self.client_id, forKey: .client_id ) try container.encode( - client_secret, + self.client_secret, forKey: .client_secret ) try container.encodeIfPresent( - webhook_secret, + self.webhook_secret, forKey: .webhook_secret ) try container.encode( - pem, + self.pem, forKey: .pem ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -5331,12 +5340,12 @@ public enum Operations { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/paths/app-manifests/{code}/conversions/POST/responses/201/content/application\/json`. @@ -6389,6 +6398,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//app/installation-requests/get(apps/list-installation-requests-for-authenticated-app)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6853,6 +6870,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.apps_sol_delete_hyphen_installation.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//app/installations/{installation_id}/delete(apps/delete-installation)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7258,6 +7283,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.apps_sol_suspend_hyphen_installation.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//app/installations/{installation_id}/suspended/put(apps/suspend-installation)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7391,6 +7424,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.apps_sol_unsuspend_hyphen_installation.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//app/installations/{installation_id}/suspended/delete(apps/unsuspend-installation)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7549,6 +7590,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.apps_sol_delete_hyphen_authorization.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//applications/{client_id}/grant/delete(apps/delete-authorization)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -8091,6 +8140,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.apps_sol_delete_hyphen_token.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//applications/{client_id}/token/delete(apps/delete-token)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -8820,6 +8877,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//installation/repositories/get(apps/list-repos-accessible-to-installation)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -8916,6 +8981,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.apps_sol_revoke_hyphen_installation_hyphen_access_hyphen_token.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//installation/token/delete(apps/revoke-installation-access-token)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -9384,7 +9457,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/marketplace_listing/plans/{plan_id}/accounts/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/sort`. - @frozen public enum sort: String, Codable, Hashable, Sendable { + @frozen public enum sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -9393,7 +9466,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/marketplace_listing/plans/{plan_id}/accounts/GET/query/sort`. public var sort: Components.Parameters.sort? /// - Remark: Generated from `#/paths/marketplace_listing/plans/{plan_id}/accounts/GET/query/direction`. - @frozen public enum directionPayload: String, Codable, Hashable, Sendable { + @frozen public enum directionPayload: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -9741,6 +9814,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.apps_sol_get_hyphen_subscription_hyphen_plan_hyphen_for_hyphen_account_hyphen_stubbed.Output.NotFound) + /// Not Found when the account has not purchased the listing + /// + /// - Remark: Generated from `#/paths//marketplace_listing/stubbed/accounts/{account_id}/get(apps/get-subscription-plan-for-account-stubbed)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -10026,7 +10107,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/marketplace_listing/stubbed/plans/{plan_id}/accounts/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/sort`. - @frozen public enum sort: String, Codable, Hashable, Sendable { + @frozen public enum sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -10035,7 +10116,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/marketplace_listing/stubbed/plans/{plan_id}/accounts/GET/query/sort`. public var sort: Components.Parameters.sort? /// - Remark: Generated from `#/paths/marketplace_listing/stubbed/plans/{plan_id}/accounts/GET/query/direction`. - @frozen public enum directionPayload: String, Codable, Hashable, Sendable { + @frozen public enum directionPayload: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -10709,6 +10790,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/installations/get(apps/list-installations-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -11035,6 +11124,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/get(apps/list-installation-repos-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -11154,6 +11251,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.apps_sol_add_hyphen_repo_hyphen_to_hyphen_installation_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/put(apps/add-repo-to-installation-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -11200,6 +11305,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/put(apps/add-repo-to-installation-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -11342,6 +11455,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.apps_sol_remove_hyphen_repo_hyphen_from_hyphen_installation_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/delete(apps/remove-repo-from-installation-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -11388,6 +11509,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/delete(apps/remove-repo-from-installation-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -11438,6 +11567,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.apps_sol_remove_hyphen_repo_hyphen_from_hyphen_installation_hyphen_for_hyphen_authenticated_hyphen_user.Output.UnprocessableContent) + /// Returned when the application is installed on `all` repositories in the organization, or if this request would remove the last repository that the application has access to in the organization. + /// + /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/delete(apps/remove-repo-from-installation-for-authenticated-user)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -11621,6 +11758,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/marketplace_purchases/get(apps/list-subscriptions-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -11850,6 +11995,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/marketplace_purchases/stubbed/get(apps/list-subscriptions-for-authenticated-user-stubbed)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/billing/Client.swift b/Sources/billing/Client.swift index ca1a2b7197c..9f840625d05 100644 --- a/Sources/billing/Client.swift +++ b/Sources/billing/Client.swift @@ -637,4 +637,195 @@ public struct Client: APIProtocol { } ) } + /// Get billing usage report for a user + /// + /// Gets a report of the total usage for a user. + /// + /// **Note:** This endpoint is only available to users with access to the enhanced billing platform. + /// + /// - Remark: HTTP `GET /users/{username}/settings/billing/usage`. + /// - Remark: Generated from `#/paths//users/{username}/settings/billing/usage/get(billing/get-github-billing-usage-report-user)`. + public func billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user(_ input: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Input) async throws -> Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Output { + try await client.send( + input: input, + forOperation: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/users/{}/settings/billing/usage", + parameters: [ + input.path.username + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "year", + value: input.query.year + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "month", + value: input.query.month + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "day", + value: input.query.day + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "hour", + value: input.query.hour + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.billing_usage_report_user.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.billing_hyphen_usage_hyphen_report_hyphen_user.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.bad_request.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json", + "application/scim+json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + case "application/scim+json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.scim_hyphen_error.self, + from: responseBody, + transforming: { value in + .application_scim_plus_json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.internal_error.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.service_unavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Responses.service_unavailable.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } } diff --git a/Sources/billing/Types.swift b/Sources/billing/Types.swift index 607928e5ff5..a0472903bc5 100644 --- a/Sources/billing/Types.swift +++ b/Sources/billing/Types.swift @@ -86,6 +86,15 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /users/{username}/settings/billing/shared-storage`. /// - Remark: Generated from `#/paths//users/{username}/settings/billing/shared-storage/get(billing/get-shared-storage-billing-user)`. func billing_sol_get_hyphen_shared_hyphen_storage_hyphen_billing_hyphen_user(_ input: Operations.billing_sol_get_hyphen_shared_hyphen_storage_hyphen_billing_hyphen_user.Input) async throws -> Operations.billing_sol_get_hyphen_shared_hyphen_storage_hyphen_billing_hyphen_user.Output + /// Get billing usage report for a user + /// + /// Gets a report of the total usage for a user. + /// + /// **Note:** This endpoint is only available to users with access to the enhanced billing platform. + /// + /// - Remark: HTTP `GET /users/{username}/settings/billing/usage`. + /// - Remark: Generated from `#/paths//users/{username}/settings/billing/usage/get(billing/get-github-billing-usage-report-user)`. + func billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user(_ input: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Input) async throws -> Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Output } /// Convenience overloads for operation inputs. @@ -223,10 +232,38 @@ extension APIProtocol { headers: headers )) } + /// Get billing usage report for a user + /// + /// Gets a report of the total usage for a user. + /// + /// **Note:** This endpoint is only available to users with access to the enhanced billing platform. + /// + /// - Remark: HTTP `GET /users/{username}/settings/billing/usage`. + /// - Remark: Generated from `#/paths//users/{username}/settings/billing/usage/get(billing/get-github-billing-usage-report-user)`. + public func billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user( + path: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Input.Path, + query: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Input.Query = .init(), + headers: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Input.Headers = .init() + ) async throws -> Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Output { + try await billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user(Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Input( + path: path, + query: query, + headers: headers + )) + } } /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -683,6 +720,114 @@ public enum Components { case estimated_storage_for_month } } + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user`. + public struct billing_hyphen_usage_hyphen_report_hyphen_user: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItemsPayload`. + public struct usageItemsPayloadPayload: Codable, Hashable, Sendable { + /// Date of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItemsPayload/date`. + public var date: Swift.String + /// Product name. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItemsPayload/product`. + public var product: Swift.String + /// SKU name. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItemsPayload/sku`. + public var sku: Swift.String + /// Quantity of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItemsPayload/quantity`. + public var quantity: Swift.Int + /// Unit type of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItemsPayload/unitType`. + public var unitType: Swift.String + /// Price per unit of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItemsPayload/pricePerUnit`. + public var pricePerUnit: Swift.Double + /// Gross amount of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItemsPayload/grossAmount`. + public var grossAmount: Swift.Double + /// Discount amount of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItemsPayload/discountAmount`. + public var discountAmount: Swift.Double + /// Net amount of the usage line item. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItemsPayload/netAmount`. + public var netAmount: Swift.Double + /// Name of the repository. + /// + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItemsPayload/repositoryName`. + public var repositoryName: Swift.String? + /// Creates a new `usageItemsPayloadPayload`. + /// + /// - Parameters: + /// - date: Date of the usage line item. + /// - product: Product name. + /// - sku: SKU name. + /// - quantity: Quantity of the usage line item. + /// - unitType: Unit type of the usage line item. + /// - pricePerUnit: Price per unit of the usage line item. + /// - grossAmount: Gross amount of the usage line item. + /// - discountAmount: Discount amount of the usage line item. + /// - netAmount: Net amount of the usage line item. + /// - repositoryName: Name of the repository. + public init( + date: Swift.String, + product: Swift.String, + sku: Swift.String, + quantity: Swift.Int, + unitType: Swift.String, + pricePerUnit: Swift.Double, + grossAmount: Swift.Double, + discountAmount: Swift.Double, + netAmount: Swift.Double, + repositoryName: Swift.String? = nil + ) { + self.date = date + self.product = product + self.sku = sku + self.quantity = quantity + self.unitType = unitType + self.pricePerUnit = pricePerUnit + self.grossAmount = grossAmount + self.discountAmount = discountAmount + self.netAmount = netAmount + self.repositoryName = repositoryName + } + public enum CodingKeys: String, CodingKey { + case date + case product + case sku + case quantity + case unitType + case pricePerUnit + case grossAmount + case discountAmount + case netAmount + case repositoryName + } + } + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItems`. + public typealias usageItemsPayload = [Components.Schemas.billing_hyphen_usage_hyphen_report_hyphen_user.usageItemsPayloadPayload] + /// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItems`. + public var usageItems: Components.Schemas.billing_hyphen_usage_hyphen_report_hyphen_user.usageItemsPayload? + /// Creates a new `billing_hyphen_usage_hyphen_report_hyphen_user`. + /// + /// - Parameters: + /// - usageItems: + public init(usageItems: Components.Schemas.billing_hyphen_usage_hyphen_report_hyphen_user.usageItemsPayload? = nil) { + self.usageItems = usageItems + } + public enum CodingKeys: String, CodingKey { + case usageItems + } + } } /// Types generated from the `#/components/parameters` section of the OpenAPI document. public enum Parameters { @@ -795,6 +940,34 @@ public enum Components { self.body = body } } + public struct internal_error: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.internal_error.Body + /// Creates a new `internal_error`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.internal_error.Body) { + self.body = body + } + } public struct service_unavailable: Sendable, Hashable { /// - Remark: Generated from `#/components/responses/service_unavailable/content`. @frozen public enum Body: Sendable, Hashable { @@ -880,16 +1053,16 @@ public enum Components { self.body = body } } - public struct internal_error: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content`. + public struct billing_usage_report_user: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/billing_usage_report_user/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. - case json(Components.Schemas.basic_hyphen_error) + /// - Remark: Generated from `#/components/responses/billing_usage_report_user/content/application\/json`. + case json(Components.Schemas.billing_hyphen_usage_hyphen_report_hyphen_user) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.basic_hyphen_error { + public var json: Components.Schemas.billing_hyphen_usage_hyphen_report_hyphen_user { get throws { switch self { case let .json(body): @@ -899,12 +1072,12 @@ public enum Components { } } /// Received HTTP response body - public var body: Components.Responses.internal_error.Body - /// Creates a new `internal_error`. + public var body: Components.Responses.billing_usage_report_user.Body + /// Creates a new `billing_usage_report_user`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Components.Responses.internal_error.Body) { + public init(body: Components.Responses.billing_usage_report_user.Body) { self.body = body } } @@ -1976,4 +2149,249 @@ public enum Operations { } } } + /// Get billing usage report for a user + /// + /// Gets a report of the total usage for a user. + /// + /// **Note:** This endpoint is only available to users with access to the enhanced billing platform. + /// + /// - Remark: HTTP `GET /users/{username}/settings/billing/usage`. + /// - Remark: Generated from `#/paths//users/{username}/settings/billing/usage/get(billing/get-github-billing-usage-report-user)`. + public enum billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user { + public static let id: Swift.String = "billing/get-github-billing-usage-report-user" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/users/{username}/settings/billing/usage/GET/path`. + public struct Path: Sendable, Hashable { + /// The handle for the GitHub user account. + /// + /// - Remark: Generated from `#/paths/users/{username}/settings/billing/usage/GET/path/username`. + public var username: Components.Parameters.username + /// Creates a new `Path`. + /// + /// - Parameters: + /// - username: The handle for the GitHub user account. + public init(username: Components.Parameters.username) { + self.username = username + } + } + public var path: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Input.Path + /// - Remark: Generated from `#/paths/users/{username}/settings/billing/usage/GET/query`. + public struct Query: Sendable, Hashable { + /// If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2025`. Default value is the current year. + /// + /// - Remark: Generated from `#/paths/users/{username}/settings/billing/usage/GET/query/year`. + public var year: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_year? + /// If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. If no year is specified the default `year` is used. + /// + /// - Remark: Generated from `#/paths/users/{username}/settings/billing/usage/GET/query/month`. + public var month: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_month? + /// If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. If no `year` or `month` is specified, the default `year` and `month` are used. + /// + /// - Remark: Generated from `#/paths/users/{username}/settings/billing/usage/GET/query/day`. + public var day: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_day? + /// If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. If no `year`, `month`, or `day` is specified, the default `year`, `month`, and `day` are used. + /// + /// - Remark: Generated from `#/paths/users/{username}/settings/billing/usage/GET/query/hour`. + public var hour: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_hour? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - year: If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2025`. Default value is the current year. + /// - month: If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. If no year is specified the default `year` is used. + /// - day: If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. If no `year` or `month` is specified, the default `year` and `month` are used. + /// - hour: If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. If no `year`, `month`, or `day` is specified, the default `year`, `month`, and `day` are used. + public init( + year: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_year? = nil, + month: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_month? = nil, + day: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_day? = nil, + hour: Components.Parameters.billing_hyphen_usage_hyphen_report_hyphen_hour? = nil + ) { + self.year = year + self.month = month + self.day = day + self.hour = hour + } + } + public var query: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Input.Query + /// - Remark: Generated from `#/paths/users/{username}/settings/billing/usage/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Input.Path, + query: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Input.Query = .init(), + headers: Operations.billing_sol_get_hyphen_github_hyphen_billing_hyphen_usage_hyphen_report_hyphen_user.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + /// Response when getting a billing usage report + /// + /// - Remark: Generated from `#/paths//users/{username}/settings/billing/usage/get(billing/get-github-billing-usage-report-user)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Components.Responses.billing_usage_report_user) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Components.Responses.billing_usage_report_user { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Bad Request + /// + /// - Remark: Generated from `#/paths//users/{username}/settings/billing/usage/get(billing/get-github-billing-usage-report-user)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Components.Responses.bad_request) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Components.Responses.bad_request { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//users/{username}/settings/billing/usage/get(billing/get-github-billing-usage-report-user)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Internal Error + /// + /// - Remark: Generated from `#/paths//users/{username}/settings/billing/usage/get(billing/get-github-billing-usage-report-user)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Components.Responses.internal_error) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Components.Responses.internal_error { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//users/{username}/settings/billing/usage/get(billing/get-github-billing-usage-report-user)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Components.Responses.service_unavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Components.Responses.service_unavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case application_scim_plus_json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "application/scim+json": + self = .application_scim_plus_json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .application_scim_plus_json: + return "application/scim+json" + } + } + public static var allCases: [Self] { + [ + .json, + .application_scim_plus_json + ] + } + } + } } diff --git a/Sources/campaigns/Types.swift b/Sources/campaigns/Types.swift index 768df1d84ee..d8a25a69842 100644 --- a/Sources/campaigns/Types.swift +++ b/Sources/campaigns/Types.swift @@ -181,6 +181,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -378,7 +387,7 @@ public enum Components { /// Indicates whether a campaign is open or closed /// /// - Remark: Generated from `#/components/schemas/campaign-state`. - @frozen public enum campaign_hyphen_state: String, Codable, Hashable, Sendable { + @frozen public enum campaign_hyphen_state: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" } @@ -713,15 +722,15 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - open_count = try container.decode( + self.open_count = try container.decode( Swift.Int.self, forKey: .open_count ) - closed_count = try container.decode( + self.closed_count = try container.decode( Swift.Int.self, forKey: .closed_count ) - in_progress_count = try container.decode( + self.in_progress_count = try container.decode( Swift.Int.self, forKey: .in_progress_count ) @@ -801,7 +810,7 @@ public enum Components { /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -956,7 +965,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/GET/query/per_page`. public var per_page: Components.Parameters.per_hyphen_page? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -969,7 +978,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/GET/query/state`. public var state: Components.Schemas.campaign_hyphen_state? /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case ends_at = "ends_at" @@ -1277,11 +1286,11 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - repository_id = try container.decode( + self.repository_id = try container.decode( Swift.Int.self, forKey: .repository_id ) - alert_numbers = try container.decode( + self.alert_numbers = try container.decode( [Swift.Int].self, forKey: .alert_numbers ) @@ -1345,35 +1354,35 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decode( + self.name = try container.decode( Swift.String.self, forKey: .name ) - description = try container.decode( + self.description = try container.decode( Swift.String.self, forKey: .description ) - managers = try container.decodeIfPresent( + self.managers = try container.decodeIfPresent( [Swift.String].self, forKey: .managers ) - team_managers = try container.decodeIfPresent( + self.team_managers = try container.decodeIfPresent( [Swift.String].self, forKey: .team_managers ) - ends_at = try container.decode( + self.ends_at = try container.decode( Foundation.Date.self, forKey: .ends_at ) - contact_link = try container.decodeIfPresent( + self.contact_link = try container.decodeIfPresent( Swift.String.self, forKey: .contact_link ) - code_scanning_alerts = try container.decode( + self.code_scanning_alerts = try container.decode( Operations.campaigns_sol_create_hyphen_campaign.Input.Body.jsonPayload.code_scanning_alertsPayload.self, forKey: .code_scanning_alerts ) - generate_issues = try container.decodeIfPresent( + self.generate_issues = try container.decodeIfPresent( Swift.Bool.self, forKey: .generate_issues ) @@ -1596,6 +1605,14 @@ public enum Operations { /// /// HTTP response code: `429 tooManyRequests`. case tooManyRequests(Operations.campaigns_sol_create_hyphen_campaign.Output.TooManyRequests) + /// Too Many Requests + /// + /// - Remark: Generated from `#/paths//orgs/{org}/campaigns/post(campaigns/create-campaign)/responses/429`. + /// + /// HTTP response code: `429 tooManyRequests`. + public static var tooManyRequests: Self { + .tooManyRequests(.init()) + } /// The associated value of the enum case if `self` is `.tooManyRequests`. /// /// - Throws: An error if `self` is not `.tooManyRequests`. @@ -2026,31 +2043,31 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decodeIfPresent( + self.name = try container.decodeIfPresent( Swift.String.self, forKey: .name ) - description = try container.decodeIfPresent( + self.description = try container.decodeIfPresent( Swift.String.self, forKey: .description ) - managers = try container.decodeIfPresent( + self.managers = try container.decodeIfPresent( [Swift.String].self, forKey: .managers ) - team_managers = try container.decodeIfPresent( + self.team_managers = try container.decodeIfPresent( [Swift.String].self, forKey: .team_managers ) - ends_at = try container.decodeIfPresent( + self.ends_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .ends_at ) - contact_link = try container.decodeIfPresent( + self.contact_link = try container.decodeIfPresent( Swift.String.self, forKey: .contact_link ) - state = try container.decodeIfPresent( + self.state = try container.decodeIfPresent( Components.Schemas.campaign_hyphen_state.self, forKey: .state ) @@ -2389,6 +2406,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.campaigns_sol_delete_hyphen_campaign.Output.NoContent) + /// Deletion successful + /// + /// - Remark: Generated from `#/paths//orgs/{org}/campaigns/{campaign_number}/delete(campaigns/delete-campaign)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. diff --git a/Sources/checks/Client.swift b/Sources/checks/Client.swift index 38920d58672..ce23dfcd593 100644 --- a/Sources/checks/Client.swift +++ b/Sources/checks/Client.swift @@ -366,8 +366,6 @@ public struct Client: APIProtocol { /// /// For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". /// - /// OAuth apps and personal access tokens (classic) cannot use this endpoint. - /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest/post(checks/rerequest-run)`. public func checks_sol_rerequest_hyphen_run(_ input: Operations.checks_sol_rerequest_hyphen_run.Input) async throws -> Operations.checks_sol_rerequest_hyphen_run.Output { @@ -861,8 +859,6 @@ public struct Client: APIProtocol { /// /// Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. /// - /// OAuth apps and personal access tokens (classic) cannot use this endpoint. - /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest/post(checks/rerequest-suite)`. public func checks_sol_rerequest_hyphen_suite(_ input: Operations.checks_sol_rerequest_hyphen_suite.Input) async throws -> Operations.checks_sol_rerequest_hyphen_suite.Output { diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index 36299b84caf..8f8d80e58c2 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -64,8 +64,6 @@ public protocol APIProtocol: Sendable { /// /// For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". /// - /// OAuth apps and personal access tokens (classic) cannot use this endpoint. - /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest/post(checks/rerequest-run)`. func checks_sol_rerequest_hyphen_run(_ input: Operations.checks_sol_rerequest_hyphen_run.Input) async throws -> Operations.checks_sol_rerequest_hyphen_run.Output @@ -117,8 +115,6 @@ public protocol APIProtocol: Sendable { /// /// Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. /// - /// OAuth apps and personal access tokens (classic) cannot use this endpoint. - /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest/post(checks/rerequest-suite)`. func checks_sol_rerequest_hyphen_suite(_ input: Operations.checks_sol_rerequest_hyphen_suite.Input) async throws -> Operations.checks_sol_rerequest_hyphen_suite.Output @@ -243,8 +239,6 @@ extension APIProtocol { /// /// For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". /// - /// OAuth apps and personal access tokens (classic) cannot use this endpoint. - /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest/post(checks/rerequest-run)`. public func checks_sol_rerequest_hyphen_run( @@ -342,8 +336,6 @@ extension APIProtocol { /// /// Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. /// - /// OAuth apps and personal access tokens (classic) cannot use this endpoint. - /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest/post(checks/rerequest-suite)`. public func checks_sol_rerequest_hyphen_suite( @@ -405,6 +397,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -841,23 +842,23 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - issues = try container.decodeIfPresent( + self.issues = try container.decodeIfPresent( Swift.String.self, forKey: .issues ) - checks = try container.decodeIfPresent( + self.checks = try container.decodeIfPresent( Swift.String.self, forKey: .checks ) - metadata = try container.decodeIfPresent( + self.metadata = try container.decodeIfPresent( Swift.String.self, forKey: .metadata ) - contents = try container.decodeIfPresent( + self.contents = try container.decodeIfPresent( Swift.String.self, forKey: .contents ) - deployments = try container.decodeIfPresent( + self.deployments = try container.decodeIfPresent( Swift.String.self, forKey: .deployments ) @@ -872,23 +873,23 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - issues, + self.issues, forKey: .issues ) try container.encodeIfPresent( - checks, + self.checks, forKey: .checks ) try container.encodeIfPresent( - metadata, + self.metadata, forKey: .metadata ) try container.encodeIfPresent( - contents, + self.contents, forKey: .contents ) try container.encodeIfPresent( - deployments, + self.deployments, forKey: .deployments ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -994,7 +995,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. public struct advanced_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -1016,7 +1017,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security`. public struct code_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -1042,7 +1043,7 @@ public enum Components { /// The enablement status of Dependabot security updates for the repository. /// /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -1068,7 +1069,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. public struct secret_scanningPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -1090,7 +1091,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -1112,7 +1113,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -1134,7 +1135,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2108,7 +2109,7 @@ public enum Components { /// The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs. /// /// - Remark: Generated from `#/components/schemas/check-run/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case queued = "queued" case in_progress = "in_progress" case completed = "completed" @@ -2121,7 +2122,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/check-run/status`. public var status: Components.Schemas.check_hyphen_run.statusPayload /// - Remark: Generated from `#/components/schemas/check-run/conclusion`. - @frozen public enum conclusionPayload: String, Codable, Hashable, Sendable { + @frozen public enum conclusionPayload: String, Codable, Hashable, Sendable, CaseIterable { case success = "success" case failure = "failure" case neutral = "neutral" @@ -2494,7 +2495,7 @@ public enum Components { /// The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites. /// /// - Remark: Generated from `#/components/schemas/check-suite/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case queued = "queued" case in_progress = "in_progress" case completed = "completed" @@ -2507,7 +2508,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/check-suite/status`. public var status: Components.Schemas.check_hyphen_suite.statusPayload? /// - Remark: Generated from `#/components/schemas/check-suite/conclusion`. - @frozen public enum conclusionPayload: String, Codable, Hashable, Sendable { + @frozen public enum conclusionPayload: String, Codable, Hashable, Sendable, CaseIterable { case success = "success" case failure = "failure" case neutral = "neutral" @@ -2731,7 +2732,7 @@ public enum Components { /// Returns check runs with the specified `status`. /// /// - Remark: Generated from `#/components/parameters/status`. - @frozen public enum status: String, Codable, Hashable, Sendable { + @frozen public enum status: String, Codable, Hashable, Sendable, CaseIterable { case queued = "queued" case in_progress = "in_progress" case completed = "completed" @@ -3202,7 +3203,7 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - status = try container.decodeIfPresent( + self.status = try container.decodeIfPresent( OpenAPIRuntime.OpenAPIValueContainer.self, forKey: .status ) @@ -3213,7 +3214,7 @@ public enum Operations { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - status, + self.status, forKey: .status ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -3244,7 +3245,7 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - status = try container.decodeIfPresent( + self.status = try container.decodeIfPresent( OpenAPIRuntime.OpenAPIValueContainer.self, forKey: .status ) @@ -3255,7 +3256,7 @@ public enum Operations { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - status, + self.status, forKey: .status ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -3278,19 +3279,19 @@ public enum Operations { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -3298,8 +3299,8 @@ public enum Operations { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-runs/{check_run_id}/PATCH/requestBody/content/application\/json`. @@ -3607,8 +3608,6 @@ public enum Operations { /// /// For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". /// - /// OAuth apps and personal access tokens (classic) cannot use this endpoint. - /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest/post(checks/rerequest-run)`. public enum checks_sol_rerequest_hyphen_run { @@ -4505,7 +4504,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs/GET/query/check_name`. public var check_name: Components.Parameters.check_hyphen_name? /// - Remark: Generated from `#/components/parameters/status`. - @frozen public enum status: String, Codable, Hashable, Sendable { + @frozen public enum status: String, Codable, Hashable, Sendable, CaseIterable { case queued = "queued" case in_progress = "in_progress" case completed = "completed" @@ -4515,7 +4514,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs/GET/query/status`. public var status: Components.Parameters.status? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs/GET/query/filter`. - @frozen public enum filterPayload: String, Codable, Hashable, Sendable { + @frozen public enum filterPayload: String, Codable, Hashable, Sendable, CaseIterable { case latest = "latest" case all = "all" } @@ -4711,8 +4710,6 @@ public enum Operations { /// /// Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. /// - /// OAuth apps and personal access tokens (classic) cannot use this endpoint. - /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest/post(checks/rerequest-suite)`. public enum checks_sol_rerequest_hyphen_suite { @@ -4911,7 +4908,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/commits/{ref}/check-runs/GET/query/check_name`. public var check_name: Components.Parameters.check_hyphen_name? /// - Remark: Generated from `#/components/parameters/status`. - @frozen public enum status: String, Codable, Hashable, Sendable { + @frozen public enum status: String, Codable, Hashable, Sendable, CaseIterable { case queued = "queued" case in_progress = "in_progress" case completed = "completed" @@ -4921,7 +4918,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/commits/{ref}/check-runs/GET/query/status`. public var status: Components.Parameters.status? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/commits/{ref}/check-runs/GET/query/filter`. - @frozen public enum filterPayload: String, Codable, Hashable, Sendable { + @frozen public enum filterPayload: String, Codable, Hashable, Sendable, CaseIterable { case latest = "latest" case all = "all" } diff --git a/Sources/classroom/Types.swift b/Sources/classroom/Types.swift index 27a08163617..1a3031d13dd 100644 --- a/Sources/classroom/Types.swift +++ b/Sources/classroom/Types.swift @@ -155,6 +155,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -384,7 +393,7 @@ public enum Components { /// Whether it's a group assignment or individual assignment. /// /// - Remark: Generated from `#/components/schemas/classroom-assignment/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case individual = "individual" case group = "group" } @@ -634,7 +643,7 @@ public enum Components { /// Whether it's a Group Assignment or Individual Assignment. /// /// - Remark: Generated from `#/components/schemas/simple-classroom-assignment/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case individual = "individual" case group = "group" } diff --git a/Sources/code-scanning/Client.swift b/Sources/code-scanning/Client.swift index c9fefb816da..03ce5bc367b 100644 --- a/Sources/code-scanning/Client.swift +++ b/Sources/code-scanning/Client.swift @@ -1764,6 +1764,28 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .notFound(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.unprocessable_analysis.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unprocessableContent(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) let body: Components.Responses.service_unavailable.Body diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index ada491d0dd3..62609d4b8ae 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -863,6 +863,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1679,7 +1688,7 @@ public enum Components { /// State of a code scanning alert. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-state-query`. - @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_state_hyphen_query: String, Codable, Hashable, Sendable { + @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_state_hyphen_query: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" case dismissed = "dismissed" @@ -1688,7 +1697,7 @@ public enum Components { /// Severity of a code scanning alert. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-severity`. - @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_severity: String, Codable, Hashable, Sendable { + @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_severity: String, Codable, Hashable, Sendable, CaseIterable { case critical = "critical" case high = "high" case medium = "medium" @@ -1704,7 +1713,7 @@ public enum Components { /// State of a code scanning alert. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-state`. - @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_state: String, Codable, Hashable, Sendable { + @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_state: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case dismissed = "dismissed" case fixed = "fixed" @@ -1712,7 +1721,7 @@ public enum Components { /// **Required when the state is dismissed.** The reason for dismissing or closing the alert. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-dismissed-reason`. - @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_dismissed_hyphen_reason: String, Codable, Hashable, Sendable { + @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_dismissed_hyphen_reason: String, Codable, Hashable, Sendable, CaseIterable { case false_space_positive = "false positive" case won_apos_t_space_fix = "won't fix" case used_space_in_space_tests = "used in tests" @@ -1734,7 +1743,7 @@ public enum Components { /// The severity of the alert. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/severity`. - @frozen public enum severityPayload: String, Codable, Hashable, Sendable { + @frozen public enum severityPayload: String, Codable, Hashable, Sendable, CaseIterable { case none = "none" case note = "note" case warning = "warning" @@ -1747,7 +1756,7 @@ public enum Components { /// The security severity of the alert. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/security_severity_level`. - @frozen public enum security_severity_levelPayload: String, Codable, Hashable, Sendable { + @frozen public enum security_severity_levelPayload: String, Codable, Hashable, Sendable, CaseIterable { case low = "low" case medium = "medium" case high = "high" @@ -1918,7 +1927,7 @@ public enum Components { /// A classification of the file. For example to identify it as generated. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-classification`. - @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_classification: String, Codable, Hashable, Sendable { + @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_classification: String, Codable, Hashable, Sendable, CaseIterable { case source = "source" case generated = "generated" case test = "test" @@ -2246,7 +2255,7 @@ public enum Components { /// The severity of the alert. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule/severity`. - @frozen public enum severityPayload: String, Codable, Hashable, Sendable { + @frozen public enum severityPayload: String, Codable, Hashable, Sendable, CaseIterable { case none = "none" case note = "note" case warning = "warning" @@ -2259,7 +2268,7 @@ public enum Components { /// The security severity of the alert. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule/security_severity_level`. - @frozen public enum security_severity_levelPayload: String, Codable, Hashable, Sendable { + @frozen public enum security_severity_levelPayload: String, Codable, Hashable, Sendable, CaseIterable { case low = "low" case medium = "medium" case high = "high" @@ -2444,7 +2453,7 @@ public enum Components { /// Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-set-state`. - @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_set_hyphen_state: String, Codable, Hashable, Sendable { + @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_set_hyphen_state: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case dismissed = "dismissed" } @@ -2455,7 +2464,7 @@ public enum Components { /// The status of an autofix. /// /// - Remark: Generated from `#/components/schemas/code-scanning-autofix-status`. - @frozen public enum code_hyphen_scanning_hyphen_autofix_hyphen_status: String, Codable, Hashable, Sendable { + @frozen public enum code_hyphen_scanning_hyphen_autofix_hyphen_status: String, Codable, Hashable, Sendable, CaseIterable { case pending = "pending" case error = "error" case success = "success" @@ -2806,7 +2815,7 @@ public enum Components { /// The language targeted by the CodeQL query /// /// - Remark: Generated from `#/components/schemas/code-scanning-variant-analysis-language`. - @frozen public enum code_hyphen_scanning_hyphen_variant_hyphen_analysis_hyphen_language: String, Codable, Hashable, Sendable { + @frozen public enum code_hyphen_scanning_hyphen_variant_hyphen_analysis_hyphen_language: String, Codable, Hashable, Sendable, CaseIterable { case cpp = "cpp" case csharp = "csharp" case go = "go" @@ -2877,7 +2886,7 @@ public enum Components { /// The new status of the CodeQL variant analysis repository task. /// /// - Remark: Generated from `#/components/schemas/code-scanning-variant-analysis-status`. - @frozen public enum code_hyphen_scanning_hyphen_variant_hyphen_analysis_hyphen_status: String, Codable, Hashable, Sendable { + @frozen public enum code_hyphen_scanning_hyphen_variant_hyphen_analysis_hyphen_status: String, Codable, Hashable, Sendable, CaseIterable { case pending = "pending" case in_progress = "in_progress" case succeeded = "succeeded" @@ -2943,7 +2952,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/code-scanning-variant-analysis/completed_at`. public var completed_at: Foundation.Date? /// - Remark: Generated from `#/components/schemas/code-scanning-variant-analysis/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case in_progress = "in_progress" case succeeded = "succeeded" case failed = "failed" @@ -2958,7 +2967,7 @@ public enum Components { /// The reason for a failure of the variant analysis. This is only available if the variant analysis has failed. /// /// - Remark: Generated from `#/components/schemas/code-scanning-variant-analysis/failure_reason`. - @frozen public enum failure_reasonPayload: String, Codable, Hashable, Sendable { + @frozen public enum failure_reasonPayload: String, Codable, Hashable, Sendable, CaseIterable { case no_repos_queried = "no_repos_queried" case actions_workflow_run_failed = "actions_workflow_run_failed" case internal_error = "internal_error" @@ -3225,7 +3234,7 @@ public enum Components { /// Code scanning default setup has been configured or not. /// /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case configured = "configured" case not_hyphen_configured = "not-configured" } @@ -3234,7 +3243,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup/state`. public var state: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup.statePayload? /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup/languagesPayload`. - @frozen public enum languagesPayloadPayload: String, Codable, Hashable, Sendable { + @frozen public enum languagesPayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { case actions = "actions" case c_hyphen_cpp = "c-cpp" case csharp = "csharp" @@ -3258,7 +3267,7 @@ public enum Components { /// Runner type to be used. /// /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup/runner_type`. - @frozen public enum runner_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum runner_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case standard = "standard" case labeled = "labeled" } @@ -3273,7 +3282,7 @@ public enum Components { /// CodeQL query suite to be used. /// /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup/query_suite`. - @frozen public enum query_suitePayload: String, Codable, Hashable, Sendable { + @frozen public enum query_suitePayload: String, Codable, Hashable, Sendable, CaseIterable { case _default = "default" case extended = "extended" } @@ -3288,7 +3297,7 @@ public enum Components { /// The frequency of the periodic analysis. /// /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup/schedule`. - @frozen public enum schedulePayload: String, Codable, Hashable, Sendable { + @frozen public enum schedulePayload: String, Codable, Hashable, Sendable, CaseIterable { case weekly = "weekly" } /// The frequency of the periodic analysis. @@ -3339,7 +3348,7 @@ public enum Components { /// The desired state of code scanning default setup. /// /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-update/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case configured = "configured" case not_hyphen_configured = "not-configured" } @@ -3350,7 +3359,7 @@ public enum Components { /// Runner type to be used. /// /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-update/runner_type`. - @frozen public enum runner_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum runner_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case standard = "standard" case labeled = "labeled" } @@ -3365,7 +3374,7 @@ public enum Components { /// CodeQL query suite to be used. /// /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-update/query_suite`. - @frozen public enum query_suitePayload: String, Codable, Hashable, Sendable { + @frozen public enum query_suitePayload: String, Codable, Hashable, Sendable, CaseIterable { case _default = "default" case extended = "extended" } @@ -3374,7 +3383,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-update/query_suite`. public var query_suite: Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.query_suitePayload? /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-update/languagesPayload`. - @frozen public enum languagesPayloadPayload: String, Codable, Hashable, Sendable { + @frozen public enum languagesPayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { case actions = "actions" case c_hyphen_cpp = "c-cpp" case csharp = "csharp" @@ -3423,23 +3432,23 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - state = try container.decodeIfPresent( + self.state = try container.decodeIfPresent( Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.statePayload.self, forKey: .state ) - runner_type = try container.decodeIfPresent( + self.runner_type = try container.decodeIfPresent( Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.runner_typePayload.self, forKey: .runner_type ) - runner_label = try container.decodeIfPresent( + self.runner_label = try container.decodeIfPresent( Swift.String.self, forKey: .runner_label ) - query_suite = try container.decodeIfPresent( + self.query_suite = try container.decodeIfPresent( Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.query_suitePayload.self, forKey: .query_suite ) - languages = try container.decodeIfPresent( + self.languages = try container.decodeIfPresent( Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_update.languagesPayload.self, forKey: .languages ) @@ -3521,7 +3530,7 @@ public enum Components { /// `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. /// /// - Remark: Generated from `#/components/schemas/code-scanning-sarifs-status/processing_status`. - @frozen public enum processing_statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum processing_statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case pending = "pending" case complete = "complete" case failed = "failed" @@ -3573,7 +3582,7 @@ public enum Components { /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -3875,6 +3884,34 @@ public enum Components { self.body = body } } + public struct unprocessable_analysis: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/unprocessable_analysis/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/unprocessable_analysis/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.unprocessable_analysis.Body + /// Creates a new `unprocessable_analysis`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.unprocessable_analysis.Body) { + self.body = body + } + } public struct found: Sendable, Hashable { /// Creates a new `found`. public init() {} @@ -3972,7 +4009,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/code-scanning/alerts/GET/query/per_page`. public var per_page: Components.Parameters.per_hyphen_page? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -3985,7 +4022,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/code-scanning/alerts/GET/query/state`. public var state: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_state_hyphen_query? /// - Remark: Generated from `#/paths/orgs/{org}/code-scanning/alerts/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -4277,7 +4314,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/GET/query/pr`. public var pr: Components.Parameters.pr_hyphen_alias? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -4294,7 +4331,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/GET/query/after`. public var after: Components.Parameters.pagination_hyphen_after? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/alerts/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -4440,6 +4477,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/alerts/get(code-scanning/list-alerts-for-repo)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4682,6 +4727,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/get(code-scanning/get-alert)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5585,6 +5638,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.code_hyphen_scanning_sol_create_hyphen_autofix.Output.UnprocessableContent) + /// Unprocessable Entity + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/post(code-scanning/create-autofix)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -5865,6 +5926,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.code_hyphen_scanning_sol_commit_hyphen_autofix.Output.UnprocessableContent) + /// Unprocessable Entity + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits/post(code-scanning/commit-autofix)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -6274,7 +6343,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/analyses/GET/query/sarif_id`. public var sarif_id: Components.Schemas.code_hyphen_scanning_hyphen_analysis_hyphen_sarif_hyphen_id? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -6283,7 +6352,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/analyses/GET/query/direction`. public var direction: Components.Parameters.direction? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-scanning/analyses/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" } /// The property by which to sort the results. @@ -6708,6 +6777,29 @@ public enum Operations { } } } + /// Response if analysis could not be processed + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}/get(code-scanning/get-analysis)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.unprocessable_analysis) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.unprocessable_analysis { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) + } + } + } /// Service unavailable /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}/get(code-scanning/get-analysis)/responses/503`. @@ -7438,6 +7530,14 @@ public enum Operations { /// /// HTTP response code: `302 found`. case found(Components.Responses.found) + /// Found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/get(code-scanning/get-codeql-database)/responses/302`. + /// + /// HTTP response code: `302 found`. + public static var found: Self { + .found(.init()) + } /// The associated value of the enum case if `self` is `.found`. /// /// - Throws: An error if `self` is not `.found`. @@ -7633,6 +7733,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/delete(code-scanning/delete-codeql-database)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -9121,31 +9229,31 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - commit_sha = try container.decode( + self.commit_sha = try container.decode( Components.Schemas.code_hyphen_scanning_hyphen_analysis_hyphen_commit_hyphen_sha.self, forKey: .commit_sha ) - ref = try container.decode( + self.ref = try container.decode( Components.Schemas.code_hyphen_scanning_hyphen_ref_hyphen_full.self, forKey: .ref ) - sarif = try container.decode( + self.sarif = try container.decode( Components.Schemas.code_hyphen_scanning_hyphen_analysis_hyphen_sarif_hyphen_file.self, forKey: .sarif ) - checkout_uri = try container.decodeIfPresent( + self.checkout_uri = try container.decodeIfPresent( Swift.String.self, forKey: .checkout_uri ) - started_at = try container.decodeIfPresent( + self.started_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .started_at ) - tool_name = try container.decodeIfPresent( + self.tool_name = try container.decodeIfPresent( Swift.String.self, forKey: .tool_name ) - validate = try container.decodeIfPresent( + self.validate = try container.decodeIfPresent( Swift.Bool.self, forKey: .validate ) @@ -9242,6 +9350,14 @@ public enum Operations { /// /// HTTP response code: `400 badRequest`. case badRequest(Operations.code_hyphen_scanning_sol_upload_hyphen_sarif.Output.BadRequest) + /// Bad Request if the sarif field is invalid + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/sarifs/post(code-scanning/upload-sarif)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + public static var badRequest: Self { + .badRequest(.init()) + } /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. @@ -9315,6 +9431,14 @@ public enum Operations { /// /// HTTP response code: `413 contentTooLarge`. case contentTooLarge(Operations.code_hyphen_scanning_sol_upload_hyphen_sarif.Output.ContentTooLarge) + /// Payload Too Large if the sarif field is too large + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/sarifs/post(code-scanning/upload-sarif)/responses/413`. + /// + /// HTTP response code: `413 contentTooLarge`. + public static var contentTooLarge: Self { + .contentTooLarge(.init()) + } /// The associated value of the enum case if `self` is `.contentTooLarge`. /// /// - Throws: An error if `self` is not `.contentTooLarge`. @@ -9537,6 +9661,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.code_hyphen_scanning_sol_get_hyphen_sarif.Output.NotFound) + /// Not Found if the sarif id does not match any upload + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}/get(code-scanning/get-sarif)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index f32aebc6b2d..1f8ae50c271 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -671,6 +671,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -929,7 +938,7 @@ public enum Components { /// The type of the code security configuration. /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/target_type`. - @frozen public enum target_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum target_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case global = "global" case organization = "organization" case enterprise = "enterprise" @@ -945,7 +954,7 @@ public enum Components { /// The enablement status of GitHub Advanced Security /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/advanced_security`. - @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable { + @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case code_security = "code_security" @@ -958,7 +967,7 @@ public enum Components { /// The enablement status of Dependency Graph /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph`. - @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -970,7 +979,7 @@ public enum Components { /// The enablement status of Automatic dependency submission /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph_autosubmit_action`. - @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1005,7 +1014,7 @@ public enum Components { /// The enablement status of Dependabot alerts /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependabot_alerts`. - @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1017,7 +1026,7 @@ public enum Components { /// The enablement status of Dependabot security updates /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependabot_security_updates`. - @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1029,7 +1038,7 @@ public enum Components { /// The enablement status of code scanning default setup /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/code_scanning_default_setup`. - @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable { + @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1045,7 +1054,7 @@ public enum Components { /// Whether to use labeled runners or standard GitHub runners. /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/code_scanning_default_setup_options/runner_type`. - @frozen public enum runner_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum runner_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case standard = "standard" case labeled = "labeled" case not_set = "not_set" @@ -1082,7 +1091,7 @@ public enum Components { /// The enablement status of code scanning delegated alert dismissal /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/code_scanning_delegated_alert_dismissal`. - @frozen public enum code_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable { + @frozen public enum code_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1094,7 +1103,7 @@ public enum Components { /// The enablement status of secret scanning /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning`. - @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1106,7 +1115,7 @@ public enum Components { /// The enablement status of secret scanning push protection /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_push_protection`. - @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1118,7 +1127,7 @@ public enum Components { /// The enablement status of secret scanning delegated bypass /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_bypass`. - @frozen public enum secret_scanning_delegated_bypassPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_delegated_bypassPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1140,7 +1149,7 @@ public enum Components { /// The type of the bypass reviewer /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_bypass_options/reviewersPayload/reviewer_type`. - @frozen public enum reviewer_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum reviewer_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case TEAM = "TEAM" case ROLE = "ROLE" } @@ -1191,7 +1200,7 @@ public enum Components { /// The enablement status of secret scanning validity checks /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_validity_checks`. - @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1203,7 +1212,7 @@ public enum Components { /// The enablement status of secret scanning non-provider patterns /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_non_provider_patterns`. - @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1215,7 +1224,7 @@ public enum Components { /// The enablement status of Copilot secret scanning /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_generic_secrets`. - @frozen public enum secret_scanning_generic_secretsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_generic_secretsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1227,7 +1236,7 @@ public enum Components { /// The enablement status of secret scanning delegated alert dismissal /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_delegated_alert_dismissal`. - @frozen public enum secret_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1239,7 +1248,7 @@ public enum Components { /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/private_vulnerability_reporting`. - @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable { + @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -1251,7 +1260,7 @@ public enum Components { /// The enforcement status for a security configuration /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/enforcement`. - @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable, CaseIterable { case enforced = "enforced" case unenforced = "unenforced" } @@ -1395,7 +1404,7 @@ public enum Components { /// Whether to use labeled runners or standard GitHub runners. /// /// - Remark: Generated from `#/components/schemas/code-scanning-default-setup-options/runner_type`. - @frozen public enum runner_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum runner_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case standard = "standard" case labeled = "labeled" case not_set = "not_set" @@ -1840,7 +1849,7 @@ public enum Components { /// The attachment status of the code security configuration on the repository. /// /// - Remark: Generated from `#/components/schemas/code-security-configuration-repositories/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case attached = "attached" case attaching = "attaching" case detached = "detached" @@ -1880,7 +1889,7 @@ public enum Components { /// The attachment status of the code security configuration on the repository. /// /// - Remark: Generated from `#/components/schemas/code-security-configuration-for-repository/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case attached = "attached" case attaching = "attaching" case detached = "detached" @@ -2399,7 +2408,7 @@ public enum Operations { /// The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features. /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/advanced_security`. - @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable { + @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case code_security = "code_security" @@ -2412,7 +2421,7 @@ public enum Operations { /// The enablement status of Dependency Graph /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/dependency_graph`. - @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2424,7 +2433,7 @@ public enum Operations { /// The enablement status of Automatic dependency submission /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/dependency_graph_autosubmit_action`. - @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2459,7 +2468,7 @@ public enum Operations { /// The enablement status of Dependabot alerts /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/dependabot_alerts`. - @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2471,7 +2480,7 @@ public enum Operations { /// The enablement status of Dependabot security updates /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/dependabot_security_updates`. - @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2483,7 +2492,7 @@ public enum Operations { /// The enablement status of code scanning default setup /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/code_scanning_default_setup`. - @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable { + @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2497,7 +2506,7 @@ public enum Operations { /// The enablement status of code scanning delegated alert dismissal /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/code_scanning_delegated_alert_dismissal`. - @frozen public enum code_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable { + @frozen public enum code_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2509,7 +2518,7 @@ public enum Operations { /// The enablement status of secret scanning /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/secret_scanning`. - @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2521,7 +2530,7 @@ public enum Operations { /// The enablement status of secret scanning push protection /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/secret_scanning_push_protection`. - @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2533,7 +2542,7 @@ public enum Operations { /// The enablement status of secret scanning validity checks /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/secret_scanning_validity_checks`. - @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2545,7 +2554,7 @@ public enum Operations { /// The enablement status of secret scanning non provider patterns /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/secret_scanning_non_provider_patterns`. - @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2557,7 +2566,7 @@ public enum Operations { /// The enablement status of Copilot secret scanning /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/secret_scanning_generic_secrets`. - @frozen public enum secret_scanning_generic_secretsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_generic_secretsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2569,7 +2578,7 @@ public enum Operations { /// The enablement status of secret scanning delegated alert dismissal /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_alert_dismissal`. - @frozen public enum secret_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2581,7 +2590,7 @@ public enum Operations { /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. - @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable { + @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -2593,7 +2602,7 @@ public enum Operations { /// The enforcement status for a security configuration /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/POST/requestBody/json/enforcement`. - @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable, CaseIterable { case enforced = "enforced" case unenforced = "unenforced" } @@ -2687,79 +2696,79 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decode( + self.name = try container.decode( Swift.String.self, forKey: .name ) - description = try container.decode( + self.description = try container.decode( Swift.String.self, forKey: .description ) - advanced_security = try container.decodeIfPresent( + self.advanced_security = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.advanced_securityPayload.self, forKey: .advanced_security ) - dependency_graph = try container.decodeIfPresent( + self.dependency_graph = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.dependency_graphPayload.self, forKey: .dependency_graph ) - dependency_graph_autosubmit_action = try container.decodeIfPresent( + self.dependency_graph_autosubmit_action = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload.self, forKey: .dependency_graph_autosubmit_action ) - dependency_graph_autosubmit_action_options = try container.decodeIfPresent( + self.dependency_graph_autosubmit_action_options = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload.self, forKey: .dependency_graph_autosubmit_action_options ) - dependabot_alerts = try container.decodeIfPresent( + self.dependabot_alerts = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.dependabot_alertsPayload.self, forKey: .dependabot_alerts ) - dependabot_security_updates = try container.decodeIfPresent( + self.dependabot_security_updates = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.dependabot_security_updatesPayload.self, forKey: .dependabot_security_updates ) - code_scanning_default_setup = try container.decodeIfPresent( + self.code_scanning_default_setup = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.code_scanning_default_setupPayload.self, forKey: .code_scanning_default_setup ) - code_scanning_default_setup_options = try container.decodeIfPresent( + self.code_scanning_default_setup_options = try container.decodeIfPresent( Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options.self, forKey: .code_scanning_default_setup_options ) - code_scanning_delegated_alert_dismissal = try container.decodeIfPresent( + self.code_scanning_delegated_alert_dismissal = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.code_scanning_delegated_alert_dismissalPayload.self, forKey: .code_scanning_delegated_alert_dismissal ) - secret_scanning = try container.decodeIfPresent( + self.secret_scanning = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.secret_scanningPayload.self, forKey: .secret_scanning ) - secret_scanning_push_protection = try container.decodeIfPresent( + self.secret_scanning_push_protection = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, forKey: .secret_scanning_push_protection ) - secret_scanning_validity_checks = try container.decodeIfPresent( + self.secret_scanning_validity_checks = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, forKey: .secret_scanning_validity_checks ) - secret_scanning_non_provider_patterns = try container.decodeIfPresent( + self.secret_scanning_non_provider_patterns = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload.self, forKey: .secret_scanning_non_provider_patterns ) - secret_scanning_generic_secrets = try container.decodeIfPresent( + self.secret_scanning_generic_secrets = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.secret_scanning_generic_secretsPayload.self, forKey: .secret_scanning_generic_secrets ) - secret_scanning_delegated_alert_dismissal = try container.decodeIfPresent( + self.secret_scanning_delegated_alert_dismissal = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.secret_scanning_delegated_alert_dismissalPayload.self, forKey: .secret_scanning_delegated_alert_dismissal ) - private_vulnerability_reporting = try container.decodeIfPresent( + self.private_vulnerability_reporting = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.private_vulnerability_reportingPayload.self, forKey: .private_vulnerability_reporting ) - enforcement = try container.decodeIfPresent( + self.enforcement = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration_hyphen_for_hyphen_enterprise.Input.Body.jsonPayload.enforcementPayload.self, forKey: .enforcement ) @@ -3220,6 +3229,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/code-security/configurations/{configuration_id}/get(code-security/get-single-configuration-for-enterprise)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -3378,7 +3395,7 @@ public enum Operations { /// The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features. /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/advanced_security`. - @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable { + @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case code_security = "code_security" @@ -3391,7 +3408,7 @@ public enum Operations { /// The enablement status of Dependency Graph /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph`. - @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3403,7 +3420,7 @@ public enum Operations { /// The enablement status of Automatic dependency submission /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph_autosubmit_action`. - @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3438,7 +3455,7 @@ public enum Operations { /// The enablement status of Dependabot alerts /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_alerts`. - @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3450,7 +3467,7 @@ public enum Operations { /// The enablement status of Dependabot security updates /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_security_updates`. - @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3462,7 +3479,7 @@ public enum Operations { /// The enablement status of code scanning default setup /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/code_scanning_default_setup`. - @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable { + @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3476,7 +3493,7 @@ public enum Operations { /// The enablement status of code scanning delegated alert dismissal /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/code_scanning_delegated_alert_dismissal`. - @frozen public enum code_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable { + @frozen public enum code_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3488,7 +3505,7 @@ public enum Operations { /// The enablement status of secret scanning /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning`. - @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3500,7 +3517,7 @@ public enum Operations { /// The enablement status of secret scanning push protection /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_push_protection`. - @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3512,7 +3529,7 @@ public enum Operations { /// The enablement status of secret scanning validity checks /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_validity_checks`. - @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3524,7 +3541,7 @@ public enum Operations { /// The enablement status of secret scanning non-provider patterns /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_non_provider_patterns`. - @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3536,7 +3553,7 @@ public enum Operations { /// The enablement status of Copilot secret scanning /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_generic_secrets`. - @frozen public enum secret_scanning_generic_secretsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_generic_secretsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3548,7 +3565,7 @@ public enum Operations { /// The enablement status of secret scanning delegated alert dismissal /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_alert_dismissal`. - @frozen public enum secret_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3560,7 +3577,7 @@ public enum Operations { /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. - @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable { + @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -3572,7 +3589,7 @@ public enum Operations { /// The enforcement status for a security configuration /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/enforcement`. - @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable, CaseIterable { case enforced = "enforced" case unenforced = "unenforced" } @@ -3666,79 +3683,79 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decodeIfPresent( + self.name = try container.decodeIfPresent( Swift.String.self, forKey: .name ) - description = try container.decodeIfPresent( + self.description = try container.decodeIfPresent( Swift.String.self, forKey: .description ) - advanced_security = try container.decodeIfPresent( + self.advanced_security = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload.self, forKey: .advanced_security ) - dependency_graph = try container.decodeIfPresent( + self.dependency_graph = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload.self, forKey: .dependency_graph ) - dependency_graph_autosubmit_action = try container.decodeIfPresent( + self.dependency_graph_autosubmit_action = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload.self, forKey: .dependency_graph_autosubmit_action ) - dependency_graph_autosubmit_action_options = try container.decodeIfPresent( + self.dependency_graph_autosubmit_action_options = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload.self, forKey: .dependency_graph_autosubmit_action_options ) - dependabot_alerts = try container.decodeIfPresent( + self.dependabot_alerts = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload.self, forKey: .dependabot_alerts ) - dependabot_security_updates = try container.decodeIfPresent( + self.dependabot_security_updates = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload.self, forKey: .dependabot_security_updates ) - code_scanning_default_setup = try container.decodeIfPresent( + self.code_scanning_default_setup = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload.self, forKey: .code_scanning_default_setup ) - code_scanning_default_setup_options = try container.decodeIfPresent( + self.code_scanning_default_setup_options = try container.decodeIfPresent( Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options.self, forKey: .code_scanning_default_setup_options ) - code_scanning_delegated_alert_dismissal = try container.decodeIfPresent( + self.code_scanning_delegated_alert_dismissal = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.code_scanning_delegated_alert_dismissalPayload.self, forKey: .code_scanning_delegated_alert_dismissal ) - secret_scanning = try container.decodeIfPresent( + self.secret_scanning = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload.self, forKey: .secret_scanning ) - secret_scanning_push_protection = try container.decodeIfPresent( + self.secret_scanning_push_protection = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, forKey: .secret_scanning_push_protection ) - secret_scanning_validity_checks = try container.decodeIfPresent( + self.secret_scanning_validity_checks = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, forKey: .secret_scanning_validity_checks ) - secret_scanning_non_provider_patterns = try container.decodeIfPresent( + self.secret_scanning_non_provider_patterns = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload.self, forKey: .secret_scanning_non_provider_patterns ) - secret_scanning_generic_secrets = try container.decodeIfPresent( + self.secret_scanning_generic_secrets = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_generic_secretsPayload.self, forKey: .secret_scanning_generic_secrets ) - secret_scanning_delegated_alert_dismissal = try container.decodeIfPresent( + self.secret_scanning_delegated_alert_dismissal = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_alert_dismissalPayload.self, forKey: .secret_scanning_delegated_alert_dismissal ) - private_vulnerability_reporting = try container.decodeIfPresent( + self.private_vulnerability_reporting = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload.self, forKey: .private_vulnerability_reporting ) - enforcement = try container.decodeIfPresent( + self.enforcement = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload.self, forKey: .enforcement ) @@ -3843,6 +3860,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/code-security/configurations/{configuration_id}/patch(code-security/update-enterprise-configuration)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4031,6 +4056,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration-for-enterprise)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -4235,7 +4268,7 @@ public enum Operations { /// The type of repositories to attach the configuration to. /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach/POST/requestBody/json/scope`. - @frozen public enum scopePayload: String, Codable, Hashable, Sendable { + @frozen public enum scopePayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case all_without_configurations = "all_without_configurations" } @@ -4255,7 +4288,7 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - scope = try container.decode( + self.scope = try container.decode( Operations.code_hyphen_security_sol_attach_hyphen_enterprise_hyphen_configuration.Input.Body.jsonPayload.scopePayload.self, forKey: .scope ) @@ -4466,7 +4499,7 @@ public enum Operations { /// Specify which types of repository this security configuration should be applied to by default. /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults/PUT/requestBody/json/default_for_new_repos`. - @frozen public enum default_for_new_reposPayload: String, Codable, Hashable, Sendable { + @frozen public enum default_for_new_reposPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case none = "none" case private_and_internal = "private_and_internal" @@ -4516,7 +4549,7 @@ public enum Operations { /// Specifies which types of repository this security configuration is applied to by default. /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content/json/default_for_new_repos`. - @frozen public enum default_for_new_reposPayload: String, Codable, Hashable, Sendable { + @frozen public enum default_for_new_reposPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case none = "none" case private_and_internal = "private_and_internal" @@ -4935,7 +4968,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query/target_type`. - @frozen public enum target_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum target_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case global = "global" case all = "all" } @@ -5187,7 +5220,7 @@ public enum Operations { /// The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features. /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/advanced_security`. - @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable { + @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case code_security = "code_security" @@ -5200,7 +5233,7 @@ public enum Operations { /// The enablement status of Dependency Graph /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph`. - @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5212,7 +5245,7 @@ public enum Operations { /// The enablement status of Automatic dependency submission /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph_autosubmit_action`. - @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5247,7 +5280,7 @@ public enum Operations { /// The enablement status of Dependabot alerts /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependabot_alerts`. - @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5259,7 +5292,7 @@ public enum Operations { /// The enablement status of Dependabot security updates /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependabot_security_updates`. - @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5271,7 +5304,7 @@ public enum Operations { /// The enablement status of code scanning default setup /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/code_scanning_default_setup`. - @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable { + @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5285,7 +5318,7 @@ public enum Operations { /// The enablement status of code scanning delegated alert dismissal /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/code_scanning_delegated_alert_dismissal`. - @frozen public enum code_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable { + @frozen public enum code_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5297,7 +5330,7 @@ public enum Operations { /// The enablement status of secret scanning /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning`. - @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5309,7 +5342,7 @@ public enum Operations { /// The enablement status of secret scanning push protection /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_push_protection`. - @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5321,7 +5354,7 @@ public enum Operations { /// The enablement status of secret scanning delegated bypass /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_bypass`. - @frozen public enum secret_scanning_delegated_bypassPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_delegated_bypassPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5343,7 +5376,7 @@ public enum Operations { /// The type of the bypass reviewer /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_bypass_options/reviewersPayload/reviewer_type`. - @frozen public enum reviewer_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum reviewer_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case TEAM = "TEAM" case ROLE = "ROLE" } @@ -5394,7 +5427,7 @@ public enum Operations { /// The enablement status of secret scanning validity checks /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_validity_checks`. - @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5406,7 +5439,7 @@ public enum Operations { /// The enablement status of secret scanning non provider patterns /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_non_provider_patterns`. - @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5418,7 +5451,7 @@ public enum Operations { /// The enablement status of Copilot secret scanning /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_generic_secrets`. - @frozen public enum secret_scanning_generic_secretsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_generic_secretsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5430,7 +5463,7 @@ public enum Operations { /// The enablement status of secret scanning delegated alert dismissal /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_delegated_alert_dismissal`. - @frozen public enum secret_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5442,7 +5475,7 @@ public enum Operations { /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. - @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable { + @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -5454,7 +5487,7 @@ public enum Operations { /// The enforcement status for a security configuration /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/enforcement`. - @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable, CaseIterable { case enforced = "enforced" case unenforced = "unenforced" } @@ -5556,87 +5589,87 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decode( + self.name = try container.decode( Swift.String.self, forKey: .name ) - description = try container.decode( + self.description = try container.decode( Swift.String.self, forKey: .description ) - advanced_security = try container.decodeIfPresent( + self.advanced_security = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload.self, forKey: .advanced_security ) - dependency_graph = try container.decodeIfPresent( + self.dependency_graph = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload.self, forKey: .dependency_graph ) - dependency_graph_autosubmit_action = try container.decodeIfPresent( + self.dependency_graph_autosubmit_action = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload.self, forKey: .dependency_graph_autosubmit_action ) - dependency_graph_autosubmit_action_options = try container.decodeIfPresent( + self.dependency_graph_autosubmit_action_options = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload.self, forKey: .dependency_graph_autosubmit_action_options ) - dependabot_alerts = try container.decodeIfPresent( + self.dependabot_alerts = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload.self, forKey: .dependabot_alerts ) - dependabot_security_updates = try container.decodeIfPresent( + self.dependabot_security_updates = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload.self, forKey: .dependabot_security_updates ) - code_scanning_default_setup = try container.decodeIfPresent( + self.code_scanning_default_setup = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload.self, forKey: .code_scanning_default_setup ) - code_scanning_default_setup_options = try container.decodeIfPresent( + self.code_scanning_default_setup_options = try container.decodeIfPresent( Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options.self, forKey: .code_scanning_default_setup_options ) - code_scanning_delegated_alert_dismissal = try container.decodeIfPresent( + self.code_scanning_delegated_alert_dismissal = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_delegated_alert_dismissalPayload.self, forKey: .code_scanning_delegated_alert_dismissal ) - secret_scanning = try container.decodeIfPresent( + self.secret_scanning = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload.self, forKey: .secret_scanning ) - secret_scanning_push_protection = try container.decodeIfPresent( + self.secret_scanning_push_protection = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, forKey: .secret_scanning_push_protection ) - secret_scanning_delegated_bypass = try container.decodeIfPresent( + self.secret_scanning_delegated_bypass = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypassPayload.self, forKey: .secret_scanning_delegated_bypass ) - secret_scanning_delegated_bypass_options = try container.decodeIfPresent( + self.secret_scanning_delegated_bypass_options = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.self, forKey: .secret_scanning_delegated_bypass_options ) - secret_scanning_validity_checks = try container.decodeIfPresent( + self.secret_scanning_validity_checks = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, forKey: .secret_scanning_validity_checks ) - secret_scanning_non_provider_patterns = try container.decodeIfPresent( + self.secret_scanning_non_provider_patterns = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload.self, forKey: .secret_scanning_non_provider_patterns ) - secret_scanning_generic_secrets = try container.decodeIfPresent( + self.secret_scanning_generic_secrets = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_generic_secretsPayload.self, forKey: .secret_scanning_generic_secrets ) - secret_scanning_delegated_alert_dismissal = try container.decodeIfPresent( + self.secret_scanning_delegated_alert_dismissal = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_alert_dismissalPayload.self, forKey: .secret_scanning_delegated_alert_dismissal ) - private_vulnerability_reporting = try container.decodeIfPresent( + self.private_vulnerability_reporting = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload.self, forKey: .private_vulnerability_reporting ) - enforcement = try container.decodeIfPresent( + self.enforcement = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload.self, forKey: .enforcement ) @@ -5879,6 +5912,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6034,7 +6075,7 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - selected_repository_ids = try container.decodeIfPresent( + self.selected_repository_ids = try container.decodeIfPresent( [Swift.Int].self, forKey: .selected_repository_ids ) @@ -6070,6 +6111,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6336,6 +6385,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6494,7 +6551,7 @@ public enum Operations { /// The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features. /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/advanced_security`. - @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable { + @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case code_security = "code_security" @@ -6507,7 +6564,7 @@ public enum Operations { /// The enablement status of Dependency Graph /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph`. - @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6519,7 +6576,7 @@ public enum Operations { /// The enablement status of Automatic dependency submission /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph_autosubmit_action`. - @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6554,7 +6611,7 @@ public enum Operations { /// The enablement status of Dependabot alerts /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_alerts`. - @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6566,7 +6623,7 @@ public enum Operations { /// The enablement status of Dependabot security updates /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_security_updates`. - @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6578,7 +6635,7 @@ public enum Operations { /// The enablement status of code scanning default setup /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/code_scanning_default_setup`. - @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable { + @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6592,7 +6649,7 @@ public enum Operations { /// The enablement status of code scanning delegated alert dismissal /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/code_scanning_delegated_alert_dismissal`. - @frozen public enum code_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable { + @frozen public enum code_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6604,7 +6661,7 @@ public enum Operations { /// The enablement status of secret scanning /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning`. - @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6616,7 +6673,7 @@ public enum Operations { /// The enablement status of secret scanning push protection /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_push_protection`. - @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6628,7 +6685,7 @@ public enum Operations { /// The enablement status of secret scanning delegated bypass /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_bypass`. - @frozen public enum secret_scanning_delegated_bypassPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_delegated_bypassPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6650,7 +6707,7 @@ public enum Operations { /// The type of the bypass reviewer /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_bypass_options/reviewersPayload/reviewer_type`. - @frozen public enum reviewer_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum reviewer_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case TEAM = "TEAM" case ROLE = "ROLE" } @@ -6701,7 +6758,7 @@ public enum Operations { /// The enablement status of secret scanning validity checks /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_validity_checks`. - @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6713,7 +6770,7 @@ public enum Operations { /// The enablement status of secret scanning non-provider patterns /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_non_provider_patterns`. - @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_non_provider_patternsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6725,7 +6782,7 @@ public enum Operations { /// The enablement status of Copilot secret scanning /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_generic_secrets`. - @frozen public enum secret_scanning_generic_secretsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_generic_secretsPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6737,7 +6794,7 @@ public enum Operations { /// The enablement status of secret scanning delegated alert dismissal /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_delegated_alert_dismissal`. - @frozen public enum secret_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_delegated_alert_dismissalPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6749,7 +6806,7 @@ public enum Operations { /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. - @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable { + @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case not_set = "not_set" @@ -6761,7 +6818,7 @@ public enum Operations { /// The enforcement status for a security configuration /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/enforcement`. - @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable, CaseIterable { case enforced = "enforced" case unenforced = "unenforced" } @@ -6863,87 +6920,87 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decodeIfPresent( + self.name = try container.decodeIfPresent( Swift.String.self, forKey: .name ) - description = try container.decodeIfPresent( + self.description = try container.decodeIfPresent( Swift.String.self, forKey: .description ) - advanced_security = try container.decodeIfPresent( + self.advanced_security = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload.self, forKey: .advanced_security ) - dependency_graph = try container.decodeIfPresent( + self.dependency_graph = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload.self, forKey: .dependency_graph ) - dependency_graph_autosubmit_action = try container.decodeIfPresent( + self.dependency_graph_autosubmit_action = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload.self, forKey: .dependency_graph_autosubmit_action ) - dependency_graph_autosubmit_action_options = try container.decodeIfPresent( + self.dependency_graph_autosubmit_action_options = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload.self, forKey: .dependency_graph_autosubmit_action_options ) - dependabot_alerts = try container.decodeIfPresent( + self.dependabot_alerts = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload.self, forKey: .dependabot_alerts ) - dependabot_security_updates = try container.decodeIfPresent( + self.dependabot_security_updates = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload.self, forKey: .dependabot_security_updates ) - code_scanning_default_setup = try container.decodeIfPresent( + self.code_scanning_default_setup = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload.self, forKey: .code_scanning_default_setup ) - code_scanning_default_setup_options = try container.decodeIfPresent( + self.code_scanning_default_setup_options = try container.decodeIfPresent( Components.Schemas.code_hyphen_scanning_hyphen_default_hyphen_setup_hyphen_options.self, forKey: .code_scanning_default_setup_options ) - code_scanning_delegated_alert_dismissal = try container.decodeIfPresent( + self.code_scanning_delegated_alert_dismissal = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_delegated_alert_dismissalPayload.self, forKey: .code_scanning_delegated_alert_dismissal ) - secret_scanning = try container.decodeIfPresent( + self.secret_scanning = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload.self, forKey: .secret_scanning ) - secret_scanning_push_protection = try container.decodeIfPresent( + self.secret_scanning_push_protection = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, forKey: .secret_scanning_push_protection ) - secret_scanning_delegated_bypass = try container.decodeIfPresent( + self.secret_scanning_delegated_bypass = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypassPayload.self, forKey: .secret_scanning_delegated_bypass ) - secret_scanning_delegated_bypass_options = try container.decodeIfPresent( + self.secret_scanning_delegated_bypass_options = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_bypass_optionsPayload.self, forKey: .secret_scanning_delegated_bypass_options ) - secret_scanning_validity_checks = try container.decodeIfPresent( + self.secret_scanning_validity_checks = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, forKey: .secret_scanning_validity_checks ) - secret_scanning_non_provider_patterns = try container.decodeIfPresent( + self.secret_scanning_non_provider_patterns = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_non_provider_patternsPayload.self, forKey: .secret_scanning_non_provider_patterns ) - secret_scanning_generic_secrets = try container.decodeIfPresent( + self.secret_scanning_generic_secrets = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_generic_secretsPayload.self, forKey: .secret_scanning_generic_secrets ) - secret_scanning_delegated_alert_dismissal = try container.decodeIfPresent( + self.secret_scanning_delegated_alert_dismissal = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_delegated_alert_dismissalPayload.self, forKey: .secret_scanning_delegated_alert_dismissal ) - private_vulnerability_reporting = try container.decodeIfPresent( + self.private_vulnerability_reporting = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload.self, forKey: .private_vulnerability_reporting ) - enforcement = try container.decodeIfPresent( + self.enforcement = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload.self, forKey: .enforcement ) @@ -7054,6 +7111,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.code_hyphen_security_sol_update_hyphen_configuration.Output.NoContent) + /// Response when no new updates are made + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7173,6 +7238,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7377,7 +7450,7 @@ public enum Operations { /// The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids` /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody/json/scope`. - @frozen public enum scopePayload: String, Codable, Hashable, Sendable { + @frozen public enum scopePayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case all_without_configurations = "all_without_configurations" case _public = "public" @@ -7410,11 +7483,11 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - scope = try container.decode( + self.scope = try container.decode( Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body.jsonPayload.scopePayload.self, forKey: .scope ) - selected_repository_ids = try container.decodeIfPresent( + self.selected_repository_ids = try container.decodeIfPresent( [Swift.Int].self, forKey: .selected_repository_ids ) @@ -7557,7 +7630,7 @@ public enum Operations { /// Specify which types of repository this security configuration should be applied to by default. /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/requestBody/json/default_for_new_repos`. - @frozen public enum default_for_new_reposPayload: String, Codable, Hashable, Sendable { + @frozen public enum default_for_new_reposPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case none = "none" case private_and_internal = "private_and_internal" @@ -7607,7 +7680,7 @@ public enum Operations { /// Specifies which types of repository this security configuration is applied to by default. /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content/json/default_for_new_repos`. - @frozen public enum default_for_new_reposPayload: String, Codable, Hashable, Sendable { + @frozen public enum default_for_new_reposPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case none = "none" case private_and_internal = "private_and_internal" @@ -8115,6 +8188,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -8138,6 +8219,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/codes-of-conduct/Types.swift b/Sources/codes-of-conduct/Types.swift index e18d4ce5a9e..af9f8d82514 100644 --- a/Sources/codes-of-conduct/Types.swift +++ b/Sources/codes-of-conduct/Types.swift @@ -57,6 +57,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -282,6 +291,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//codes_of_conduct/get(codes-of-conduct/get-all-codes-of-conduct)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -458,6 +475,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//codes_of_conduct/{key}/get(codes-of-conduct/get-conduct-code)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/codespaces/Types.swift b/Sources/codespaces/Types.swift index 022008e0e36..6077b896040 100644 --- a/Sources/codespaces/Types.swift +++ b/Sources/codespaces/Types.swift @@ -1387,6 +1387,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -2208,7 +2217,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -2226,7 +2235,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -2245,7 +2254,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -2263,7 +2272,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -2737,7 +2746,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. public struct advanced_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2759,7 +2768,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security`. public struct code_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2785,7 +2794,7 @@ public enum Components { /// The enablement status of Dependabot security updates for the repository. /// /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2811,7 +2820,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. public struct secret_scanningPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2833,7 +2842,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2855,7 +2864,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2877,7 +2886,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -3593,7 +3602,7 @@ public enum Components { /// Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. /// /// - Remark: Generated from `#/components/schemas/nullable-codespace-machine/prebuild_availability`. - @frozen public enum prebuild_availabilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum prebuild_availabilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case none = "none" case ready = "ready" case in_progress = "in_progress" @@ -3684,7 +3693,7 @@ public enum Components { /// State of this codespace. /// /// - Remark: Generated from `#/components/schemas/codespace/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case Unknown = "Unknown" case Created = "Created" case Queued = "Queued" @@ -3771,7 +3780,7 @@ public enum Components { /// The initally assigned location of a new codespace. /// /// - Remark: Generated from `#/components/schemas/codespace/location`. - @frozen public enum locationPayload: String, Codable, Hashable, Sendable { + @frozen public enum locationPayload: String, Codable, Hashable, Sendable, CaseIterable { case EastUs = "EastUs" case SouthEastAsia = "SouthEastAsia" case WestEurope = "WestEurope" @@ -4010,7 +4019,7 @@ public enum Components { /// The type of repositories in the organization that the secret is visible to /// /// - Remark: Generated from `#/components/schemas/codespaces-org-secret/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -4364,7 +4373,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/nullable-repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -4382,7 +4391,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/nullable-repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -4401,7 +4410,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/nullable-repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -4419,7 +4428,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/nullable-repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -5105,7 +5114,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/full-repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -5123,7 +5132,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/full-repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -5142,7 +5151,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/full-repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -5160,7 +5169,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/full-repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -5681,7 +5690,7 @@ public enum Components { /// Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. /// /// - Remark: Generated from `#/components/schemas/codespace-machine/prebuild_availability`. - @frozen public enum prebuild_availabilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum prebuild_availabilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case none = "none" case ready = "ready" case in_progress = "in_progress" @@ -5798,7 +5807,7 @@ public enum Components { /// The type of repositories in the organization that the secret is visible to /// /// - Remark: Generated from `#/components/schemas/codespaces-secret/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -5983,7 +5992,7 @@ public enum Components { /// State of this codespace. /// /// - Remark: Generated from `#/components/schemas/codespace-with-full-repository/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case Unknown = "Unknown" case Created = "Created" case Queued = "Queued" @@ -6070,7 +6079,7 @@ public enum Components { /// The initally assigned location of a new codespace. /// /// - Remark: Generated from `#/components/schemas/codespace-with-full-repository/location`. - @frozen public enum locationPayload: String, Codable, Hashable, Sendable { + @frozen public enum locationPayload: String, Codable, Hashable, Sendable, CaseIterable { case EastUs = "EastUs" case SouthEastAsia = "SouthEastAsia" case WestEurope = "WestEurope" @@ -6530,6 +6539,34 @@ public enum Components { self.body = body } } + public struct internal_error: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.internal_error.Body + /// Creates a new `internal_error`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.internal_error.Body) { + self.body = body + } + } public struct conflict: Sendable, Hashable { /// - Remark: Generated from `#/components/responses/conflict/content`. @frozen public enum Body: Sendable, Hashable { @@ -6615,34 +6652,6 @@ public enum Components { self.body = body } } - public struct internal_error: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. - case json(Components.Schemas.basic_hyphen_error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.basic_hyphen_error { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Components.Responses.internal_error.Body - /// Creates a new `internal_error`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.internal_error.Body) { - self.body = body - } - } } /// Types generated from the `#/components/headers` section of the OpenAPI document. public enum Headers { @@ -6812,6 +6821,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/get(codespaces/list-in-organization)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6996,7 +7013,7 @@ public enum Operations { /// Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization. /// /// - Remark: Generated from `#/paths/orgs/{org}/codespaces/access/PUT/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case disabled = "disabled" case selected_members = "selected_members" case all_members = "all_members" @@ -7058,6 +7075,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_set_hyphen_codespaces_hyphen_access.Output.NoContent) + /// Response when successfully modifying permissions. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/access/put(codespaces/set-codespaces-access)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7081,6 +7106,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/access/put(codespaces/set-codespaces-access)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7108,6 +7141,14 @@ public enum Operations { /// /// HTTP response code: `400 badRequest`. case badRequest(Operations.codespaces_sol_set_hyphen_codespaces_hyphen_access.Output.BadRequest) + /// Users are neither members nor collaborators of this organization. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/access/put(codespaces/set-codespaces-access)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + public static var badRequest: Self { + .badRequest(.init()) + } /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. @@ -7316,6 +7357,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_set_hyphen_codespaces_hyphen_access_hyphen_users.Output.NoContent) + /// Response when successfully modifying permissions. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/access/selected_users/post(codespaces/set-codespaces-access-users)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7339,6 +7388,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/access/selected_users/post(codespaces/set-codespaces-access-users)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7366,6 +7423,14 @@ public enum Operations { /// /// HTTP response code: `400 badRequest`. case badRequest(Operations.codespaces_sol_set_hyphen_codespaces_hyphen_access_hyphen_users.Output.BadRequest) + /// Users are neither members nor collaborators of this organization. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/access/selected_users/post(codespaces/set-codespaces-access-users)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + public static var badRequest: Self { + .badRequest(.init()) + } /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. @@ -7574,6 +7639,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_delete_hyphen_codespaces_hyphen_access_hyphen_users.Output.NoContent) + /// Response when successfully modifying permissions. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/access/selected_users/delete(codespaces/delete-codespaces-access-users)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7597,6 +7670,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/access/selected_users/delete(codespaces/delete-codespaces-access-users)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7624,6 +7705,14 @@ public enum Operations { /// /// HTTP response code: `400 badRequest`. case badRequest(Operations.codespaces_sol_delete_hyphen_codespaces_hyphen_access_hyphen_users.Output.BadRequest) + /// Users are neither members nor collaborators of this organization. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/access/selected_users/delete(codespaces/delete-codespaces-access-users)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + public static var badRequest: Self { + .badRequest(.init()) + } /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. @@ -8303,7 +8392,7 @@ public enum Operations { /// Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. /// /// - Remark: Generated from `#/paths/orgs/{org}/codespaces/secrets/{secret_name}/PUT/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -8423,6 +8512,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_create_hyphen_or_hyphen_update_hyphen_org_hyphen_secret.Output.NoContent) + /// Response when updating a secret + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/secrets/{secret_name}/put(codespaces/create-or-update-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -8588,6 +8685,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_delete_hyphen_org_hyphen_secret.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/secrets/{secret_name}/delete(codespaces/delete-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -8975,6 +9080,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_set_hyphen_selected_hyphen_repos_hyphen_for_hyphen_org_hyphen_secret.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/secrets/{secret_name}/repositories/put(codespaces/set-selected-repos-for-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -9025,6 +9138,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.codespaces_sol_set_hyphen_selected_hyphen_repos_hyphen_for_hyphen_org_hyphen_secret.Output.Conflict) + /// Conflict when visibility type not set to selected + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/secrets/{secret_name}/repositories/put(codespaces/set-selected-repos-for-org-secret)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -9148,6 +9269,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_add_hyphen_selected_hyphen_repo_hyphen_to_hyphen_org_hyphen_secret.Output.NoContent) + /// No Content when repository was added to the selected list + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}/put(codespaces/add-selected-repo-to-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -9198,6 +9327,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.codespaces_sol_add_hyphen_selected_hyphen_repo_hyphen_to_hyphen_org_hyphen_secret.Output.Conflict) + /// Conflict when visibility type is not set to selected + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}/put(codespaces/add-selected-repo-to-org-secret)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -9347,6 +9484,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_remove_hyphen_selected_hyphen_repo_hyphen_from_hyphen_org_hyphen_secret.Output.NoContent) + /// Response when repository was removed from the selected list + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}/delete(codespaces/remove-selected-repo-from-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -9397,6 +9542,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.codespaces_sol_remove_hyphen_selected_hyphen_repo_hyphen_from_hyphen_org_hyphen_secret.Output.Conflict) + /// Conflict when visibility type not set to selected + /// + /// - Remark: Generated from `#/paths//orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}/delete(codespaces/remove-selected-repo-from-org-secret)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -9636,6 +9789,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/codespaces/get(codespaces/get-codespaces-for-user-in-org)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -9873,6 +10034,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/codespaces/{codespace_name}/delete(codespaces/delete-from-organization)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -10138,6 +10307,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/codespaces/{codespace_name}/stop/post(codespaces/stop-in-organization)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -10625,7 +10802,7 @@ public enum Operations { /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/codespaces/POST/requestBody/json/geo`. - @frozen public enum geoPayload: String, Codable, Hashable, Sendable { + @frozen public enum geoPayload: String, Codable, Hashable, Sendable, CaseIterable { case EuropeWest = "EuropeWest" case SoutheastAsia = "SoutheastAsia" case UsEast = "UsEast" @@ -11516,6 +11693,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/codespaces/machines/get(codespaces/repo-machines-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -12899,6 +13084,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_create_hyphen_or_hyphen_update_hyphen_repo_hyphen_secret.Output.NoContent) + /// Response when updating a secret + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/codespaces/secrets/{secret_name}/put(codespaces/create-or-update-repo-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -13008,6 +13201,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_delete_hyphen_repo_hyphen_secret.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/codespaces/secrets/{secret_name}/delete(codespaces/delete-repo-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -13096,7 +13297,7 @@ public enum Operations { /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/codespaces/POST/requestBody/json/geo`. - @frozen public enum geoPayload: String, Codable, Hashable, Sendable { + @frozen public enum geoPayload: String, Codable, Hashable, Sendable, CaseIterable { case EuropeWest = "EuropeWest" case SoutheastAsia = "SoutheastAsia" case UsEast = "UsEast" @@ -13581,6 +13782,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/codespaces/get(codespaces/list-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -13767,7 +13976,7 @@ public enum Operations { /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// /// - Remark: Generated from `#/paths/user/codespaces/POST/requestBody/json/case1/geo`. - @frozen public enum geoPayload: String, Codable, Hashable, Sendable { + @frozen public enum geoPayload: String, Codable, Hashable, Sendable, CaseIterable { case EuropeWest = "EuropeWest" case SoutheastAsia = "SoutheastAsia" case UsEast = "UsEast" @@ -13910,7 +14119,7 @@ public enum Operations { /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. /// /// - Remark: Generated from `#/paths/user/codespaces/POST/requestBody/json/case2/geo`. - @frozen public enum geoPayload: String, Codable, Hashable, Sendable { + @frozen public enum geoPayload: String, Codable, Hashable, Sendable, CaseIterable { case EuropeWest = "EuropeWest" case SoutheastAsia = "SoutheastAsia" case UsEast = "UsEast" @@ -14761,19 +14970,19 @@ public enum Operations { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try decoder.decodeFromSingleValueContainer() + self.value1 = try decoder.decodeFromSingleValueContainer() } catch { errors.append(error) } do { - value2 = try decoder.decodeFromSingleValueContainer() + self.value2 = try decoder.decodeFromSingleValueContainer() } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -14782,8 +14991,8 @@ public enum Operations { } public func encode(to encoder: any Encoder) throws { try encoder.encodeFirstNonNilValueToSingleValueContainer([ - value1, - value2 + self.value1, + self.value2 ]) } } @@ -14898,6 +15107,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_create_hyphen_or_hyphen_update_hyphen_secret_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response after successfully updating a secret + /// + /// - Remark: Generated from `#/paths//user/codespaces/secrets/{secret_name}/put(codespaces/create-or-update-secret-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15039,6 +15256,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_delete_hyphen_secret_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/codespaces/secrets/{secret_name}/delete(codespaces/delete-secret-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15403,6 +15628,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_set_hyphen_repositories_hyphen_for_hyphen_secret_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// No Content when repositories were added to the selected list + /// + /// - Remark: Generated from `#/paths//user/codespaces/secrets/{secret_name}/repositories/put(codespaces/set-repositories-for-secret-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15614,6 +15847,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_add_hyphen_repository_hyphen_for_hyphen_secret_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// No Content when repository was added to the selected list + /// + /// - Remark: Generated from `#/paths//user/codespaces/secrets/{secret_name}/repositories/{repository_id}/put(codespaces/add-repository-for-secret-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15825,6 +16066,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.codespaces_sol_remove_hyphen_repository_hyphen_for_hyphen_secret_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// No Content when repository was removed from the selected list + /// + /// - Remark: Generated from `#/paths//user/codespaces/secrets/{secret_name}/repositories/{repository_id}/delete(codespaces/remove-repository-for-secret-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -16074,6 +16323,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/codespaces/{codespace_name}/get(codespaces/get-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -16544,6 +16801,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/codespaces/{codespace_name}/delete(codespaces/delete-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -17233,6 +17498,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/codespaces/{codespace_name}/machines/get(codespaces/codespace-machines-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -17748,6 +18021,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/codespaces/{codespace_name}/start/post(codespaces/start-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 9ff6ca65a1d..d0812d05316 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -427,6 +427,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -936,7 +945,7 @@ public enum Components { /// The organization policy for allowing or blocking suggestions matching public code (duplication detection filter). /// /// - Remark: Generated from `#/components/schemas/copilot-organization-details/public_code_suggestions`. - @frozen public enum public_code_suggestionsPayload: String, Codable, Hashable, Sendable { + @frozen public enum public_code_suggestionsPayload: String, Codable, Hashable, Sendable, CaseIterable { case allow = "allow" case block = "block" case unconfigured = "unconfigured" @@ -948,7 +957,7 @@ public enum Components { /// The organization policy for allowing or disallowing Copilot Chat in the IDE. /// /// - Remark: Generated from `#/components/schemas/copilot-organization-details/ide_chat`. - @frozen public enum ide_chatPayload: String, Codable, Hashable, Sendable { + @frozen public enum ide_chatPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case unconfigured = "unconfigured" @@ -960,7 +969,7 @@ public enum Components { /// The organization policy for allowing or disallowing Copilot features on GitHub.com. /// /// - Remark: Generated from `#/components/schemas/copilot-organization-details/platform_chat`. - @frozen public enum platform_chatPayload: String, Codable, Hashable, Sendable { + @frozen public enum platform_chatPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case unconfigured = "unconfigured" @@ -972,7 +981,7 @@ public enum Components { /// The organization policy for allowing or disallowing Copilot in the CLI. /// /// - Remark: Generated from `#/components/schemas/copilot-organization-details/cli`. - @frozen public enum cliPayload: String, Codable, Hashable, Sendable { + @frozen public enum cliPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" case unconfigured = "unconfigured" @@ -984,7 +993,7 @@ public enum Components { /// The mode of assigning new seats. /// /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_management_setting`. - @frozen public enum seat_management_settingPayload: String, Codable, Hashable, Sendable { + @frozen public enum seat_management_settingPayload: String, Codable, Hashable, Sendable, CaseIterable { case assign_all = "assign_all" case assign_selected = "assign_selected" case disabled = "disabled" @@ -997,7 +1006,7 @@ public enum Components { /// The Copilot plan of the organization, or the parent enterprise, when applicable. /// /// - Remark: Generated from `#/components/schemas/copilot-organization-details/plan_type`. - @frozen public enum plan_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum plan_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case business = "business" case enterprise = "enterprise" } @@ -1048,31 +1057,31 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - seat_breakdown = try container.decode( + self.seat_breakdown = try container.decode( Components.Schemas.copilot_hyphen_organization_hyphen_seat_hyphen_breakdown.self, forKey: .seat_breakdown ) - public_code_suggestions = try container.decode( + self.public_code_suggestions = try container.decode( Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload.self, forKey: .public_code_suggestions ) - ide_chat = try container.decodeIfPresent( + self.ide_chat = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload.self, forKey: .ide_chat ) - platform_chat = try container.decodeIfPresent( + self.platform_chat = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload.self, forKey: .platform_chat ) - cli = try container.decodeIfPresent( + self.cli = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload.self, forKey: .cli ) - seat_management_setting = try container.decode( + self.seat_management_setting = try container.decode( Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload.self, forKey: .seat_management_setting ) - plan_type = try container.decodeIfPresent( + self.plan_type = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_organization_hyphen_details.plan_typePayload.self, forKey: .plan_type ) @@ -1089,31 +1098,31 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode( - seat_breakdown, + self.seat_breakdown, forKey: .seat_breakdown ) try container.encode( - public_code_suggestions, + self.public_code_suggestions, forKey: .public_code_suggestions ) try container.encodeIfPresent( - ide_chat, + self.ide_chat, forKey: .ide_chat ) try container.encodeIfPresent( - platform_chat, + self.platform_chat, forKey: .platform_chat ) try container.encodeIfPresent( - cli, + self.cli, forKey: .cli ) try container.encode( - seat_management_setting, + self.seat_management_setting, forKey: .seat_management_setting ) try container.encodeIfPresent( - plan_type, + self.plan_type, forKey: .plan_type ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -1356,7 +1365,7 @@ public enum Components { /// The Copilot plan of the organization, or the parent enterprise, when applicable. /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details/plan_type`. - @frozen public enum plan_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum plan_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case business = "business" case enterprise = "enterprise" case unknown = "unknown" @@ -1411,39 +1420,39 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - assignee = try container.decodeIfPresent( + self.assignee = try container.decodeIfPresent( Components.Schemas.nullable_hyphen_simple_hyphen_user.self, forKey: .assignee ) - organization = try container.decodeIfPresent( + self.organization = try container.decodeIfPresent( Components.Schemas.nullable_hyphen_organization_hyphen_simple.self, forKey: .organization ) - assigning_team = try container.decodeIfPresent( + self.assigning_team = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload.self, forKey: .assigning_team ) - pending_cancellation_date = try container.decodeIfPresent( + self.pending_cancellation_date = try container.decodeIfPresent( Swift.String.self, forKey: .pending_cancellation_date ) - last_activity_at = try container.decodeIfPresent( + self.last_activity_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .last_activity_at ) - last_activity_editor = try container.decodeIfPresent( + self.last_activity_editor = try container.decodeIfPresent( Swift.String.self, forKey: .last_activity_editor ) - created_at = try container.decode( + self.created_at = try container.decode( Foundation.Date.self, forKey: .created_at ) - updated_at = try container.decodeIfPresent( + self.updated_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .updated_at ) - plan_type = try container.decodeIfPresent( + self.plan_type = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_seat_hyphen_details.plan_typePayload.self, forKey: .plan_type ) @@ -1668,15 +1677,15 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decodeIfPresent( + self.name = try container.decodeIfPresent( Swift.String.self, forKey: .name ) - total_engaged_users = try container.decodeIfPresent( + self.total_engaged_users = try container.decodeIfPresent( Swift.Int.self, forKey: .total_engaged_users ) - models = try container.decodeIfPresent( + self.models = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayloadPayload.modelsPayload.self, forKey: .models ) @@ -1689,15 +1698,15 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - name, + self.name, forKey: .name ) try container.encodeIfPresent( - total_engaged_users, + self.total_engaged_users, forKey: .total_engaged_users ) try container.encodeIfPresent( - models, + self.models, forKey: .models ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -1734,15 +1743,15 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - total_engaged_users = try container.decodeIfPresent( + self.total_engaged_users = try container.decodeIfPresent( Swift.Int.self, forKey: .total_engaged_users ) - languages = try container.decodeIfPresent( + self.languages = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.languagesPayload.self, forKey: .languages ) - editors = try container.decodeIfPresent( + self.editors = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.editorsPayload.self, forKey: .editors ) @@ -1755,15 +1764,15 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - total_engaged_users, + self.total_engaged_users, forKey: .total_engaged_users ) try container.encodeIfPresent( - languages, + self.languages, forKey: .languages ) try container.encodeIfPresent( - editors, + self.editors, forKey: .editors ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -1912,11 +1921,11 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - total_engaged_users = try container.decodeIfPresent( + self.total_engaged_users = try container.decodeIfPresent( Swift.Int.self, forKey: .total_engaged_users ) - editors = try container.decodeIfPresent( + self.editors = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_ide_hyphen_chat.editorsPayload.self, forKey: .editors ) @@ -1928,11 +1937,11 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - total_engaged_users, + self.total_engaged_users, forKey: .total_engaged_users ) try container.encodeIfPresent( - editors, + self.editors, forKey: .editors ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -2028,11 +2037,11 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - total_engaged_users = try container.decodeIfPresent( + self.total_engaged_users = try container.decodeIfPresent( Swift.Int.self, forKey: .total_engaged_users ) - models = try container.decodeIfPresent( + self.models = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_dotcom_hyphen_chat.modelsPayload.self, forKey: .models ) @@ -2044,11 +2053,11 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - total_engaged_users, + self.total_engaged_users, forKey: .total_engaged_users ) try container.encodeIfPresent( - models, + self.models, forKey: .models ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -2183,11 +2192,11 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - total_engaged_users = try container.decodeIfPresent( + self.total_engaged_users = try container.decodeIfPresent( Swift.Int.self, forKey: .total_engaged_users ) - repositories = try container.decodeIfPresent( + self.repositories = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_dotcom_hyphen_pull_hyphen_requests.repositoriesPayload.self, forKey: .repositories ) @@ -2199,11 +2208,11 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - total_engaged_users, + self.total_engaged_users, forKey: .total_engaged_users ) try container.encodeIfPresent( - repositories, + self.repositories, forKey: .repositories ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -2276,31 +2285,31 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - date = try container.decode( + self.date = try container.decode( Swift.String.self, forKey: .date ) - total_active_users = try container.decodeIfPresent( + self.total_active_users = try container.decodeIfPresent( Swift.Int.self, forKey: .total_active_users ) - total_engaged_users = try container.decodeIfPresent( + self.total_engaged_users = try container.decodeIfPresent( Swift.Int.self, forKey: .total_engaged_users ) - copilot_ide_code_completions = try container.decodeIfPresent( + self.copilot_ide_code_completions = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_ide_hyphen_code_hyphen_completions.self, forKey: .copilot_ide_code_completions ) - copilot_ide_chat = try container.decodeIfPresent( + self.copilot_ide_chat = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_ide_hyphen_chat.self, forKey: .copilot_ide_chat ) - copilot_dotcom_chat = try container.decodeIfPresent( + self.copilot_dotcom_chat = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_dotcom_hyphen_chat.self, forKey: .copilot_dotcom_chat ) - copilot_dotcom_pull_requests = try container.decodeIfPresent( + self.copilot_dotcom_pull_requests = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_dotcom_hyphen_pull_hyphen_requests.self, forKey: .copilot_dotcom_pull_requests ) @@ -2317,31 +2326,31 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode( - date, + self.date, forKey: .date ) try container.encodeIfPresent( - total_active_users, + self.total_active_users, forKey: .total_active_users ) try container.encodeIfPresent( - total_engaged_users, + self.total_engaged_users, forKey: .total_engaged_users ) try container.encodeIfPresent( - copilot_ide_code_completions, + self.copilot_ide_code_completions, forKey: .copilot_ide_code_completions ) try container.encodeIfPresent( - copilot_ide_chat, + self.copilot_ide_chat, forKey: .copilot_ide_chat ) try container.encodeIfPresent( - copilot_dotcom_chat, + self.copilot_dotcom_chat, forKey: .copilot_dotcom_chat ) try container.encodeIfPresent( - copilot_dotcom_pull_requests, + self.copilot_dotcom_pull_requests, forKey: .copilot_dotcom_pull_requests ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -2733,6 +2742,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.Output.UnprocessableContent) + /// There is a problem with your account's associated payment method. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/get(copilot/get-copilot-organization-details)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -3343,6 +3360,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.Output.UnprocessableContent) + /// Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/post(copilot/add-copilot-seats-for-teams)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -3648,6 +3673,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.Output.UnprocessableContent) + /// Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/delete(copilot/cancel-copilot-seat-assignment-for-teams)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -3954,6 +3987,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.Output.UnprocessableContent) + /// Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/post(copilot/add-copilot-seats-for-users)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -4259,6 +4300,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output.UnprocessableContent) + /// Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, the seat management setting is set to enable Copilot for all users or is unconfigured, or a user's seat cannot be cancelled because it was assigned to them via a team. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -4806,6 +4855,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.Output.UnprocessableContent) + /// Copilot Business or Enterprise is not enabled for this organization or the user has a pending organization invitation. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/copilot/get(copilot/get-copilot-seat-details-for-user)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. diff --git a/Sources/credentials/Client.swift b/Sources/credentials/Client.swift new file mode 100644 index 00000000000..8c78e493035 --- /dev/null +++ b/Sources/credentials/Client.swift @@ -0,0 +1,168 @@ +// Generated by swift-openapi-generator, do not modify. +@_spi(Generated) import OpenAPIRuntime +#if os(Linux) +@preconcurrency import struct Foundation.URL +@preconcurrency import struct Foundation.Data +@preconcurrency import struct Foundation.Date +#else +import struct Foundation.URL +import struct Foundation.Data +import struct Foundation.Date +#endif +import HTTPTypes +/// GitHub's v3 REST API. +public struct Client: APIProtocol { + /// The underlying HTTP client. + private let client: UniversalClient + /// Creates a new client. + /// - Parameters: + /// - serverURL: The server URL that the client connects to. Any server + /// URLs defined in the OpenAPI document are available as static methods + /// on the ``Servers`` type. + /// - configuration: A set of configuration values for the client. + /// - transport: A transport that performs HTTP operations. + /// - middlewares: A list of middlewares to call before the transport. + public init( + serverURL: Foundation.URL, + configuration: Configuration = .init(), + transport: any ClientTransport, + middlewares: [any ClientMiddleware] = [] + ) { + self.client = .init( + serverURL: serverURL, + configuration: configuration, + transport: transport, + middlewares: middlewares + ) + } + private var converter: Converter { + client.converter + } + /// Revoke a list of credentials + /// + /// Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation. + /// + /// This endpoint currently accepts the following credential types: + /// - Personal access tokens (classic) + /// - Fine-grained personal access tokens + /// + /// Revoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users. + /// GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated. + /// + /// To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request. + /// + /// > [!NOTE] + /// > Any authenticated requests will return a 403. + /// + /// - Remark: HTTP `POST /credentials/revoke`. + /// - Remark: Generated from `#/paths//credentials/revoke/post(credentials/revoke)`. + public func credentials_sol_revoke(_ input: Operations.credentials_sol_revoke.Input) async throws -> Operations.credentials_sol_revoke.Output { + try await client.send( + input: input, + forOperation: Operations.credentials_sol_revoke.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/credentials/revoke", + parameters: [] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 202: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.accepted.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + OpenAPIRuntime.OpenAPIObjectContainer.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .accepted(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.validation_failed_simple.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.validation_hyphen_error_hyphen_simple.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unprocessableContent(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.internal_error.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } +} diff --git a/Sources/credentials/Types.swift b/Sources/credentials/Types.swift new file mode 100644 index 00000000000..e3938b436f2 --- /dev/null +++ b/Sources/credentials/Types.swift @@ -0,0 +1,425 @@ +// Generated by swift-openapi-generator, do not modify. +@_spi(Generated) import OpenAPIRuntime +#if os(Linux) +@preconcurrency import struct Foundation.URL +@preconcurrency import struct Foundation.Data +@preconcurrency import struct Foundation.Date +#else +import struct Foundation.URL +import struct Foundation.Data +import struct Foundation.Date +#endif +/// A type that performs HTTP operations defined by the OpenAPI document. +public protocol APIProtocol: Sendable { + /// Revoke a list of credentials + /// + /// Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation. + /// + /// This endpoint currently accepts the following credential types: + /// - Personal access tokens (classic) + /// - Fine-grained personal access tokens + /// + /// Revoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users. + /// GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated. + /// + /// To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request. + /// + /// > [!NOTE] + /// > Any authenticated requests will return a 403. + /// + /// - Remark: HTTP `POST /credentials/revoke`. + /// - Remark: Generated from `#/paths//credentials/revoke/post(credentials/revoke)`. + func credentials_sol_revoke(_ input: Operations.credentials_sol_revoke.Input) async throws -> Operations.credentials_sol_revoke.Output +} + +/// Convenience overloads for operation inputs. +extension APIProtocol { + /// Revoke a list of credentials + /// + /// Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation. + /// + /// This endpoint currently accepts the following credential types: + /// - Personal access tokens (classic) + /// - Fine-grained personal access tokens + /// + /// Revoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users. + /// GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated. + /// + /// To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request. + /// + /// > [!NOTE] + /// > Any authenticated requests will return a 403. + /// + /// - Remark: HTTP `POST /credentials/revoke`. + /// - Remark: Generated from `#/paths//credentials/revoke/post(credentials/revoke)`. + public func credentials_sol_revoke( + headers: Operations.credentials_sol_revoke.Input.Headers = .init(), + body: Operations.credentials_sol_revoke.Input.Body + ) async throws -> Operations.credentials_sol_revoke.Output { + try await credentials_sol_revoke(Operations.credentials_sol_revoke.Input( + headers: headers, + body: body + )) + } +} + +/// Server URLs defined in the OpenAPI document. +public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") + public static func server1() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } +} + +/// Types generated from the components section of the OpenAPI document. +public enum Components { + /// Types generated from the `#/components/schemas` section of the OpenAPI document. + public enum Schemas { + /// Basic Error + /// + /// - Remark: Generated from `#/components/schemas/basic-error`. + public struct basic_hyphen_error: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/basic-error/message`. + public var message: Swift.String? + /// - Remark: Generated from `#/components/schemas/basic-error/documentation_url`. + public var documentation_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/basic-error/url`. + public var url: Swift.String? + /// - Remark: Generated from `#/components/schemas/basic-error/status`. + public var status: Swift.String? + /// Creates a new `basic_hyphen_error`. + /// + /// - Parameters: + /// - message: + /// - documentation_url: + /// - url: + /// - status: + public init( + message: Swift.String? = nil, + documentation_url: Swift.String? = nil, + url: Swift.String? = nil, + status: Swift.String? = nil + ) { + self.message = message + self.documentation_url = documentation_url + self.url = url + self.status = status + } + public enum CodingKeys: String, CodingKey { + case message + case documentation_url + case url + case status + } + } + /// Validation Error Simple + /// + /// - Remark: Generated from `#/components/schemas/validation-error-simple`. + public struct validation_hyphen_error_hyphen_simple: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/validation-error-simple/message`. + public var message: Swift.String + /// - Remark: Generated from `#/components/schemas/validation-error-simple/documentation_url`. + public var documentation_url: Swift.String + /// - Remark: Generated from `#/components/schemas/validation-error-simple/errors`. + public var errors: [Swift.String]? + /// Creates a new `validation_hyphen_error_hyphen_simple`. + /// + /// - Parameters: + /// - message: + /// - documentation_url: + /// - errors: + public init( + message: Swift.String, + documentation_url: Swift.String, + errors: [Swift.String]? = nil + ) { + self.message = message + self.documentation_url = documentation_url + self.errors = errors + } + public enum CodingKeys: String, CodingKey { + case message + case documentation_url + case errors + } + } + } + /// Types generated from the `#/components/parameters` section of the OpenAPI document. + public enum Parameters {} + /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. + public enum RequestBodies {} + /// Types generated from the `#/components/responses` section of the OpenAPI document. + public enum Responses { + public struct validation_failed_simple: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/validation_failed_simple/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/validation_failed_simple/content/application\/json`. + case json(Components.Schemas.validation_hyphen_error_hyphen_simple) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.validation_hyphen_error_hyphen_simple { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.validation_failed_simple.Body + /// Creates a new `validation_failed_simple`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.validation_failed_simple.Body) { + self.body = body + } + } + public struct accepted: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/accepted/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/accepted/content/application\/json`. + case json(OpenAPIRuntime.OpenAPIObjectContainer) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: OpenAPIRuntime.OpenAPIObjectContainer { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.accepted.Body + /// Creates a new `accepted`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.accepted.Body) { + self.body = body + } + } + public struct internal_error: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.internal_error.Body + /// Creates a new `internal_error`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.internal_error.Body) { + self.body = body + } + } + } + /// Types generated from the `#/components/headers` section of the OpenAPI document. + public enum Headers {} +} + +/// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. +public enum Operations { + /// Revoke a list of credentials + /// + /// Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation. + /// + /// This endpoint currently accepts the following credential types: + /// - Personal access tokens (classic) + /// - Fine-grained personal access tokens + /// + /// Revoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users. + /// GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated. + /// + /// To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request. + /// + /// > [!NOTE] + /// > Any authenticated requests will return a 403. + /// + /// - Remark: HTTP `POST /credentials/revoke`. + /// - Remark: Generated from `#/paths//credentials/revoke/post(credentials/revoke)`. + public enum credentials_sol_revoke { + public static let id: Swift.String = "credentials/revoke" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/credentials/revoke/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.credentials_sol_revoke.Input.Headers + /// - Remark: Generated from `#/paths/credentials/revoke/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/credentials/revoke/POST/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// A list of credentials to be revoked, up to 1000 per request. + /// + /// - Remark: Generated from `#/paths/credentials/revoke/POST/requestBody/json/credentials`. + public var credentials: [Swift.String] + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - credentials: A list of credentials to be revoked, up to 1000 per request. + public init(credentials: [Swift.String]) { + self.credentials = credentials + } + public enum CodingKeys: String, CodingKey { + case credentials + } + } + /// - Remark: Generated from `#/paths/credentials/revoke/POST/requestBody/content/application\/json`. + case json(Operations.credentials_sol_revoke.Input.Body.jsonPayload) + } + public var body: Operations.credentials_sol_revoke.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - headers: + /// - body: + public init( + headers: Operations.credentials_sol_revoke.Input.Headers = .init(), + body: Operations.credentials_sol_revoke.Input.Body + ) { + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + /// Accepted + /// + /// - Remark: Generated from `#/paths//credentials/revoke/post(credentials/revoke)/responses/202`. + /// + /// HTTP response code: `202 accepted`. + case accepted(Components.Responses.accepted) + /// The associated value of the enum case if `self` is `.accepted`. + /// + /// - Throws: An error if `self` is not `.accepted`. + /// - SeeAlso: `.accepted`. + public var accepted: Components.Responses.accepted { + get throws { + switch self { + case let .accepted(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "accepted", + response: self + ) + } + } + } + /// Validation failed, or the endpoint has been spammed. + /// + /// - Remark: Generated from `#/paths//credentials/revoke/post(credentials/revoke)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.validation_failed_simple) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.validation_failed_simple { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) + } + } + } + /// Internal Error + /// + /// - Remark: Generated from `#/paths//credentials/revoke/post(credentials/revoke)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Components.Responses.internal_error) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Components.Responses.internal_error { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } +} diff --git a/Sources/dependabot/Client.swift b/Sources/dependabot/Client.swift index 701e3b3542e..8fb44251c4c 100644 --- a/Sources/dependabot/Client.swift +++ b/Sources/dependabot/Client.swift @@ -101,6 +101,13 @@ public struct Client: APIProtocol { name: "epss_percentage", value: input.query.epss_percentage ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "has", + value: input.query.has + ) try converter.setQueryItemAsURI( in: &request, style: .form, @@ -328,6 +335,13 @@ public struct Client: APIProtocol { name: "epss_percentage", value: input.query.epss_percentage ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "has", + value: input.query.has + ) try converter.setQueryItemAsURI( in: &request, style: .form, @@ -1167,6 +1181,13 @@ public struct Client: APIProtocol { name: "epss_percentage", value: input.query.epss_percentage ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "has", + value: input.query.has + ) try converter.setQueryItemAsURI( in: &request, style: .form, diff --git a/Sources/dependabot/Types.swift b/Sources/dependabot/Types.swift index a439100266b..18f0c5aa349 100644 --- a/Sources/dependabot/Types.swift +++ b/Sources/dependabot/Types.swift @@ -539,6 +539,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1516,11 +1525,11 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - ecosystem = try container.decode( + self.ecosystem = try container.decode( Swift.String.self, forKey: .ecosystem ) - name = try container.decode( + self.name = try container.decode( Swift.String.self, forKey: .name ) @@ -1539,7 +1548,7 @@ public enum Components { /// The severity of the vulnerability. /// /// - Remark: Generated from `#/components/schemas/dependabot-alert-security-vulnerability/severity`. - @frozen public enum severityPayload: String, Codable, Hashable, Sendable { + @frozen public enum severityPayload: String, Codable, Hashable, Sendable, CaseIterable { case low = "low" case medium = "medium" case high = "high" @@ -1573,7 +1582,7 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - identifier = try container.decode( + self.identifier = try container.decode( Swift.String.self, forKey: .identifier ) @@ -1612,19 +1621,19 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - package = try container.decode( + self.package = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_package.self, forKey: .package ) - severity = try container.decode( + self.severity = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_vulnerability.severityPayload.self, forKey: .severity ) - vulnerable_version_range = try container.decode( + self.vulnerable_version_range = try container.decode( Swift.String.self, forKey: .vulnerable_version_range ) - first_patched_version = try container.decodeIfPresent( + self.first_patched_version = try container.decodeIfPresent( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_vulnerability.first_patched_versionPayload.self, forKey: .first_patched_version ) @@ -1663,7 +1672,7 @@ public enum Components { /// The severity of the advisory. /// /// - Remark: Generated from `#/components/schemas/dependabot-alert-security-advisory/severity`. - @frozen public enum severityPayload: String, Codable, Hashable, Sendable { + @frozen public enum severityPayload: String, Codable, Hashable, Sendable, CaseIterable { case low = "low" case medium = "medium" case high = "high" @@ -1703,11 +1712,11 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - score = try container.decode( + self.score = try container.decode( Swift.Double.self, forKey: .score ) - vector_string = try container.decodeIfPresent( + self.vector_string = try container.decodeIfPresent( Swift.String.self, forKey: .vector_string ) @@ -1755,11 +1764,11 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - cwe_id = try container.decode( + self.cwe_id = try container.decode( Swift.String.self, forKey: .cwe_id ) - name = try container.decode( + self.name = try container.decode( Swift.String.self, forKey: .name ) @@ -1784,7 +1793,7 @@ public enum Components { /// The type of advisory identifier. /// /// - Remark: Generated from `#/components/schemas/dependabot-alert-security-advisory/identifiersPayload/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case CVE = "CVE" case GHSA = "GHSA" } @@ -1814,11 +1823,11 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - _type = try container.decode( + self._type = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.identifiersPayloadPayload._typePayload.self, forKey: ._type ) - value = try container.decode( + self.value = try container.decode( Swift.String.self, forKey: .value ) @@ -1856,7 +1865,7 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - url = try container.decode( + self.url = try container.decode( Swift.String.self, forKey: .url ) @@ -1955,63 +1964,63 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - ghsa_id = try container.decode( + self.ghsa_id = try container.decode( Swift.String.self, forKey: .ghsa_id ) - cve_id = try container.decodeIfPresent( + self.cve_id = try container.decodeIfPresent( Swift.String.self, forKey: .cve_id ) - summary = try container.decode( + self.summary = try container.decode( Swift.String.self, forKey: .summary ) - description = try container.decode( + self.description = try container.decode( Swift.String.self, forKey: .description ) - vulnerabilities = try container.decode( + self.vulnerabilities = try container.decode( [Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_vulnerability].self, forKey: .vulnerabilities ) - severity = try container.decode( + self.severity = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.severityPayload.self, forKey: .severity ) - cvss = try container.decode( + self.cvss = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.cvssPayload.self, forKey: .cvss ) - cvss_severities = try container.decodeIfPresent( + self.cvss_severities = try container.decodeIfPresent( Components.Schemas.cvss_hyphen_severities.self, forKey: .cvss_severities ) - epss = try container.decodeIfPresent( + self.epss = try container.decodeIfPresent( Components.Schemas.security_hyphen_advisory_hyphen_epss.self, forKey: .epss ) - cwes = try container.decode( + self.cwes = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.cwesPayload.self, forKey: .cwes ) - identifiers = try container.decode( + self.identifiers = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.identifiersPayload.self, forKey: .identifiers ) - references = try container.decode( + self.references = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.referencesPayload.self, forKey: .references ) - published_at = try container.decode( + self.published_at = try container.decode( Foundation.Date.self, forKey: .published_at ) - updated_at = try container.decode( + self.updated_at = try container.decode( Foundation.Date.self, forKey: .updated_at ) - withdrawn_at = try container.decodeIfPresent( + self.withdrawn_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .withdrawn_at ) @@ -2071,7 +2080,7 @@ public enum Components { /// The state of the Dependabot alert. /// /// - Remark: Generated from `#/components/schemas/dependabot-alert-with-repository/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case auto_dismissed = "auto_dismissed" case dismissed = "dismissed" case fixed = "fixed" @@ -2094,7 +2103,7 @@ public enum Components { /// The execution scope of the vulnerable dependency. /// /// - Remark: Generated from `#/components/schemas/dependabot-alert-with-repository/dependency/scope`. - @frozen public enum scopePayload: String, Codable, Hashable, Sendable { + @frozen public enum scopePayload: String, Codable, Hashable, Sendable, CaseIterable { case development = "development" case runtime = "runtime" } @@ -2109,7 +2118,7 @@ public enum Components { /// /// /// - Remark: Generated from `#/components/schemas/dependabot-alert-with-repository/dependency/relationship`. - @frozen public enum relationshipPayload: String, Codable, Hashable, Sendable { + @frozen public enum relationshipPayload: String, Codable, Hashable, Sendable, CaseIterable { case unknown = "unknown" case direct = "direct" case transitive = "transitive" @@ -2170,7 +2179,7 @@ public enum Components { /// The reason that the alert was dismissed. /// /// - Remark: Generated from `#/components/schemas/dependabot-alert-with-repository/dismissed_reason`. - @frozen public enum dismissed_reasonPayload: String, Codable, Hashable, Sendable { + @frozen public enum dismissed_reasonPayload: String, Codable, Hashable, Sendable, CaseIterable { case fix_started = "fix_started" case inaccurate = "inaccurate" case no_bandwidth = "no_bandwidth" @@ -2265,67 +2274,67 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - number = try container.decode( + self.number = try container.decode( Components.Schemas.alert_hyphen_number.self, forKey: .number ) - state = try container.decode( + self.state = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_with_hyphen_repository.statePayload.self, forKey: .state ) - dependency = try container.decode( + self.dependency = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_with_hyphen_repository.dependencyPayload.self, forKey: .dependency ) - security_advisory = try container.decode( + self.security_advisory = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.self, forKey: .security_advisory ) - security_vulnerability = try container.decode( + self.security_vulnerability = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_vulnerability.self, forKey: .security_vulnerability ) - url = try container.decode( + self.url = try container.decode( Components.Schemas.alert_hyphen_url.self, forKey: .url ) - html_url = try container.decode( + self.html_url = try container.decode( Components.Schemas.alert_hyphen_html_hyphen_url.self, forKey: .html_url ) - created_at = try container.decode( + self.created_at = try container.decode( Components.Schemas.alert_hyphen_created_hyphen_at.self, forKey: .created_at ) - updated_at = try container.decode( + self.updated_at = try container.decode( Components.Schemas.alert_hyphen_updated_hyphen_at.self, forKey: .updated_at ) - dismissed_at = try container.decodeIfPresent( + self.dismissed_at = try container.decodeIfPresent( Components.Schemas.alert_hyphen_dismissed_hyphen_at.self, forKey: .dismissed_at ) - dismissed_by = try container.decodeIfPresent( + self.dismissed_by = try container.decodeIfPresent( Components.Schemas.nullable_hyphen_simple_hyphen_user.self, forKey: .dismissed_by ) - dismissed_reason = try container.decodeIfPresent( + self.dismissed_reason = try container.decodeIfPresent( Components.Schemas.dependabot_hyphen_alert_hyphen_with_hyphen_repository.dismissed_reasonPayload.self, forKey: .dismissed_reason ) - dismissed_comment = try container.decodeIfPresent( + self.dismissed_comment = try container.decodeIfPresent( Swift.String.self, forKey: .dismissed_comment ) - fixed_at = try container.decodeIfPresent( + self.fixed_at = try container.decodeIfPresent( Components.Schemas.alert_hyphen_fixed_hyphen_at.self, forKey: .fixed_at ) - auto_dismissed_at = try container.decodeIfPresent( + self.auto_dismissed_at = try container.decodeIfPresent( Components.Schemas.alert_hyphen_auto_hyphen_dismissed_hyphen_at.self, forKey: .auto_dismissed_at ) - repository = try container.decode( + self.repository = try container.decode( Components.Schemas.simple_hyphen_repository.self, forKey: .repository ) @@ -2354,7 +2363,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. public struct advanced_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2376,7 +2385,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security`. public struct code_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2402,7 +2411,7 @@ public enum Components { /// The enablement status of Dependabot security updates for the repository. /// /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2428,7 +2437,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. public struct secret_scanningPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2450,7 +2459,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2472,7 +2481,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2494,7 +2503,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -3194,7 +3203,7 @@ public enum Components { /// Visibility of a secret /// /// - Remark: Generated from `#/components/schemas/organization-dependabot-secret/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -3272,7 +3281,7 @@ public enum Components { /// The state of the Dependabot alert. /// /// - Remark: Generated from `#/components/schemas/dependabot-alert/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case auto_dismissed = "auto_dismissed" case dismissed = "dismissed" case fixed = "fixed" @@ -3295,7 +3304,7 @@ public enum Components { /// The execution scope of the vulnerable dependency. /// /// - Remark: Generated from `#/components/schemas/dependabot-alert/dependency/scope`. - @frozen public enum scopePayload: String, Codable, Hashable, Sendable { + @frozen public enum scopePayload: String, Codable, Hashable, Sendable, CaseIterable { case development = "development" case runtime = "runtime" } @@ -3310,7 +3319,7 @@ public enum Components { /// /// /// - Remark: Generated from `#/components/schemas/dependabot-alert/dependency/relationship`. - @frozen public enum relationshipPayload: String, Codable, Hashable, Sendable { + @frozen public enum relationshipPayload: String, Codable, Hashable, Sendable, CaseIterable { case unknown = "unknown" case direct = "direct" case transitive = "transitive" @@ -3371,7 +3380,7 @@ public enum Components { /// The reason that the alert was dismissed. /// /// - Remark: Generated from `#/components/schemas/dependabot-alert/dismissed_reason`. - @frozen public enum dismissed_reasonPayload: String, Codable, Hashable, Sendable { + @frozen public enum dismissed_reasonPayload: String, Codable, Hashable, Sendable, CaseIterable { case fix_started = "fix_started" case inaccurate = "inaccurate" case no_bandwidth = "no_bandwidth" @@ -3460,63 +3469,63 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - number = try container.decode( + self.number = try container.decode( Components.Schemas.alert_hyphen_number.self, forKey: .number ) - state = try container.decode( + self.state = try container.decode( Components.Schemas.dependabot_hyphen_alert.statePayload.self, forKey: .state ) - dependency = try container.decode( + self.dependency = try container.decode( Components.Schemas.dependabot_hyphen_alert.dependencyPayload.self, forKey: .dependency ) - security_advisory = try container.decode( + self.security_advisory = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_advisory.self, forKey: .security_advisory ) - security_vulnerability = try container.decode( + self.security_vulnerability = try container.decode( Components.Schemas.dependabot_hyphen_alert_hyphen_security_hyphen_vulnerability.self, forKey: .security_vulnerability ) - url = try container.decode( + self.url = try container.decode( Components.Schemas.alert_hyphen_url.self, forKey: .url ) - html_url = try container.decode( + self.html_url = try container.decode( Components.Schemas.alert_hyphen_html_hyphen_url.self, forKey: .html_url ) - created_at = try container.decode( + self.created_at = try container.decode( Components.Schemas.alert_hyphen_created_hyphen_at.self, forKey: .created_at ) - updated_at = try container.decode( + self.updated_at = try container.decode( Components.Schemas.alert_hyphen_updated_hyphen_at.self, forKey: .updated_at ) - dismissed_at = try container.decodeIfPresent( + self.dismissed_at = try container.decodeIfPresent( Components.Schemas.alert_hyphen_dismissed_hyphen_at.self, forKey: .dismissed_at ) - dismissed_by = try container.decodeIfPresent( + self.dismissed_by = try container.decodeIfPresent( Components.Schemas.nullable_hyphen_simple_hyphen_user.self, forKey: .dismissed_by ) - dismissed_reason = try container.decodeIfPresent( + self.dismissed_reason = try container.decodeIfPresent( Components.Schemas.dependabot_hyphen_alert.dismissed_reasonPayload.self, forKey: .dismissed_reason ) - dismissed_comment = try container.decodeIfPresent( + self.dismissed_comment = try container.decodeIfPresent( Swift.String.self, forKey: .dismissed_comment ) - fixed_at = try container.decodeIfPresent( + self.fixed_at = try container.decodeIfPresent( Components.Schemas.alert_hyphen_fixed_hyphen_at.self, forKey: .fixed_at ) - auto_dismissed_at = try container.decodeIfPresent( + self.auto_dismissed_at = try container.decodeIfPresent( Components.Schemas.alert_hyphen_auto_hyphen_dismissed_hyphen_at.self, forKey: .auto_dismissed_at ) @@ -3586,7 +3595,7 @@ public enum Components { /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -3633,10 +3642,54 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-epss`. public typealias dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_epss = Swift.String + /// Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned. + /// Multiple `has` filters can be passed to filter for alerts that have all of the values. Currently, only `patch` is supported. + /// + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has`. + @frozen public enum dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/Case2Payload`. + @frozen public enum Case2PayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { + case patch = "patch" + } + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/case2`. + public typealias Case2Payload = [Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has.Case2PayloadPayload] + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/case2`. + case case2(Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has.Case2Payload) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .case1(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + do { + self = .case2(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try encoder.encodeToSingleValueContainer(value) + } + } + } /// The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. /// /// - Remark: Generated from `#/components/parameters/dependabot-alert-scope`. - @frozen public enum dependabot_hyphen_alert_hyphen_scope: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_hyphen_alert_hyphen_scope: String, Codable, Hashable, Sendable, CaseIterable { case development = "development" case runtime = "runtime" } @@ -3646,7 +3699,7 @@ public enum Components { /// `epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage. /// /// - Remark: Generated from `#/components/parameters/dependabot-alert-sort`. - @frozen public enum dependabot_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case epss_percentage = "epss_percentage" @@ -3936,8 +3989,54 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/dependabot/alerts/GET/query/epss_percentage`. public var epss_percentage: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_epss? + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has`. + @frozen public enum dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/Case2Payload`. + @frozen public enum Case2PayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { + case patch = "patch" + } + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/case2`. + public typealias Case2Payload = [Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has.Case2PayloadPayload] + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/case2`. + case case2(Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has.Case2Payload) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .case1(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + do { + self = .case2(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try encoder.encodeToSingleValueContainer(value) + } + } + } + /// Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned. + /// Multiple `has` filters can be passed to filter for alerts that have all of the values. Currently, only `patch` is supported. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/dependabot/alerts/GET/query/has`. + public var has: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has? /// - Remark: Generated from `#/components/parameters/dependabot-alert-scope`. - @frozen public enum dependabot_hyphen_alert_hyphen_scope: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_hyphen_alert_hyphen_scope: String, Codable, Hashable, Sendable, CaseIterable { case development = "development" case runtime = "runtime" } @@ -3946,7 +4045,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/enterprises/{enterprise}/dependabot/alerts/GET/query/scope`. public var scope: Components.Parameters.dependabot_hyphen_alert_hyphen_scope? /// - Remark: Generated from `#/components/parameters/dependabot-alert-sort`. - @frozen public enum dependabot_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case epss_percentage = "epss_percentage" @@ -3959,7 +4058,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/enterprises/{enterprise}/dependabot/alerts/GET/query/sort`. public var sort: Components.Parameters.dependabot_hyphen_alert_hyphen_sort? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -3999,6 +4098,7 @@ public enum Operations { /// - ecosystem: A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. /// - package: A comma-separated list of package names. If specified, only alerts for these packages will be returned. /// - epss_percentage: CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as: + /// - has: Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned. /// - scope: The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. /// - sort: The property by which to sort the results. /// - direction: The direction to sort the results by. @@ -4013,6 +4113,7 @@ public enum Operations { ecosystem: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_ecosystems? = nil, package: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_packages? = nil, epss_percentage: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_epss? = nil, + has: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has? = nil, scope: Components.Parameters.dependabot_hyphen_alert_hyphen_scope? = nil, sort: Components.Parameters.dependabot_hyphen_alert_hyphen_sort? = nil, direction: Components.Parameters.direction? = nil, @@ -4027,6 +4128,7 @@ public enum Operations { self.ecosystem = ecosystem self.package = package self.epss_percentage = epss_percentage + self.has = has self.scope = scope self.sort = sort self.direction = direction @@ -4124,6 +4226,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/dependabot/alerts/get(dependabot/list-alerts-for-enterprise)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4302,8 +4412,54 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/dependabot/alerts/GET/query/epss_percentage`. public var epss_percentage: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_epss? + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has`. + @frozen public enum dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/Case2Payload`. + @frozen public enum Case2PayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { + case patch = "patch" + } + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/case2`. + public typealias Case2Payload = [Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has.Case2PayloadPayload] + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/case2`. + case case2(Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has.Case2Payload) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .case1(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + do { + self = .case2(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try encoder.encodeToSingleValueContainer(value) + } + } + } + /// Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned. + /// Multiple `has` filters can be passed to filter for alerts that have all of the values. Currently, only `patch` is supported. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/dependabot/alerts/GET/query/has`. + public var has: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has? /// - Remark: Generated from `#/components/parameters/dependabot-alert-scope`. - @frozen public enum dependabot_hyphen_alert_hyphen_scope: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_hyphen_alert_hyphen_scope: String, Codable, Hashable, Sendable, CaseIterable { case development = "development" case runtime = "runtime" } @@ -4312,7 +4468,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/dependabot/alerts/GET/query/scope`. public var scope: Components.Parameters.dependabot_hyphen_alert_hyphen_scope? /// - Remark: Generated from `#/components/parameters/dependabot-alert-sort`. - @frozen public enum dependabot_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case epss_percentage = "epss_percentage" @@ -4325,7 +4481,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/dependabot/alerts/GET/query/sort`. public var sort: Components.Parameters.dependabot_hyphen_alert_hyphen_sort? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -4365,6 +4521,7 @@ public enum Operations { /// - ecosystem: A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. /// - package: A comma-separated list of package names. If specified, only alerts for these packages will be returned. /// - epss_percentage: CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as: + /// - has: Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned. /// - scope: The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. /// - sort: The property by which to sort the results. /// - direction: The direction to sort the results by. @@ -4379,6 +4536,7 @@ public enum Operations { ecosystem: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_ecosystems? = nil, package: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_packages? = nil, epss_percentage: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_epss? = nil, + has: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has? = nil, scope: Components.Parameters.dependabot_hyphen_alert_hyphen_scope? = nil, sort: Components.Parameters.dependabot_hyphen_alert_hyphen_sort? = nil, direction: Components.Parameters.direction? = nil, @@ -4393,6 +4551,7 @@ public enum Operations { self.ecosystem = ecosystem self.package = package self.epss_percentage = epss_percentage + self.has = has self.scope = scope self.sort = sort self.direction = direction @@ -4490,6 +4649,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/dependabot/alerts/get(dependabot/list-alerts-for-org)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5181,7 +5348,7 @@ public enum Operations { /// Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. /// /// - Remark: Generated from `#/paths/orgs/{org}/dependabot/secrets/{secret_name}/PUT/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -5301,6 +5468,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.dependabot_sol_create_hyphen_or_hyphen_update_hyphen_org_hyphen_secret.Output.NoContent) + /// Response when updating a secret + /// + /// - Remark: Generated from `#/paths//orgs/{org}/dependabot/secrets/{secret_name}/put(dependabot/create-or-update-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5403,6 +5578,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.dependabot_sol_delete_hyphen_org_hyphen_secret.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/dependabot/secrets/{secret_name}/delete(dependabot/delete-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5704,6 +5887,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.dependabot_sol_set_hyphen_selected_hyphen_repos_hyphen_for_hyphen_org_hyphen_secret.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/dependabot/secrets/{secret_name}/repositories/put(dependabot/set-selected-repos-for-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5788,6 +5979,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.dependabot_sol_add_hyphen_selected_hyphen_repo_hyphen_to_hyphen_org_hyphen_secret.Output.NoContent) + /// No Content when repository was added to the selected list + /// + /// - Remark: Generated from `#/paths//orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}/put(dependabot/add-selected-repo-to-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5815,6 +6014,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.dependabot_sol_add_hyphen_selected_hyphen_repo_hyphen_to_hyphen_org_hyphen_secret.Output.Conflict) + /// Conflict when visibility type is not set to selected + /// + /// - Remark: Generated from `#/paths//orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}/put(dependabot/add-selected-repo-to-org-secret)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -5899,6 +6106,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.dependabot_sol_remove_hyphen_selected_hyphen_repo_hyphen_from_hyphen_org_hyphen_secret.Output.NoContent) + /// Response when repository was removed from the selected list + /// + /// - Remark: Generated from `#/paths//orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}/delete(dependabot/remove-selected-repo-from-org-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5926,6 +6141,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.dependabot_sol_remove_hyphen_selected_hyphen_repo_hyphen_from_hyphen_org_hyphen_secret.Output.Conflict) + /// Conflict when visibility type not set to selected + /// + /// - Remark: Generated from `#/paths//orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}/delete(dependabot/remove-selected-repo-from-org-secret)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -6019,8 +6242,54 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/GET/query/epss_percentage`. public var epss_percentage: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_epss? + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has`. + @frozen public enum dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/Case2Payload`. + @frozen public enum Case2PayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { + case patch = "patch" + } + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/case2`. + public typealias Case2Payload = [Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has.Case2PayloadPayload] + /// - Remark: Generated from `#/components/parameters/dependabot-alert-comma-separated-has/case2`. + case case2(Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has.Case2Payload) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .case1(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + do { + self = .case2(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try encoder.encodeToSingleValueContainer(value) + } + } + } + /// Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned. + /// Multiple `has` filters can be passed to filter for alerts that have all of the values. Currently, only `patch` is supported. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/GET/query/has`. + public var has: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has? /// - Remark: Generated from `#/components/parameters/dependabot-alert-scope`. - @frozen public enum dependabot_hyphen_alert_hyphen_scope: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_hyphen_alert_hyphen_scope: String, Codable, Hashable, Sendable, CaseIterable { case development = "development" case runtime = "runtime" } @@ -6029,7 +6298,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/GET/query/scope`. public var scope: Components.Parameters.dependabot_hyphen_alert_hyphen_scope? /// - Remark: Generated from `#/components/parameters/dependabot-alert-sort`. - @frozen public enum dependabot_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case epss_percentage = "epss_percentage" @@ -6042,7 +6311,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/GET/query/sort`. public var sort: Components.Parameters.dependabot_hyphen_alert_hyphen_sort? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -6089,6 +6358,7 @@ public enum Operations { /// - package: A comma-separated list of package names. If specified, only alerts for these packages will be returned. /// - manifest: A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. /// - epss_percentage: CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as: + /// - has: Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned. /// - scope: The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. /// - sort: The property by which to sort the results. /// - direction: The direction to sort the results by. @@ -6105,6 +6375,7 @@ public enum Operations { package: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_packages? = nil, manifest: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_manifests? = nil, epss_percentage: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_epss? = nil, + has: Components.Parameters.dependabot_hyphen_alert_hyphen_comma_hyphen_separated_hyphen_has? = nil, scope: Components.Parameters.dependabot_hyphen_alert_hyphen_scope? = nil, sort: Components.Parameters.dependabot_hyphen_alert_hyphen_sort? = nil, direction: Components.Parameters.direction? = nil, @@ -6121,6 +6392,7 @@ public enum Operations { self.package = package self.manifest = manifest self.epss_percentage = epss_percentage + self.has = has self.scope = scope self.sort = sort self.direction = direction @@ -6219,6 +6491,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/dependabot/alerts/get(dependabot/list-alerts-for-repo)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6491,6 +6771,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/dependabot/alerts/{alert_number}/get(dependabot/get-alert)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6650,7 +6938,7 @@ public enum Operations { /// A `dismissed_reason` must be provided when setting the state to `dismissed`. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/{alert_number}/PATCH/requestBody/json/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case dismissed = "dismissed" case open = "open" } @@ -6662,7 +6950,7 @@ public enum Operations { /// **Required when `state` is `dismissed`.** A reason for dismissing the alert. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/{alert_number}/PATCH/requestBody/json/dismissed_reason`. - @frozen public enum dismissed_reasonPayload: String, Codable, Hashable, Sendable { + @frozen public enum dismissed_reasonPayload: String, Codable, Hashable, Sendable, CaseIterable { case fix_started = "fix_started" case inaccurate = "inaccurate" case no_bandwidth = "no_bandwidth" @@ -6699,15 +6987,15 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - state = try container.decode( + self.state = try container.decode( Operations.dependabot_sol_update_hyphen_alert.Input.Body.jsonPayload.statePayload.self, forKey: .state ) - dismissed_reason = try container.decodeIfPresent( + self.dismissed_reason = try container.decodeIfPresent( Operations.dependabot_sol_update_hyphen_alert.Input.Body.jsonPayload.dismissed_reasonPayload.self, forKey: .dismissed_reason ) - dismissed_comment = try container.decodeIfPresent( + self.dismissed_comment = try container.decodeIfPresent( Swift.String.self, forKey: .dismissed_comment ) @@ -7616,6 +7904,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.dependabot_sol_create_hyphen_or_hyphen_update_hyphen_repo_hyphen_secret.Output.NoContent) + /// Response when updating a secret + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/dependabot/secrets/{secret_name}/put(dependabot/create-or-update-repo-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7725,6 +8021,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.dependabot_sol_delete_hyphen_repo_hyphen_secret.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/dependabot/secrets/{secret_name}/delete(dependabot/delete-repo-secret)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. diff --git a/Sources/dependency-graph/Types.swift b/Sources/dependency-graph/Types.swift index 7150249fc09..8fc29505c63 100644 --- a/Sources/dependency-graph/Types.swift +++ b/Sources/dependency-graph/Types.swift @@ -97,6 +97,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -149,7 +158,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/dependency_hyphen_graph_hyphen_diff`. public struct dependency_hyphen_graph_hyphen_diffPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/dependency_hyphen_graph_hyphen_diff/change_type`. - @frozen public enum change_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum change_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case added = "added" case removed = "removed" } @@ -211,7 +220,7 @@ public enum Components { /// Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. /// /// - Remark: Generated from `#/components/schemas/dependency_hyphen_graph_hyphen_diff/scope`. - @frozen public enum scopePayload: String, Codable, Hashable, Sendable { + @frozen public enum scopePayload: String, Codable, Hashable, Sendable, CaseIterable { case unknown = "unknown" case runtime = "runtime" case development = "development" @@ -593,25 +602,25 @@ public enum Components { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try decoder.decodeFromSingleValueContainer() + self.value1 = try decoder.decodeFromSingleValueContainer() } catch { errors.append(error) } do { - value2 = try decoder.decodeFromSingleValueContainer() + self.value2 = try decoder.decodeFromSingleValueContainer() } catch { errors.append(error) } do { - value3 = try decoder.decodeFromSingleValueContainer() + self.value3 = try decoder.decodeFromSingleValueContainer() } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2, - value3 + self.value1, + self.value2, + self.value3 ], type: Self.self, codingPath: decoder.codingPath, @@ -620,9 +629,9 @@ public enum Components { } public func encode(to encoder: any Encoder) throws { try encoder.encodeFirstNonNilValueToSingleValueContainer([ - value1, - value2, - value3 + self.value1, + self.value2, + self.value3 ]) } } @@ -653,7 +662,7 @@ public enum Components { /// A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency. /// /// - Remark: Generated from `#/components/schemas/dependency/relationship`. - @frozen public enum relationshipPayload: String, Codable, Hashable, Sendable { + @frozen public enum relationshipPayload: String, Codable, Hashable, Sendable, CaseIterable { case direct = "direct" case indirect = "indirect" } @@ -664,7 +673,7 @@ public enum Components { /// A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes. /// /// - Remark: Generated from `#/components/schemas/dependency/scope`. - @frozen public enum scopePayload: String, Codable, Hashable, Sendable { + @frozen public enum scopePayload: String, Codable, Hashable, Sendable, CaseIterable { case runtime = "runtime" case development = "development" } @@ -706,23 +715,23 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - package_url = try container.decodeIfPresent( + self.package_url = try container.decodeIfPresent( Swift.String.self, forKey: .package_url ) - metadata = try container.decodeIfPresent( + self.metadata = try container.decodeIfPresent( Components.Schemas.metadata.self, forKey: .metadata ) - relationship = try container.decodeIfPresent( + self.relationship = try container.decodeIfPresent( Components.Schemas.dependency.relationshipPayload.self, forKey: .relationship ) - scope = try container.decodeIfPresent( + self.scope = try container.decodeIfPresent( Components.Schemas.dependency.scopePayload.self, forKey: .scope ) - dependencies = try container.decodeIfPresent( + self.dependencies = try container.decodeIfPresent( [Swift.String].self, forKey: .dependencies ) @@ -759,7 +768,7 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - source_location = try container.decodeIfPresent( + self.source_location = try container.decodeIfPresent( Swift.String.self, forKey: .source_location ) @@ -822,19 +831,19 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decode( + self.name = try container.decode( Swift.String.self, forKey: .name ) - file = try container.decodeIfPresent( + self.file = try container.decodeIfPresent( Components.Schemas.manifest.filePayload.self, forKey: .file ) - metadata = try container.decodeIfPresent( + self.metadata = try container.decodeIfPresent( Components.Schemas.metadata.self, forKey: .metadata ) - resolved = try container.decodeIfPresent( + self.resolved = try container.decodeIfPresent( Components.Schemas.manifest.resolvedPayload.self, forKey: .resolved ) @@ -890,15 +899,15 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - id = try container.decode( + self.id = try container.decode( Swift.String.self, forKey: .id ) - correlator = try container.decode( + self.correlator = try container.decode( Swift.String.self, forKey: .correlator ) - html_url = try container.decodeIfPresent( + self.html_url = try container.decodeIfPresent( Swift.String.self, forKey: .html_url ) @@ -957,15 +966,15 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decode( + self.name = try container.decode( Swift.String.self, forKey: .name ) - version = try container.decode( + self.version = try container.decode( Swift.String.self, forKey: .version ) - url = try container.decode( + self.url = try container.decode( Swift.String.self, forKey: .url ) @@ -1052,35 +1061,35 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - version = try container.decode( + self.version = try container.decode( Swift.Int.self, forKey: .version ) - job = try container.decode( + self.job = try container.decode( Components.Schemas.snapshot.jobPayload.self, forKey: .job ) - sha = try container.decode( + self.sha = try container.decode( Swift.String.self, forKey: .sha ) - ref = try container.decode( + self.ref = try container.decode( Swift.String.self, forKey: .ref ) - detector = try container.decode( + self.detector = try container.decode( Components.Schemas.snapshot.detectorPayload.self, forKey: .detector ) - metadata = try container.decodeIfPresent( + self.metadata = try container.decodeIfPresent( Components.Schemas.metadata.self, forKey: .metadata ) - manifests = try container.decodeIfPresent( + self.manifests = try container.decodeIfPresent( Components.Schemas.snapshot.manifestsPayload.self, forKey: .manifests ) - scanned = try container.decode( + self.scanned = try container.decode( Foundation.Date.self, forKey: .scanned ) diff --git a/Sources/desktop/Types.swift b/Sources/desktop/Types.swift index 2a210decbff..c3d1209ecf5 100644 --- a/Sources/desktop/Types.swift +++ b/Sources/desktop/Types.swift @@ -18,6 +18,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", diff --git a/Sources/emojis/Types.swift b/Sources/emojis/Types.swift index e02b45e2073..acfe40c9cf7 100644 --- a/Sources/emojis/Types.swift +++ b/Sources/emojis/Types.swift @@ -35,6 +35,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -169,6 +178,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//emojis/get(emojis/get)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/enterprise-teams/Types.swift b/Sources/enterprise-teams/Types.swift index 2a210decbff..c3d1209ecf5 100644 --- a/Sources/enterprise-teams/Types.swift +++ b/Sources/enterprise-teams/Types.swift @@ -18,6 +18,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", diff --git a/Sources/gists/Types.swift b/Sources/gists/Types.swift index 80f879d245d..a52b38ec4ac 100644 --- a/Sources/gists/Types.swift +++ b/Sources/gists/Types.swift @@ -561,6 +561,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1028,7 +1037,7 @@ public enum Components { /// How the author is associated with the repository. /// /// - Remark: Generated from `#/components/schemas/author-association`. - @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable { + @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable, CaseIterable { case COLLABORATOR = "COLLABORATOR" case CONTRIBUTOR = "CONTRIBUTOR" case FIRST_TIMER = "FIRST_TIMER" @@ -1533,163 +1542,163 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - login = try container.decode( + self.login = try container.decode( Swift.String.self, forKey: .login ) - id = try container.decode( + self.id = try container.decode( Swift.Int64.self, forKey: .id ) - user_view_type = try container.decodeIfPresent( + self.user_view_type = try container.decodeIfPresent( Swift.String.self, forKey: .user_view_type ) - node_id = try container.decode( + self.node_id = try container.decode( Swift.String.self, forKey: .node_id ) - avatar_url = try container.decode( + self.avatar_url = try container.decode( Swift.String.self, forKey: .avatar_url ) - gravatar_id = try container.decodeIfPresent( + self.gravatar_id = try container.decodeIfPresent( Swift.String.self, forKey: .gravatar_id ) - url = try container.decode( + self.url = try container.decode( Swift.String.self, forKey: .url ) - html_url = try container.decode( + self.html_url = try container.decode( Swift.String.self, forKey: .html_url ) - followers_url = try container.decode( + self.followers_url = try container.decode( Swift.String.self, forKey: .followers_url ) - following_url = try container.decode( + self.following_url = try container.decode( Swift.String.self, forKey: .following_url ) - gists_url = try container.decode( + self.gists_url = try container.decode( Swift.String.self, forKey: .gists_url ) - starred_url = try container.decode( + self.starred_url = try container.decode( Swift.String.self, forKey: .starred_url ) - subscriptions_url = try container.decode( + self.subscriptions_url = try container.decode( Swift.String.self, forKey: .subscriptions_url ) - organizations_url = try container.decode( + self.organizations_url = try container.decode( Swift.String.self, forKey: .organizations_url ) - repos_url = try container.decode( + self.repos_url = try container.decode( Swift.String.self, forKey: .repos_url ) - events_url = try container.decode( + self.events_url = try container.decode( Swift.String.self, forKey: .events_url ) - received_events_url = try container.decode( + self.received_events_url = try container.decode( Swift.String.self, forKey: .received_events_url ) - _type = try container.decode( + self._type = try container.decode( Swift.String.self, forKey: ._type ) - site_admin = try container.decode( + self.site_admin = try container.decode( Swift.Bool.self, forKey: .site_admin ) - name = try container.decodeIfPresent( + self.name = try container.decodeIfPresent( Swift.String.self, forKey: .name ) - company = try container.decodeIfPresent( + self.company = try container.decodeIfPresent( Swift.String.self, forKey: .company ) - blog = try container.decodeIfPresent( + self.blog = try container.decodeIfPresent( Swift.String.self, forKey: .blog ) - location = try container.decodeIfPresent( + self.location = try container.decodeIfPresent( Swift.String.self, forKey: .location ) - email = try container.decodeIfPresent( + self.email = try container.decodeIfPresent( Swift.String.self, forKey: .email ) - notification_email = try container.decodeIfPresent( + self.notification_email = try container.decodeIfPresent( Swift.String.self, forKey: .notification_email ) - hireable = try container.decodeIfPresent( + self.hireable = try container.decodeIfPresent( Swift.Bool.self, forKey: .hireable ) - bio = try container.decodeIfPresent( + self.bio = try container.decodeIfPresent( Swift.String.self, forKey: .bio ) - twitter_username = try container.decodeIfPresent( + self.twitter_username = try container.decodeIfPresent( Swift.String.self, forKey: .twitter_username ) - public_repos = try container.decode( + self.public_repos = try container.decode( Swift.Int.self, forKey: .public_repos ) - public_gists = try container.decode( + self.public_gists = try container.decode( Swift.Int.self, forKey: .public_gists ) - followers = try container.decode( + self.followers = try container.decode( Swift.Int.self, forKey: .followers ) - following = try container.decode( + self.following = try container.decode( Swift.Int.self, forKey: .following ) - created_at = try container.decode( + self.created_at = try container.decode( Foundation.Date.self, forKey: .created_at ) - updated_at = try container.decode( + self.updated_at = try container.decode( Foundation.Date.self, forKey: .updated_at ) - plan = try container.decodeIfPresent( + self.plan = try container.decodeIfPresent( Components.Schemas.public_hyphen_user.planPayload.self, forKey: .plan ) - private_gists = try container.decodeIfPresent( + self.private_gists = try container.decodeIfPresent( Swift.Int.self, forKey: .private_gists ) - total_private_repos = try container.decodeIfPresent( + self.total_private_repos = try container.decodeIfPresent( Swift.Int.self, forKey: .total_private_repos ) - owned_private_repos = try container.decodeIfPresent( + self.owned_private_repos = try container.decodeIfPresent( Swift.Int.self, forKey: .owned_private_repos ) - disk_usage = try container.decodeIfPresent( + self.disk_usage = try container.decodeIfPresent( Swift.Int.self, forKey: .disk_usage ) - collaborators = try container.decodeIfPresent( + self.collaborators = try container.decodeIfPresent( Swift.Int.self, forKey: .collaborators ) @@ -2799,6 +2808,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/get(gists/list)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -2950,7 +2967,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/gists/POST/requestBody/json/public/case1`. case case1(Swift.Bool) /// - Remark: Generated from `#/paths/gists/POST/requestBody/json/public/case2`. - @frozen public enum Case2Payload: String, Codable, Hashable, Sendable { + @frozen public enum Case2Payload: String, Codable, Hashable, Sendable, CaseIterable { case _true = "true" case _false = "false" } @@ -3125,6 +3142,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/post(gists/create)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -3386,6 +3411,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/public/get(gists/list-public)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -3622,6 +3655,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/starred/get(gists/list-starred)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -3851,6 +3892,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/get(gists/get)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4237,6 +4286,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.gists_sol_delete.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/delete(gists/delete)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -4283,6 +4340,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/delete(gists/delete)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4512,6 +4577,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/comments/get(gists/list-comments)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4763,6 +4836,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/comments/post(gists/create-comment)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4978,6 +5059,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/comments/{comment_id}/get(gists/get-comment)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5336,6 +5425,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.gists_sol_delete_hyphen_comment.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/comments/{comment_id}/delete(gists/delete-comment)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5359,6 +5456,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/comments/{comment_id}/delete(gists/delete-comment)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5629,6 +5734,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/commits/get(gists/list-commits)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5876,6 +5989,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/forks/get(gists/list-forks)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6119,6 +6240,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/forks/post(gists/fork)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6250,6 +6379,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.gists_sol_check_hyphen_is_hyphen_starred.Output.NoContent) + /// Response if gist is starred + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/star/get(gists/check-is-starred)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6332,6 +6469,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/star/get(gists/check-is-starred)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6463,6 +6608,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.gists_sol_star.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/star/put(gists/star)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6509,6 +6662,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/star/put(gists/star)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6640,6 +6801,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.gists_sol_unstar.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/star/delete(gists/unstar)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6663,6 +6832,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gists/{gist_id}/star/delete(gists/unstar)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/git/Types.swift b/Sources/git/Types.swift index 69f8478cfe9..51e1f5a98cc 100644 --- a/Sources/git/Types.swift +++ b/Sources/git/Types.swift @@ -611,6 +611,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -3850,6 +3859,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.git_sol_delete_hyphen_ref.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/refs/{ref}/delete(git/delete-ref)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -3877,6 +3894,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.git_sol_delete_hyphen_ref.Output.UnprocessableContent) + /// Validation failed, an attempt was made to delete the default branch, or the endpoint has been spammed. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/refs/{ref}/delete(git/delete-ref)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -4042,7 +4067,7 @@ public enum Operations { /// The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/tags/POST/requestBody/json/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case commit = "commit" case tree = "tree" case blob = "blob" @@ -4571,7 +4596,7 @@ public enum Operations { /// The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/trees/POST/requestBody/json/treePayload/mode`. - @frozen public enum modePayload: String, Codable, Hashable, Sendable { + @frozen public enum modePayload: String, Codable, Hashable, Sendable, CaseIterable { case _100644 = "100644" case _100755 = "100755" case _040000 = "040000" @@ -4585,7 +4610,7 @@ public enum Operations { /// Either `blob`, `tree`, or `commit`. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/trees/POST/requestBody/json/treePayload/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case blob = "blob" case tree = "tree" case commit = "commit" diff --git a/Sources/gitignore/Types.swift b/Sources/gitignore/Types.swift index 6b3a7a7bedc..8533484cf2d 100644 --- a/Sources/gitignore/Types.swift +++ b/Sources/gitignore/Types.swift @@ -65,6 +65,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -207,6 +216,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gitignore/templates/get(gitignore/get-all-templates)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -364,6 +381,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//gitignore/templates/{name}/get(gitignore/get-template)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/hosted-compute/Types.swift b/Sources/hosted-compute/Types.swift index 3ea064e4dba..5b439bbd553 100644 --- a/Sources/hosted-compute/Types.swift +++ b/Sources/hosted-compute/Types.swift @@ -175,6 +175,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -202,7 +211,7 @@ public enum Components { /// The hosted compute service the network configuration supports. /// /// - Remark: Generated from `#/components/schemas/network-configuration/compute_service`. - @frozen public enum compute_servicePayload: String, Codable, Hashable, Sendable { + @frozen public enum compute_servicePayload: String, Codable, Hashable, Sendable, CaseIterable { case none = "none" case actions = "actions" case codespaces = "codespaces" @@ -590,7 +599,7 @@ public enum Operations { /// The hosted compute service to use for the network configuration. /// /// - Remark: Generated from `#/paths/orgs/{org}/settings/network-configurations/POST/requestBody/json/compute_service`. - @frozen public enum compute_servicePayload: String, Codable, Hashable, Sendable { + @frozen public enum compute_servicePayload: String, Codable, Hashable, Sendable, CaseIterable { case none = "none" case actions = "actions" } @@ -946,7 +955,7 @@ public enum Operations { /// The hosted compute service to use for the network configuration. /// /// - Remark: Generated from `#/paths/orgs/{org}/settings/network-configurations/{network_configuration_id}/PATCH/requestBody/json/compute_service`. - @frozen public enum compute_servicePayload: String, Codable, Hashable, Sendable { + @frozen public enum compute_servicePayload: String, Codable, Hashable, Sendable, CaseIterable { case none = "none" case actions = "actions" } @@ -1136,6 +1145,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.hosted_hyphen_compute_sol_delete_hyphen_network_hyphen_configuration_hyphen_from_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/settings/network-configurations/{network_configuration_id}/delete(hosted-compute/delete-network-configuration-from-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. diff --git a/Sources/interactions/Types.swift b/Sources/interactions/Types.swift index a89a2328d61..83f55bf0ae0 100644 --- a/Sources/interactions/Types.swift +++ b/Sources/interactions/Types.swift @@ -197,6 +197,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -337,7 +346,7 @@ public enum Components { /// The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. /// /// - Remark: Generated from `#/components/schemas/interaction-group`. - @frozen public enum interaction_hyphen_group: String, Codable, Hashable, Sendable { + @frozen public enum interaction_hyphen_group: String, Codable, Hashable, Sendable, CaseIterable { case existing_users = "existing_users" case contributors_only = "contributors_only" case collaborators_only = "collaborators_only" @@ -376,7 +385,7 @@ public enum Components { /// The duration of the interaction restriction. Default: `one_day`. /// /// - Remark: Generated from `#/components/schemas/interaction-expiry`. - @frozen public enum interaction_hyphen_expiry: String, Codable, Hashable, Sendable { + @frozen public enum interaction_hyphen_expiry: String, Codable, Hashable, Sendable, CaseIterable { case one_day = "one_day" case three_days = "three_days" case one_week = "one_week" @@ -545,19 +554,19 @@ public enum Operations { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -565,8 +574,8 @@ public enum Operations { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/paths/orgs/{org}/interaction-limits/GET/responses/200/content/application\/json`. @@ -855,6 +864,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.interactions_sol_remove_hyphen_restrictions_hyphen_for_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/interaction-limits/delete(interactions/remove-restrictions-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -969,19 +986,19 @@ public enum Operations { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -989,8 +1006,8 @@ public enum Operations { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/interaction-limits/GET/responses/200/content/application\/json`. @@ -1201,6 +1218,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.interactions_sol_set_hyphen_restrictions_hyphen_for_hyphen_repo.Output.Conflict) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/interaction-limits/put(interactions/set-restrictions-for-repo)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -1301,6 +1326,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.interactions_sol_remove_hyphen_restrictions_hyphen_for_hyphen_repo.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/interaction-limits/delete(interactions/remove-restrictions-for-repo)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -1328,6 +1361,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.interactions_sol_remove_hyphen_restrictions_hyphen_for_hyphen_repo.Output.Conflict) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/interaction-limits/delete(interactions/remove-restrictions-for-repo)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -1413,19 +1454,19 @@ public enum Operations { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -1433,8 +1474,8 @@ public enum Operations { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/paths/user/interaction-limits/GET/responses/200/content/application\/json`. @@ -1495,6 +1536,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.interactions_sol_get_hyphen_restrictions_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response when there are no restrictions + /// + /// - Remark: Generated from `#/paths//user/interaction-limits/get(interactions/get-restrictions-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -1712,6 +1761,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.interactions_sol_remove_hyphen_restrictions_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/interaction-limits/delete(interactions/remove-restrictions-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index a24b16c3d6e..088475b191a 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -1341,6 +1341,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1765,23 +1774,23 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - issues = try container.decodeIfPresent( + self.issues = try container.decodeIfPresent( Swift.String.self, forKey: .issues ) - checks = try container.decodeIfPresent( + self.checks = try container.decodeIfPresent( Swift.String.self, forKey: .checks ) - metadata = try container.decodeIfPresent( + self.metadata = try container.decodeIfPresent( Swift.String.self, forKey: .metadata ) - contents = try container.decodeIfPresent( + self.contents = try container.decodeIfPresent( Swift.String.self, forKey: .contents ) - deployments = try container.decodeIfPresent( + self.deployments = try container.decodeIfPresent( Swift.String.self, forKey: .deployments ) @@ -1796,23 +1805,23 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - issues, + self.issues, forKey: .issues ) try container.encodeIfPresent( - checks, + self.checks, forKey: .checks ) try container.encodeIfPresent( - metadata, + self.metadata, forKey: .metadata ) try container.encodeIfPresent( - contents, + self.contents, forKey: .contents ) try container.encodeIfPresent( - deployments, + self.deployments, forKey: .deployments ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -2540,7 +2549,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -2558,7 +2567,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -2577,7 +2586,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -2595,7 +2604,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -3042,7 +3051,7 @@ public enum Components { /// The state of the milestone. /// /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" } @@ -3166,7 +3175,7 @@ public enum Components { /// The color of the issue type. /// /// - Remark: Generated from `#/components/schemas/issue-type/color`. - @frozen public enum colorPayload: String, Codable, Hashable, Sendable { + @frozen public enum colorPayload: String, Codable, Hashable, Sendable, CaseIterable { case gray = "gray" case blue = "blue" case green = "green" @@ -3349,23 +3358,23 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - issues = try container.decodeIfPresent( + self.issues = try container.decodeIfPresent( Swift.String.self, forKey: .issues ) - checks = try container.decodeIfPresent( + self.checks = try container.decodeIfPresent( Swift.String.self, forKey: .checks ) - metadata = try container.decodeIfPresent( + self.metadata = try container.decodeIfPresent( Swift.String.self, forKey: .metadata ) - contents = try container.decodeIfPresent( + self.contents = try container.decodeIfPresent( Swift.String.self, forKey: .contents ) - deployments = try container.decodeIfPresent( + self.deployments = try container.decodeIfPresent( Swift.String.self, forKey: .deployments ) @@ -3380,23 +3389,23 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - issues, + self.issues, forKey: .issues ) try container.encodeIfPresent( - checks, + self.checks, forKey: .checks ) try container.encodeIfPresent( - metadata, + self.metadata, forKey: .metadata ) try container.encodeIfPresent( - contents, + self.contents, forKey: .contents ) try container.encodeIfPresent( - deployments, + self.deployments, forKey: .deployments ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -3500,7 +3509,7 @@ public enum Components { /// How the author is associated with the repository. /// /// - Remark: Generated from `#/components/schemas/author-association`. - @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable { + @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable, CaseIterable { case COLLABORATOR = "COLLABORATOR" case CONTRIBUTOR = "CONTRIBUTOR" case FIRST_TIMER = "FIRST_TIMER" @@ -3643,7 +3652,7 @@ public enum Components { /// The reason for the current state /// /// - Remark: Generated from `#/components/schemas/issue/state_reason`. - @frozen public enum state_reasonPayload: String, Codable, Hashable, Sendable { + @frozen public enum state_reasonPayload: String, Codable, Hashable, Sendable, CaseIterable { case completed = "completed" case reopened = "reopened" case not_planned = "not_planned" @@ -4472,7 +4481,7 @@ public enum Components { /// The reason for the current state /// /// - Remark: Generated from `#/components/schemas/nullable-issue/state_reason`. - @frozen public enum state_reasonPayload: String, Codable, Hashable, Sendable { + @frozen public enum state_reasonPayload: String, Codable, Hashable, Sendable, CaseIterable { case completed = "completed" case reopened = "reopened" case not_planned = "not_planned" @@ -6660,97 +6669,97 @@ public enum Components { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } do { - value3 = try .init(from: decoder) + self.value3 = try .init(from: decoder) } catch { errors.append(error) } do { - value4 = try .init(from: decoder) + self.value4 = try .init(from: decoder) } catch { errors.append(error) } do { - value5 = try .init(from: decoder) + self.value5 = try .init(from: decoder) } catch { errors.append(error) } do { - value6 = try .init(from: decoder) + self.value6 = try .init(from: decoder) } catch { errors.append(error) } do { - value7 = try .init(from: decoder) + self.value7 = try .init(from: decoder) } catch { errors.append(error) } do { - value8 = try .init(from: decoder) + self.value8 = try .init(from: decoder) } catch { errors.append(error) } do { - value9 = try .init(from: decoder) + self.value9 = try .init(from: decoder) } catch { errors.append(error) } do { - value10 = try .init(from: decoder) + self.value10 = try .init(from: decoder) } catch { errors.append(error) } do { - value11 = try .init(from: decoder) + self.value11 = try .init(from: decoder) } catch { errors.append(error) } do { - value12 = try .init(from: decoder) + self.value12 = try .init(from: decoder) } catch { errors.append(error) } do { - value13 = try .init(from: decoder) + self.value13 = try .init(from: decoder) } catch { errors.append(error) } do { - value14 = try .init(from: decoder) + self.value14 = try .init(from: decoder) } catch { errors.append(error) } do { - value15 = try .init(from: decoder) + self.value15 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2, - value3, - value4, - value5, - value6, - value7, - value8, - value9, - value10, - value11, - value12, - value13, - value14, - value15 + self.value1, + self.value2, + self.value3, + self.value4, + self.value5, + self.value6, + self.value7, + self.value8, + self.value9, + self.value10, + self.value11, + self.value12, + self.value13, + self.value14, + self.value15 ], type: Self.self, codingPath: decoder.codingPath, @@ -6758,21 +6767,21 @@ public enum Components { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) - try value3?.encode(to: encoder) - try value4?.encode(to: encoder) - try value5?.encode(to: encoder) - try value6?.encode(to: encoder) - try value7?.encode(to: encoder) - try value8?.encode(to: encoder) - try value9?.encode(to: encoder) - try value10?.encode(to: encoder) - try value11?.encode(to: encoder) - try value12?.encode(to: encoder) - try value13?.encode(to: encoder) - try value14?.encode(to: encoder) - try value15?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) + try self.value3?.encode(to: encoder) + try self.value4?.encode(to: encoder) + try self.value5?.encode(to: encoder) + try self.value6?.encode(to: encoder) + try self.value7?.encode(to: encoder) + try self.value8?.encode(to: encoder) + try self.value9?.encode(to: encoder) + try self.value10?.encode(to: encoder) + try self.value11?.encode(to: encoder) + try self.value12?.encode(to: encoder) + try self.value13?.encode(to: encoder) + try self.value14?.encode(to: encoder) + try self.value15?.encode(to: encoder) } } /// Color-coded labels help you categorize and filter your issues (just like labels in Gmail). @@ -7594,7 +7603,7 @@ public enum Components { /// The side of the first line of the range for a multi-line comment. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/start_side`. - @frozen public enum start_sidePayload: String, Codable, Hashable, Sendable { + @frozen public enum start_sidePayload: String, Codable, Hashable, Sendable, CaseIterable { case LEFT = "LEFT" case RIGHT = "RIGHT" } @@ -7613,7 +7622,7 @@ public enum Components { /// The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/side`. - @frozen public enum sidePayload: String, Codable, Hashable, Sendable { + @frozen public enum sidePayload: String, Codable, Hashable, Sendable, CaseIterable { case LEFT = "LEFT" case RIGHT = "RIGHT" } @@ -7624,7 +7633,7 @@ public enum Components { /// The level at which the comment is targeted, can be a diff line or a file. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/subject_type`. - @frozen public enum subject_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum subject_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case line = "line" case file = "file" } @@ -8173,139 +8182,139 @@ public enum Components { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } do { - value3 = try .init(from: decoder) + self.value3 = try .init(from: decoder) } catch { errors.append(error) } do { - value4 = try .init(from: decoder) + self.value4 = try .init(from: decoder) } catch { errors.append(error) } do { - value5 = try .init(from: decoder) + self.value5 = try .init(from: decoder) } catch { errors.append(error) } do { - value6 = try .init(from: decoder) + self.value6 = try .init(from: decoder) } catch { errors.append(error) } do { - value7 = try .init(from: decoder) + self.value7 = try .init(from: decoder) } catch { errors.append(error) } do { - value8 = try .init(from: decoder) + self.value8 = try .init(from: decoder) } catch { errors.append(error) } do { - value9 = try .init(from: decoder) + self.value9 = try .init(from: decoder) } catch { errors.append(error) } do { - value10 = try .init(from: decoder) + self.value10 = try .init(from: decoder) } catch { errors.append(error) } do { - value11 = try .init(from: decoder) + self.value11 = try .init(from: decoder) } catch { errors.append(error) } do { - value12 = try .init(from: decoder) + self.value12 = try .init(from: decoder) } catch { errors.append(error) } do { - value13 = try .init(from: decoder) + self.value13 = try .init(from: decoder) } catch { errors.append(error) } do { - value14 = try .init(from: decoder) + self.value14 = try .init(from: decoder) } catch { errors.append(error) } do { - value15 = try .init(from: decoder) + self.value15 = try .init(from: decoder) } catch { errors.append(error) } do { - value16 = try .init(from: decoder) + self.value16 = try .init(from: decoder) } catch { errors.append(error) } do { - value17 = try .init(from: decoder) + self.value17 = try .init(from: decoder) } catch { errors.append(error) } do { - value18 = try .init(from: decoder) + self.value18 = try .init(from: decoder) } catch { errors.append(error) } do { - value19 = try .init(from: decoder) + self.value19 = try .init(from: decoder) } catch { errors.append(error) } do { - value20 = try .init(from: decoder) + self.value20 = try .init(from: decoder) } catch { errors.append(error) } do { - value21 = try .init(from: decoder) + self.value21 = try .init(from: decoder) } catch { errors.append(error) } do { - value22 = try .init(from: decoder) + self.value22 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2, - value3, - value4, - value5, - value6, - value7, - value8, - value9, - value10, - value11, - value12, - value13, - value14, - value15, - value16, - value17, - value18, - value19, - value20, - value21, - value22 + self.value1, + self.value2, + self.value3, + self.value4, + self.value5, + self.value6, + self.value7, + self.value8, + self.value9, + self.value10, + self.value11, + self.value12, + self.value13, + self.value14, + self.value15, + self.value16, + self.value17, + self.value18, + self.value19, + self.value20, + self.value21, + self.value22 ], type: Self.self, codingPath: decoder.codingPath, @@ -8313,28 +8322,28 @@ public enum Components { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) - try value3?.encode(to: encoder) - try value4?.encode(to: encoder) - try value5?.encode(to: encoder) - try value6?.encode(to: encoder) - try value7?.encode(to: encoder) - try value8?.encode(to: encoder) - try value9?.encode(to: encoder) - try value10?.encode(to: encoder) - try value11?.encode(to: encoder) - try value12?.encode(to: encoder) - try value13?.encode(to: encoder) - try value14?.encode(to: encoder) - try value15?.encode(to: encoder) - try value16?.encode(to: encoder) - try value17?.encode(to: encoder) - try value18?.encode(to: encoder) - try value19?.encode(to: encoder) - try value20?.encode(to: encoder) - try value21?.encode(to: encoder) - try value22?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) + try self.value3?.encode(to: encoder) + try self.value4?.encode(to: encoder) + try self.value5?.encode(to: encoder) + try self.value6?.encode(to: encoder) + try self.value7?.encode(to: encoder) + try self.value8?.encode(to: encoder) + try self.value9?.encode(to: encoder) + try self.value10?.encode(to: encoder) + try self.value11?.encode(to: encoder) + try self.value12?.encode(to: encoder) + try self.value13?.encode(to: encoder) + try self.value14?.encode(to: encoder) + try self.value15?.encode(to: encoder) + try self.value16?.encode(to: encoder) + try self.value17?.encode(to: encoder) + try self.value18?.encode(to: encoder) + try self.value19?.encode(to: encoder) + try self.value20?.encode(to: encoder) + try self.value21?.encode(to: encoder) + try self.value22?.encode(to: encoder) } } /// A collection of related issues and pull requests. @@ -8358,7 +8367,7 @@ public enum Components { /// The state of the milestone. /// /// - Remark: Generated from `#/components/schemas/milestone/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" } @@ -8465,7 +8474,7 @@ public enum Components { /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -8492,7 +8501,7 @@ public enum Components { /// The property to sort the results by. /// /// - Remark: Generated from `#/components/parameters/sort`. - @frozen public enum sort: String, Codable, Hashable, Sendable { + @frozen public enum sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -8836,7 +8845,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/issues/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/issues/GET/query/filter`. - @frozen public enum filterPayload: String, Codable, Hashable, Sendable { + @frozen public enum filterPayload: String, Codable, Hashable, Sendable, CaseIterable { case assigned = "assigned" case created = "created" case mentioned = "mentioned" @@ -8849,7 +8858,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/issues/GET/query/filter`. public var filter: Operations.issues_sol_list.Input.Query.filterPayload? /// - Remark: Generated from `#/paths/issues/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" case all = "all" @@ -8863,7 +8872,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/issues/GET/query/labels`. public var labels: Components.Parameters.labels? /// - Remark: Generated from `#/paths/issues/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case comments = "comments" @@ -8873,7 +8882,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/issues/GET/query/sort`. public var sort: Operations.issues_sol_list.Input.Query.sortPayload? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -9070,6 +9079,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//issues/get(issues/list)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -9178,7 +9195,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/issues/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/issues/GET/query/filter`. - @frozen public enum filterPayload: String, Codable, Hashable, Sendable { + @frozen public enum filterPayload: String, Codable, Hashable, Sendable, CaseIterable { case assigned = "assigned" case created = "created" case mentioned = "mentioned" @@ -9191,7 +9208,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/issues/GET/query/filter`. public var filter: Operations.issues_sol_list_hyphen_for_hyphen_org.Input.Query.filterPayload? /// - Remark: Generated from `#/paths/orgs/{org}/issues/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" case all = "all" @@ -9209,7 +9226,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/issues/GET/query/type`. public var _type: Swift.String? /// - Remark: Generated from `#/paths/orgs/{org}/issues/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case comments = "comments" @@ -9219,7 +9236,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/issues/GET/query/sort`. public var sort: Operations.issues_sol_list_hyphen_for_hyphen_org.Input.Query.sortPayload? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -9715,6 +9732,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.issues_sol_check_hyphen_user_hyphen_can_hyphen_be_hyphen_assigned.Output.NoContent) + /// If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/assignees/{assignee}/get(issues/check-user-can-be-assigned)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -9864,7 +9889,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/GET/query/milestone`. public var milestone: Swift.String? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" case all = "all" @@ -9894,7 +9919,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/GET/query/labels`. public var labels: Components.Parameters.labels? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case comments = "comments" @@ -9904,7 +9929,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/GET/query/sort`. public var sort: Operations.issues_sol_list_hyphen_for_hyphen_repo.Input.Query.sortPayload? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -10748,7 +10773,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/comments/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/sort`. - @frozen public enum sort: String, Codable, Hashable, Sendable { + @frozen public enum sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -10757,7 +10782,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/comments/GET/query/sort`. public var sort: Components.Parameters.sort? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/comments/GET/query/direction`. - @frozen public enum directionPayload: String, Codable, Hashable, Sendable { + @frozen public enum directionPayload: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -11417,6 +11442,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.issues_sol_delete_hyphen_comment.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/comments/{comment_id}/delete(issues/delete-comment)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -12072,6 +12105,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/get(issues/get)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -12235,7 +12276,7 @@ public enum Operations { /// The open or closed state of the issue. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" } @@ -12246,7 +12287,7 @@ public enum Operations { /// The reason for the state change. Ignored unless `state` is changed. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/state_reason`. - @frozen public enum state_reasonPayload: String, Codable, Hashable, Sendable { + @frozen public enum state_reasonPayload: String, Codable, Hashable, Sendable, CaseIterable { case completed = "completed" case not_planned = "not_planned" case reopened = "reopened" @@ -13099,6 +13140,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.issues_sol_check_hyphen_user_hyphen_can_hyphen_be_hyphen_assigned_hyphen_to_hyphen_issue.Output.NoContent) + /// Response if `assignee` can be assigned to `issue_number` + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}/get(issues/check-user-can-be-assigned-to-issue)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15067,6 +15116,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.issues_sol_remove_hyphen_all_hyphen_labels.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/labels/delete(issues/remove-all-labels)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15471,7 +15528,7 @@ public enum Operations { /// * `spam` /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/lock/PUT/requestBody/json/lock_reason`. - @frozen public enum lock_reasonPayload: String, Codable, Hashable, Sendable { + @frozen public enum lock_reasonPayload: String, Codable, Hashable, Sendable, CaseIterable { case off_hyphen_topic = "off-topic" case too_space_heated = "too heated" case resolved = "resolved" @@ -15527,6 +15584,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.issues_sol_lock.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/lock/put(issues/lock)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15743,6 +15808,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.issues_sol_unlock.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/lock/delete(issues/unlock)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -18043,6 +18116,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.issues_sol_delete_hyphen_label.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/labels/{name}/delete(issues/delete-label)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -18102,7 +18183,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/milestones/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/milestones/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" case all = "all" @@ -18112,7 +18193,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/milestones/GET/query/state`. public var state: Operations.issues_sol_list_hyphen_milestones.Input.Query.statePayload? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/milestones/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case due_on = "due_on" case completeness = "completeness" } @@ -18121,7 +18202,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/milestones/GET/query/sort`. public var sort: Operations.issues_sol_list_hyphen_milestones.Input.Query.sortPayload? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/milestones/GET/query/direction`. - @frozen public enum directionPayload: String, Codable, Hashable, Sendable { + @frozen public enum directionPayload: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -18369,7 +18450,7 @@ public enum Operations { /// The state of the milestone. Either `open` or `closed`. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/milestones/POST/requestBody/json/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" } @@ -18812,7 +18893,7 @@ public enum Operations { /// The state of the milestone. Either `open` or `closed`. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/milestones/{milestone_number}/PATCH/requestBody/json/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" } @@ -19032,6 +19113,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.issues_sol_delete_hyphen_milestone.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/milestones/{milestone_number}/delete(issues/delete-milestone)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -19319,7 +19408,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/issues/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/user/issues/GET/query/filter`. - @frozen public enum filterPayload: String, Codable, Hashable, Sendable { + @frozen public enum filterPayload: String, Codable, Hashable, Sendable, CaseIterable { case assigned = "assigned" case created = "created" case mentioned = "mentioned" @@ -19332,7 +19421,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/issues/GET/query/filter`. public var filter: Operations.issues_sol_list_hyphen_for_hyphen_authenticated_hyphen_user.Input.Query.filterPayload? /// - Remark: Generated from `#/paths/user/issues/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" case all = "all" @@ -19346,7 +19435,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/issues/GET/query/labels`. public var labels: Components.Parameters.labels? /// - Remark: Generated from `#/paths/user/issues/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case comments = "comments" @@ -19356,7 +19445,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/issues/GET/query/sort`. public var sort: Operations.issues_sol_list_hyphen_for_hyphen_authenticated_hyphen_user.Input.Query.sortPayload? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -19533,6 +19622,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/issues/get(issues/list-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/licenses/Types.swift b/Sources/licenses/Types.swift index 7ef3d201e30..366bbcdc632 100644 --- a/Sources/licenses/Types.swift +++ b/Sources/licenses/Types.swift @@ -97,6 +97,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -676,6 +685,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//licenses/get(licenses/get-all-commonly-used)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -875,6 +892,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//licenses/{license}/get(licenses/get)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/markdown/Types.swift b/Sources/markdown/Types.swift index ad04dde1658..56413034eb1 100644 --- a/Sources/markdown/Types.swift +++ b/Sources/markdown/Types.swift @@ -63,6 +63,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -129,7 +138,7 @@ public enum Operations { /// The rendering mode. /// /// - Remark: Generated from `#/paths/markdown/POST/requestBody/json/mode`. - @frozen public enum modePayload: String, Codable, Hashable, Sendable { + @frozen public enum modePayload: String, Codable, Hashable, Sendable, CaseIterable { case markdown = "markdown" case gfm = "gfm" } @@ -268,6 +277,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//markdown/post(markdown/render)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -435,6 +452,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//markdown/raw/post(markdown/render-raw)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/merge-queue/Types.swift b/Sources/merge-queue/Types.swift index 2a210decbff..c3d1209ecf5 100644 --- a/Sources/merge-queue/Types.swift +++ b/Sources/merge-queue/Types.swift @@ -18,6 +18,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", diff --git a/Sources/meta/Types.swift b/Sources/meta/Types.swift index d62139f0f8b..bb7aaff69bd 100644 --- a/Sources/meta/Types.swift +++ b/Sources/meta/Types.swift @@ -119,6 +119,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -879,6 +888,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//meta/get(meta/get)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/migrations/Types.swift b/Sources/migrations/Types.swift index aa2a758facf..4c87bba1eec 100644 --- a/Sources/migrations/Types.swift +++ b/Sources/migrations/Types.swift @@ -755,6 +755,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1527,7 +1536,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -1545,7 +1554,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -1564,7 +1573,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -1582,7 +1591,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -2056,7 +2065,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. public struct advanced_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2078,7 +2087,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security`. public struct code_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2104,7 +2113,7 @@ public enum Components { /// The enablement status of Dependabot security updates for the repository. /// /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2130,7 +2139,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. public struct secret_scanningPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2152,7 +2161,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2174,7 +2183,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2196,7 +2205,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -3013,7 +3022,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/import/tfvc_project`. public var tfvc_project: Swift.String? /// - Remark: Generated from `#/components/schemas/import/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case auth = "auth" case error = "error" case none = "none" @@ -3524,7 +3533,7 @@ public enum Operations { /// Allowed values that can be passed to the exclude param. /// /// - Remark: Generated from `#/paths/orgs/{org}/migrations/GET/query/excludePayload`. - @frozen public enum excludePayloadPayload: String, Codable, Hashable, Sendable { + @frozen public enum excludePayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { case repositories = "repositories" } /// - Remark: Generated from `#/paths/orgs/{org}/migrations/GET/query/exclude`. @@ -3753,7 +3762,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/migrations/POST/requestBody/json/org_metadata_only`. public var org_metadata_only: Swift.Bool? /// - Remark: Generated from `#/paths/orgs/{org}/migrations/POST/requestBody/json/excludePayload`. - @frozen public enum excludePayloadPayload: String, Codable, Hashable, Sendable { + @frozen public enum excludePayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { case repositories = "repositories" } /// Exclude related items from being returned in the response in order to improve performance of the request. @@ -4003,7 +4012,7 @@ public enum Operations { /// Allowed values that can be passed to the exclude param. /// /// - Remark: Generated from `#/paths/orgs/{org}/migrations/{migration_id}/GET/query/excludePayload`. - @frozen public enum excludePayloadPayload: String, Codable, Hashable, Sendable { + @frozen public enum excludePayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { case repositories = "repositories" } /// - Remark: Generated from `#/paths/orgs/{org}/migrations/{migration_id}/GET/query/exclude`. @@ -4227,6 +4236,14 @@ public enum Operations { /// /// HTTP response code: `302 found`. case found(Operations.migrations_sol_download_hyphen_archive_hyphen_for_hyphen_org.Output.Found) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/migrations/{migration_id}/archive/get(migrations/download-archive-for-org)/responses/302`. + /// + /// HTTP response code: `302 found`. + public static var found: Self { + .found(.init()) + } /// The associated value of the enum case if `self` is `.found`. /// /// - Throws: An error if `self` is not `.found`. @@ -4367,6 +4384,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.migrations_sol_delete_hyphen_archive_hyphen_for_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/migrations/{migration_id}/archive/delete(migrations/delete-archive-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -4514,6 +4539,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.migrations_sol_unlock_hyphen_repo_hyphen_for_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock/delete(migrations/unlock-repo-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5086,7 +5119,7 @@ public enum Operations { /// The type of version control system you are migrating from. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/import/PATCH/requestBody/json/vcs`. - @frozen public enum vcsPayload: String, Codable, Hashable, Sendable { + @frozen public enum vcsPayload: String, Codable, Hashable, Sendable, CaseIterable { case subversion = "subversion" case tfvc = "tfvc" case git = "git" @@ -5312,7 +5345,7 @@ public enum Operations { /// The originating VCS type. Without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/import/PUT/requestBody/json/vcs`. - @frozen public enum vcsPayload: String, Codable, Hashable, Sendable { + @frozen public enum vcsPayload: String, Codable, Hashable, Sendable, CaseIterable { case subversion = "subversion" case git = "git" case mercurial = "mercurial" @@ -5626,6 +5659,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.migrations_sol_cancel_hyphen_import.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5991,11 +6032,11 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - email = try container.decodeIfPresent( + self.email = try container.decodeIfPresent( Swift.String.self, forKey: .email ) - name = try container.decodeIfPresent( + self.name = try container.decodeIfPresent( Swift.String.self, forKey: .name ) @@ -6403,7 +6444,7 @@ public enum Operations { /// Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/import/lfs/PATCH/requestBody/json/use_lfs`. - @frozen public enum use_lfsPayload: String, Codable, Hashable, Sendable { + @frozen public enum use_lfsPayload: String, Codable, Hashable, Sendable, CaseIterable { case opt_in = "opt_in" case opt_out = "opt_out" } @@ -6706,6 +6747,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/migrations/get(migrations/list-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6856,7 +6905,7 @@ public enum Operations { /// Allowed values that can be passed to the exclude param. /// /// - Remark: Generated from `#/paths/user/migrations/POST/requestBody/json/excludePayload`. - @frozen public enum excludePayloadPayload: String, Codable, Hashable, Sendable { + @frozen public enum excludePayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { case repositories = "repositories" } /// Exclude attributes from the API response to improve performance @@ -7012,6 +7061,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/migrations/post(migrations/start-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7259,6 +7316,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/migrations/{migration_id}/get(migrations/get-status-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7433,6 +7498,14 @@ public enum Operations { /// /// HTTP response code: `302 found`. case found(Operations.migrations_sol_get_hyphen_archive_hyphen_for_hyphen_authenticated_hyphen_user.Output.Found) + /// Response + /// + /// - Remark: Generated from `#/paths//user/migrations/{migration_id}/archive/get(migrations/get-archive-for-authenticated-user)/responses/302`. + /// + /// HTTP response code: `302 found`. + public static var found: Self { + .found(.init()) + } /// The associated value of the enum case if `self` is `.found`. /// /// - Throws: An error if `self` is not `.found`. @@ -7456,6 +7529,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/migrations/{migration_id}/archive/get(migrations/get-archive-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7610,6 +7691,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.migrations_sol_delete_hyphen_archive_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/migrations/{migration_id}/archive/delete(migrations/delete-archive-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7656,6 +7745,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/migrations/{migration_id}/archive/delete(migrations/delete-archive-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7819,6 +7916,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.migrations_sol_unlock_hyphen_repo_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/migrations/{migration_id}/repos/{repo_name}/lock/delete(migrations/unlock-repo-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7842,6 +7947,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/migrations/{migration_id}/repos/{repo_name}/lock/delete(migrations/unlock-repo-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/oidc/Types.swift b/Sources/oidc/Types.swift index fe0bab05c2a..e17820f5f2b 100644 --- a/Sources/oidc/Types.swift +++ b/Sources/oidc/Types.swift @@ -73,6 +73,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index ec68e9f9b43..363df26706e 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -2461,6 +2461,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -3388,7 +3397,7 @@ public enum Components { /// The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. /// /// - Remark: Generated from `#/components/schemas/app-permissions/actions`. - @frozen public enum actionsPayload: String, Codable, Hashable, Sendable { + @frozen public enum actionsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3399,7 +3408,7 @@ public enum Components { /// The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. /// /// - Remark: Generated from `#/components/schemas/app-permissions/administration`. - @frozen public enum administrationPayload: String, Codable, Hashable, Sendable { + @frozen public enum administrationPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3410,7 +3419,7 @@ public enum Components { /// The level of permission to grant the access token for checks on code. /// /// - Remark: Generated from `#/components/schemas/app-permissions/checks`. - @frozen public enum checksPayload: String, Codable, Hashable, Sendable { + @frozen public enum checksPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3421,7 +3430,7 @@ public enum Components { /// The level of permission to grant the access token to create, edit, delete, and list Codespaces. /// /// - Remark: Generated from `#/components/schemas/app-permissions/codespaces`. - @frozen public enum codespacesPayload: String, Codable, Hashable, Sendable { + @frozen public enum codespacesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3432,7 +3441,7 @@ public enum Components { /// The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. /// /// - Remark: Generated from `#/components/schemas/app-permissions/contents`. - @frozen public enum contentsPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3443,7 +3452,7 @@ public enum Components { /// The level of permission to grant the access token to manage Dependabot secrets. /// /// - Remark: Generated from `#/components/schemas/app-permissions/dependabot_secrets`. - @frozen public enum dependabot_secretsPayload: String, Codable, Hashable, Sendable { + @frozen public enum dependabot_secretsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3454,7 +3463,7 @@ public enum Components { /// The level of permission to grant the access token for deployments and deployment statuses. /// /// - Remark: Generated from `#/components/schemas/app-permissions/deployments`. - @frozen public enum deploymentsPayload: String, Codable, Hashable, Sendable { + @frozen public enum deploymentsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3465,7 +3474,7 @@ public enum Components { /// The level of permission to grant the access token for managing repository environments. /// /// - Remark: Generated from `#/components/schemas/app-permissions/environments`. - @frozen public enum environmentsPayload: String, Codable, Hashable, Sendable { + @frozen public enum environmentsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3476,7 +3485,7 @@ public enum Components { /// The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. /// /// - Remark: Generated from `#/components/schemas/app-permissions/issues`. - @frozen public enum issuesPayload: String, Codable, Hashable, Sendable { + @frozen public enum issuesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3487,7 +3496,7 @@ public enum Components { /// The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. /// /// - Remark: Generated from `#/components/schemas/app-permissions/metadata`. - @frozen public enum metadataPayload: String, Codable, Hashable, Sendable { + @frozen public enum metadataPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3498,7 +3507,7 @@ public enum Components { /// The level of permission to grant the access token for packages published to GitHub Packages. /// /// - Remark: Generated from `#/components/schemas/app-permissions/packages`. - @frozen public enum packagesPayload: String, Codable, Hashable, Sendable { + @frozen public enum packagesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3509,7 +3518,7 @@ public enum Components { /// The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. /// /// - Remark: Generated from `#/components/schemas/app-permissions/pages`. - @frozen public enum pagesPayload: String, Codable, Hashable, Sendable { + @frozen public enum pagesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3520,7 +3529,7 @@ public enum Components { /// The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. /// /// - Remark: Generated from `#/components/schemas/app-permissions/pull_requests`. - @frozen public enum pull_requestsPayload: String, Codable, Hashable, Sendable { + @frozen public enum pull_requestsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3531,7 +3540,7 @@ public enum Components { /// The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. /// /// - Remark: Generated from `#/components/schemas/app-permissions/repository_custom_properties`. - @frozen public enum repository_custom_propertiesPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_custom_propertiesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3542,7 +3551,7 @@ public enum Components { /// The level of permission to grant the access token to manage the post-receive hooks for a repository. /// /// - Remark: Generated from `#/components/schemas/app-permissions/repository_hooks`. - @frozen public enum repository_hooksPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_hooksPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3553,7 +3562,7 @@ public enum Components { /// The level of permission to grant the access token to manage repository projects, columns, and cards. /// /// - Remark: Generated from `#/components/schemas/app-permissions/repository_projects`. - @frozen public enum repository_projectsPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_projectsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -3565,7 +3574,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage secret scanning alerts. /// /// - Remark: Generated from `#/components/schemas/app-permissions/secret_scanning_alerts`. - @frozen public enum secret_scanning_alertsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secret_scanning_alertsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3576,7 +3585,7 @@ public enum Components { /// The level of permission to grant the access token to manage repository secrets. /// /// - Remark: Generated from `#/components/schemas/app-permissions/secrets`. - @frozen public enum secretsPayload: String, Codable, Hashable, Sendable { + @frozen public enum secretsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3587,7 +3596,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage security events like code scanning alerts. /// /// - Remark: Generated from `#/components/schemas/app-permissions/security_events`. - @frozen public enum security_eventsPayload: String, Codable, Hashable, Sendable { + @frozen public enum security_eventsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3598,7 +3607,7 @@ public enum Components { /// The level of permission to grant the access token to manage just a single file. /// /// - Remark: Generated from `#/components/schemas/app-permissions/single_file`. - @frozen public enum single_filePayload: String, Codable, Hashable, Sendable { + @frozen public enum single_filePayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3609,7 +3618,7 @@ public enum Components { /// The level of permission to grant the access token for commit statuses. /// /// - Remark: Generated from `#/components/schemas/app-permissions/statuses`. - @frozen public enum statusesPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3620,7 +3629,7 @@ public enum Components { /// The level of permission to grant the access token to manage Dependabot alerts. /// /// - Remark: Generated from `#/components/schemas/app-permissions/vulnerability_alerts`. - @frozen public enum vulnerability_alertsPayload: String, Codable, Hashable, Sendable { + @frozen public enum vulnerability_alertsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3631,7 +3640,7 @@ public enum Components { /// The level of permission to grant the access token to update GitHub Actions workflow files. /// /// - Remark: Generated from `#/components/schemas/app-permissions/workflows`. - @frozen public enum workflowsPayload: String, Codable, Hashable, Sendable { + @frozen public enum workflowsPayload: String, Codable, Hashable, Sendable, CaseIterable { case write = "write" } /// The level of permission to grant the access token to update GitHub Actions workflow files. @@ -3641,7 +3650,7 @@ public enum Components { /// The level of permission to grant the access token for organization teams and members. /// /// - Remark: Generated from `#/components/schemas/app-permissions/members`. - @frozen public enum membersPayload: String, Codable, Hashable, Sendable { + @frozen public enum membersPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3652,7 +3661,7 @@ public enum Components { /// The level of permission to grant the access token to manage access to an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_administration`. - @frozen public enum organization_administrationPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_administrationPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3663,7 +3672,7 @@ public enum Components { /// The level of permission to grant the access token for custom repository roles management. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_roles`. - @frozen public enum organization_custom_rolesPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_custom_rolesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3674,7 +3683,7 @@ public enum Components { /// The level of permission to grant the access token for custom organization roles management. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_org_roles`. - @frozen public enum organization_custom_org_rolesPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_custom_org_rolesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3685,7 +3694,7 @@ public enum Components { /// The level of permission to grant the access token for custom property management. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_custom_properties`. - @frozen public enum organization_custom_propertiesPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_custom_propertiesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -3697,7 +3706,7 @@ public enum Components { /// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_copilot_seat_management`. - @frozen public enum organization_copilot_seat_managementPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_copilot_seat_managementPayload: String, Codable, Hashable, Sendable, CaseIterable { case write = "write" } /// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change. @@ -3707,7 +3716,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage announcement banners for an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_announcement_banners`. - @frozen public enum organization_announcement_bannersPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_announcement_bannersPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3718,7 +3727,7 @@ public enum Components { /// The level of permission to grant the access token to view events triggered by an activity in an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_events`. - @frozen public enum organization_eventsPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_eventsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" } /// The level of permission to grant the access token to view events triggered by an activity in an organization. @@ -3728,7 +3737,7 @@ public enum Components { /// The level of permission to grant the access token to manage the post-receive hooks for an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_hooks`. - @frozen public enum organization_hooksPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_hooksPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3739,7 +3748,7 @@ public enum Components { /// The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_personal_access_tokens`. - @frozen public enum organization_personal_access_tokensPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_personal_access_tokensPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3750,7 +3759,7 @@ public enum Components { /// The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_personal_access_token_requests`. - @frozen public enum organization_personal_access_token_requestsPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_personal_access_token_requestsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3761,7 +3770,7 @@ public enum Components { /// The level of permission to grant the access token for viewing an organization's plan. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_plan`. - @frozen public enum organization_planPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_planPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" } /// The level of permission to grant the access token for viewing an organization's plan. @@ -3771,7 +3780,7 @@ public enum Components { /// The level of permission to grant the access token to manage organization projects and projects public preview (where available). /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_projects`. - @frozen public enum organization_projectsPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_projectsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -3783,7 +3792,7 @@ public enum Components { /// The level of permission to grant the access token for organization packages published to GitHub Packages. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_packages`. - @frozen public enum organization_packagesPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_packagesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3794,7 +3803,7 @@ public enum Components { /// The level of permission to grant the access token to manage organization secrets. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_secrets`. - @frozen public enum organization_secretsPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_secretsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3805,7 +3814,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_self_hosted_runners`. - @frozen public enum organization_self_hosted_runnersPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_self_hosted_runnersPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3816,7 +3825,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage users blocked by the organization. /// /// - Remark: Generated from `#/components/schemas/app-permissions/organization_user_blocking`. - @frozen public enum organization_user_blockingPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_user_blockingPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3827,7 +3836,7 @@ public enum Components { /// The level of permission to grant the access token to manage team discussions and related comments. /// /// - Remark: Generated from `#/components/schemas/app-permissions/team_discussions`. - @frozen public enum team_discussionsPayload: String, Codable, Hashable, Sendable { + @frozen public enum team_discussionsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3838,7 +3847,7 @@ public enum Components { /// The level of permission to grant the access token to manage the email addresses belonging to a user. /// /// - Remark: Generated from `#/components/schemas/app-permissions/email_addresses`. - @frozen public enum email_addressesPayload: String, Codable, Hashable, Sendable { + @frozen public enum email_addressesPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3849,7 +3858,7 @@ public enum Components { /// The level of permission to grant the access token to manage the followers belonging to a user. /// /// - Remark: Generated from `#/components/schemas/app-permissions/followers`. - @frozen public enum followersPayload: String, Codable, Hashable, Sendable { + @frozen public enum followersPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3860,7 +3869,7 @@ public enum Components { /// The level of permission to grant the access token to manage git SSH keys. /// /// - Remark: Generated from `#/components/schemas/app-permissions/git_ssh_keys`. - @frozen public enum git_ssh_keysPayload: String, Codable, Hashable, Sendable { + @frozen public enum git_ssh_keysPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3871,7 +3880,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage GPG keys belonging to a user. /// /// - Remark: Generated from `#/components/schemas/app-permissions/gpg_keys`. - @frozen public enum gpg_keysPayload: String, Codable, Hashable, Sendable { + @frozen public enum gpg_keysPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3882,7 +3891,7 @@ public enum Components { /// The level of permission to grant the access token to view and manage interaction limits on a repository. /// /// - Remark: Generated from `#/components/schemas/app-permissions/interaction_limits`. - @frozen public enum interaction_limitsPayload: String, Codable, Hashable, Sendable { + @frozen public enum interaction_limitsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -3893,7 +3902,7 @@ public enum Components { /// The level of permission to grant the access token to manage the profile settings belonging to a user. /// /// - Remark: Generated from `#/components/schemas/app-permissions/profile`. - @frozen public enum profilePayload: String, Codable, Hashable, Sendable { + @frozen public enum profilePayload: String, Codable, Hashable, Sendable, CaseIterable { case write = "write" } /// The level of permission to grant the access token to manage the profile settings belonging to a user. @@ -3903,7 +3912,7 @@ public enum Components { /// The level of permission to grant the access token to list and manage repositories a user is starring. /// /// - Remark: Generated from `#/components/schemas/app-permissions/starring`. - @frozen public enum starringPayload: String, Codable, Hashable, Sendable { + @frozen public enum starringPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" } @@ -4286,19 +4295,19 @@ public enum Components { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -4306,8 +4315,8 @@ public enum Components { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/installation/account`. @@ -4315,7 +4324,7 @@ public enum Components { /// Describe whether all repositories have been selected or there's a selection involved /// /// - Remark: Generated from `#/components/schemas/installation/repository_selection`. - @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case selected = "selected" } @@ -4514,7 +4523,7 @@ public enum Components { /// The color of the issue type. /// /// - Remark: Generated from `#/components/schemas/issue-type/color`. - @frozen public enum colorPayload: String, Codable, Hashable, Sendable { + @frozen public enum colorPayload: String, Codable, Hashable, Sendable, CaseIterable { case gray = "gray" case blue = "blue" case green = "green" @@ -4586,7 +4595,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. public struct advanced_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -4608,7 +4617,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security`. public struct code_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -4634,7 +4643,7 @@ public enum Components { /// The enablement status of Dependabot security updates for the repository. /// /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -4660,7 +4669,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. public struct secret_scanningPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -4682,7 +4691,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -4704,7 +4713,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -4726,7 +4735,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -6648,7 +6657,7 @@ public enum Components { /// Color for the issue type. /// /// - Remark: Generated from `#/components/schemas/organization-create-issue-type/color`. - @frozen public enum colorPayload: String, Codable, Hashable, Sendable { + @frozen public enum colorPayload: String, Codable, Hashable, Sendable, CaseIterable { case gray = "gray" case blue = "blue" case green = "green" @@ -6704,7 +6713,7 @@ public enum Components { /// Color for the issue type. /// /// - Remark: Generated from `#/components/schemas/organization-update-issue-type/color`. - @frozen public enum colorPayload: String, Codable, Hashable, Sendable { + @frozen public enum colorPayload: String, Codable, Hashable, Sendable, CaseIterable { case gray = "gray" case blue = "blue" case green = "green" @@ -6752,7 +6761,7 @@ public enum Components { /// The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. /// /// - Remark: Generated from `#/components/schemas/org-membership/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case active = "active" case pending = "pending" } @@ -6763,7 +6772,7 @@ public enum Components { /// The user's membership type in the organization. /// /// - Remark: Generated from `#/components/schemas/org-membership/role`. - @frozen public enum rolePayload: String, Codable, Hashable, Sendable { + @frozen public enum rolePayload: String, Codable, Hashable, Sendable, CaseIterable { case admin = "admin" case member = "member" case billing_manager = "billing_manager" @@ -6851,7 +6860,7 @@ public enum Components { /// The system role from which this role inherits permissions. /// /// - Remark: Generated from `#/components/schemas/organization-role/base_role`. - @frozen public enum base_rolePayload: String, Codable, Hashable, Sendable { + @frozen public enum base_rolePayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case triage = "triage" case write = "write" @@ -6865,7 +6874,7 @@ public enum Components { /// Source answers the question, "where did this role come from?" /// /// - Remark: Generated from `#/components/schemas/organization-role/source`. - @frozen public enum sourcePayload: String, Codable, Hashable, Sendable { + @frozen public enum sourcePayload: String, Codable, Hashable, Sendable, CaseIterable { case Organization = "Organization" case Enterprise = "Enterprise" case Predefined = "Predefined" @@ -6940,7 +6949,7 @@ public enum Components { /// Determines if the team has a direct, indirect, or mixed relationship to a role /// /// - Remark: Generated from `#/components/schemas/team-role-assignment/assignment`. - @frozen public enum assignmentPayload: String, Codable, Hashable, Sendable { + @frozen public enum assignmentPayload: String, Codable, Hashable, Sendable, CaseIterable { case direct = "direct" case indirect = "indirect" case mixed = "mixed" @@ -7201,7 +7210,7 @@ public enum Components { /// Determines if the user has a direct, indirect, or mixed relationship to a role /// /// - Remark: Generated from `#/components/schemas/user-role-assignment/assignment`. - @frozen public enum assignmentPayload: String, Codable, Hashable, Sendable { + @frozen public enum assignmentPayload: String, Codable, Hashable, Sendable, CaseIterable { case direct = "direct" case indirect = "indirect" case mixed = "mixed" @@ -7380,7 +7389,7 @@ public enum Components { /// Type of repository selection requested. /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant-request/repository_selection`. - @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable, CaseIterable { case none = "none" case all = "all" case subset = "subset" @@ -7576,7 +7585,7 @@ public enum Components { /// Type of repository selection requested. /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant/repository_selection`. - @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable { + @frozen public enum repository_selectionPayload: String, Codable, Hashable, Sendable, CaseIterable { case none = "none" case all = "all" case subset = "subset" @@ -7770,7 +7779,7 @@ public enum Components { /// The source type of the property /// /// - Remark: Generated from `#/components/schemas/custom-property/source_type`. - @frozen public enum source_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum source_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case organization = "organization" case enterprise = "enterprise" } @@ -7781,7 +7790,7 @@ public enum Components { /// The type of the value for the property /// /// - Remark: Generated from `#/components/schemas/custom-property/value_type`. - @frozen public enum value_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum value_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case string = "string" case single_select = "single_select" case multi_select = "multi_select" @@ -7848,7 +7857,7 @@ public enum Components { /// Who can edit the values of the property /// /// - Remark: Generated from `#/components/schemas/custom-property/values_editable_by`. - @frozen public enum values_editable_byPayload: String, Codable, Hashable, Sendable { + @frozen public enum values_editable_byPayload: String, Codable, Hashable, Sendable, CaseIterable { case org_actors = "org_actors" case org_and_repo_actors = "org_and_repo_actors" } @@ -7908,7 +7917,7 @@ public enum Components { /// The type of the value for the property /// /// - Remark: Generated from `#/components/schemas/custom-property-set-payload/value_type`. - @frozen public enum value_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum value_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case string = "string" case single_select = "single_select" case multi_select = "multi_select" @@ -7975,7 +7984,7 @@ public enum Components { /// Who can edit the values of the property /// /// - Remark: Generated from `#/components/schemas/custom-property-set-payload/values_editable_by`. - @frozen public enum values_editable_byPayload: String, Codable, Hashable, Sendable { + @frozen public enum values_editable_byPayload: String, Codable, Hashable, Sendable, CaseIterable { case org_actors = "org_actors" case org_and_repo_actors = "org_and_repo_actors" } @@ -8217,12 +8226,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } } @@ -8239,7 +8248,7 @@ public enum Components { /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -8276,7 +8285,7 @@ public enum Components { /// The type of the actor /// /// - Remark: Generated from `#/components/parameters/api-insights-actor-type`. - @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case installation = "installation" case classic_pat = "classic_pat" case fine_grained_pat = "fine_grained_pat" @@ -8296,7 +8305,7 @@ public enum Components { /// - Remark: Generated from `#/components/parameters/api-insights-max-timestamp`. public typealias api_hyphen_insights_hyphen_max_hyphen_timestamp = Swift.String /// - Remark: Generated from `#/components/parameters/api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sort`. - @frozen public enum api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case last_rate_limited_timestamp = "last_rate_limited_timestamp" case last_request_timestamp = "last_request_timestamp" case rate_limited_request_count = "rate_limited_request_count" @@ -8313,7 +8322,7 @@ public enum Components { /// - Remark: Generated from `#/components/parameters/api-insights-api-route-substring`. public typealias api_hyphen_insights_hyphen_api_hyphen_route_hyphen_substring = Swift.String /// - Remark: Generated from `#/components/parameters/api_hyphen_insights_hyphen_sort`. - @frozen public enum api_hyphen_insights_hyphen_sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum api_hyphen_insights_hyphen_sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case last_rate_limited_timestamp = "last_rate_limited_timestamp" case last_request_timestamp = "last_request_timestamp" case rate_limited_request_count = "rate_limited_request_count" @@ -8359,7 +8368,7 @@ public enum Components { /// The property by which to sort the results. /// /// - Remark: Generated from `#/components/parameters/personal-access-token-sort`. - @frozen public enum personal_hyphen_access_hyphen_token_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum personal_hyphen_access_hyphen_token_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created_at = "created_at" } /// A list of owner usernames to use to filter the results. @@ -8397,7 +8406,7 @@ public enum Components { /// The security feature to enable or disable. /// /// - Remark: Generated from `#/components/parameters/security-product`. - @frozen public enum security_hyphen_product: String, Codable, Hashable, Sendable { + @frozen public enum security_hyphen_product: String, Codable, Hashable, Sendable, CaseIterable { case dependency_graph = "dependency_graph" case dependabot_alerts = "dependabot_alerts" case dependabot_security_updates = "dependabot_security_updates" @@ -8412,7 +8421,7 @@ public enum Components { /// `disable_all` means to disable the specified security feature for all repositories in the organization. /// /// - Remark: Generated from `#/components/parameters/org-security-product-enablement`. - @frozen public enum org_hyphen_security_hyphen_product_hyphen_enablement: String, Codable, Hashable, Sendable { + @frozen public enum org_hyphen_security_hyphen_product_hyphen_enablement: String, Codable, Hashable, Sendable, CaseIterable { case enable_all = "enable_all" case disable_all = "disable_all" } @@ -8645,10 +8654,10 @@ public enum Components { self.body = body } } - public struct conflict: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/conflict/content`. + public struct internal_error: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/conflict/content/application\/json`. + /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. case json(Components.Schemas.basic_hyphen_error) /// The associated value of the enum case if `self` is `.json`. /// @@ -8664,23 +8673,19 @@ public enum Components { } } /// Received HTTP response body - public var body: Components.Responses.conflict.Body - /// Creates a new `conflict`. + public var body: Components.Responses.internal_error.Body + /// Creates a new `internal_error`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Components.Responses.conflict.Body) { + public init(body: Components.Responses.internal_error.Body) { self.body = body } } - public struct no_content: Sendable, Hashable { - /// Creates a new `no_content`. - public init() {} - } - public struct internal_error: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content`. + public struct conflict: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/conflict/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. + /// - Remark: Generated from `#/components/responses/conflict/content/application\/json`. case json(Components.Schemas.basic_hyphen_error) /// The associated value of the enum case if `self` is `.json`. /// @@ -8696,15 +8701,19 @@ public enum Components { } } /// Received HTTP response body - public var body: Components.Responses.internal_error.Body - /// Creates a new `internal_error`. + public var body: Components.Responses.conflict.Body + /// Creates a new `conflict`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Components.Responses.internal_error.Body) { + public init(body: Components.Responses.conflict.Body) { self.body = body } } + public struct no_content: Sendable, Hashable { + /// Creates a new `no_content`. + public init() {} + } } /// Types generated from the `#/components/headers` section of the OpenAPI document. public enum Headers { @@ -8853,6 +8862,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//organizations/get(orgs/list)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -9153,7 +9170,7 @@ public enum Operations { /// Default permission level members have for organization repositories. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/default_repository_permission`. - @frozen public enum default_repository_permissionPayload: String, Codable, Hashable, Sendable { + @frozen public enum default_repository_permissionPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -9183,7 +9200,7 @@ public enum Operations { /// **Note:** This parameter is closing down and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/members_allowed_repository_creation_type`. - @frozen public enum members_allowed_repository_creation_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum members_allowed_repository_creation_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case none = "none" @@ -10322,6 +10339,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_check_hyphen_blocked_hyphen_user.Output.NoContent) + /// If the user is blocked + /// + /// - Remark: Generated from `#/paths//orgs/{org}/blocks/{username}/get(orgs/check-blocked-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -10490,6 +10515,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_block_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/blocks/{username}/put(orgs/block-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -10613,6 +10646,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_unblock_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/blocks/{username}/delete(orgs/unblock-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -11873,6 +11914,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_delete_hyphen_webhook.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/hooks/{hook_id}/delete(orgs/delete-webhook)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -12958,6 +13007,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_ping_hyphen_webhook.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/hooks/{hook_id}/pings/post(orgs/ping-webhook)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -13045,7 +13102,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/path/org`. public var org: Components.Parameters.org /// - Remark: Generated from `#/components/parameters/api-insights-actor-type`. - @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case installation = "installation" case classic_pat = "classic_pat" case fine_grained_pat = "fine_grained_pat" @@ -13096,7 +13153,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/per_page`. public var per_page: Components.Parameters.per_hyphen_page? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -13105,7 +13162,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}/GET/query/direction`. public var direction: Components.Parameters.direction? /// - Remark: Generated from `#/components/parameters/api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sort`. - @frozen public enum api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum api_hyphen_insights_hyphen_route_hyphen_stats_hyphen_sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case last_rate_limited_timestamp = "last_rate_limited_timestamp" case last_request_timestamp = "last_request_timestamp" case rate_limited_request_count = "rate_limited_request_count" @@ -13306,7 +13363,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/query/per_page`. public var per_page: Components.Parameters.per_hyphen_page? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -13315,7 +13372,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/subject-stats/GET/query/direction`. public var direction: Components.Parameters.direction? /// - Remark: Generated from `#/components/parameters/api_hyphen_insights_hyphen_sort`. - @frozen public enum api_hyphen_insights_hyphen_sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum api_hyphen_insights_hyphen_sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case last_rate_limited_timestamp = "last_rate_limited_timestamp" case last_request_timestamp = "last_request_timestamp" case rate_limited_request_count = "rate_limited_request_count" @@ -13815,7 +13872,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}/GET/path/org`. public var org: Components.Parameters.org /// - Remark: Generated from `#/components/parameters/api-insights-actor-type`. - @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case installation = "installation" case classic_pat = "classic_pat" case fine_grained_pat = "fine_grained_pat" @@ -14339,7 +14396,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}/GET/path/org`. public var org: Components.Parameters.org /// - Remark: Generated from `#/components/parameters/api-insights-actor-type`. - @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum api_hyphen_insights_hyphen_actor_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case installation = "installation" case classic_pat = "classic_pat" case fine_grained_pat = "fine_grained_pat" @@ -14565,7 +14622,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/per_page`. public var per_page: Components.Parameters.per_hyphen_page? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -14574,7 +14631,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/insights/api/user-stats/{user_id}/GET/query/direction`. public var direction: Components.Parameters.direction? /// - Remark: Generated from `#/components/parameters/api_hyphen_insights_hyphen_sort`. - @frozen public enum api_hyphen_insights_hyphen_sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum api_hyphen_insights_hyphen_sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case last_rate_limited_timestamp = "last_rate_limited_timestamp" case last_request_timestamp = "last_request_timestamp" case rate_limited_request_count = "rate_limited_request_count" @@ -14975,7 +15032,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/invitations/GET/query/page`. public var page: Components.Parameters.page? /// - Remark: Generated from `#/paths/orgs/{org}/invitations/GET/query/role`. - @frozen public enum rolePayload: String, Codable, Hashable, Sendable { + @frozen public enum rolePayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case admin = "admin" case direct_member = "direct_member" @@ -14987,7 +15044,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/invitations/GET/query/role`. public var role: Operations.orgs_sol_list_hyphen_pending_hyphen_invitations.Input.Query.rolePayload? /// - Remark: Generated from `#/paths/orgs/{org}/invitations/GET/query/invitation_source`. - @frozen public enum invitation_sourcePayload: String, Codable, Hashable, Sendable { + @frozen public enum invitation_sourcePayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case member = "member" case scim = "scim" @@ -15227,7 +15284,7 @@ public enum Operations { /// * `reinstate` - The previous role assigned to the invitee before they were removed from your organization. Can be one of the roles listed above. Only works if the invitee was previously part of your organization. /// /// - Remark: Generated from `#/paths/orgs/{org}/invitations/POST/requestBody/json/role`. - @frozen public enum rolePayload: String, Codable, Hashable, Sendable { + @frozen public enum rolePayload: String, Codable, Hashable, Sendable, CaseIterable { case admin = "admin" case direct_member = "direct_member" case billing_manager = "billing_manager" @@ -15490,6 +15547,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_cancel_hyphen_invitation.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/invitations/{invitation_id}/delete(orgs/cancel-invitation)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -16416,6 +16481,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_delete_hyphen_issue_hyphen_type.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/issue-types/{issue_type_id}/delete(orgs/delete-issue-type)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -16537,16 +16610,17 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query/filter`. - @frozen public enum filterPayload: String, Codable, Hashable, Sendable { + @frozen public enum filterPayload: String, Codable, Hashable, Sendable, CaseIterable { case _2fa_disabled = "2fa_disabled" + case _2fa_insecure = "2fa_insecure" case all = "all" } - /// Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. + /// Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. `2fa_insecure` means that only members with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned. These options are only available for organization owners. /// /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query/filter`. public var filter: Operations.orgs_sol_list_hyphen_members.Input.Query.filterPayload? /// - Remark: Generated from `#/paths/orgs/{org}/members/GET/query/role`. - @frozen public enum rolePayload: String, Codable, Hashable, Sendable { + @frozen public enum rolePayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case admin = "admin" case member = "member" @@ -16566,7 +16640,7 @@ public enum Operations { /// Creates a new `Query`. /// /// - Parameters: - /// - filter: Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. + /// - filter: Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. `2fa_insecure` means that only members with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned. These options are only available for organization owners. /// - role: Filter members returned by their role. /// - per_page: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - page: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." @@ -16788,6 +16862,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.NoContent) + /// Response if requester is an organization member and user is a member + /// + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/get(orgs/check-membership-for-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -16861,6 +16943,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.orgs_sol_check_hyphen_membership_hyphen_for_hyphen_user.Output.NotFound) + /// Not Found if requester is an organization member and user is not a member + /// + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/get(orgs/check-membership-for-user)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -16953,6 +17043,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_remove_hyphen_member.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/delete(orgs/remove-member)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -17273,7 +17371,7 @@ public enum Operations { /// * `member` - The user will become a non-owner member of the organization. /// /// - Remark: Generated from `#/paths/orgs/{org}/memberships/{username}/PUT/requestBody/json/role`. - @frozen public enum rolePayload: String, Codable, Hashable, Sendable { + @frozen public enum rolePayload: String, Codable, Hashable, Sendable, CaseIterable { case admin = "admin" case member = "member" } @@ -17514,6 +17612,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -17876,6 +17982,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/teams/{team_slug}/delete(orgs/revoke-all-org-roles-team)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -17962,6 +18076,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_assign_hyphen_team_hyphen_to_hyphen_org_hyphen_role.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/teams/{team_slug}/{role_id}/put(orgs/assign-team-to-org-role)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -17989,6 +18111,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.orgs_sol_assign_hyphen_team_hyphen_to_hyphen_org_hyphen_role.Output.NotFound) + /// Response if the organization, team or role does not exist. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/teams/{team_slug}/{role_id}/put(orgs/assign-team-to-org-role)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -18016,6 +18146,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.orgs_sol_assign_hyphen_team_hyphen_to_hyphen_org_hyphen_role.Output.UnprocessableContent) + /// Response if the organization roles feature is not enabled for the organization, or validation failed. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/teams/{team_slug}/{role_id}/put(orgs/assign-team-to-org-role)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -18102,6 +18240,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_team.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/teams/{team_slug}/{role_id}/delete(orgs/revoke-org-role-team)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -18181,6 +18327,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/users/{username}/delete(orgs/revoke-all-org-roles-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -18267,6 +18421,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_assign_hyphen_user_hyphen_to_hyphen_org_hyphen_role.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/users/{username}/{role_id}/put(orgs/assign-user-to-org-role)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -18294,6 +18456,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.orgs_sol_assign_hyphen_user_hyphen_to_hyphen_org_hyphen_role.Output.NotFound) + /// Response if the organization, user or role does not exist. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/users/{username}/{role_id}/put(orgs/assign-user-to-org-role)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -18321,6 +18491,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.orgs_sol_assign_hyphen_user_hyphen_to_hyphen_org_hyphen_role.Output.UnprocessableContent) + /// Response if the organization roles feature is not enabled enabled for the organization, the validation failed, or the user is not an organization member. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/users/{username}/{role_id}/put(orgs/assign-user-to-org-role)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -18407,6 +18585,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/users/{username}/{role_id}/delete(orgs/revoke-org-role-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -18794,6 +18980,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.orgs_sol_list_hyphen_org_hyphen_role_hyphen_teams.Output.NotFound) + /// Response if the organization or role does not exist. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/teams/get(orgs/list-org-role-teams)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -18821,6 +19015,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.orgs_sol_list_hyphen_org_hyphen_role_hyphen_teams.Output.UnprocessableContent) + /// Response if the organization roles feature is not enabled or validation failed. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/teams/get(orgs/list-org-role-teams)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -19039,6 +19241,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.orgs_sol_list_hyphen_org_hyphen_role_hyphen_users.Output.NotFound) + /// Response if the organization or role does not exist. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/users/get(orgs/list-org-role-users)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -19066,6 +19276,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.orgs_sol_list_hyphen_org_hyphen_role_hyphen_users.Output.UnprocessableContent) + /// Response if the organization roles feature is not enabled or validation failed. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/users/get(orgs/list-org-role-users)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -19141,11 +19359,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/outside_collaborators/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/outside_collaborators/GET/query/filter`. - @frozen public enum filterPayload: String, Codable, Hashable, Sendable { + @frozen public enum filterPayload: String, Codable, Hashable, Sendable, CaseIterable { case _2fa_disabled = "2fa_disabled" + case _2fa_insecure = "2fa_insecure" case all = "all" } - /// Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. + /// Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. `2fa_insecure` means that only outside collaborators with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned. /// /// - Remark: Generated from `#/paths/orgs/{org}/outside_collaborators/GET/query/filter`. public var filter: Operations.orgs_sol_list_hyphen_outside_hyphen_collaborators.Input.Query.filterPayload? @@ -19160,7 +19379,7 @@ public enum Operations { /// Creates a new `Query`. /// /// - Parameters: - /// - filter: Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. + /// - filter: Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. `2fa_insecure` means that only outside collaborators with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned. /// - per_page: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - page: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." public init( @@ -19458,6 +19677,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_convert_hyphen_member_hyphen_to_hyphen_outside_hyphen_collaborator.Output.NoContent) + /// User was converted + /// + /// - Remark: Generated from `#/paths//orgs/{org}/outside_collaborators/{username}/put(orgs/convert-member-to-outside-collaborator)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -19485,6 +19712,14 @@ public enum Operations { /// /// HTTP response code: `403 forbidden`. case forbidden(Operations.orgs_sol_convert_hyphen_member_hyphen_to_hyphen_outside_hyphen_collaborator.Output.Forbidden) + /// Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + /// + /// - Remark: Generated from `#/paths//orgs/{org}/outside_collaborators/{username}/put(orgs/convert-member-to-outside-collaborator)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + public static var forbidden: Self { + .forbidden(.init()) + } /// The associated value of the enum case if `self` is `.forbidden`. /// /// - Throws: An error if `self` is not `.forbidden`. @@ -19625,6 +19860,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_remove_hyphen_outside_hyphen_collaborator.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/outside_collaborators/{username}/delete(orgs/remove-outside-collaborator)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -19784,7 +20027,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/personal-access-token-requests/GET/query/page`. public var page: Components.Parameters.page? /// - Remark: Generated from `#/components/parameters/personal-access-token-sort`. - @frozen public enum personal_hyphen_access_hyphen_token_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum personal_hyphen_access_hyphen_token_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created_at = "created_at" } /// The property by which to sort the results. @@ -19792,7 +20035,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/personal-access-token-requests/GET/query/sort`. public var sort: Components.Parameters.personal_hyphen_access_hyphen_token_hyphen_sort? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -20133,7 +20376,7 @@ public enum Operations { /// Action to apply to the requests. /// /// - Remark: Generated from `#/paths/orgs/{org}/personal-access-token-requests/POST/requestBody/json/action`. - @frozen public enum actionPayload: String, Codable, Hashable, Sendable { + @frozen public enum actionPayload: String, Codable, Hashable, Sendable, CaseIterable { case approve = "approve" case deny = "deny" } @@ -20387,7 +20630,7 @@ public enum Operations { /// Action to apply to the request. /// /// - Remark: Generated from `#/paths/orgs/{org}/personal-access-token-requests/{pat_request_id}/POST/requestBody/json/action`. - @frozen public enum actionPayload: String, Codable, Hashable, Sendable { + @frozen public enum actionPayload: String, Codable, Hashable, Sendable, CaseIterable { case approve = "approve" case deny = "deny" } @@ -20535,6 +20778,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/personal-access-token-requests/{pat_request_id}/post(orgs/review-pat-grant-request)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -20878,7 +21129,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/personal-access-tokens/GET/query/page`. public var page: Components.Parameters.page? /// - Remark: Generated from `#/components/parameters/personal-access-token-sort`. - @frozen public enum personal_hyphen_access_hyphen_token_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum personal_hyphen_access_hyphen_token_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created_at = "created_at" } /// The property by which to sort the results. @@ -20886,7 +21137,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/personal-access-tokens/GET/query/sort`. public var sort: Components.Parameters.personal_hyphen_access_hyphen_token_hyphen_sort? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -21223,7 +21474,7 @@ public enum Operations { /// Action to apply to the fine-grained personal access token. /// /// - Remark: Generated from `#/paths/orgs/{org}/personal-access-tokens/POST/requestBody/json/action`. - @frozen public enum actionPayload: String, Codable, Hashable, Sendable { + @frozen public enum actionPayload: String, Codable, Hashable, Sendable, CaseIterable { case revoke = "revoke" } /// Action to apply to the fine-grained personal access token. @@ -21472,7 +21723,7 @@ public enum Operations { /// Action to apply to the fine-grained personal access token. /// /// - Remark: Generated from `#/paths/orgs/{org}/personal-access-tokens/{pat_id}/POST/requestBody/json/action`. - @frozen public enum actionPayload: String, Codable, Hashable, Sendable { + @frozen public enum actionPayload: String, Codable, Hashable, Sendable, CaseIterable { case revoke = "revoke" } /// Action to apply to the fine-grained personal access token. @@ -21563,6 +21814,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/personal-access-tokens/{pat_id}/post(orgs/update-pat-access)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -22763,6 +23022,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/properties/schema/{custom_property_name}/delete(orgs/remove-custom-property)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -23194,6 +23461,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_create_hyphen_or_hyphen_update_hyphen_custom_hyphen_properties_hyphen_values_hyphen_for_hyphen_repos.Output.NoContent) + /// No Content when custom property values are successfully created or updated + /// + /// - Remark: Generated from `#/paths//orgs/{org}/properties/values/patch(orgs/create-or-update-custom-properties-values-for-repos)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -23541,6 +23816,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_check_hyphen_public_hyphen_membership_hyphen_for_hyphen_user.Output.NoContent) + /// Response if user is a public member + /// + /// - Remark: Generated from `#/paths//orgs/{org}/public_members/{username}/get(orgs/check-public-membership-for-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -23568,6 +23851,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.orgs_sol_check_hyphen_public_hyphen_membership_hyphen_for_hyphen_user.Output.NotFound) + /// Not Found if user is not a public member + /// + /// - Remark: Generated from `#/paths//orgs/{org}/public_members/{username}/get(orgs/check-public-membership-for-user)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -23662,6 +23953,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_set_hyphen_public_hyphen_membership_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/public_members/{username}/put(orgs/set-public-membership-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -23785,6 +24084,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_remove_hyphen_public_hyphen_membership_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/public_members/{username}/delete(orgs/remove-public-membership-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -24402,6 +24709,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_add_hyphen_security_hyphen_manager_hyphen_team.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/security-managers/teams/{team_slug}/put(orgs/add-security-manager-team)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -24478,6 +24793,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_remove_hyphen_security_hyphen_manager_hyphen_team.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/security-managers/teams/{team_slug}/delete(orgs/remove-security-manager-team)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -24524,7 +24847,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/{security_product}/{enablement}/POST/path/org`. public var org: Components.Parameters.org /// - Remark: Generated from `#/components/parameters/security-product`. - @frozen public enum security_hyphen_product: String, Codable, Hashable, Sendable { + @frozen public enum security_hyphen_product: String, Codable, Hashable, Sendable, CaseIterable { case dependency_graph = "dependency_graph" case dependabot_alerts = "dependabot_alerts" case dependabot_security_updates = "dependabot_security_updates" @@ -24538,7 +24861,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/{security_product}/{enablement}/POST/path/security_product`. public var security_product: Components.Parameters.security_hyphen_product /// - Remark: Generated from `#/components/parameters/org-security-product-enablement`. - @frozen public enum org_hyphen_security_hyphen_product_hyphen_enablement: String, Codable, Hashable, Sendable { + @frozen public enum org_hyphen_security_hyphen_product_hyphen_enablement: String, Codable, Hashable, Sendable, CaseIterable { case enable_all = "enable_all" case disable_all = "disable_all" } @@ -24574,7 +24897,7 @@ public enum Operations { /// If you don't specify any `query_suite` in your request, the preferred query suite of the organization will be applied. /// /// - Remark: Generated from `#/paths/orgs/{org}/{security_product}/{enablement}/POST/requestBody/json/query_suite`. - @frozen public enum query_suitePayload: String, Codable, Hashable, Sendable { + @frozen public enum query_suitePayload: String, Codable, Hashable, Sendable, CaseIterable { case _default = "default" case extended = "extended" } @@ -24622,6 +24945,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Output.NoContent) + /// Action started + /// + /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -24649,6 +24980,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Output.UnprocessableContent) + /// The action could not be taken due to an in progress enablement, or a policy is preventing enablement + /// + /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -24684,7 +25023,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/memberships/orgs/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/user/memberships/orgs/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case active = "active" case pending = "pending" } @@ -24819,6 +25158,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/memberships/orgs/get(orgs/list-memberships-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -25157,7 +25504,7 @@ public enum Operations { /// The state that the membership should be in. Only `"active"` will be accepted. /// /// - Remark: Generated from `#/paths/user/memberships/orgs/{org}/PATCH/requestBody/json/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case active = "active" } /// The state that the membership should be in. Only `"active"` will be accepted. @@ -25487,6 +25834,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/orgs/get(orgs/list-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/packages/Types.swift b/Sources/packages/Types.swift index fa6c479a873..e99964e577e 100644 --- a/Sources/packages/Types.swift +++ b/Sources/packages/Types.swift @@ -813,6 +813,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1200,7 +1209,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. public struct advanced_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -1222,7 +1231,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security`. public struct code_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -1248,7 +1257,7 @@ public enum Components { /// The enablement status of Dependabot security updates for the repository. /// /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -1274,7 +1283,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. public struct secret_scanningPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -1296,7 +1305,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -1318,7 +1327,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -1340,7 +1349,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2028,7 +2037,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/package/name`. public var name: Swift.String /// - Remark: Generated from `#/components/schemas/package/package_type`. - @frozen public enum package_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum package_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -2047,7 +2056,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/package/version_count`. public var version_count: Swift.Int /// - Remark: Generated from `#/components/schemas/package/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case _private = "private" case _public = "public" } @@ -2145,7 +2154,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/package-version/metadata`. public struct metadataPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/package-version/metadata/package_type`. - @frozen public enum package_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum package_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -2290,7 +2299,7 @@ public enum Components { /// For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." /// /// - Remark: Generated from `#/components/parameters/package-visibility`. - @frozen public enum package_hyphen_visibility: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_visibility: String, Codable, Hashable, Sendable, CaseIterable { case _public = "public" case _private = "private" case _internal = "internal" @@ -2298,7 +2307,7 @@ public enum Components { /// The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. /// /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -2623,7 +2632,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/packages/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/packages/GET/query/package_type`. - @frozen public enum package_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum package_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -2636,7 +2645,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/packages/GET/query/package_type`. public var package_type: Operations.packages_sol_list_hyphen_packages_hyphen_for_hyphen_organization.Input.Query.package_typePayload /// - Remark: Generated from `#/components/parameters/package-visibility`. - @frozen public enum package_hyphen_visibility: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_visibility: String, Codable, Hashable, Sendable, CaseIterable { case _public = "public" case _private = "private" case _internal = "internal" @@ -2808,6 +2817,14 @@ public enum Operations { /// /// HTTP response code: `400 badRequest`. case badRequest(Components.Responses.package_es_list_error) + /// The value of `per_page` multiplied by `page` cannot be greater than 10000. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/packages/get(packages/list-packages-for-organization)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + public static var badRequest: Self { + .badRequest(.init()) + } /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. @@ -2870,7 +2887,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/packages/{package_type}/{package_name}/GET/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -3031,7 +3048,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/packages/{package_type}/{package_name}/DELETE/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -3104,6 +3121,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.packages_sol_delete_hyphen_package_hyphen_for_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/delete(packages/delete-package-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -3241,7 +3266,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/packages/{package_type}/{package_name}/restore/POST/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -3332,6 +3357,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.packages_sol_restore_hyphen_package_hyphen_for_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -3463,7 +3496,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/packages/{package_type}/{package_name}/versions/GET/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -3511,7 +3544,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/packages/{package_type}/{package_name}/versions/GET/query/per_page`. public var per_page: Components.Parameters.per_hyphen_page? /// - Remark: Generated from `#/paths/orgs/{org}/packages/{package_type}/{package_name}/versions/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case active = "active" case deleted = "deleted" } @@ -3730,7 +3763,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/GET/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -3898,7 +3931,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/DELETE/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -3978,6 +4011,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.packages_sol_delete_hyphen_package_hyphen_version_hyphen_for_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -4115,7 +4156,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/POST/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -4195,6 +4236,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.packages_sol_restore_hyphen_package_hyphen_version_hyphen_for_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -4440,7 +4489,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/packages/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/user/packages/GET/query/package_type`. - @frozen public enum package_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum package_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -4453,7 +4502,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/packages/GET/query/package_type`. public var package_type: Operations.packages_sol_list_hyphen_packages_hyphen_for_hyphen_authenticated_hyphen_user.Input.Query.package_typePayload /// - Remark: Generated from `#/components/parameters/package-visibility`. - @frozen public enum package_hyphen_visibility: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_visibility: String, Codable, Hashable, Sendable, CaseIterable { case _public = "public" case _private = "private" case _internal = "internal" @@ -4576,6 +4625,14 @@ public enum Operations { /// /// HTTP response code: `400 badRequest`. case badRequest(Components.Responses.package_es_list_error) + /// The value of `per_page` multiplied by `page` cannot be greater than 10000. + /// + /// - Remark: Generated from `#/paths//user/packages/get(packages/list-packages-for-authenticated-user)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + public static var badRequest: Self { + .badRequest(.init()) + } /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. @@ -4638,7 +4695,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/packages/{package_type}/{package_name}/GET/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -4790,7 +4847,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/packages/{package_type}/{package_name}/DELETE/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -4856,6 +4913,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.packages_sol_delete_hyphen_package_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/delete(packages/delete-package-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -4991,7 +5056,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/packages/{package_type}/{package_name}/restore/POST/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -5075,6 +5140,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.packages_sol_restore_hyphen_package_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5206,7 +5279,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/packages/{package_type}/{package_name}/versions/GET/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -5247,7 +5320,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/packages/{package_type}/{package_name}/versions/GET/query/per_page`. public var per_page: Components.Parameters.per_hyphen_page? /// - Remark: Generated from `#/paths/user/packages/{package_type}/{package_name}/versions/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case active = "active" case deleted = "deleted" } @@ -5466,7 +5539,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/packages/{package_type}/{package_name}/versions/{package_version_id}/GET/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -5627,7 +5700,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/packages/{package_type}/{package_name}/versions/{package_version_id}/DELETE/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -5700,6 +5773,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.packages_sol_delete_hyphen_package_hyphen_version_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5835,7 +5916,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/POST/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -5908,6 +5989,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.packages_sol_restore_hyphen_package_hyphen_version_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6234,7 +6323,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/packages/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/users/{username}/packages/GET/query/package_type`. - @frozen public enum package_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum package_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -6247,7 +6336,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/packages/GET/query/package_type`. public var package_type: Operations.packages_sol_list_hyphen_packages_hyphen_for_hyphen_user.Input.Query.package_typePayload /// - Remark: Generated from `#/components/parameters/package-visibility`. - @frozen public enum package_hyphen_visibility: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_visibility: String, Codable, Hashable, Sendable, CaseIterable { case _public = "public" case _private = "private" case _internal = "internal" @@ -6419,6 +6508,14 @@ public enum Operations { /// /// HTTP response code: `400 badRequest`. case badRequest(Components.Responses.package_es_list_error) + /// The value of `per_page` multiplied by `page` cannot be greater than 10000. + /// + /// - Remark: Generated from `#/paths//users/{username}/packages/get(packages/list-packages-for-user)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + public static var badRequest: Self { + .badRequest(.init()) + } /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. @@ -6481,7 +6578,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/packages/{package_type}/{package_name}/GET/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -6642,7 +6739,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/packages/{package_type}/{package_name}/DELETE/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -6715,6 +6812,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.packages_sol_delete_hyphen_package_hyphen_for_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/delete(packages/delete-package-for-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6852,7 +6957,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/packages/{package_type}/{package_name}/restore/POST/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -6943,6 +7048,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.packages_sol_restore_hyphen_package_hyphen_for_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/restore/post(packages/restore-package-for-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7074,7 +7187,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/packages/{package_type}/{package_name}/versions/GET/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -7302,7 +7415,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/GET/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -7470,7 +7583,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/DELETE/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -7550,6 +7663,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.packages_sol_delete_hyphen_package_hyphen_version_hyphen_for_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/delete(packages/delete-package-version-for-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7687,7 +7808,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/POST/path`. public struct Path: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/package-type`. - @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum package_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case npm = "npm" case maven = "maven" case rubygems = "rubygems" @@ -7767,6 +7888,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.packages_sol_restore_hyphen_package_hyphen_version_hyphen_for_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore/post(packages/restore-package-version-for-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. diff --git a/Sources/private-registries/Types.swift b/Sources/private-registries/Types.swift index c6ae22521ab..6e6c9c26492 100644 --- a/Sources/private-registries/Types.swift +++ b/Sources/private-registries/Types.swift @@ -195,6 +195,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -429,7 +438,7 @@ public enum Components { /// The registry type. /// /// - Remark: Generated from `#/components/schemas/org-private-registry-configuration/registry_type`. - @frozen public enum registry_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum registry_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case maven_repository = "maven_repository" } /// The registry type. @@ -443,7 +452,7 @@ public enum Components { /// Which type of organization repositories have access to the private registry. /// /// - Remark: Generated from `#/components/schemas/org-private-registry-configuration/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -500,7 +509,7 @@ public enum Components { /// The registry type. /// /// - Remark: Generated from `#/components/schemas/org-private-registry-configuration-with-selected-repositories/registry_type`. - @frozen public enum registry_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum registry_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case maven_repository = "maven_repository" } /// The registry type. @@ -514,7 +523,7 @@ public enum Components { /// Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry. /// /// - Remark: Generated from `#/components/schemas/org-private-registry-configuration-with-selected-repositories/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -1013,7 +1022,7 @@ public enum Operations { /// The registry type. /// /// - Remark: Generated from `#/paths/orgs/{org}/private-registries/POST/requestBody/json/registry_type`. - @frozen public enum registry_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum registry_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case maven_repository = "maven_repository" } /// The registry type. @@ -1035,7 +1044,7 @@ public enum Operations { /// Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry. /// /// - Remark: Generated from `#/paths/orgs/{org}/private-registries/POST/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -1656,7 +1665,7 @@ public enum Operations { /// The registry type. /// /// - Remark: Generated from `#/paths/orgs/{org}/private-registries/{secret_name}/PATCH/requestBody/json/registry_type`. - @frozen public enum registry_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum registry_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case maven_repository = "maven_repository" } /// The registry type. @@ -1678,7 +1687,7 @@ public enum Operations { /// Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry. /// /// - Remark: Generated from `#/paths/orgs/{org}/private-registries/{secret_name}/PATCH/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _private = "private" case selected = "selected" @@ -1755,6 +1764,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.private_hyphen_registries_sol_update_hyphen_org_hyphen_private_hyphen_registry.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/private-registries/{secret_name}/patch(private-registries/update-org-private-registry)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -1921,6 +1938,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.private_hyphen_registries_sol_delete_hyphen_org_hyphen_private_hyphen_registry.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/private-registries/{secret_name}/delete(private-registries/delete-org-private-registry)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. diff --git a/Sources/projects/Types.swift b/Sources/projects/Types.swift index fd72276c2f5..ed60e2a748c 100644 --- a/Sources/projects/Types.swift +++ b/Sources/projects/Types.swift @@ -751,6 +751,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1285,7 +1294,7 @@ public enum Components { /// The baseline permission that all organization members have on this project. Only present if owner is an organization. /// /// - Remark: Generated from `#/components/schemas/project/organization_permission`. - @frozen public enum organization_permissionPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_permissionPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -1808,7 +1817,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/projects/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/projects/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" case all = "all" @@ -2389,6 +2398,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/get(projects/get-card)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -2651,6 +2668,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/patch(projects/update-card)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -2853,6 +2878,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.projects_sol_delete_hyphen_card.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects/delete-card)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -2876,6 +2909,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects/delete-card)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -3203,6 +3244,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/moves/post(projects/move-card)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -3634,6 +3683,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects/get-column)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -3886,6 +3943,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects/update-column)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4042,6 +4107,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.projects_sol_delete_hyphen_column.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects/delete-column)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -4065,6 +4138,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects/delete-column)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4188,7 +4269,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/GET/query/archived_state`. - @frozen public enum archived_statePayload: String, Codable, Hashable, Sendable { + @frozen public enum archived_statePayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case archived = "archived" case not_archived = "not_archived" @@ -4327,6 +4408,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/get(projects/list-cards)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4618,6 +4707,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/post(projects/create-card)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5052,6 +5149,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/moves/post(projects/move-column)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5278,6 +5383,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/get(projects/get)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5429,7 +5542,7 @@ public enum Operations { /// The baseline permission that all organization members have on this project /// /// - Remark: Generated from `#/paths/projects/{project_id}/PATCH/requestBody/json/organization_permission`. - @frozen public enum organization_permissionPayload: String, Codable, Hashable, Sendable { + @frozen public enum organization_permissionPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -5554,6 +5667,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.projects_sol_update.Output.NotFound) + /// Not Found if the authenticated user does not have access to the project + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/patch(projects/update)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -5577,6 +5698,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/patch(projects/update)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5836,6 +5965,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.projects_sol_delete.Output.NoContent) + /// Delete Success + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/delete(projects/delete)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5859,6 +5996,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/delete(projects/delete)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6085,7 +6230,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/projects/{project_id}/collaborators/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/projects/{project_id}/collaborators/GET/query/affiliation`. - @frozen public enum affiliationPayload: String, Codable, Hashable, Sendable { + @frozen public enum affiliationPayload: String, Codable, Hashable, Sendable, CaseIterable { case outside = "outside" case direct = "direct" case all = "all" @@ -6270,6 +6415,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/collaborators/get(projects/list-collaborators)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6418,7 +6571,7 @@ public enum Operations { /// The permission to grant the collaborator. /// /// - Remark: Generated from `#/paths/projects/{project_id}/collaborators/{username}/PUT/requestBody/json/permission`. - @frozen public enum permissionPayload: String, Codable, Hashable, Sendable { + @frozen public enum permissionPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -6469,6 +6622,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.projects_sol_add_hyphen_collaborator.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/collaborators/{username}/put(projects/add-collaborator)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6538,6 +6699,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/collaborators/{username}/put(projects/add-collaborator)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6703,6 +6872,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.projects_sol_remove_hyphen_collaborator.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/collaborators/{username}/delete(projects/remove-collaborator)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6726,6 +6903,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/collaborators/{username}/delete(projects/remove-collaborator)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7030,6 +7215,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/collaborators/{username}/permission/get(projects/get-permission-for-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7279,6 +7472,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/columns/get(projects/list-columns)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7508,6 +7709,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//projects/{project_id}/columns/post(projects/create-column)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7663,7 +7872,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/projects/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/projects/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" case all = "all" @@ -8363,6 +8572,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/projects/post(projects/create-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -8509,7 +8726,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/projects/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/users/{username}/projects/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" case all = "all" diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index 25009b84852..eae1c9f48e4 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -1045,6 +1045,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1848,7 +1857,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -1866,7 +1875,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -1885,7 +1894,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -1903,7 +1912,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -2350,7 +2359,7 @@ public enum Components { /// The state of the milestone. /// /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" } @@ -2454,7 +2463,7 @@ public enum Components { /// How the author is associated with the repository. /// /// - Remark: Generated from `#/components/schemas/author-association`. - @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable { + @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable, CaseIterable { case COLLABORATOR = "COLLABORATOR" case CONTRIBUTOR = "CONTRIBUTOR" case FIRST_TIMER = "FIRST_TIMER" @@ -2978,7 +2987,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/diff-entry/filename`. public var filename: Swift.String /// - Remark: Generated from `#/components/schemas/diff-entry/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case added = "added" case removed = "removed" case modified = "modified" @@ -3369,7 +3378,7 @@ public enum Components { /// The merge method to use. /// /// - Remark: Generated from `#/components/schemas/auto-merge/merge_method`. - @frozen public enum merge_methodPayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_methodPayload: String, Codable, Hashable, Sendable, CaseIterable { case merge = "merge" case squash = "squash" case rebase = "rebase" @@ -3993,7 +4002,7 @@ public enum Components { /// The side of the first line of the range for a multi-line comment. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/start_side`. - @frozen public enum start_sidePayload: String, Codable, Hashable, Sendable { + @frozen public enum start_sidePayload: String, Codable, Hashable, Sendable, CaseIterable { case LEFT = "LEFT" case RIGHT = "RIGHT" } @@ -4012,7 +4021,7 @@ public enum Components { /// The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/side`. - @frozen public enum sidePayload: String, Codable, Hashable, Sendable { + @frozen public enum sidePayload: String, Codable, Hashable, Sendable, CaseIterable { case LEFT = "LEFT" case RIGHT = "RIGHT" } @@ -4023,7 +4032,7 @@ public enum Components { /// The level at which the comment is targeted, can be a diff line or a file. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/subject_type`. - @frozen public enum subject_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum subject_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case line = "line" case file = "file" } @@ -4197,7 +4206,7 @@ public enum Components { /// State of this Pull Request. Either `open` or `closed`. /// /// - Remark: Generated from `#/components/schemas/pull-request/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" } @@ -4962,7 +4971,7 @@ public enum Components { /// The side of the first line of the range for a multi-line comment. /// /// - Remark: Generated from `#/components/schemas/review-comment/side`. - @frozen public enum sidePayload: String, Codable, Hashable, Sendable { + @frozen public enum sidePayload: String, Codable, Hashable, Sendable, CaseIterable { case LEFT = "LEFT" case RIGHT = "RIGHT" } @@ -4973,7 +4982,7 @@ public enum Components { /// The side of the first line of the range for a multi-line comment. /// /// - Remark: Generated from `#/components/schemas/review-comment/start_side`. - @frozen public enum start_sidePayload: String, Codable, Hashable, Sendable { + @frozen public enum start_sidePayload: String, Codable, Hashable, Sendable, CaseIterable { case LEFT = "LEFT" case RIGHT = "RIGHT" } @@ -5140,7 +5149,7 @@ public enum Components { /// The property to sort the results by. /// /// - Remark: Generated from `#/components/parameters/sort`. - @frozen public enum sort: String, Codable, Hashable, Sendable { + @frozen public enum sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -5281,6 +5290,34 @@ public enum Components { self.body = body } } + public struct internal_error: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.internal_error.Body + /// Creates a new `internal_error`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.internal_error.Body) { + self.body = body + } + } public struct service_unavailable: Sendable, Hashable { /// - Remark: Generated from `#/components/responses/service_unavailable/content`. @frozen public enum Body: Sendable, Hashable { @@ -5338,34 +5375,6 @@ public enum Components { self.body = body } } - public struct internal_error: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. - case json(Components.Schemas.basic_hyphen_error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.basic_hyphen_error { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Components.Responses.internal_error.Body - /// Creates a new `internal_error`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.internal_error.Body) { - self.body = body - } - } public struct unacceptable: Sendable, Hashable { /// - Remark: Generated from `#/components/responses/unacceptable/content`. @frozen public enum Body: Sendable, Hashable { @@ -5453,7 +5462,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" case all = "all" @@ -5471,7 +5480,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/GET/query/base`. public var base: Swift.String? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case popularity = "popularity" @@ -5482,7 +5491,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/GET/query/sort`. public var sort: Operations.pulls_sol_list.Input.Query.sortPayload? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/GET/query/direction`. - @frozen public enum directionPayload: String, Codable, Hashable, Sendable { + @frozen public enum directionPayload: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -5632,6 +5641,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/get(pulls/list)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6048,7 +6065,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/comments/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/comments/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case created_at = "created_at" @@ -6056,7 +6073,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/comments/GET/query/sort`. public var sort: Operations.pulls_sol_list_hyphen_review_hyphen_comments_hyphen_for_hyphen_repo.Input.Query.sortPayload? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/comments/GET/query/direction`. - @frozen public enum directionPayload: String, Codable, Hashable, Sendable { + @frozen public enum directionPayload: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -6664,6 +6681,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.pulls_sol_delete_hyphen_review_hyphen_comment.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/comments/{comment_id}/delete(pulls/delete-review-comment)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6880,6 +6905,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/{pull_number}/get(pulls/get)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7096,7 +7129,7 @@ public enum Operations { /// State of this Pull Request. Either `open` or `closed`. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/PATCH/requestBody/json/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" } @@ -7341,7 +7374,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/comments/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/sort`. - @frozen public enum sort: String, Codable, Hashable, Sendable { + @frozen public enum sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -7350,7 +7383,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/comments/GET/query/sort`. public var sort: Components.Parameters.sort? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/comments/GET/query/direction`. - @frozen public enum directionPayload: String, Codable, Hashable, Sendable { + @frozen public enum directionPayload: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -7613,7 +7646,7 @@ public enum Operations { /// In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/comments/POST/requestBody/json/side`. - @frozen public enum sidePayload: String, Codable, Hashable, Sendable { + @frozen public enum sidePayload: String, Codable, Hashable, Sendable, CaseIterable { case LEFT = "LEFT" case RIGHT = "RIGHT" } @@ -7632,7 +7665,7 @@ public enum Operations { /// **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/comments/POST/requestBody/json/start_side`. - @frozen public enum start_sidePayload: String, Codable, Hashable, Sendable { + @frozen public enum start_sidePayload: String, Codable, Hashable, Sendable, CaseIterable { case LEFT = "LEFT" case RIGHT = "RIGHT" case side = "side" @@ -7648,7 +7681,7 @@ public enum Operations { /// The level at which the comment is targeted. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/comments/POST/requestBody/json/subject_type`. - @frozen public enum subject_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum subject_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case line = "line" case file = "file" } @@ -8641,6 +8674,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.pulls_sol_check_hyphen_if_hyphen_merged.Output.NoContent) + /// Response if pull request has been merged + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/{pull_number}/merge/get(pulls/check-if-merged)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -8668,6 +8709,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.pulls_sol_check_hyphen_if_hyphen_merged.Output.NotFound) + /// Not Found if pull request has not been merged + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/{pull_number}/merge/get(pulls/check-if-merged)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -8763,7 +8812,7 @@ public enum Operations { /// The merge method to use. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/merge/PUT/requestBody/json/merge_method`. - @frozen public enum merge_methodPayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_methodPayload: String, Codable, Hashable, Sendable, CaseIterable { case merge = "merge" case squash = "squash" case rebase = "rebase" @@ -9370,19 +9419,19 @@ public enum Operations { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -9390,8 +9439,8 @@ public enum Operations { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers/POST/requestBody/content/application\/json`. @@ -9476,6 +9525,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.pulls_sol_request_hyphen_reviewers.Output.UnprocessableContent) + /// Unprocessable Entity if user is not a collaborator + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers/post(pulls/request-reviewers)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -10038,7 +10095,7 @@ public enum Operations { /// The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request) when you are ready. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/reviews/POST/requestBody/json/event`. - @frozen public enum eventPayload: String, Codable, Hashable, Sendable { + @frozen public enum eventPayload: String, Codable, Hashable, Sendable, CaseIterable { case APPROVE = "APPROVE" case REQUEST_CHANGES = "REQUEST_CHANGES" case COMMENT = "COMMENT" @@ -11201,7 +11258,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals/PUT/requestBody/json/message`. public var message: Swift.String /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals/PUT/requestBody/json/event`. - @frozen public enum eventPayload: String, Codable, Hashable, Sendable { + @frozen public enum eventPayload: String, Codable, Hashable, Sendable, CaseIterable { case DISMISS = "DISMISS" } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals/PUT/requestBody/json/event`. @@ -11449,7 +11506,7 @@ public enum Operations { /// The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events/POST/requestBody/json/event`. - @frozen public enum eventPayload: String, Codable, Hashable, Sendable { + @frozen public enum eventPayload: String, Codable, Hashable, Sendable, CaseIterable { case APPROVE = "APPROVE" case REQUEST_CHANGES = "REQUEST_CHANGES" case COMMENT = "COMMENT" diff --git a/Sources/rate-limit/Types.swift b/Sources/rate-limit/Types.swift index 42bb0a4bbac..1c959c07e9a 100644 --- a/Sources/rate-limit/Types.swift +++ b/Sources/rate-limit/Types.swift @@ -65,6 +65,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -437,6 +446,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//rate_limit/get(rate-limit/get)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/reactions/Types.swift b/Sources/reactions/Types.swift index 7d6e6d904be..61e550ba2ac 100644 --- a/Sources/reactions/Types.swift +++ b/Sources/reactions/Types.swift @@ -717,6 +717,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1049,7 +1058,7 @@ public enum Components { /// The reaction to use /// /// - Remark: Generated from `#/components/schemas/reaction/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -1303,7 +1312,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/GET/query/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -1545,7 +1554,7 @@ public enum Operations { /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion comment. /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/POST/requestBody/json/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -1802,6 +1811,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.reactions_sol_delete_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}/delete(reactions/delete-for-team-discussion-comment)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -1873,7 +1890,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/GET/query/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -2108,7 +2125,7 @@ public enum Operations { /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion. /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/POST/requestBody/json/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -2358,6 +2375,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.reactions_sol_delete_hyphen_for_hyphen_team_hyphen_discussion.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}/delete(reactions/delete-for-team-discussion)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -2424,7 +2449,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/comments/{comment_id}/reactions/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/comments/{comment_id}/reactions/GET/query/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -2675,7 +2700,7 @@ public enum Operations { /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the commit comment. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/comments/{comment_id}/reactions/POST/requestBody/json/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -2946,6 +2971,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.reactions_sol_delete_hyphen_for_hyphen_commit_hyphen_comment.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}/delete(reactions/delete-for-commit-comment)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -3012,7 +3045,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/GET/query/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -3263,7 +3296,7 @@ public enum Operations { /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue comment. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/POST/requestBody/json/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -3534,6 +3567,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.reactions_sol_delete_hyphen_for_hyphen_issue_hyphen_comment.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}/delete(reactions/delete-for-issue-comment)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -3600,7 +3641,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/reactions/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/reactions/GET/query/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -3874,7 +3915,7 @@ public enum Operations { /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/reactions/POST/requestBody/json/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -4145,6 +4186,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.reactions_sol_delete_hyphen_for_hyphen_issue.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}/delete(reactions/delete-for-issue)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -4211,7 +4260,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/GET/query/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -4462,7 +4511,7 @@ public enum Operations { /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the pull request review comment. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/POST/requestBody/json/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -4733,6 +4782,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.reactions_sol_delete_hyphen_for_hyphen_pull_hyphen_request_hyphen_comment.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}/delete(reactions/delete-for-pull-request-comment)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -4799,7 +4856,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/releases/{release_id}/reactions/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/releases/{release_id}/reactions/GET/query/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case laugh = "laugh" case heart = "heart" @@ -5048,7 +5105,7 @@ public enum Operations { /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the release. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/releases/{release_id}/reactions/POST/requestBody/json/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case laugh = "laugh" case heart = "heart" @@ -5317,6 +5374,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.reactions_sol_delete_hyphen_for_hyphen_release.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}/delete(reactions/delete-for-release)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5388,7 +5453,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions/GET/query/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -5623,7 +5688,7 @@ public enum Operations { /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion comment. /// /// - Remark: Generated from `#/paths/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions/POST/requestBody/json/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -5792,7 +5857,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/teams/{team_id}/discussions/{discussion_number}/reactions/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/teams/{team_id}/discussions/{discussion_number}/reactions/GET/query/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" @@ -6020,7 +6085,7 @@ public enum Operations { /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion. /// /// - Remark: Generated from `#/paths/teams/{team_id}/discussions/{discussion_number}/reactions/POST/requestBody/json/content`. - @frozen public enum contentPayload: String, Codable, Hashable, Sendable { + @frozen public enum contentPayload: String, Codable, Hashable, Sendable, CaseIterable { case _plus_1 = "+1" case _hyphen_1 = "-1" case laugh = "laugh" diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index 25e9f5513c6..cd297a59cb8 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -5875,12 +5875,12 @@ public struct Client: APIProtocol { /// List repository collaborators /// /// For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - /// Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + /// The `permissions` hash returned in the response contains the base role permissions of the collaborator. The `role_name` is the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise. + /// There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. /// /// Team members will include the members of child teams. /// - /// The authenticated user must have push access to the repository to use this endpoint. - /// + /// The authenticated user must have write, maintain, or admin privileges on the repository to use this endpoint. For organization-owned repositories, the authenticated user needs to be a member of the organization. /// OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/collaborators`. @@ -6054,11 +6054,13 @@ public struct Client: APIProtocol { } /// Add a repository collaborator /// - /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// Add a user to a repository with a specified level of access. If the repository is owned by an organization, this API does not add the user to the organization - a user that has repository access without being an organization member is called an "outside collaborator" (if they are not an Enterprise Managed User) or a "repository collaborator" if they are an Enterprise Managed User. These users are exempt from some organization policies - see "[Adding outside collaborators to repositories](https://docs.github.com/organizations/managing-user-access-to-your-organizations-repositories/managing-outside-collaborators/adding-outside-collaborators-to-repositories-in-your-organization)" to learn more about these collaborator types. + /// + /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). /// - /// Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + /// Adding an outside collaborator may be restricted by enterprise and organization administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)" and "[Setting permissions for adding outside collaborators](https://docs.github.com/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)" for organization settings. /// - /// For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + /// For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the role being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: /// /// ``` /// Cannot assign {member} permission of {role name} @@ -6068,6 +6070,8 @@ public struct Client: APIProtocol { /// /// The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations). /// + /// For Enterprise Managed Users, this endpoint does not send invitations - these users are automatically added to organizations and repositories. Enterprise Managed Users can only be added to organizations and repositories within their enterprise. + /// /// **Updating an existing collaborator's permission level** /// /// The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. @@ -6141,7 +6145,7 @@ public struct Client: APIProtocol { return .noContent(.init()) case 422: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.validation_failed.Body + let body: Operations.repos_sol_add_hyphen_collaborator.Output.UnprocessableContent.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -6308,13 +6312,15 @@ public struct Client: APIProtocol { } /// Get repository permissions for a user /// - /// Checks the repository permission of a collaborator. The possible repository - /// permissions are `admin`, `write`, `read`, and `none`. + /// Checks the repository permission and role of a collaborator. + /// + /// The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the + /// `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. + /// The `role_name` attribute provides the name of the assigned role, including custom roles. The + /// `permission` can also be used to determine which base level of access the collaborator has to the repository. /// - /// *Note*: The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the - /// `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role assigned to the - /// collaborator, see the `role_name` attribute, which will provide the full role name, including custom roles. The - /// `permissions` hash can also be used to determine which base level of access the collaborator has to the repository. + /// The calculated permissions are the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise. + /// There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/collaborators/{username}/permission`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/collaborators/{username}/permission/get(repos/get-collaborator-permission-level)`. diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 847c0fcb7af..a413fd2c5ec 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -544,12 +544,12 @@ public protocol APIProtocol: Sendable { /// List repository collaborators /// /// For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - /// Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + /// The `permissions` hash returned in the response contains the base role permissions of the collaborator. The `role_name` is the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise. + /// There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. /// /// Team members will include the members of child teams. /// - /// The authenticated user must have push access to the repository to use this endpoint. - /// + /// The authenticated user must have write, maintain, or admin privileges on the repository to use this endpoint. For organization-owned repositories, the authenticated user needs to be a member of the organization. /// OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/collaborators`. @@ -570,11 +570,13 @@ public protocol APIProtocol: Sendable { func repos_sol_check_hyphen_collaborator(_ input: Operations.repos_sol_check_hyphen_collaborator.Input) async throws -> Operations.repos_sol_check_hyphen_collaborator.Output /// Add a repository collaborator /// - /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// Add a user to a repository with a specified level of access. If the repository is owned by an organization, this API does not add the user to the organization - a user that has repository access without being an organization member is called an "outside collaborator" (if they are not an Enterprise Managed User) or a "repository collaborator" if they are an Enterprise Managed User. These users are exempt from some organization policies - see "[Adding outside collaborators to repositories](https://docs.github.com/organizations/managing-user-access-to-your-organizations-repositories/managing-outside-collaborators/adding-outside-collaborators-to-repositories-in-your-organization)" to learn more about these collaborator types. /// - /// Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). /// - /// For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + /// Adding an outside collaborator may be restricted by enterprise and organization administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)" and "[Setting permissions for adding outside collaborators](https://docs.github.com/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)" for organization settings. + /// + /// For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the role being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: /// /// ``` /// Cannot assign {member} permission of {role name} @@ -584,6 +586,8 @@ public protocol APIProtocol: Sendable { /// /// The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations). /// + /// For Enterprise Managed Users, this endpoint does not send invitations - these users are automatically added to organizations and repositories. Enterprise Managed Users can only be added to organizations and repositories within their enterprise. + /// /// **Updating an existing collaborator's permission level** /// /// The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. @@ -625,13 +629,15 @@ public protocol APIProtocol: Sendable { func repos_sol_remove_hyphen_collaborator(_ input: Operations.repos_sol_remove_hyphen_collaborator.Input) async throws -> Operations.repos_sol_remove_hyphen_collaborator.Output /// Get repository permissions for a user /// - /// Checks the repository permission of a collaborator. The possible repository - /// permissions are `admin`, `write`, `read`, and `none`. + /// Checks the repository permission and role of a collaborator. /// - /// *Note*: The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the - /// `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role assigned to the - /// collaborator, see the `role_name` attribute, which will provide the full role name, including custom roles. The - /// `permissions` hash can also be used to determine which base level of access the collaborator has to the repository. + /// The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the + /// `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. + /// The `role_name` attribute provides the name of the assigned role, including custom roles. The + /// `permission` can also be used to determine which base level of access the collaborator has to the repository. + /// + /// The calculated permissions are the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise. + /// There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/collaborators/{username}/permission`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/collaborators/{username}/permission/get(repos/get-collaborator-permission-level)`. @@ -3147,12 +3153,12 @@ extension APIProtocol { /// List repository collaborators /// /// For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - /// Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + /// The `permissions` hash returned in the response contains the base role permissions of the collaborator. The `role_name` is the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise. + /// There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. /// /// Team members will include the members of child teams. /// - /// The authenticated user must have push access to the repository to use this endpoint. - /// + /// The authenticated user must have write, maintain, or admin privileges on the repository to use this endpoint. For organization-owned repositories, the authenticated user needs to be a member of the organization. /// OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/collaborators`. @@ -3185,11 +3191,13 @@ extension APIProtocol { } /// Add a repository collaborator /// - /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// Add a user to a repository with a specified level of access. If the repository is owned by an organization, this API does not add the user to the organization - a user that has repository access without being an organization member is called an "outside collaborator" (if they are not an Enterprise Managed User) or a "repository collaborator" if they are an Enterprise Managed User. These users are exempt from some organization policies - see "[Adding outside collaborators to repositories](https://docs.github.com/organizations/managing-user-access-to-your-organizations-repositories/managing-outside-collaborators/adding-outside-collaborators-to-repositories-in-your-organization)" to learn more about these collaborator types. /// - /// Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). /// - /// For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + /// Adding an outside collaborator may be restricted by enterprise and organization administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)" and "[Setting permissions for adding outside collaborators](https://docs.github.com/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)" for organization settings. + /// + /// For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the role being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: /// /// ``` /// Cannot assign {member} permission of {role name} @@ -3199,6 +3207,8 @@ extension APIProtocol { /// /// The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations). /// + /// For Enterprise Managed Users, this endpoint does not send invitations - these users are automatically added to organizations and repositories. Enterprise Managed Users can only be added to organizations and repositories within their enterprise. + /// /// **Updating an existing collaborator's permission level** /// /// The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. @@ -3258,13 +3268,15 @@ extension APIProtocol { } /// Get repository permissions for a user /// - /// Checks the repository permission of a collaborator. The possible repository - /// permissions are `admin`, `write`, `read`, and `none`. + /// Checks the repository permission and role of a collaborator. + /// + /// The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the + /// `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. + /// The `role_name` attribute provides the name of the assigned role, including custom roles. The + /// `permission` can also be used to determine which base level of access the collaborator has to the repository. /// - /// *Note*: The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the - /// `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role assigned to the - /// collaborator, see the `role_name` attribute, which will provide the full role name, including custom roles. The - /// `permissions` hash can also be used to determine which base level of access the collaborator has to the repository. + /// The calculated permissions are the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise. + /// There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/collaborators/{username}/permission`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/collaborators/{username}/permission/get(repos/get-collaborator-permission-level)`. @@ -5917,6 +5929,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -6341,23 +6362,23 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - issues = try container.decodeIfPresent( + self.issues = try container.decodeIfPresent( Swift.String.self, forKey: .issues ) - checks = try container.decodeIfPresent( + self.checks = try container.decodeIfPresent( Swift.String.self, forKey: .checks ) - metadata = try container.decodeIfPresent( + self.metadata = try container.decodeIfPresent( Swift.String.self, forKey: .metadata ) - contents = try container.decodeIfPresent( + self.contents = try container.decodeIfPresent( Swift.String.self, forKey: .contents ) - deployments = try container.decodeIfPresent( + self.deployments = try container.decodeIfPresent( Swift.String.self, forKey: .deployments ) @@ -6372,23 +6393,23 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - issues, + self.issues, forKey: .issues ) try container.encodeIfPresent( - checks, + self.checks, forKey: .checks ) try container.encodeIfPresent( - metadata, + self.metadata, forKey: .metadata ) try container.encodeIfPresent( - contents, + self.contents, forKey: .contents ) try container.encodeIfPresent( - deployments, + self.deployments, forKey: .deployments ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -7554,7 +7575,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -7572,7 +7593,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -7591,7 +7612,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -7609,7 +7630,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -8099,7 +8120,7 @@ public enum Components { /// The state of the milestone. /// /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" } @@ -8316,23 +8337,23 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - issues = try container.decodeIfPresent( + self.issues = try container.decodeIfPresent( Swift.String.self, forKey: .issues ) - checks = try container.decodeIfPresent( + self.checks = try container.decodeIfPresent( Swift.String.self, forKey: .checks ) - metadata = try container.decodeIfPresent( + self.metadata = try container.decodeIfPresent( Swift.String.self, forKey: .metadata ) - contents = try container.decodeIfPresent( + self.contents = try container.decodeIfPresent( Swift.String.self, forKey: .contents ) - deployments = try container.decodeIfPresent( + self.deployments = try container.decodeIfPresent( Swift.String.self, forKey: .deployments ) @@ -8347,23 +8368,23 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - issues, + self.issues, forKey: .issues ) try container.encodeIfPresent( - checks, + self.checks, forKey: .checks ) try container.encodeIfPresent( - metadata, + self.metadata, forKey: .metadata ) try container.encodeIfPresent( - contents, + self.contents, forKey: .contents ) try container.encodeIfPresent( - deployments, + self.deployments, forKey: .deployments ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -8467,7 +8488,7 @@ public enum Components { /// How the author is associated with the repository. /// /// - Remark: Generated from `#/components/schemas/author-association`. - @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable { + @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable, CaseIterable { case COLLABORATOR = "COLLABORATOR" case CONTRIBUTOR = "CONTRIBUTOR" case FIRST_TIMER = "FIRST_TIMER" @@ -8553,7 +8574,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. public struct advanced_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -8575,7 +8596,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security`. public struct code_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -8601,7 +8622,7 @@ public enum Components { /// The enablement status of Dependabot security updates for the repository. /// /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -8627,7 +8648,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. public struct secret_scanningPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -8649,7 +8670,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -8671,7 +8692,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -8693,7 +8714,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -9948,7 +9969,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/nullable-repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -9966,7 +9987,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/nullable-repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -9985,7 +10006,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/nullable-repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -10003,7 +10024,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/nullable-repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -10689,7 +10710,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/full-repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -10707,7 +10728,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/full-repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -10726,7 +10747,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/full-repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -10744,7 +10765,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/full-repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -11237,7 +11258,7 @@ public enum Components { /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise). /// /// - Remark: Generated from `#/components/schemas/repository-rule-enforcement`. - @frozen public enum repository_hyphen_rule_hyphen_enforcement: String, Codable, Hashable, Sendable { + @frozen public enum repository_hyphen_rule_hyphen_enforcement: String, Codable, Hashable, Sendable, CaseIterable { case disabled = "disabled" case active = "active" case evaluate = "evaluate" @@ -11253,7 +11274,7 @@ public enum Components { /// The type of actor that can bypass a ruleset. /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/actor_type`. - @frozen public enum actor_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum actor_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case Integration = "Integration" case OrganizationAdmin = "OrganizationAdmin" case RepositoryRole = "RepositoryRole" @@ -11267,7 +11288,7 @@ public enum Components { /// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets. /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-bypass-actor/bypass_mode`. - @frozen public enum bypass_modePayload: String, Codable, Hashable, Sendable { + @frozen public enum bypass_modePayload: String, Codable, Hashable, Sendable, CaseIterable { case always = "always" case pull_request = "pull_request" } @@ -11441,7 +11462,7 @@ public enum Components { /// The source of the repository property. Defaults to 'custom' if not specified. /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-spec/source`. - @frozen public enum sourcePayload: String, Codable, Hashable, Sendable { + @frozen public enum sourcePayload: String, Codable, Hashable, Sendable, CaseIterable { case custom = "custom" case system = "system" } @@ -11542,12 +11563,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// Conditions to target repositories by name and refs by name @@ -11575,12 +11596,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// Conditions to target repositories by id and refs by name @@ -11608,12 +11629,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// Conditions to target repositories by property and refs by name @@ -11662,7 +11683,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-creation`. public struct repository_hyphen_rule_hyphen_creation: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-creation/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case creation = "creation" } /// - Remark: Generated from `#/components/schemas/repository-rule-creation/type`. @@ -11683,7 +11704,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-update`. public struct repository_hyphen_rule_hyphen_update: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-update/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case update = "update" } /// - Remark: Generated from `#/components/schemas/repository-rule-update/type`. @@ -11729,7 +11750,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-deletion`. public struct repository_hyphen_rule_hyphen_deletion: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-deletion/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case deletion = "deletion" } /// - Remark: Generated from `#/components/schemas/repository-rule-deletion/type`. @@ -11750,7 +11771,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-required-linear-history`. public struct repository_hyphen_rule_hyphen_required_hyphen_linear_hyphen_history: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-required-linear-history/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case required_linear_history = "required_linear_history" } /// - Remark: Generated from `#/components/schemas/repository-rule-required-linear-history/type`. @@ -11771,7 +11792,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue`. public struct repository_hyphen_rule_hyphen_merge_hyphen_queue: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case merge_queue = "merge_queue" } /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/type`. @@ -11785,7 +11806,7 @@ public enum Components { /// When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. /// /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/grouping_strategy`. - @frozen public enum grouping_strategyPayload: String, Codable, Hashable, Sendable { + @frozen public enum grouping_strategyPayload: String, Codable, Hashable, Sendable, CaseIterable { case ALLGREEN = "ALLGREEN" case HEADGREEN = "HEADGREEN" } @@ -11804,7 +11825,7 @@ public enum Components { /// Method to use when merging changes from queued pull requests. /// /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/merge_method`. - @frozen public enum merge_methodPayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_methodPayload: String, Codable, Hashable, Sendable, CaseIterable { case MERGE = "MERGE" case SQUASH = "SQUASH" case REBASE = "REBASE" @@ -11882,7 +11903,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-required-deployments`. public struct repository_hyphen_rule_hyphen_required_hyphen_deployments: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-required-deployments/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case required_deployments = "required_deployments" } /// - Remark: Generated from `#/components/schemas/repository-rule-required-deployments/type`. @@ -11928,7 +11949,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-required-signatures`. public struct repository_hyphen_rule_hyphen_required_hyphen_signatures: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-required-signatures/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case required_signatures = "required_signatures" } /// - Remark: Generated from `#/components/schemas/repository-rule-required-signatures/type`. @@ -11949,7 +11970,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-pull-request`. public struct repository_hyphen_rule_hyphen_pull_hyphen_request: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-pull-request/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case pull_request = "pull_request" } /// - Remark: Generated from `#/components/schemas/repository-rule-pull-request/type`. @@ -11957,7 +11978,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-pull-request/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-pull-request/parameters/allowed_merge_methodsPayload`. - @frozen public enum allowed_merge_methodsPayloadPayload: String, Codable, Hashable, Sendable { + @frozen public enum allowed_merge_methodsPayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { case merge = "merge" case squash = "squash" case rebase = "rebase" @@ -12084,7 +12105,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-required-status-checks`. public struct repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-required-status-checks/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case required_status_checks = "required_status_checks" } /// - Remark: Generated from `#/components/schemas/repository-rule-required-status-checks/type`. @@ -12148,7 +12169,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-non-fast-forward`. public struct repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-non-fast-forward/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case non_fast_forward = "non_fast_forward" } /// - Remark: Generated from `#/components/schemas/repository-rule-non-fast-forward/type`. @@ -12169,7 +12190,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-commit-message-pattern`. public struct repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-commit-message-pattern/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case commit_message_pattern = "commit_message_pattern" } /// - Remark: Generated from `#/components/schemas/repository-rule-commit-message-pattern/type`. @@ -12187,7 +12208,7 @@ public enum Components { /// The operator to use for matching. /// /// - Remark: Generated from `#/components/schemas/repository-rule-commit-message-pattern/parameters/operator`. - @frozen public enum _operatorPayload: String, Codable, Hashable, Sendable { + @frozen public enum _operatorPayload: String, Codable, Hashable, Sendable, CaseIterable { case starts_with = "starts_with" case ends_with = "ends_with" case contains = "contains" @@ -12250,7 +12271,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-commit-author-email-pattern`. public struct repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-commit-author-email-pattern/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case commit_author_email_pattern = "commit_author_email_pattern" } /// - Remark: Generated from `#/components/schemas/repository-rule-commit-author-email-pattern/type`. @@ -12268,7 +12289,7 @@ public enum Components { /// The operator to use for matching. /// /// - Remark: Generated from `#/components/schemas/repository-rule-commit-author-email-pattern/parameters/operator`. - @frozen public enum _operatorPayload: String, Codable, Hashable, Sendable { + @frozen public enum _operatorPayload: String, Codable, Hashable, Sendable, CaseIterable { case starts_with = "starts_with" case ends_with = "ends_with" case contains = "contains" @@ -12331,7 +12352,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-committer-email-pattern`. public struct repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-committer-email-pattern/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case committer_email_pattern = "committer_email_pattern" } /// - Remark: Generated from `#/components/schemas/repository-rule-committer-email-pattern/type`. @@ -12349,7 +12370,7 @@ public enum Components { /// The operator to use for matching. /// /// - Remark: Generated from `#/components/schemas/repository-rule-committer-email-pattern/parameters/operator`. - @frozen public enum _operatorPayload: String, Codable, Hashable, Sendable { + @frozen public enum _operatorPayload: String, Codable, Hashable, Sendable, CaseIterable { case starts_with = "starts_with" case ends_with = "ends_with" case contains = "contains" @@ -12412,7 +12433,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-branch-name-pattern`. public struct repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-branch-name-pattern/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case branch_name_pattern = "branch_name_pattern" } /// - Remark: Generated from `#/components/schemas/repository-rule-branch-name-pattern/type`. @@ -12430,7 +12451,7 @@ public enum Components { /// The operator to use for matching. /// /// - Remark: Generated from `#/components/schemas/repository-rule-branch-name-pattern/parameters/operator`. - @frozen public enum _operatorPayload: String, Codable, Hashable, Sendable { + @frozen public enum _operatorPayload: String, Codable, Hashable, Sendable, CaseIterable { case starts_with = "starts_with" case ends_with = "ends_with" case contains = "contains" @@ -12493,7 +12514,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-tag-name-pattern`. public struct repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-tag-name-pattern/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case tag_name_pattern = "tag_name_pattern" } /// - Remark: Generated from `#/components/schemas/repository-rule-tag-name-pattern/type`. @@ -12511,7 +12532,7 @@ public enum Components { /// The operator to use for matching. /// /// - Remark: Generated from `#/components/schemas/repository-rule-tag-name-pattern/parameters/operator`. - @frozen public enum _operatorPayload: String, Codable, Hashable, Sendable { + @frozen public enum _operatorPayload: String, Codable, Hashable, Sendable, CaseIterable { case starts_with = "starts_with" case ends_with = "ends_with" case contains = "contains" @@ -12574,7 +12595,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-file-path-restriction`. public struct repository_hyphen_rule_hyphen_file_hyphen_path_hyphen_restriction: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-file-path-restriction/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case file_path_restriction = "file_path_restriction" } /// - Remark: Generated from `#/components/schemas/repository-rule-file-path-restriction/type`. @@ -12620,7 +12641,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-max-file-path-length`. public struct repository_hyphen_rule_hyphen_max_hyphen_file_hyphen_path_hyphen_length: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-max-file-path-length/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case max_file_path_length = "max_file_path_length" } /// - Remark: Generated from `#/components/schemas/repository-rule-max-file-path-length/type`. @@ -12666,7 +12687,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-file-extension-restriction`. public struct repository_hyphen_rule_hyphen_file_hyphen_extension_hyphen_restriction: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-file-extension-restriction/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case file_extension_restriction = "file_extension_restriction" } /// - Remark: Generated from `#/components/schemas/repository-rule-file-extension-restriction/type`. @@ -12712,7 +12733,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-max-file-size`. public struct repository_hyphen_rule_hyphen_max_hyphen_file_hyphen_size: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-max-file-size/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case max_file_size = "max_file_size" } /// - Remark: Generated from `#/components/schemas/repository-rule-max-file-size/type`. @@ -12803,7 +12824,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-workflows`. public struct repository_hyphen_rule_hyphen_workflows: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-workflows/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case workflows = "workflows" } /// - Remark: Generated from `#/components/schemas/repository-rule-workflows/type`. @@ -12861,7 +12882,7 @@ public enum Components { /// The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." /// /// - Remark: Generated from `#/components/schemas/repository-rule-params-code-scanning-tool/alerts_threshold`. - @frozen public enum alerts_thresholdPayload: String, Codable, Hashable, Sendable { + @frozen public enum alerts_thresholdPayload: String, Codable, Hashable, Sendable, CaseIterable { case none = "none" case errors = "errors" case errors_and_warnings = "errors_and_warnings" @@ -12874,7 +12895,7 @@ public enum Components { /// The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." /// /// - Remark: Generated from `#/components/schemas/repository-rule-params-code-scanning-tool/security_alerts_threshold`. - @frozen public enum security_alerts_thresholdPayload: String, Codable, Hashable, Sendable { + @frozen public enum security_alerts_thresholdPayload: String, Codable, Hashable, Sendable, CaseIterable { case none = "none" case critical = "critical" case high_or_higher = "high_or_higher" @@ -12915,7 +12936,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-code-scanning`. public struct repository_hyphen_rule_hyphen_code_hyphen_scanning: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-code-scanning/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case code_scanning = "code_scanning" } /// - Remark: Generated from `#/components/schemas/repository-rule-code-scanning/type`. @@ -13198,7 +13219,7 @@ public enum Components { /// The target of the ruleset /// /// - Remark: Generated from `#/components/schemas/repository-ruleset/target`. - @frozen public enum targetPayload: String, Codable, Hashable, Sendable { + @frozen public enum targetPayload: String, Codable, Hashable, Sendable, CaseIterable { case branch = "branch" case tag = "tag" case push = "push" @@ -13211,7 +13232,7 @@ public enum Components { /// The type of the source of the ruleset /// /// - Remark: Generated from `#/components/schemas/repository-ruleset/source_type`. - @frozen public enum source_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum source_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case Repository = "Repository" case Organization = "Organization" case Enterprise = "Enterprise" @@ -13234,7 +13255,7 @@ public enum Components { /// querying the repository-level endpoint. /// /// - Remark: Generated from `#/components/schemas/repository-ruleset/current_user_can_bypass`. - @frozen public enum current_user_can_bypassPayload: String, Codable, Hashable, Sendable { + @frozen public enum current_user_can_bypassPayload: String, Codable, Hashable, Sendable, CaseIterable { case always = "always" case pull_requests_only = "pull_requests_only" case never = "never" @@ -13326,19 +13347,19 @@ public enum Components { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -13346,8 +13367,8 @@ public enum Components { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-ruleset/conditions`. @@ -13462,7 +13483,7 @@ public enum Components { /// The result of the rule evaluations for rules with the `active` enforcement status. /// /// - Remark: Generated from `#/components/schemas/rule_hyphen_suites/result`. - @frozen public enum resultPayload: String, Codable, Hashable, Sendable { + @frozen public enum resultPayload: String, Codable, Hashable, Sendable, CaseIterable { case pass = "pass" case fail = "fail" case bypass = "bypass" @@ -13474,7 +13495,7 @@ public enum Components { /// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. /// /// - Remark: Generated from `#/components/schemas/rule_hyphen_suites/evaluation_result`. - @frozen public enum evaluation_resultPayload: String, Codable, Hashable, Sendable { + @frozen public enum evaluation_resultPayload: String, Codable, Hashable, Sendable, CaseIterable { case pass = "pass" case fail = "fail" case bypass = "bypass" @@ -13581,7 +13602,7 @@ public enum Components { /// The result of the rule evaluations for rules with the `active` enforcement status. /// /// - Remark: Generated from `#/components/schemas/rule-suite/result`. - @frozen public enum resultPayload: String, Codable, Hashable, Sendable { + @frozen public enum resultPayload: String, Codable, Hashable, Sendable, CaseIterable { case pass = "pass" case fail = "fail" case bypass = "bypass" @@ -13593,7 +13614,7 @@ public enum Components { /// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. Null if no rules with `evaluate` enforcement status were run. /// /// - Remark: Generated from `#/components/schemas/rule-suite/evaluation_result`. - @frozen public enum evaluation_resultPayload: String, Codable, Hashable, Sendable { + @frozen public enum evaluation_resultPayload: String, Codable, Hashable, Sendable, CaseIterable { case pass = "pass" case fail = "fail" case bypass = "bypass" @@ -13644,7 +13665,7 @@ public enum Components { /// The enforcement level of this rule source. /// /// - Remark: Generated from `#/components/schemas/rule-suite/rule_evaluationsPayload/enforcement`. - @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable, CaseIterable { case active = "active" case evaluate = "evaluate" case deleted_space_ruleset = "deleted ruleset" @@ -13656,7 +13677,7 @@ public enum Components { /// The result of the evaluation of the individual rule. /// /// - Remark: Generated from `#/components/schemas/rule-suite/rule_evaluationsPayload/result`. - @frozen public enum resultPayload: String, Codable, Hashable, Sendable { + @frozen public enum resultPayload: String, Codable, Hashable, Sendable, CaseIterable { case pass = "pass" case fail = "fail" } @@ -13862,18 +13883,18 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// The type of reviewer. /// /// - Remark: Generated from `#/components/schemas/deployment-reviewer-type`. - @frozen public enum deployment_hyphen_reviewer_hyphen_type: String, Codable, Hashable, Sendable { + @frozen public enum deployment_hyphen_reviewer_hyphen_type: String, Codable, Hashable, Sendable, CaseIterable { case User = "User" case Team = "Team" } @@ -14090,7 +14111,7 @@ public enum Components { /// The type of the activity that was performed. /// /// - Remark: Generated from `#/components/schemas/activity/activity_type`. - @frozen public enum activity_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum activity_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case push = "push" case force_push = "force_push" case branch_deletion = "branch_deletion" @@ -15411,7 +15432,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/diff-entry/filename`. public var filename: Swift.String /// - Remark: Generated from `#/components/schemas/diff-entry/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case added = "added" case removed = "removed" case modified = "modified" @@ -16118,11 +16139,11 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - url = try container.decode( + self.url = try container.decode( Swift.String.self, forKey: .url ) - enabled = try container.decode( + self.enabled = try container.decode( Swift.Bool.self, forKey: .enabled ) @@ -16150,7 +16171,7 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - enabled = try container.decode( + self.enabled = try container.decode( Swift.Bool.self, forKey: .enabled ) @@ -16177,7 +16198,7 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - enabled = try container.decode( + self.enabled = try container.decode( Swift.Bool.self, forKey: .enabled ) @@ -16204,7 +16225,7 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - enabled = try container.decode( + self.enabled = try container.decode( Swift.Bool.self, forKey: .enabled ) @@ -16233,7 +16254,7 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - enabled = try container.decodeIfPresent( + self.enabled = try container.decodeIfPresent( Swift.Bool.self, forKey: .enabled ) @@ -16260,7 +16281,7 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - enabled = try container.decode( + self.enabled = try container.decode( Swift.Bool.self, forKey: .enabled ) @@ -16289,7 +16310,7 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - enabled = try container.decodeIfPresent( + self.enabled = try container.decodeIfPresent( Swift.Bool.self, forKey: .enabled ) @@ -16320,7 +16341,7 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - enabled = try container.decodeIfPresent( + self.enabled = try container.decodeIfPresent( Swift.Bool.self, forKey: .enabled ) @@ -16689,7 +16710,7 @@ public enum Components { /// The permission associated with the invitation. /// /// - Remark: Generated from `#/components/schemas/repository-invitation/permissions`. - @frozen public enum permissionsPayload: String, Codable, Hashable, Sendable { + @frozen public enum permissionsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -17163,7 +17184,7 @@ public enum Components { /// The merge method to use. /// /// - Remark: Generated from `#/components/schemas/auto-merge/merge_method`. - @frozen public enum merge_methodPayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_methodPayload: String, Codable, Hashable, Sendable, CaseIterable { case merge = "merge" case squash = "squash" case rebase = "rebase" @@ -18024,7 +18045,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/commit-comparison/merge_base_commit`. public var merge_base_commit: Components.Schemas.commit /// - Remark: Generated from `#/components/schemas/commit-comparison/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case diverged = "diverged" case ahead = "ahead" case behind = "behind" @@ -18328,7 +18349,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/content_hyphen_directory`. public struct content_hyphen_directoryPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/content_hyphen_directory/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case dir = "dir" case file = "file" case submodule = "submodule" @@ -18447,7 +18468,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/content-file`. public struct content_hyphen_file: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/content-file/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case file = "file" } /// - Remark: Generated from `#/components/schemas/content-file/type`. @@ -18577,7 +18598,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/content-symlink`. public struct content_hyphen_symlink: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/content-symlink/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case symlink = "symlink" } /// - Remark: Generated from `#/components/schemas/content-symlink/type`. @@ -18689,7 +18710,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/content-submodule`. public struct content_hyphen_submodule: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/content-submodule/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case submodule = "submodule" } /// - Remark: Generated from `#/components/schemas/content-submodule/type`. @@ -19399,7 +19420,7 @@ public enum Components { /// The state of the status. /// /// - Remark: Generated from `#/components/schemas/deployment-status/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case error = "error" case failure = "failure" case inactive = "inactive" @@ -19648,19 +19669,19 @@ public enum Components { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -19668,8 +19689,8 @@ public enum Components { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/environment/protection_rulesPayload/value2/reviewersPayload/reviewer`. @@ -19779,25 +19800,25 @@ public enum Components { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } do { - value3 = try .init(from: decoder) + self.value3 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2, - value3 + self.value1, + self.value2, + self.value3 ], type: Self.self, codingPath: decoder.codingPath, @@ -19805,9 +19826,9 @@ public enum Components { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) - try value3?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) + try self.value3?.encode(to: encoder) } } /// Built-in deployment protection rules for the environment. @@ -19886,7 +19907,7 @@ public enum Components { /// Whether this rule targets a branch or tag. /// /// - Remark: Generated from `#/components/schemas/deployment-branch-policy/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case branch = "branch" case tag = "tag" } @@ -19931,7 +19952,7 @@ public enum Components { /// Whether this rule targets a branch or tag /// /// - Remark: Generated from `#/components/schemas/deployment-branch-policy-name-pattern-with-type/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case branch = "branch" case tag = "tag" } @@ -20292,7 +20313,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/merged-upstream/message`. public var message: Swift.String? /// - Remark: Generated from `#/components/schemas/merged-upstream/merge_type`. - @frozen public enum merge_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case merge = "merge" case fast_hyphen_forward = "fast-forward" case none = "none" @@ -20348,7 +20369,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pages-https-certificate`. public struct pages_hyphen_https_hyphen_certificate: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pages-https-certificate/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case new = "new" case authorization_created = "authorization_created" case authorization_pending = "authorization_pending" @@ -20408,7 +20429,7 @@ public enum Components { /// The status of the most recent build of the Page. /// /// - Remark: Generated from `#/components/schemas/page/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case built = "built" case building = "building" case errored = "errored" @@ -20424,7 +20445,7 @@ public enum Components { /// The state if the domain is verified /// /// - Remark: Generated from `#/components/schemas/page/protected_domain_state`. - @frozen public enum protected_domain_statePayload: String, Codable, Hashable, Sendable { + @frozen public enum protected_domain_statePayload: String, Codable, Hashable, Sendable, CaseIterable { case pending = "pending" case verified = "verified" case unverified = "unverified" @@ -20448,7 +20469,7 @@ public enum Components { /// The process in which the Page will be built. /// /// - Remark: Generated from `#/components/schemas/page/build_type`. - @frozen public enum build_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum build_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case legacy = "legacy" case workflow = "workflow" } @@ -20713,7 +20734,7 @@ public enum Components { /// The current status of the deployment. /// /// - Remark: Generated from `#/components/schemas/pages-deployment-status/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case deployment_in_progress = "deployment_in_progress" case syncing_files = "syncing_files" case finished_file_sync = "finished_file_sync" @@ -21145,7 +21166,7 @@ public enum Components { /// State of the release asset. /// /// - Remark: Generated from `#/components/schemas/release-asset/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case uploaded = "uploaded" case open = "open" } @@ -21423,7 +21444,7 @@ public enum Components { /// The type of source for the ruleset that includes this rule. /// /// - Remark: Generated from `#/components/schemas/repository-rule-ruleset-info/ruleset_source_type`. - @frozen public enum ruleset_source_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum ruleset_source_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case Repository = "Repository" case Organization = "Organization" } @@ -21483,12 +21504,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case1`. @@ -21512,12 +21533,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case2`. @@ -21541,12 +21562,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case3`. @@ -21570,12 +21591,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case4`. @@ -21599,12 +21620,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case5`. @@ -21628,12 +21649,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case6`. @@ -21657,12 +21678,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case7`. @@ -21686,12 +21707,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case8`. @@ -21715,12 +21736,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case9`. @@ -21744,12 +21765,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case10`. @@ -21773,12 +21794,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case11`. @@ -21802,12 +21823,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case12`. @@ -21831,12 +21852,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case13`. @@ -21860,12 +21881,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case14`. @@ -21889,12 +21910,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case15`. @@ -21918,12 +21939,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16`. @@ -21947,12 +21968,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case17`. @@ -21976,12 +21997,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case18`. @@ -22005,12 +22026,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case19`. @@ -22034,12 +22055,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case20`. @@ -22063,12 +22084,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case21`. @@ -22679,7 +22700,7 @@ public enum Components { /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -22745,7 +22766,7 @@ public enum Components { /// For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). /// /// - Remark: Generated from `#/components/parameters/time-period`. - @frozen public enum time_hyphen_period: String, Codable, Hashable, Sendable { + @frozen public enum time_hyphen_period: String, Codable, Hashable, Sendable, CaseIterable { case hour = "hour" case day = "day" case week = "week" @@ -22758,7 +22779,7 @@ public enum Components { /// The rule results to filter on. When specified, only suites with this result will be returned. /// /// - Remark: Generated from `#/components/parameters/rule-suite-result`. - @frozen public enum rule_hyphen_suite_hyphen_result: String, Codable, Hashable, Sendable { + @frozen public enum rule_hyphen_suite_hyphen_result: String, Codable, Hashable, Sendable, CaseIterable { case pass = "pass" case fail = "fail" case bypass = "bypass" @@ -22859,7 +22880,7 @@ public enum Components { /// The time frame to display results for. /// /// - Remark: Generated from `#/components/parameters/per`. - @frozen public enum per: String, Codable, Hashable, Sendable { + @frozen public enum per: String, Codable, Hashable, Sendable, CaseIterable { case day = "day" case week = "week" } @@ -23104,6 +23125,34 @@ public enum Components { self.body = body } } + public struct internal_error: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.internal_error.Body + /// Creates a new `internal_error`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.internal_error.Body) { + self.body = body + } + } public struct conflict: Sendable, Hashable { /// - Remark: Generated from `#/components/responses/conflict/content`. @frozen public enum Body: Sendable, Hashable { @@ -23221,34 +23270,6 @@ public enum Components { self.body = body } } - public struct internal_error: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. - case json(Components.Schemas.basic_hyphen_error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.basic_hyphen_error { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Components.Responses.internal_error.Body - /// Creates a new `internal_error`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.internal_error.Body) { - self.body = body - } - } public struct temporary_redirect: Sendable, Hashable { /// - Remark: Generated from `#/components/responses/temporary_redirect/content`. @frozen public enum Body: Sendable, Hashable { @@ -23321,7 +23342,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/repos/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/repos/GET/query/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _public = "public" case _private = "private" @@ -23334,7 +23355,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/repos/GET/query/type`. public var _type: Operations.repos_sol_list_hyphen_for_hyphen_org.Input.Query._typePayload? /// - Remark: Generated from `#/paths/orgs/{org}/repos/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case pushed = "pushed" @@ -23345,7 +23366,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/repos/GET/query/sort`. public var sort: Operations.repos_sol_list_hyphen_for_hyphen_org.Input.Query.sortPayload? /// - Remark: Generated from `#/paths/orgs/{org}/repos/GET/query/direction`. - @frozen public enum directionPayload: String, Codable, Hashable, Sendable { + @frozen public enum directionPayload: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -23575,7 +23596,7 @@ public enum Operations { /// The visibility of the repository. /// /// - Remark: Generated from `#/paths/orgs/{org}/repos/POST/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case _public = "public" case _private = "private" } @@ -23652,7 +23673,7 @@ public enum Operations { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/paths/orgs/{org}/repos/POST/requestBody/json/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -23672,7 +23693,7 @@ public enum Operations { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/paths/orgs/{org}/repos/POST/requestBody/json/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -23693,7 +23714,7 @@ public enum Operations { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/paths/orgs/{org}/repos/POST/requestBody/json/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -23713,7 +23734,7 @@ public enum Operations { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/paths/orgs/{org}/repos/POST/requestBody/json/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -24289,7 +24310,7 @@ public enum Operations { /// The target of the ruleset /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/POST/requestBody/json/target`. - @frozen public enum targetPayload: String, Codable, Hashable, Sendable { + @frozen public enum targetPayload: String, Codable, Hashable, Sendable, CaseIterable { case branch = "branch" case tag = "tag" case push = "push" @@ -24529,7 +24550,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/rule-suites/GET/query/repository_name`. public var repository_name: Components.Parameters.repository_hyphen_name_hyphen_in_hyphen_query? /// - Remark: Generated from `#/components/parameters/time-period`. - @frozen public enum time_hyphen_period: String, Codable, Hashable, Sendable { + @frozen public enum time_hyphen_period: String, Codable, Hashable, Sendable, CaseIterable { case hour = "hour" case day = "day" case week = "week" @@ -24546,7 +24567,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/rule-suites/GET/query/actor_name`. public var actor_name: Components.Parameters.actor_hyphen_name_hyphen_in_hyphen_query? /// - Remark: Generated from `#/components/parameters/rule-suite-result`. - @frozen public enum rule_hyphen_suite_hyphen_result: String, Codable, Hashable, Sendable { + @frozen public enum rule_hyphen_suite_hyphen_result: String, Codable, Hashable, Sendable, CaseIterable { case pass = "pass" case fail = "fail" case bypass = "bypass" @@ -25187,7 +25208,7 @@ public enum Operations { /// The target of the ruleset /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. - @frozen public enum targetPayload: String, Codable, Hashable, Sendable { + @frozen public enum targetPayload: String, Codable, Hashable, Sendable, CaseIterable { case branch = "branch" case tag = "tag" case push = "push" @@ -25460,6 +25481,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_org_hyphen_ruleset.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/rulesets/{ruleset_id}/delete(repos/delete-org-ruleset)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -25836,7 +25865,7 @@ public enum Operations { /// The visibility of the repository. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case _public = "public" case _private = "private" } @@ -26094,7 +26123,7 @@ public enum Operations { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -26114,7 +26143,7 @@ public enum Operations { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -26135,7 +26164,7 @@ public enum Operations { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -26155,7 +26184,7 @@ public enum Operations { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -26558,6 +26587,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/delete(repos/delete)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -26765,7 +26802,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -26796,7 +26833,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/actor`. public var actor: Swift.String? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/time_period`. - @frozen public enum time_periodPayload: String, Codable, Hashable, Sendable { + @frozen public enum time_periodPayload: String, Codable, Hashable, Sendable, CaseIterable { case day = "day" case week = "week" case month = "month" @@ -26810,7 +26847,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/time_period`. public var time_period: Operations.repos_sol_list_hyphen_activities.Input.Query.time_periodPayload? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/activity_type`. - @frozen public enum activity_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum activity_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case push = "push" case force_push = "force_push" case branch_creation = "branch_creation" @@ -28244,6 +28281,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_autolink.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/autolinks/{autolink_id}/delete(repos/delete-autolink)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -28435,6 +28480,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.repos_sol_check_hyphen_automated_hyphen_security_hyphen_fixes.Output.NotFound) + /// Not Found if Dependabot is not enabled for the repository + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/automated-security-fixes/get(repos/check-automated-security-fixes)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -28535,6 +28588,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_enable_hyphen_automated_hyphen_security_hyphen_fixes.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/automated-security-fixes/put(repos/enable-automated-security-fixes)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -28610,6 +28671,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_disable_hyphen_automated_hyphen_security_hyphen_fixes.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/automated-security-fixes/delete(repos/disable-automated-security-fixes)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -29865,6 +29934,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_branch_hyphen_protection.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/delete(repos/delete-branch-protection)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -30312,6 +30389,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_admin_hyphen_branch_hyphen_protection.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins/delete(repos/delete-admin-branch-protection)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -30925,6 +31010,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_pull_hyphen_request_hyphen_review_hyphen_protection.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews/delete(repos/delete-pull-request-review-protection)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -31423,6 +31516,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_commit_hyphen_signature_hyphen_protection.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_signatures/delete(repos/delete-commit-signature-protection)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -31996,6 +32097,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_remove_hyphen_status_hyphen_check_hyphen_protection.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/delete(repos/remove-status-check-protection)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -33221,6 +33330,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_access_hyphen_restrictions.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/restrictions/delete(repos/delete-access-restrictions)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -36069,6 +36186,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.repos_sol_codeowners_hyphen_errors.Output.NotFound) + /// Resource not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/codeowners/errors/get(repos/codeowners-errors)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -36120,12 +36245,12 @@ public enum Operations { /// List repository collaborators /// /// For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - /// Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + /// The `permissions` hash returned in the response contains the base role permissions of the collaborator. The `role_name` is the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise. + /// There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. /// /// Team members will include the members of child teams. /// - /// The authenticated user must have push access to the repository to use this endpoint. - /// + /// The authenticated user must have write, maintain, or admin privileges on the repository to use this endpoint. For organization-owned repositories, the authenticated user needs to be a member of the organization. /// OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/collaborators`. @@ -36160,7 +36285,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/collaborators/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/collaborators/GET/query/affiliation`. - @frozen public enum affiliationPayload: String, Codable, Hashable, Sendable { + @frozen public enum affiliationPayload: String, Codable, Hashable, Sendable, CaseIterable { case outside = "outside" case direct = "direct" case all = "all" @@ -36170,7 +36295,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/collaborators/GET/query/affiliation`. public var affiliation: Operations.repos_sol_list_hyphen_collaborators.Input.Query.affiliationPayload? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/collaborators/GET/query/permission`. - @frozen public enum permissionPayload: String, Codable, Hashable, Sendable { + @frozen public enum permissionPayload: String, Codable, Hashable, Sendable, CaseIterable { case pull = "pull" case triage = "triage" case push = "push" @@ -36427,6 +36552,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_check_hyphen_collaborator.Output.NoContent) + /// Response if user is a collaborator + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/collaborators/{username}/get(repos/check-collaborator)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -36454,6 +36587,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.repos_sol_check_hyphen_collaborator.Output.NotFound) + /// Not Found if user is not a collaborator + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/collaborators/{username}/get(repos/check-collaborator)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -36479,11 +36620,13 @@ public enum Operations { } /// Add a repository collaborator /// - /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// Add a user to a repository with a specified level of access. If the repository is owned by an organization, this API does not add the user to the organization - a user that has repository access without being an organization member is called an "outside collaborator" (if they are not an Enterprise Managed User) or a "repository collaborator" if they are an Enterprise Managed User. These users are exempt from some organization policies - see "[Adding outside collaborators to repositories](https://docs.github.com/organizations/managing-user-access-to-your-organizations-repositories/managing-outside-collaborators/adding-outside-collaborators-to-repositories-in-your-organization)" to learn more about these collaborator types. /// - /// Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). /// - /// For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + /// Adding an outside collaborator may be restricted by enterprise and organization administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)" and "[Setting permissions for adding outside collaborators](https://docs.github.com/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)" for organization settings. + /// + /// For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the role being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: /// /// ``` /// Cannot assign {member} permission of {role name} @@ -36493,6 +36636,8 @@ public enum Operations { /// /// The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations). /// + /// For Enterprise Managed Users, this endpoint does not send invitations - these users are automatically added to organizations and repositories. Enterprise Managed Users can only be added to organizations and repositories within their enterprise. + /// /// **Updating an existing collaborator's permission level** /// /// The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. @@ -36653,6 +36798,17 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_add_hyphen_collaborator.Output.NoContent) + /// Response when: + /// - an existing collaborator is added as a collaborator + /// - an organization member is added as an individual collaborator + /// - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/collaborators/{username}/put(repos/add-collaborator)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -36670,17 +36826,47 @@ public enum Operations { } } } - /// Validation failed, or the endpoint has been spammed. + public struct UnprocessableContent: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/collaborators/{username}/PUT/responses/422/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/collaborators/{username}/PUT/responses/422/content/application\/json`. + case json(Components.Schemas.validation_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.validation_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.repos_sol_add_hyphen_collaborator.Output.UnprocessableContent.Body + /// Creates a new `UnprocessableContent`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.repos_sol_add_hyphen_collaborator.Output.UnprocessableContent.Body) { + self.body = body + } + } + /// Response when: + /// - validation failed, or the endpoint has been spammed + /// - an Enterprise Managed User (EMU) account was invited to a repository in an enterprise with personal user accounts /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/collaborators/{username}/put(repos/add-collaborator)/responses/422`. /// /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) + case unprocessableContent(Operations.repos_sol_add_hyphen_collaborator.Output.UnprocessableContent) /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed { + public var unprocessableContent: Operations.repos_sol_add_hyphen_collaborator.Output.UnprocessableContent { get throws { switch self { case let .unprocessableContent(response): @@ -36844,6 +37030,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_remove_hyphen_collaborator.Output.NoContent) + /// No Content when collaborator was removed from the repository. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/collaborators/{username}/delete(repos/remove-collaborator)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -36940,13 +37134,15 @@ public enum Operations { } /// Get repository permissions for a user /// - /// Checks the repository permission of a collaborator. The possible repository - /// permissions are `admin`, `write`, `read`, and `none`. + /// Checks the repository permission and role of a collaborator. /// - /// *Note*: The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the - /// `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role assigned to the - /// collaborator, see the `role_name` attribute, which will provide the full role name, including custom roles. The - /// `permissions` hash can also be used to determine which base level of access the collaborator has to the repository. + /// The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the + /// `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. + /// The `role_name` attribute provides the name of the assigned role, including custom roles. The + /// `permission` can also be used to determine which base level of access the collaborator has to the repository. + /// + /// The calculated permissions are the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise. + /// There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/collaborators/{username}/permission`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/collaborators/{username}/permission/get(repos/get-collaborator-permission-level)`. @@ -37767,6 +37963,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_commit_hyphen_comment.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/comments/{comment_id}/delete(repos/delete-commit-comment)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -40492,6 +40696,14 @@ public enum Operations { /// /// HTTP response code: `302 found`. case found(Components.Responses.found) + /// Found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/get(repos/get-content)/responses/302`. + /// + /// HTTP response code: `302 found`. + public static var found: Self { + .found(.init()) + } /// The associated value of the enum case if `self` is `.found`. /// /// - Throws: An error if `self` is not `.found`. @@ -40515,6 +40727,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/get(repos/get-content)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -41585,6 +41805,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_list_hyphen_contributors.Output.NoContent) + /// Response if repository is empty + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contributors/get(repos/list-contributors)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -42272,6 +42500,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.repos_sol_create_hyphen_deployment.Output.Conflict) + /// Conflict when there is a merge conflict or the commit's status checks failed + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/deployments/post(repos/create-deployment)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -42599,6 +42835,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_deployment.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/deployments/{deployment_id}/delete(repos/delete-deployment)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -42971,7 +43215,7 @@ public enum Operations { /// The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/POST/requestBody/json/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case error = "error" case failure = "failure" case inactive = "inactive" @@ -43500,6 +43744,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_create_hyphen_dispatch_hyphen_event.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/dispatches/post(repos/create-dispatch-event)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -44073,19 +44325,19 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - wait_timer = try container.decodeIfPresent( + self.wait_timer = try container.decodeIfPresent( Components.Schemas.wait_hyphen_timer.self, forKey: .wait_timer ) - prevent_self_review = try container.decodeIfPresent( + self.prevent_self_review = try container.decodeIfPresent( Components.Schemas.prevent_hyphen_self_hyphen_review.self, forKey: .prevent_self_review ) - reviewers = try container.decodeIfPresent( + self.reviewers = try container.decodeIfPresent( Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_environment.Input.Body.jsonPayload.reviewersPayload.self, forKey: .reviewers ) - deployment_branch_policy = try container.decodeIfPresent( + self.deployment_branch_policy = try container.decodeIfPresent( Components.Schemas.deployment_hyphen_branch_hyphen_policy_hyphen_settings.self, forKey: .deployment_branch_policy ) @@ -44310,6 +44562,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_an_hyphen_environment.Output.NoContent) + /// Default response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/environments/{environment_name}/delete(repos/delete-an-environment)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -44675,6 +44935,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.repos_sol_create_hyphen_deployment_hyphen_branch_hyphen_policy.Output.NotFound) + /// Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/post(repos/create-deployment-branch-policy)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -44702,6 +44970,14 @@ public enum Operations { /// /// HTTP response code: `303 seeOther`. case seeOther(Operations.repos_sol_create_hyphen_deployment_hyphen_branch_hyphen_policy.Output.SeeOther) + /// Response if the same branch name pattern already exists + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/post(repos/create-deployment-branch-policy)/responses/303`. + /// + /// HTTP response code: `303 seeOther`. + public static var seeOther: Self { + .seeOther(.init()) + } /// The associated value of the enum case if `self` is `.seeOther`. /// /// - Throws: An error if `self` is not `.seeOther`. @@ -45143,6 +45419,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_deployment_hyphen_branch_hyphen_policy.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}/delete(repos/delete-deployment-branch-policy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -45960,6 +46244,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_disable_hyphen_deployment_hyphen_protection_hyphen_rule.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}/delete(repos/disable-deployment-protection-rule)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -46019,7 +46311,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/forks/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/forks/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case newest = "newest" case oldest = "oldest" case stargazers = "stargazers" @@ -46841,19 +47133,19 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decodeIfPresent( + self.name = try container.decodeIfPresent( Swift.String.self, forKey: .name ) - config = try container.decodeIfPresent( + self.config = try container.decodeIfPresent( Operations.repos_sol_create_hyphen_webhook.Input.Body.jsonPayload.configPayload.self, forKey: .config ) - events = try container.decodeIfPresent( + self.events = try container.decodeIfPresent( [Swift.String].self, forKey: .events ) - active = try container.decodeIfPresent( + self.active = try container.decodeIfPresent( Swift.Bool.self, forKey: .active ) @@ -47557,6 +47849,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_webhook.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/delete(repos/delete-webhook)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -47870,19 +48170,19 @@ public enum Operations { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - url = try container.decodeIfPresent( + self.url = try container.decodeIfPresent( Components.Schemas.webhook_hyphen_config_hyphen_url.self, forKey: .url ) - content_type = try container.decodeIfPresent( + self.content_type = try container.decodeIfPresent( Components.Schemas.webhook_hyphen_config_hyphen_content_hyphen_type.self, forKey: .content_type ) - secret = try container.decodeIfPresent( + self.secret = try container.decodeIfPresent( Components.Schemas.webhook_hyphen_config_hyphen_secret.self, forKey: .secret ) - insecure_ssl = try container.decodeIfPresent( + self.insecure_ssl = try container.decodeIfPresent( Components.Schemas.webhook_hyphen_config_hyphen_insecure_hyphen_ssl.self, forKey: .insecure_ssl ) @@ -48682,6 +48982,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_ping_hyphen_webhook.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/pings/post(repos/ping-webhook)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -48832,6 +49140,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_test_hyphen_push_hyphen_webhook.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/tests/post(repos/test-push-webhook)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -49149,7 +49465,7 @@ public enum Operations { /// The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/invitations/{invitation_id}/PATCH/requestBody/json/permissions`. - @frozen public enum permissionsPayload: String, Codable, Hashable, Sendable { + @frozen public enum permissionsPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case maintain = "maintain" @@ -49333,6 +49649,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_invitation.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/invitations/{invitation_id}/delete(repos/delete-invitation)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -50002,6 +50326,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_deploy_hyphen_key.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/keys/{key_id}/delete(repos/delete-deploy-key)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -50312,6 +50644,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.repos_sol_merge_hyphen_upstream.Output.Conflict) + /// The branch could not be synced because of a merge conflict + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/merge-upstream/post(repos/merge-upstream)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -50339,6 +50679,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.repos_sol_merge_hyphen_upstream.Output.UnprocessableContent) + /// The branch could not be synced for some other reason + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/merge-upstream/post(repos/merge-upstream)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -50551,6 +50899,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_merge.Output.NoContent) + /// Response when already merged + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/merges/post(repos/merge)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -50578,6 +50934,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.repos_sol_merge.Output.NotFound) + /// Not Found when the base or head does not exist + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/merges/post(repos/merge)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -50605,6 +50969,14 @@ public enum Operations { /// /// HTTP response code: `409 conflict`. case conflict(Operations.repos_sol_merge.Output.Conflict) + /// Conflict when there is a merge conflict + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/merges/post(repos/merge)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + public static var conflict: Self { + .conflict(.init()) + } /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. @@ -50949,19 +51321,19 @@ public enum Operations { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2 + self.value1, + self.value2 ], type: Self.self, codingPath: decoder.codingPath, @@ -50969,8 +51341,8 @@ public enum Operations { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pages/POST/requestBody/content/application\/json`. @@ -51234,37 +51606,37 @@ public enum Operations { public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } catch { errors.append(error) } do { - value2 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } catch { errors.append(error) } do { - value3 = try .init(from: decoder) + self.value3 = try .init(from: decoder) } catch { errors.append(error) } do { - value4 = try .init(from: decoder) + self.value4 = try .init(from: decoder) } catch { errors.append(error) } do { - value5 = try .init(from: decoder) + self.value5 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ - value1, - value2, - value3, - value4, - value5 + self.value1, + self.value2, + self.value3, + self.value4, + self.value5 ], type: Self.self, codingPath: decoder.codingPath, @@ -51272,11 +51644,11 @@ public enum Operations { ) } public func encode(to encoder: any Encoder) throws { - try value1?.encode(to: encoder) - try value2?.encode(to: encoder) - try value3?.encode(to: encoder) - try value4?.encode(to: encoder) - try value5?.encode(to: encoder) + try self.value1?.encode(to: encoder) + try self.value2?.encode(to: encoder) + try self.value3?.encode(to: encoder) + try self.value4?.encode(to: encoder) + try self.value5?.encode(to: encoder) } } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/pages/PUT/requestBody/content/application\/json`. @@ -51310,6 +51682,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_update_hyphen_information_hyphen_about_hyphen_pages_hyphen_site.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pages/put(repos/update-information-about-pages-site)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -51506,6 +51886,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_pages_hyphen_site.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pages/delete(repos/delete-pages-site)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -52843,6 +53231,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel/post(repos/cancel-pages-deployment)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -53091,6 +53487,14 @@ public enum Operations { /// /// HTTP response code: `400 badRequest`. case badRequest(Operations.repos_sol_get_hyphen_pages_hyphen_health_hyphen_check.Output.BadRequest) + /// Custom domains are not available for GitHub Pages + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pages/health/get(repos/get-pages-health-check)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + public static var badRequest: Self { + .badRequest(.init()) + } /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. @@ -53118,6 +53522,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.repos_sol_get_hyphen_pages_hyphen_health_hyphen_check.Output.UnprocessableContent) + /// There isn't a CNAME for this page + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/pages/health/get(repos/get-pages-health-check)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -53441,6 +53853,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/private-vulnerability-reporting/put(repos/enable-private-vulnerability-reporting)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -53583,6 +54003,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/private-vulnerability-reporting/delete(repos/disable-private-vulnerability-reporting)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -53946,6 +54374,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_custom_hyphen_properties_hyphen_values.Output.NoContent) + /// No Content when custom property values are successfully created or updated + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/properties/values/patch(repos/create-or-update-custom-properties-values)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -54202,6 +54638,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/readme/get(repos/get-readme)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -54811,7 +55255,7 @@ public enum Operations { /// Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/releases/POST/requestBody/json/make_latest`. - @frozen public enum make_latestPayload: String, Codable, Hashable, Sendable { + @frozen public enum make_latestPayload: String, Codable, Hashable, Sendable, CaseIterable { case _true = "true" case _false = "false" case legacy = "legacy" @@ -55213,6 +55657,14 @@ public enum Operations { /// /// HTTP response code: `302 found`. case found(Components.Responses.found) + /// Found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/assets/{asset_id}/get(repos/get-release-asset)/responses/302`. + /// + /// HTTP response code: `302 found`. + public static var found: Self { + .found(.init()) + } /// The associated value of the enum case if `self` is `.found`. /// /// - Throws: An error if `self` is not `.found`. @@ -55510,6 +55962,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_release_hyphen_asset.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/assets/{asset_id}/delete(repos/delete-release-asset)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -56193,6 +56653,14 @@ public enum Operations { /// /// HTTP response code: `401 unauthorized`. case unauthorized(Operations.repos_sol_get_hyphen_release.Output.Unauthorized) + /// Unauthorized + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/{release_id}/get(repos/get-release)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + public static var unauthorized: Self { + .unauthorized(.init()) + } /// The associated value of the enum case if `self` is `.unauthorized`. /// /// - Throws: An error if `self` is not `.unauthorized`. @@ -56324,7 +56792,7 @@ public enum Operations { /// Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/releases/{release_id}/PATCH/requestBody/json/make_latest`. - @frozen public enum make_latestPayload: String, Codable, Hashable, Sendable { + @frozen public enum make_latestPayload: String, Codable, Hashable, Sendable, CaseIterable { case _true = "true" case _false = "false" case legacy = "legacy" @@ -56591,6 +57059,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_release.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/{release_id}/delete(repos/delete-release)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -56985,6 +57461,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.repos_sol_upload_hyphen_release_hyphen_asset.Output.UnprocessableContent) + /// Response if you upload an asset with the same filename as another uploaded asset + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/{release_id}/assets/post(repos/upload-release-asset)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -57498,7 +57982,7 @@ public enum Operations { /// The target of the ruleset /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/POST/requestBody/json/target`. - @frozen public enum targetPayload: String, Codable, Hashable, Sendable { + @frozen public enum targetPayload: String, Codable, Hashable, Sendable, CaseIterable { case branch = "branch" case tag = "tag" case push = "push" @@ -57742,7 +58226,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/rule-suites/GET/query/ref`. public var ref: Components.Parameters.ref_hyphen_in_hyphen_query? /// - Remark: Generated from `#/components/parameters/time-period`. - @frozen public enum time_hyphen_period: String, Codable, Hashable, Sendable { + @frozen public enum time_hyphen_period: String, Codable, Hashable, Sendable, CaseIterable { case hour = "hour" case day = "day" case week = "week" @@ -57759,7 +58243,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/rule-suites/GET/query/actor_name`. public var actor_name: Components.Parameters.actor_hyphen_name_hyphen_in_hyphen_query? /// - Remark: Generated from `#/components/parameters/rule-suite-result`. - @frozen public enum rule_hyphen_suite_hyphen_result: String, Codable, Hashable, Sendable { + @frozen public enum rule_hyphen_suite_hyphen_result: String, Codable, Hashable, Sendable, CaseIterable { case pass = "pass" case fail = "fail" case bypass = "bypass" @@ -58436,7 +58920,7 @@ public enum Operations { /// The target of the ruleset /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. - @frozen public enum targetPayload: String, Codable, Hashable, Sendable { + @frozen public enum targetPayload: String, Codable, Hashable, Sendable, CaseIterable { case branch = "branch" case tag = "tag" case push = "push" @@ -58715,6 +59199,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_repo_hyphen_ruleset.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/rulesets/{ruleset_id}/delete(repos/delete-repo-ruleset)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -59373,6 +59865,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/code_frequency/get(repos/get-code-frequency-stats)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -59400,6 +59900,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.repos_sol_get_hyphen_code_hyphen_frequency_hyphen_stats.Output.UnprocessableContent) + /// Repository contains more than 10,000 commits + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/code_frequency/get(repos/get-code-frequency-stats)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -59587,6 +60095,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/commit_activity/get(repos/get-commit-activity-stats)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -59783,6 +60299,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/contributors/get(repos/get-contributors-stats)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -60121,6 +60645,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Components.Responses.no_content) + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/punch_card/get(repos/get-punch-card-stats)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -60228,7 +60760,7 @@ public enum Operations { /// The state of the status. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/statuses/{sha}/POST/requestBody/json/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case error = "error" case failure = "failure" case pending = "pending" @@ -61075,6 +61607,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_delete_hyphen_tag_hyphen_protection.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tags/protection/{tag_protection_id}/delete(repos/delete-tag-protection)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -61927,7 +62467,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/traffic/clones/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/per`. - @frozen public enum per: String, Codable, Hashable, Sendable { + @frozen public enum per: String, Codable, Hashable, Sendable, CaseIterable { case day = "day" case week = "week" } @@ -62442,7 +62982,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/traffic/views/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/per`. - @frozen public enum per: String, Codable, Hashable, Sendable { + @frozen public enum per: String, Codable, Hashable, Sendable, CaseIterable { case day = "day" case week = "week" } @@ -62830,6 +63370,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_check_hyphen_vulnerability_hyphen_alerts.Output.NoContent) + /// Response if repository is enabled with vulnerability alerts + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/vulnerability-alerts/get(repos/check-vulnerability-alerts)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -62857,6 +63405,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.repos_sol_check_hyphen_vulnerability_hyphen_alerts.Output.NotFound) + /// Not Found if repository is not enabled with vulnerability alerts + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/vulnerability-alerts/get(repos/check-vulnerability-alerts)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -62932,6 +63488,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_enable_hyphen_vulnerability_hyphen_alerts.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/vulnerability-alerts/put(repos/enable-vulnerability-alerts)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -63009,6 +63573,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_disable_hyphen_vulnerability_hyphen_alerts.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/vulnerability-alerts/delete(repos/disable-vulnerability-alerts)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -63511,6 +64083,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repositories/get(repos/list-public)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -63573,7 +64153,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/repos/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/user/repos/GET/query/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case _public = "public" case _private = "private" @@ -63590,7 +64170,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/repos/GET/query/affiliation`. public var affiliation: Swift.String? /// - Remark: Generated from `#/paths/user/repos/GET/query/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case owner = "owner" case _public = "public" @@ -63602,7 +64182,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/repos/GET/query/type`. public var _type: Operations.repos_sol_list_hyphen_for_hyphen_authenticated_hyphen_user.Input.Query._typePayload? /// - Remark: Generated from `#/paths/user/repos/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case pushed = "pushed" @@ -63613,7 +64193,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/user/repos/GET/query/sort`. public var sort: Operations.repos_sol_list_hyphen_for_hyphen_authenticated_hyphen_user.Input.Query.sortPayload? /// - Remark: Generated from `#/paths/user/repos/GET/query/direction`. - @frozen public enum directionPayload: String, Codable, Hashable, Sendable { + @frozen public enum directionPayload: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -63797,6 +64377,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/repos/get(repos/list-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -63994,7 +64582,7 @@ public enum Operations { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/paths/user/repos/POST/requestBody/json/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -64014,7 +64602,7 @@ public enum Operations { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/paths/user/repos/POST/requestBody/json/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -64035,7 +64623,7 @@ public enum Operations { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/paths/user/repos/POST/requestBody/json/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -64055,7 +64643,7 @@ public enum Operations { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/paths/user/repos/POST/requestBody/json/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -64294,6 +64882,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/repos/post(repos/create-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -64575,6 +65171,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/repository_invitations/get(repos/list-invitations-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -64752,6 +65356,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_accept_hyphen_invitation_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/repository_invitations/{invitation_id}/patch(repos/accept-invitation-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -64844,6 +65456,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/repository_invitations/{invitation_id}/patch(repos/accept-invitation-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -64952,6 +65572,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.repos_sol_decline_hyphen_invitation_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/repository_invitations/{invitation_id}/delete(repos/decline-invitation-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -64998,6 +65626,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/repository_invitations/{invitation_id}/delete(repos/decline-invitation-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -65119,7 +65755,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/repos/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/users/{username}/repos/GET/query/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case all = "all" case owner = "owner" case member = "member" @@ -65129,7 +65765,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/repos/GET/query/type`. public var _type: Operations.repos_sol_list_hyphen_for_hyphen_user.Input.Query._typePayload? /// - Remark: Generated from `#/paths/users/{username}/repos/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case pushed = "pushed" @@ -65140,7 +65776,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/repos/GET/query/sort`. public var sort: Operations.repos_sol_list_hyphen_for_hyphen_user.Input.Query.sortPayload? /// - Remark: Generated from `#/paths/users/{username}/repos/GET/query/direction`. - @frozen public enum directionPayload: String, Codable, Hashable, Sendable { + @frozen public enum directionPayload: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } diff --git a/Sources/search/Types.swift b/Sources/search/Types.swift index 525b2a89082..f3d72c0ddfc 100644 --- a/Sources/search/Types.swift +++ b/Sources/search/Types.swift @@ -299,6 +299,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1154,7 +1163,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -1172,7 +1181,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -1191,7 +1200,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -1209,7 +1218,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -1699,7 +1708,7 @@ public enum Components { /// The state of the milestone. /// /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case closed = "closed" } @@ -1823,7 +1832,7 @@ public enum Components { /// The color of the issue type. /// /// - Remark: Generated from `#/components/schemas/issue-type/color`. - @frozen public enum colorPayload: String, Codable, Hashable, Sendable { + @frozen public enum colorPayload: String, Codable, Hashable, Sendable, CaseIterable { case gray = "gray" case blue = "blue" case green = "green" @@ -2006,23 +2015,23 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - issues = try container.decodeIfPresent( + self.issues = try container.decodeIfPresent( Swift.String.self, forKey: .issues ) - checks = try container.decodeIfPresent( + self.checks = try container.decodeIfPresent( Swift.String.self, forKey: .checks ) - metadata = try container.decodeIfPresent( + self.metadata = try container.decodeIfPresent( Swift.String.self, forKey: .metadata ) - contents = try container.decodeIfPresent( + self.contents = try container.decodeIfPresent( Swift.String.self, forKey: .contents ) - deployments = try container.decodeIfPresent( + self.deployments = try container.decodeIfPresent( Swift.String.self, forKey: .deployments ) @@ -2037,23 +2046,23 @@ public enum Components { public func encode(to encoder: any Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent( - issues, + self.issues, forKey: .issues ) try container.encodeIfPresent( - checks, + self.checks, forKey: .checks ) try container.encodeIfPresent( - metadata, + self.metadata, forKey: .metadata ) try container.encodeIfPresent( - contents, + self.contents, forKey: .contents ) try container.encodeIfPresent( - deployments, + self.deployments, forKey: .deployments ) try encoder.encodeAdditionalProperties(additionalProperties) @@ -2157,7 +2166,7 @@ public enum Components { /// How the author is associated with the repository. /// /// - Remark: Generated from `#/components/schemas/author-association`. - @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable { + @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable, CaseIterable { case COLLABORATOR = "COLLABORATOR" case CONTRIBUTOR = "CONTRIBUTOR" case FIRST_TIMER = "FIRST_TIMER" @@ -2243,7 +2252,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. public struct advanced_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2265,7 +2274,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security`. public struct code_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2291,7 +2300,7 @@ public enum Components { /// The enablement status of Dependabot security updates for the repository. /// /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2317,7 +2326,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. public struct secret_scanningPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2339,7 +2348,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2361,7 +2370,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2383,7 +2392,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -4979,7 +4988,7 @@ public enum Components { /// Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. /// /// - Remark: Generated from `#/components/parameters/order`. - @frozen public enum order: String, Codable, Hashable, Sendable { + @frozen public enum order: String, Codable, Hashable, Sendable, CaseIterable { case desc = "desc" case asc = "asc" } @@ -5180,7 +5189,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/search/code/GET/query/q`. public var q: Swift.String /// - Remark: Generated from `#/paths/search/code/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case indexed = "indexed" } /// **This field is closing down.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) @@ -5189,7 +5198,7 @@ public enum Operations { @available(*, deprecated) public var sort: Operations.search_sol_code.Input.Query.sortPayload? /// - Remark: Generated from `#/paths/search/code/GET/query/order`. - @frozen public enum orderPayload: String, Codable, Hashable, Sendable { + @frozen public enum orderPayload: String, Codable, Hashable, Sendable, CaseIterable { case desc = "desc" case asc = "asc" } @@ -5341,6 +5350,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//search/code/get(search/code)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5481,7 +5498,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/search/commits/GET/query/q`. public var q: Swift.String /// - Remark: Generated from `#/paths/search/commits/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case author_hyphen_date = "author-date" case committer_hyphen_date = "committer-date" } @@ -5490,7 +5507,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/search/commits/GET/query/sort`. public var sort: Operations.search_sol_commits.Input.Query.sortPayload? /// - Remark: Generated from `#/components/parameters/order`. - @frozen public enum order: String, Codable, Hashable, Sendable { + @frozen public enum order: String, Codable, Hashable, Sendable, CaseIterable { case desc = "desc" case asc = "asc" } @@ -5641,6 +5658,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//search/commits/get(search/commits)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5707,7 +5732,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/search/issues/GET/query/q`. public var q: Swift.String /// - Remark: Generated from `#/paths/search/issues/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case comments = "comments" case reactions = "reactions" case reactions_hyphen__plus_1 = "reactions-+1" @@ -5725,7 +5750,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/search/issues/GET/query/sort`. public var sort: Operations.search_sol_issues_hyphen_and_hyphen_pull_hyphen_requests.Input.Query.sortPayload? /// - Remark: Generated from `#/components/parameters/order`. - @frozen public enum order: String, Codable, Hashable, Sendable { + @frozen public enum order: String, Codable, Hashable, Sendable, CaseIterable { case desc = "desc" case asc = "asc" } @@ -5930,6 +5955,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6029,7 +6062,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/search/labels/GET/query/q`. public var q: Swift.String /// - Remark: Generated from `#/paths/search/labels/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -6038,7 +6071,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/search/labels/GET/query/sort`. public var sort: Operations.search_sol_labels.Input.Query.sortPayload? /// - Remark: Generated from `#/components/parameters/order`. - @frozen public enum order: String, Codable, Hashable, Sendable { + @frozen public enum order: String, Codable, Hashable, Sendable, CaseIterable { case desc = "desc" case asc = "asc" } @@ -6192,6 +6225,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//search/labels/get(search/labels)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6333,7 +6374,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/search/repositories/GET/query/q`. public var q: Swift.String /// - Remark: Generated from `#/paths/search/repositories/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case stars = "stars" case forks = "forks" case help_hyphen_wanted_hyphen_issues = "help-wanted-issues" @@ -6344,7 +6385,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/search/repositories/GET/query/sort`. public var sort: Operations.search_sol_repos.Input.Query.sortPayload? /// - Remark: Generated from `#/components/parameters/order`. - @frozen public enum order: String, Codable, Hashable, Sendable { + @frozen public enum order: String, Codable, Hashable, Sendable, CaseIterable { case desc = "desc" case asc = "asc" } @@ -6541,6 +6582,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//search/repositories/get(search/repos)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6749,6 +6798,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//search/topics/get(search/topics)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6823,7 +6880,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/search/users/GET/query/q`. public var q: Swift.String /// - Remark: Generated from `#/paths/search/users/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case followers = "followers" case repositories = "repositories" case joined = "joined" @@ -6833,7 +6890,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/search/users/GET/query/sort`. public var sort: Operations.search_sol_users.Input.Query.sortPayload? /// - Remark: Generated from `#/components/parameters/order`. - @frozen public enum order: String, Codable, Hashable, Sendable { + @frozen public enum order: String, Codable, Hashable, Sendable, CaseIterable { case desc = "desc" case asc = "asc" } @@ -6984,6 +7041,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//search/users/get(search/users)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/secret-scanning/Types.swift b/Sources/secret-scanning/Types.swift index da46cfaf3f6..d7eedcc3f09 100644 --- a/Sources/secret-scanning/Types.swift +++ b/Sources/secret-scanning/Types.swift @@ -271,6 +271,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1012,14 +1021,14 @@ public enum Components { /// Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. /// /// - Remark: Generated from `#/components/schemas/secret-scanning-alert-state`. - @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_state: String, Codable, Hashable, Sendable { + @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_state: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case resolved = "resolved" } /// **Required when the `state` is `resolved`.** The reason for resolving the alert. /// /// - Remark: Generated from `#/components/schemas/secret-scanning-alert-resolution`. - @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_resolution: String, Codable, Hashable, Sendable { + @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_resolution: String, Codable, Hashable, Sendable, CaseIterable { case false_positive = "false_positive" case wont_fix = "wont_fix" case revoked = "revoked" @@ -1097,7 +1106,7 @@ public enum Components { /// The token status as of the latest validity check. /// /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/validity`. - @frozen public enum validityPayload: String, Codable, Hashable, Sendable { + @frozen public enum validityPayload: String, Codable, Hashable, Sendable, CaseIterable { case active = "active" case inactive = "inactive" case unknown = "unknown" @@ -1305,7 +1314,7 @@ public enum Components { /// The token status as of the latest validity check. /// /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/validity`. - @frozen public enum validityPayload: String, Codable, Hashable, Sendable { + @frozen public enum validityPayload: String, Codable, Hashable, Sendable, CaseIterable { case active = "active" case inactive = "inactive" case unknown = "unknown" @@ -1435,7 +1444,7 @@ public enum Components { case is_base64_encoded } } - /// An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. + /// An optional comment when closing or reopening an alert. Cannot be updated or deleted. /// /// - Remark: Generated from `#/components/schemas/secret-scanning-alert-resolution-comment`. public typealias secret_hyphen_scanning_hyphen_alert_hyphen_resolution_hyphen_comment = Swift.String @@ -1823,7 +1832,7 @@ public enum Components { /// The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found. /// /// - Remark: Generated from `#/components/schemas/secret-scanning-location/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case commit = "commit" case wiki_commit = "wiki_commit" case issue_title = "issue_title" @@ -2009,7 +2018,7 @@ public enum Components { /// The reason for bypassing push protection. /// /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass-reason`. - @frozen public enum secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_reason: String, Codable, Hashable, Sendable { + @frozen public enum secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_reason: String, Codable, Hashable, Sendable, CaseIterable { case false_positive = "false_positive" case used_in_tests = "used_in_tests" case will_fix_later = "will_fix_later" @@ -2146,12 +2155,12 @@ public enum Components { self.value2 = value2 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) - value2 = try .init(from: decoder) + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) - try value2.encode(to: encoder) + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) } } /// - Remark: Generated from `#/components/schemas/secret-scanning-scan-history/custom_pattern_backfill_scans`. @@ -2197,7 +2206,7 @@ public enum Components { /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -2216,7 +2225,7 @@ public enum Components { /// Set to `open` or `resolved` to only list secret scanning alerts in a specific state. /// /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-state`. - @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_state: String, Codable, Hashable, Sendable { + @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_state: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case resolved = "resolved" } @@ -2231,7 +2240,7 @@ public enum Components { /// The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. /// /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-sort`. - @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -2408,7 +2417,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-state`. - @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_state: String, Codable, Hashable, Sendable { + @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_state: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case resolved = "resolved" } @@ -2425,7 +2434,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/resolution`. public var resolution: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_resolution? /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-sort`. - @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -2434,7 +2443,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/sort`. public var sort: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_sort? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -2714,7 +2723,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/secret-scanning/alerts/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-state`. - @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_state: String, Codable, Hashable, Sendable { + @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_state: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case resolved = "resolved" } @@ -2731,7 +2740,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/secret-scanning/alerts/GET/query/resolution`. public var resolution: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_resolution? /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-sort`. - @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -2740,7 +2749,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/secret-scanning/alerts/GET/query/sort`. public var sort: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_sort? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -3036,7 +3045,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/alerts/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-state`. - @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_state: String, Codable, Hashable, Sendable { + @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_state: String, Codable, Hashable, Sendable, CaseIterable { case open = "open" case resolved = "resolved" } @@ -3053,7 +3062,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/alerts/GET/query/resolution`. public var resolution: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_resolution? /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-sort`. - @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable { + @frozen public enum secret_hyphen_scanning_hyphen_alert_hyphen_sort: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" } @@ -3062,7 +3071,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/alerts/GET/query/sort`. public var sort: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_sort? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -3232,6 +3241,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.secret_hyphen_scanning_sol_list_hyphen_alerts_hyphen_for_hyphen_repo.Output.NotFound) + /// Repository is public or secret scanning is disabled for the repository + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/alerts/get(secret-scanning/list-alerts-for-repo)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -3430,6 +3447,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/get(secret-scanning/get-alert)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -3457,6 +3482,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.secret_hyphen_scanning_sol_get_hyphen_alert.Output.NotFound) + /// Repository is public, or secret scanning is disabled for the repository, or the resource is not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/get(secret-scanning/get-alert)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -3697,6 +3730,14 @@ public enum Operations { /// /// HTTP response code: `400 badRequest`. case badRequest(Operations.secret_hyphen_scanning_sol_update_hyphen_alert.Output.BadRequest) + /// Bad request, resolution comment is invalid or the resolution was not changed. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/patch(secret-scanning/update-alert)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + public static var badRequest: Self { + .badRequest(.init()) + } /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. @@ -3724,6 +3765,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.secret_hyphen_scanning_sol_update_hyphen_alert.Output.NotFound) + /// Repository is public, or secret scanning is disabled for the repository, or the resource is not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/patch(secret-scanning/update-alert)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -3751,6 +3800,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.secret_hyphen_scanning_sol_update_hyphen_alert.Output.UnprocessableContent) + /// State does not match the resolution or resolution comment + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/patch(secret-scanning/update-alert)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -3999,6 +4056,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.secret_hyphen_scanning_sol_list_hyphen_locations_hyphen_for_hyphen_alert.Output.NotFound) + /// Repository is public, or secret scanning is disabled for the repository, or the resource is not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations/get(secret-scanning/list-locations-for-alert)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -4226,6 +4291,14 @@ public enum Operations { /// /// HTTP response code: `403 forbidden`. case forbidden(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.Forbidden) + /// User does not have enough permissions to perform this action. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + public static var forbidden: Self { + .forbidden(.init()) + } /// The associated value of the enum case if `self` is `.forbidden`. /// /// - Throws: An error if `self` is not `.forbidden`. @@ -4253,6 +4326,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.NotFound) + /// Placeholder ID not found, or push protection is disabled on this repository. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -4280,6 +4361,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.UnprocessableContent) + /// Bad request, input data missing or incorrect. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -4422,6 +4511,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.secret_hyphen_scanning_sol_get_hyphen_scan_hyphen_history.Output.NotFound) + /// Repository does not have GitHub Advanced Security or secret scanning enabled + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/scan-history/get(secret-scanning/get-scan-history)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index 3b705fb9ff0..03155a870b5 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -321,6 +321,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -336,7 +345,7 @@ public enum Components { /// The package's language or package management ecosystem. /// /// - Remark: Generated from `#/components/schemas/security-advisory-ecosystems`. - @frozen public enum security_hyphen_advisory_hyphen_ecosystems: String, Codable, Hashable, Sendable { + @frozen public enum security_hyphen_advisory_hyphen_ecosystems: String, Codable, Hashable, Sendable, CaseIterable { case rubygems = "rubygems" case npm = "npm" case pip = "pip" @@ -673,7 +682,7 @@ public enum Components { /// The type of credit the user is receiving. /// /// - Remark: Generated from `#/components/schemas/security-advisory-credit-types`. - @frozen public enum security_hyphen_advisory_hyphen_credit_hyphen_types: String, Codable, Hashable, Sendable { + @frozen public enum security_hyphen_advisory_hyphen_credit_hyphen_types: String, Codable, Hashable, Sendable, CaseIterable { case analyst = "analyst" case finder = "finder" case reporter = "reporter" @@ -720,7 +729,7 @@ public enum Components { /// The type of advisory. /// /// - Remark: Generated from `#/components/schemas/global-advisory/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case reviewed = "reviewed" case unreviewed = "unreviewed" case malware = "malware" @@ -732,7 +741,7 @@ public enum Components { /// The severity of the advisory. /// /// - Remark: Generated from `#/components/schemas/global-advisory/severity`. - @frozen public enum severityPayload: String, Codable, Hashable, Sendable { + @frozen public enum severityPayload: String, Codable, Hashable, Sendable, CaseIterable { case critical = "critical" case high = "high" case medium = "medium" @@ -752,7 +761,7 @@ public enum Components { /// The type of identifier. /// /// - Remark: Generated from `#/components/schemas/global-advisory/identifiersPayload/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case CVE = "CVE" case GHSA = "GHSA" } @@ -1009,95 +1018,95 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - ghsa_id = try container.decode( + self.ghsa_id = try container.decode( Swift.String.self, forKey: .ghsa_id ) - cve_id = try container.decodeIfPresent( + self.cve_id = try container.decodeIfPresent( Swift.String.self, forKey: .cve_id ) - url = try container.decode( + self.url = try container.decode( Swift.String.self, forKey: .url ) - html_url = try container.decode( + self.html_url = try container.decode( Swift.String.self, forKey: .html_url ) - repository_advisory_url = try container.decodeIfPresent( + self.repository_advisory_url = try container.decodeIfPresent( Swift.String.self, forKey: .repository_advisory_url ) - summary = try container.decode( + self.summary = try container.decode( Swift.String.self, forKey: .summary ) - description = try container.decodeIfPresent( + self.description = try container.decodeIfPresent( Swift.String.self, forKey: .description ) - _type = try container.decode( + self._type = try container.decode( Components.Schemas.global_hyphen_advisory._typePayload.self, forKey: ._type ) - severity = try container.decode( + self.severity = try container.decode( Components.Schemas.global_hyphen_advisory.severityPayload.self, forKey: .severity ) - source_code_location = try container.decodeIfPresent( + self.source_code_location = try container.decodeIfPresent( Swift.String.self, forKey: .source_code_location ) - identifiers = try container.decodeIfPresent( + self.identifiers = try container.decodeIfPresent( Components.Schemas.global_hyphen_advisory.identifiersPayload.self, forKey: .identifiers ) - references = try container.decodeIfPresent( + self.references = try container.decodeIfPresent( [Swift.String].self, forKey: .references ) - published_at = try container.decode( + self.published_at = try container.decode( Foundation.Date.self, forKey: .published_at ) - updated_at = try container.decode( + self.updated_at = try container.decode( Foundation.Date.self, forKey: .updated_at ) - github_reviewed_at = try container.decodeIfPresent( + self.github_reviewed_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .github_reviewed_at ) - nvd_published_at = try container.decodeIfPresent( + self.nvd_published_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .nvd_published_at ) - withdrawn_at = try container.decodeIfPresent( + self.withdrawn_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .withdrawn_at ) - vulnerabilities = try container.decodeIfPresent( + self.vulnerabilities = try container.decodeIfPresent( [Components.Schemas.vulnerability].self, forKey: .vulnerabilities ) - cvss = try container.decodeIfPresent( + self.cvss = try container.decodeIfPresent( Components.Schemas.global_hyphen_advisory.cvssPayload.self, forKey: .cvss ) - cvss_severities = try container.decodeIfPresent( + self.cvss_severities = try container.decodeIfPresent( Components.Schemas.cvss_hyphen_severities.self, forKey: .cvss_severities ) - epss = try container.decodeIfPresent( + self.epss = try container.decodeIfPresent( Components.Schemas.security_hyphen_advisory_hyphen_epss.self, forKey: .epss ) - cwes = try container.decodeIfPresent( + self.cwes = try container.decodeIfPresent( Components.Schemas.global_hyphen_advisory.cwesPayload.self, forKey: .cwes ) - credits = try container.decodeIfPresent( + self.credits = try container.decodeIfPresent( Components.Schemas.global_hyphen_advisory.creditsPayload.self, forKey: .credits ) @@ -1823,7 +1832,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -1841,7 +1850,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -1860,7 +1869,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -1878,7 +1887,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -2688,7 +2697,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. public struct advanced_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2710,7 +2719,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security`. public struct code_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2736,7 +2745,7 @@ public enum Components { /// The enablement status of Dependabot security updates for the repository. /// /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2762,7 +2771,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. public struct secret_scanningPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2784,7 +2793,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2806,7 +2815,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2828,7 +2837,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -3388,7 +3397,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/nullable-repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -3406,7 +3415,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/nullable-repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -3425,7 +3434,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/nullable-repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -3443,7 +3452,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/nullable-repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -4129,7 +4138,7 @@ public enum Components { /// - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). /// /// - Remark: Generated from `#/components/schemas/full-repository/squash_merge_commit_title`. - @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } @@ -4147,7 +4156,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/full-repository/squash_merge_commit_message`. - @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum squash_merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case COMMIT_MESSAGES = "COMMIT_MESSAGES" case BLANK = "BLANK" @@ -4166,7 +4175,7 @@ public enum Components { /// - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). /// /// - Remark: Generated from `#/components/schemas/full-repository/merge_commit_title`. - @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_titlePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } @@ -4184,7 +4193,7 @@ public enum Components { /// - `BLANK` - default to a blank commit message. /// /// - Remark: Generated from `#/components/schemas/full-repository/merge_commit_message`. - @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable { + @frozen public enum merge_commit_messagePayload: String, Codable, Hashable, Sendable, CaseIterable { case PR_BODY = "PR_BODY" case PR_TITLE = "PR_TITLE" case BLANK = "BLANK" @@ -4747,19 +4756,19 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - package = try container.decodeIfPresent( + self.package = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory_hyphen_vulnerability.packagePayload.self, forKey: .package ) - vulnerable_version_range = try container.decodeIfPresent( + self.vulnerable_version_range = try container.decodeIfPresent( Swift.String.self, forKey: .vulnerable_version_range ) - patched_versions = try container.decodeIfPresent( + self.patched_versions = try container.decodeIfPresent( Swift.String.self, forKey: .patched_versions ) - vulnerable_functions = try container.decodeIfPresent( + self.vulnerable_functions = try container.decodeIfPresent( [Swift.String].self, forKey: .vulnerable_functions ) @@ -4782,7 +4791,7 @@ public enum Components { /// The state of the user's acceptance of the credit. /// /// - Remark: Generated from `#/components/schemas/repository-advisory-credit/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case accepted = "accepted" case declined = "declined" case pending = "pending" @@ -4813,15 +4822,15 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - user = try container.decode( + self.user = try container.decode( Components.Schemas.simple_hyphen_user.self, forKey: .user ) - _type = try container.decode( + self._type = try container.decode( Components.Schemas.security_hyphen_advisory_hyphen_credit_hyphen_types.self, forKey: ._type ) - state = try container.decode( + self.state = try container.decode( Components.Schemas.repository_hyphen_advisory_hyphen_credit.statePayload.self, forKey: .state ) @@ -4863,7 +4872,7 @@ public enum Components { /// The severity of the advisory. /// /// - Remark: Generated from `#/components/schemas/repository-advisory/severity`. - @frozen public enum severityPayload: String, Codable, Hashable, Sendable { + @frozen public enum severityPayload: String, Codable, Hashable, Sendable, CaseIterable { case critical = "critical" case high = "high" case medium = "medium" @@ -4887,10 +4896,10 @@ public enum Components { self.value1 = value1 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) + try self.value1.encode(to: encoder) } } /// The author of the advisory. @@ -4911,10 +4920,10 @@ public enum Components { self.value1 = value1 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) + try self.value1.encode(to: encoder) } } /// The publisher of the advisory. @@ -4926,7 +4935,7 @@ public enum Components { /// The type of identifier. /// /// - Remark: Generated from `#/components/schemas/repository-advisory/identifiersPayload/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case CVE = "CVE" case GHSA = "GHSA" } @@ -4962,7 +4971,7 @@ public enum Components { /// The state of the advisory. /// /// - Remark: Generated from `#/components/schemas/repository-advisory/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case published = "published" case closed = "closed" case withdrawn = "withdrawn" @@ -5133,10 +5142,10 @@ public enum Components { self.value1 = value1 } public init(from decoder: any Decoder) throws { - value1 = try .init(from: decoder) + self.value1 = try .init(from: decoder) } public func encode(to encoder: any Encoder) throws { - try value1.encode(to: encoder) + try self.value1.encode(to: encoder) } } /// A temporary private fork of the advisory's repository for collaborating on a fix. @@ -5261,111 +5270,111 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - ghsa_id = try container.decode( + self.ghsa_id = try container.decode( Swift.String.self, forKey: .ghsa_id ) - cve_id = try container.decodeIfPresent( + self.cve_id = try container.decodeIfPresent( Swift.String.self, forKey: .cve_id ) - url = try container.decode( + self.url = try container.decode( Swift.String.self, forKey: .url ) - html_url = try container.decode( + self.html_url = try container.decode( Swift.String.self, forKey: .html_url ) - summary = try container.decode( + self.summary = try container.decode( Swift.String.self, forKey: .summary ) - description = try container.decodeIfPresent( + self.description = try container.decodeIfPresent( Swift.String.self, forKey: .description ) - severity = try container.decodeIfPresent( + self.severity = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory.severityPayload.self, forKey: .severity ) - author = try container.decodeIfPresent( + self.author = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory.authorPayload.self, forKey: .author ) - publisher = try container.decodeIfPresent( + self.publisher = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory.publisherPayload.self, forKey: .publisher ) - identifiers = try container.decode( + self.identifiers = try container.decode( Components.Schemas.repository_hyphen_advisory.identifiersPayload.self, forKey: .identifiers ) - state = try container.decode( + self.state = try container.decode( Components.Schemas.repository_hyphen_advisory.statePayload.self, forKey: .state ) - created_at = try container.decodeIfPresent( + self.created_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .created_at ) - updated_at = try container.decodeIfPresent( + self.updated_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .updated_at ) - published_at = try container.decodeIfPresent( + self.published_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .published_at ) - closed_at = try container.decodeIfPresent( + self.closed_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .closed_at ) - withdrawn_at = try container.decodeIfPresent( + self.withdrawn_at = try container.decodeIfPresent( Foundation.Date.self, forKey: .withdrawn_at ) - submission = try container.decodeIfPresent( + self.submission = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory.submissionPayload.self, forKey: .submission ) - vulnerabilities = try container.decodeIfPresent( + self.vulnerabilities = try container.decodeIfPresent( [Components.Schemas.repository_hyphen_advisory_hyphen_vulnerability].self, forKey: .vulnerabilities ) - cvss = try container.decodeIfPresent( + self.cvss = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory.cvssPayload.self, forKey: .cvss ) - cvss_severities = try container.decodeIfPresent( + self.cvss_severities = try container.decodeIfPresent( Components.Schemas.cvss_hyphen_severities.self, forKey: .cvss_severities ) - cwes = try container.decodeIfPresent( + self.cwes = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory.cwesPayload.self, forKey: .cwes ) - cwe_ids = try container.decodeIfPresent( + self.cwe_ids = try container.decodeIfPresent( [Swift.String].self, forKey: .cwe_ids ) - credits = try container.decodeIfPresent( + self.credits = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory.creditsPayload.self, forKey: .credits ) - credits_detailed = try container.decodeIfPresent( + self.credits_detailed = try container.decodeIfPresent( [Components.Schemas.repository_hyphen_advisory_hyphen_credit].self, forKey: .credits_detailed ) - collaborating_users = try container.decodeIfPresent( + self.collaborating_users = try container.decodeIfPresent( [Components.Schemas.simple_hyphen_user].self, forKey: .collaborating_users ) - collaborating_teams = try container.decodeIfPresent( + self.collaborating_teams = try container.decodeIfPresent( [Components.Schemas.team].self, forKey: .collaborating_teams ) - private_fork = try container.decodeIfPresent( + self.private_fork = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory.private_forkPayload.self, forKey: .private_fork ) @@ -5485,19 +5494,19 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - package = try container.decode( + self.package = try container.decode( Components.Schemas.repository_hyphen_advisory_hyphen_create.vulnerabilitiesPayloadPayload.packagePayload.self, forKey: .package ) - vulnerable_version_range = try container.decodeIfPresent( + self.vulnerable_version_range = try container.decodeIfPresent( Swift.String.self, forKey: .vulnerable_version_range ) - patched_versions = try container.decodeIfPresent( + self.patched_versions = try container.decodeIfPresent( Swift.String.self, forKey: .patched_versions ) - vulnerable_functions = try container.decodeIfPresent( + self.vulnerable_functions = try container.decodeIfPresent( [Swift.String].self, forKey: .vulnerable_functions ) @@ -5547,11 +5556,11 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - login = try container.decode( + self.login = try container.decode( Swift.String.self, forKey: .login ) - _type = try container.decode( + self._type = try container.decode( Components.Schemas.security_hyphen_advisory_hyphen_credit_hyphen_types.self, forKey: ._type ) @@ -5572,7 +5581,7 @@ public enum Components { /// The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. /// /// - Remark: Generated from `#/components/schemas/repository-advisory-create/severity`. - @frozen public enum severityPayload: String, Codable, Hashable, Sendable { + @frozen public enum severityPayload: String, Codable, Hashable, Sendable, CaseIterable { case critical = "critical" case high = "high" case medium = "medium" @@ -5636,39 +5645,39 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - summary = try container.decode( + self.summary = try container.decode( Swift.String.self, forKey: .summary ) - description = try container.decode( + self.description = try container.decode( Swift.String.self, forKey: .description ) - cve_id = try container.decodeIfPresent( + self.cve_id = try container.decodeIfPresent( Swift.String.self, forKey: .cve_id ) - vulnerabilities = try container.decode( + self.vulnerabilities = try container.decode( Components.Schemas.repository_hyphen_advisory_hyphen_create.vulnerabilitiesPayload.self, forKey: .vulnerabilities ) - cwe_ids = try container.decodeIfPresent( + self.cwe_ids = try container.decodeIfPresent( [Swift.String].self, forKey: .cwe_ids ) - credits = try container.decodeIfPresent( + self.credits = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory_hyphen_create.creditsPayload.self, forKey: .credits ) - severity = try container.decodeIfPresent( + self.severity = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory_hyphen_create.severityPayload.self, forKey: .severity ) - cvss_vector_string = try container.decodeIfPresent( + self.cvss_vector_string = try container.decodeIfPresent( Swift.String.self, forKey: .cvss_vector_string ) - start_private_fork = try container.decodeIfPresent( + self.start_private_fork = try container.decodeIfPresent( Swift.Bool.self, forKey: .start_private_fork ) @@ -5766,19 +5775,19 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - package = try container.decode( + self.package = try container.decode( Components.Schemas.private_hyphen_vulnerability_hyphen_report_hyphen_create.vulnerabilitiesPayloadPayload.packagePayload.self, forKey: .package ) - vulnerable_version_range = try container.decodeIfPresent( + self.vulnerable_version_range = try container.decodeIfPresent( Swift.String.self, forKey: .vulnerable_version_range ) - patched_versions = try container.decodeIfPresent( + self.patched_versions = try container.decodeIfPresent( Swift.String.self, forKey: .patched_versions ) - vulnerable_functions = try container.decodeIfPresent( + self.vulnerable_functions = try container.decodeIfPresent( [Swift.String].self, forKey: .vulnerable_functions ) @@ -5805,7 +5814,7 @@ public enum Components { /// The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. /// /// - Remark: Generated from `#/components/schemas/private-vulnerability-report-create/severity`. - @frozen public enum severityPayload: String, Codable, Hashable, Sendable { + @frozen public enum severityPayload: String, Codable, Hashable, Sendable, CaseIterable { case critical = "critical" case high = "high" case medium = "medium" @@ -5861,31 +5870,31 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - summary = try container.decode( + self.summary = try container.decode( Swift.String.self, forKey: .summary ) - description = try container.decode( + self.description = try container.decode( Swift.String.self, forKey: .description ) - vulnerabilities = try container.decodeIfPresent( + self.vulnerabilities = try container.decodeIfPresent( Components.Schemas.private_hyphen_vulnerability_hyphen_report_hyphen_create.vulnerabilitiesPayload.self, forKey: .vulnerabilities ) - cwe_ids = try container.decodeIfPresent( + self.cwe_ids = try container.decodeIfPresent( [Swift.String].self, forKey: .cwe_ids ) - severity = try container.decodeIfPresent( + self.severity = try container.decodeIfPresent( Components.Schemas.private_hyphen_vulnerability_hyphen_report_hyphen_create.severityPayload.self, forKey: .severity ) - cvss_vector_string = try container.decodeIfPresent( + self.cvss_vector_string = try container.decodeIfPresent( Swift.String.self, forKey: .cvss_vector_string ) - start_private_fork = try container.decodeIfPresent( + self.start_private_fork = try container.decodeIfPresent( Swift.Bool.self, forKey: .start_private_fork ) @@ -5985,19 +5994,19 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - package = try container.decode( + self.package = try container.decode( Components.Schemas.repository_hyphen_advisory_hyphen_update.vulnerabilitiesPayloadPayload.packagePayload.self, forKey: .package ) - vulnerable_version_range = try container.decodeIfPresent( + self.vulnerable_version_range = try container.decodeIfPresent( Swift.String.self, forKey: .vulnerable_version_range ) - patched_versions = try container.decodeIfPresent( + self.patched_versions = try container.decodeIfPresent( Swift.String.self, forKey: .patched_versions ) - vulnerable_functions = try container.decodeIfPresent( + self.vulnerable_functions = try container.decodeIfPresent( [Swift.String].self, forKey: .vulnerable_functions ) @@ -6047,11 +6056,11 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - login = try container.decode( + self.login = try container.decode( Swift.String.self, forKey: .login ) - _type = try container.decode( + self._type = try container.decode( Components.Schemas.security_hyphen_advisory_hyphen_credit_hyphen_types.self, forKey: ._type ) @@ -6072,7 +6081,7 @@ public enum Components { /// The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. /// /// - Remark: Generated from `#/components/schemas/repository-advisory-update/severity`. - @frozen public enum severityPayload: String, Codable, Hashable, Sendable { + @frozen public enum severityPayload: String, Codable, Hashable, Sendable, CaseIterable { case critical = "critical" case high = "high" case medium = "medium" @@ -6089,7 +6098,7 @@ public enum Components { /// The state of the advisory. /// /// - Remark: Generated from `#/components/schemas/repository-advisory-update/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case published = "published" case closed = "closed" case draft = "draft" @@ -6160,47 +6169,47 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - summary = try container.decodeIfPresent( + self.summary = try container.decodeIfPresent( Swift.String.self, forKey: .summary ) - description = try container.decodeIfPresent( + self.description = try container.decodeIfPresent( Swift.String.self, forKey: .description ) - cve_id = try container.decodeIfPresent( + self.cve_id = try container.decodeIfPresent( Swift.String.self, forKey: .cve_id ) - vulnerabilities = try container.decodeIfPresent( + self.vulnerabilities = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory_hyphen_update.vulnerabilitiesPayload.self, forKey: .vulnerabilities ) - cwe_ids = try container.decodeIfPresent( + self.cwe_ids = try container.decodeIfPresent( [Swift.String].self, forKey: .cwe_ids ) - credits = try container.decodeIfPresent( + self.credits = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory_hyphen_update.creditsPayload.self, forKey: .credits ) - severity = try container.decodeIfPresent( + self.severity = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory_hyphen_update.severityPayload.self, forKey: .severity ) - cvss_vector_string = try container.decodeIfPresent( + self.cvss_vector_string = try container.decodeIfPresent( Swift.String.self, forKey: .cvss_vector_string ) - state = try container.decodeIfPresent( + self.state = try container.decodeIfPresent( Components.Schemas.repository_hyphen_advisory_hyphen_update.statePayload.self, forKey: .state ) - collaborating_users = try container.decodeIfPresent( + self.collaborating_users = try container.decodeIfPresent( [Swift.String].self, forKey: .collaborating_users ) - collaborating_teams = try container.decodeIfPresent( + self.collaborating_teams = try container.decodeIfPresent( [Swift.String].self, forKey: .collaborating_teams ) @@ -6233,7 +6242,7 @@ public enum Components { /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -6475,7 +6484,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/advisories/GET/query/ghsa_id`. public var ghsa_id: Swift.String? /// - Remark: Generated from `#/paths/advisories/GET/query/type`. - @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + @frozen public enum _typePayload: String, Codable, Hashable, Sendable, CaseIterable { case reviewed = "reviewed" case malware = "malware" case unreviewed = "unreviewed" @@ -6493,7 +6502,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/advisories/GET/query/ecosystem`. public var ecosystem: Components.Schemas.security_hyphen_advisory_hyphen_ecosystems? /// - Remark: Generated from `#/paths/advisories/GET/query/severity`. - @frozen public enum severityPayload: String, Codable, Hashable, Sendable { + @frozen public enum severityPayload: String, Codable, Hashable, Sendable, CaseIterable { case unknown = "unknown" case low = "low" case medium = "medium" @@ -6628,7 +6637,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/advisories/GET/query/after`. public var after: Components.Parameters.pagination_hyphen_after? /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -6641,7 +6650,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/advisories/GET/query/per_page`. public var per_page: Swift.Int? /// - Remark: Generated from `#/paths/advisories/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case updated = "updated" case published = "published" case epss_percentage = "epss_percentage" @@ -7081,7 +7090,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/security-advisories/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -7090,7 +7099,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/security-advisories/GET/query/direction`. public var direction: Components.Parameters.direction? /// - Remark: Generated from `#/paths/orgs/{org}/security-advisories/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case published = "published" @@ -7112,7 +7121,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/security-advisories/GET/query/per_page`. public var per_page: Swift.Int? /// - Remark: Generated from `#/paths/orgs/{org}/security-advisories/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case triage = "triage" case draft = "draft" case published = "published" @@ -7351,7 +7360,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/security-advisories/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -7360,7 +7369,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/security-advisories/GET/query/direction`. public var direction: Components.Parameters.direction? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/security-advisories/GET/query/sort`. - @frozen public enum sortPayload: String, Codable, Hashable, Sendable { + @frozen public enum sortPayload: String, Codable, Hashable, Sendable, CaseIterable { case created = "created" case updated = "updated" case published = "published" @@ -7382,7 +7391,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/security-advisories/GET/query/per_page`. public var per_page: Swift.Int? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/security-advisories/GET/query/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case triage = "triage" case draft = "draft" case published = "published" diff --git a/Sources/teams/Types.swift b/Sources/teams/Types.swift index 6dfa42c1bfa..08addd6c3ba 100644 --- a/Sources/teams/Types.swift +++ b/Sources/teams/Types.swift @@ -1973,6 +1973,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -2605,7 +2614,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. public struct advanced_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2627,7 +2636,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security`. public struct code_securityPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/code_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2653,7 +2662,7 @@ public enum Components { /// The enablement status of Dependabot security updates for the repository. /// /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2679,7 +2688,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. public struct secret_scanningPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2701,7 +2710,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2723,7 +2732,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -2745,7 +2754,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection`. public struct secret_scanning_ai_detectionPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_ai_detection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + @frozen public enum statusPayload: String, Codable, Hashable, Sendable, CaseIterable { case enabled = "enabled" case disabled = "disabled" } @@ -4125,7 +4134,7 @@ public enum Components { /// The level of privacy this team should have /// /// - Remark: Generated from `#/components/schemas/team-full/privacy`. - @frozen public enum privacyPayload: String, Codable, Hashable, Sendable { + @frozen public enum privacyPayload: String, Codable, Hashable, Sendable, CaseIterable { case closed = "closed" case secret = "secret" } @@ -4136,7 +4145,7 @@ public enum Components { /// The notification setting the team has set /// /// - Remark: Generated from `#/components/schemas/team-full/notification_setting`. - @frozen public enum notification_settingPayload: String, Codable, Hashable, Sendable { + @frozen public enum notification_settingPayload: String, Codable, Hashable, Sendable, CaseIterable { case notifications_enabled = "notifications_enabled" case notifications_disabled = "notifications_disabled" } @@ -4492,7 +4501,7 @@ public enum Components { /// The role of the user in the team. /// /// - Remark: Generated from `#/components/schemas/team-membership/role`. - @frozen public enum rolePayload: String, Codable, Hashable, Sendable { + @frozen public enum rolePayload: String, Codable, Hashable, Sendable, CaseIterable { case member = "member" case maintainer = "maintainer" } @@ -4503,7 +4512,7 @@ public enum Components { /// The state of the user's membership in the team. /// /// - Remark: Generated from `#/components/schemas/team-membership/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { + @frozen public enum statePayload: String, Codable, Hashable, Sendable, CaseIterable { case active = "active" case pending = "pending" } @@ -5306,7 +5315,7 @@ public enum Components { /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -5708,7 +5717,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/POST/requestBody/json/description`. public var description: Swift.String? - /// List GitHub IDs for organization members who will become team maintainers. + /// List GitHub usernames for organization members who will become team maintainers. /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/POST/requestBody/json/maintainers`. public var maintainers: [Swift.String]? @@ -5726,7 +5735,7 @@ public enum Operations { /// Default for child team: `closed` /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/POST/requestBody/json/privacy`. - @frozen public enum privacyPayload: String, Codable, Hashable, Sendable { + @frozen public enum privacyPayload: String, Codable, Hashable, Sendable, CaseIterable { case secret = "secret" case closed = "closed" } @@ -5747,7 +5756,7 @@ public enum Operations { /// Default: `notifications_enabled` /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/POST/requestBody/json/notification_setting`. - @frozen public enum notification_settingPayload: String, Codable, Hashable, Sendable { + @frozen public enum notification_settingPayload: String, Codable, Hashable, Sendable, CaseIterable { case notifications_enabled = "notifications_enabled" case notifications_disabled = "notifications_disabled" } @@ -5761,7 +5770,7 @@ public enum Operations { /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/POST/requestBody/json/permission`. - @frozen public enum permissionPayload: String, Codable, Hashable, Sendable { + @frozen public enum permissionPayload: String, Codable, Hashable, Sendable, CaseIterable { case pull = "pull" case push = "push" } @@ -5778,7 +5787,7 @@ public enum Operations { /// - Parameters: /// - name: The name of the team. /// - description: The description of the team. - /// - maintainers: List GitHub IDs for organization members who will become team maintainers. + /// - maintainers: List GitHub usernames for organization members who will become team maintainers. /// - repo_names: The full name (e.g., "organization-name/repository-name") of repositories to add the team to. /// - privacy: The level of privacy this team should have. The options are: /// - notification_setting: The notification setting the team has chosen. The options are: @@ -6198,7 +6207,7 @@ public enum Operations { /// * `closed` - visible to all members of this organization. /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/PATCH/requestBody/json/privacy`. - @frozen public enum privacyPayload: String, Codable, Hashable, Sendable { + @frozen public enum privacyPayload: String, Codable, Hashable, Sendable, CaseIterable { case secret = "secret" case closed = "closed" } @@ -6216,7 +6225,7 @@ public enum Operations { /// * `notifications_disabled` - no one receives notifications. /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/PATCH/requestBody/json/notification_setting`. - @frozen public enum notification_settingPayload: String, Codable, Hashable, Sendable { + @frozen public enum notification_settingPayload: String, Codable, Hashable, Sendable, CaseIterable { case notifications_enabled = "notifications_enabled" case notifications_disabled = "notifications_disabled" } @@ -6229,7 +6238,7 @@ public enum Operations { /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/PATCH/requestBody/json/permission`. - @frozen public enum permissionPayload: String, Codable, Hashable, Sendable { + @frozen public enum permissionPayload: String, Codable, Hashable, Sendable, CaseIterable { case pull = "pull" case push = "push" case admin = "admin" @@ -6555,6 +6564,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_delete_hyphen_in_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/delete(teams/delete-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6619,7 +6636,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/discussions/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -7387,6 +7404,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_delete_hyphen_discussion_hyphen_in_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/delete(teams/delete-discussion-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7458,7 +7483,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -8219,6 +8244,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_delete_hyphen_discussion_hyphen_comment_hyphen_in_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/delete(teams/delete-discussion-comment-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -8470,7 +8503,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/members/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/members/GET/query/role`. - @frozen public enum rolePayload: String, Codable, Hashable, Sendable { + @frozen public enum rolePayload: String, Codable, Hashable, Sendable, CaseIterable { case member = "member" case maintainer = "maintainer" case all = "all" @@ -8771,6 +8804,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.teams_sol_get_hyphen_membership_hyphen_for_hyphen_user_hyphen_in_hyphen_org.Output.NotFound) + /// if user has no team membership + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/get(teams/get-membership-for-user-in-org)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -8890,7 +8931,7 @@ public enum Operations { /// The role that this user should have in the team. /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/memberships/{username}/PUT/requestBody/json/role`. - @frozen public enum rolePayload: String, Codable, Hashable, Sendable { + @frozen public enum rolePayload: String, Codable, Hashable, Sendable, CaseIterable { case member = "member" case maintainer = "maintainer" } @@ -8991,6 +9032,14 @@ public enum Operations { /// /// HTTP response code: `403 forbidden`. case forbidden(Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_membership_hyphen_for_hyphen_user_hyphen_in_hyphen_org.Output.Forbidden) + /// Forbidden if team synchronization is set up + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/put(teams/add-or-update-membership-for-user-in-org)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + public static var forbidden: Self { + .forbidden(.init()) + } /// The associated value of the enum case if `self` is `.forbidden`. /// /// - Throws: An error if `self` is not `.forbidden`. @@ -9018,6 +9067,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_membership_hyphen_for_hyphen_user_hyphen_in_hyphen_org.Output.UnprocessableContent) + /// Unprocessable Entity if you attempt to add an organization to a team + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/put(teams/add-or-update-membership-for-user-in-org)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -9133,6 +9190,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_remove_hyphen_membership_hyphen_for_hyphen_user_hyphen_in_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/delete(teams/remove-membership-for-user-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -9160,6 +9225,14 @@ public enum Operations { /// /// HTTP response code: `403 forbidden`. case forbidden(Operations.teams_sol_remove_hyphen_membership_hyphen_for_hyphen_user_hyphen_in_hyphen_org.Output.Forbidden) + /// Forbidden if team synchronization is set up + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/delete(teams/remove-membership-for-user-in-org)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + public static var forbidden: Self { + .forbidden(.init()) + } /// The associated value of the enum case if `self` is `.forbidden`. /// /// - Throws: An error if `self` is not `.forbidden`. @@ -9501,6 +9574,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_project_hyphen_in_hyphen_org.Output.NotFound) + /// Not Found if project is not managed by this team + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/get(teams/check-permissions-for-project-in-org)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -9610,7 +9691,7 @@ public enum Operations { /// The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// /// - Remark: Generated from `#/paths/orgs/{org}/teams/{team_slug}/projects/{project_id}/PUT/requestBody/json/permission`. - @frozen public enum permissionPayload: String, Codable, Hashable, Sendable { + @frozen public enum permissionPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -9661,6 +9742,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_project_hyphen_permissions_hyphen_in_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/put(teams/add-or-update-project-permissions-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -9844,6 +9933,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_remove_hyphen_project_hyphen_in_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/delete(teams/remove-project-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -10200,6 +10297,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_repo_hyphen_in_hyphen_org.Output.NoContent) + /// Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/get(teams/check-permissions-for-repo-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -10227,6 +10332,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_repo_hyphen_in_hyphen_org.Output.NotFound) + /// Not Found if team does not have permission for the repository + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/get(teams/check-permissions-for-repo-in-org)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -10374,6 +10487,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_repo_hyphen_permissions_hyphen_in_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/put(teams/add-or-update-repo-permissions-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -10466,6 +10587,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_remove_hyphen_repo_hyphen_in_hyphen_org.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/delete(teams/remove-repo-in-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -10897,7 +11026,7 @@ public enum Operations { /// * `closed` - visible to all members of this organization. /// /// - Remark: Generated from `#/paths/teams/{team_id}/PATCH/requestBody/json/privacy`. - @frozen public enum privacyPayload: String, Codable, Hashable, Sendable { + @frozen public enum privacyPayload: String, Codable, Hashable, Sendable, CaseIterable { case secret = "secret" case closed = "closed" } @@ -10915,7 +11044,7 @@ public enum Operations { /// * `notifications_disabled` - no one receives notifications. /// /// - Remark: Generated from `#/paths/teams/{team_id}/PATCH/requestBody/json/notification_setting`. - @frozen public enum notification_settingPayload: String, Codable, Hashable, Sendable { + @frozen public enum notification_settingPayload: String, Codable, Hashable, Sendable, CaseIterable { case notifications_enabled = "notifications_enabled" case notifications_disabled = "notifications_disabled" } @@ -10928,7 +11057,7 @@ public enum Operations { /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. /// /// - Remark: Generated from `#/paths/teams/{team_id}/PATCH/requestBody/json/permission`. - @frozen public enum permissionPayload: String, Codable, Hashable, Sendable { + @frozen public enum permissionPayload: String, Codable, Hashable, Sendable, CaseIterable { case pull = "pull" case push = "push" case admin = "admin" @@ -11262,6 +11391,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_delete_hyphen_legacy.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/delete(teams/delete-legacy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -11388,7 +11525,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/teams/{team_id}/discussions/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -12119,6 +12256,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_delete_hyphen_discussion_hyphen_legacy.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/discussions/{discussion_number}/delete(teams/delete-discussion-legacy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -12183,7 +12328,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/teams/{team_id}/discussions/{discussion_number}/comments/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { + @frozen public enum direction: String, Codable, Hashable, Sendable, CaseIterable { case asc = "asc" case desc = "desc" } @@ -12916,6 +13061,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_delete_hyphen_discussion_hyphen_comment_hyphen_legacy.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/delete(teams/delete-discussion-comment-legacy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -13150,7 +13303,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/teams/{team_id}/members/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/teams/{team_id}/members/GET/query/role`. - @frozen public enum rolePayload: String, Codable, Hashable, Sendable { + @frozen public enum rolePayload: String, Codable, Hashable, Sendable, CaseIterable { case member = "member" case maintainer = "maintainer" case all = "all" @@ -13393,6 +13546,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_get_hyphen_member_hyphen_legacy.Output.NoContent) + /// if user is a member + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/get(teams/get-member-legacy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -13420,6 +13581,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.teams_sol_get_hyphen_member_hyphen_legacy.Output.NotFound) + /// if user is not a member + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/get(teams/get-member-legacy)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -13523,6 +13692,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_add_hyphen_member_hyphen_legacy.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/put(teams/add-member-legacy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -13550,6 +13727,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.teams_sol_add_hyphen_member_hyphen_legacy.Output.NotFound) + /// Not Found if team synchronization is set up + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/put(teams/add-member-legacy)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -13577,6 +13762,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.teams_sol_add_hyphen_member_hyphen_legacy.Output.UnprocessableContent) + /// Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/put(teams/add-member-legacy)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -13709,6 +13902,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_remove_hyphen_member_hyphen_legacy.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/delete(teams/remove-member-legacy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -13736,6 +13937,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.teams_sol_remove_hyphen_member_hyphen_legacy.Output.NotFound) + /// Not Found if team synchronization is setup + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/delete(teams/remove-member-legacy)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -13997,7 +14206,7 @@ public enum Operations { /// The role that this user should have in the team. /// /// - Remark: Generated from `#/paths/teams/{team_id}/memberships/{username}/PUT/requestBody/json/role`. - @frozen public enum rolePayload: String, Codable, Hashable, Sendable { + @frozen public enum rolePayload: String, Codable, Hashable, Sendable, CaseIterable { case member = "member" case maintainer = "maintainer" } @@ -14098,6 +14307,14 @@ public enum Operations { /// /// HTTP response code: `403 forbidden`. case forbidden(Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Output.Forbidden) + /// Forbidden if team synchronization is set up + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/memberships/{username}/put(teams/add-or-update-membership-for-user-legacy)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + public static var forbidden: Self { + .forbidden(.init()) + } /// The associated value of the enum case if `self` is `.forbidden`. /// /// - Throws: An error if `self` is not `.forbidden`. @@ -14125,6 +14342,14 @@ public enum Operations { /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Output.UnprocessableContent) + /// Unprocessable Entity if you attempt to add an organization to a team + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/memberships/{username}/put(teams/add-or-update-membership-for-user-legacy)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + public static var unprocessableContent: Self { + .unprocessableContent(.init()) + } /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. @@ -14256,6 +14481,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_remove_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/memberships/{username}/delete(teams/remove-membership-for-user-legacy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -14283,6 +14516,14 @@ public enum Operations { /// /// HTTP response code: `403 forbidden`. case forbidden(Operations.teams_sol_remove_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Output.Forbidden) + /// if team synchronization is set up + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/memberships/{username}/delete(teams/remove-membership-for-user-legacy)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + public static var forbidden: Self { + .forbidden(.init()) + } /// The associated value of the enum case if `self` is `.forbidden`. /// /// - Throws: An error if `self` is not `.forbidden`. @@ -14631,6 +14872,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_project_hyphen_legacy.Output.NotFound) + /// Not Found if project is not managed by this team + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/projects/{project_id}/get(teams/check-permissions-for-project-legacy)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -14733,7 +14982,7 @@ public enum Operations { /// The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// /// - Remark: Generated from `#/paths/teams/{team_id}/projects/{project_id}/PUT/requestBody/json/permission`. - @frozen public enum permissionPayload: String, Codable, Hashable, Sendable { + @frozen public enum permissionPayload: String, Codable, Hashable, Sendable, CaseIterable { case read = "read" case write = "write" case admin = "admin" @@ -14784,6 +15033,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_project_hyphen_permissions_hyphen_legacy.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/projects/{project_id}/put(teams/add-or-update-project-permissions-legacy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15023,6 +15280,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_remove_hyphen_project_hyphen_legacy.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/projects/{project_id}/delete(teams/remove-project-legacy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15452,6 +15717,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_repo_hyphen_legacy.Output.NoContent) + /// Response if repository is managed by this team + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/repos/{owner}/{repo}/get(teams/check-permissions-for-repo-legacy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15479,6 +15752,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_repo_hyphen_legacy.Output.NotFound) + /// Not Found if repository is not managed by this team + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/repos/{owner}/{repo}/get(teams/check-permissions-for-repo-legacy)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -15591,7 +15872,7 @@ public enum Operations { /// The permission to grant the team on this repository. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. /// /// - Remark: Generated from `#/paths/teams/{team_id}/repos/{owner}/{repo}/PUT/requestBody/json/permission`. - @frozen public enum permissionPayload: String, Codable, Hashable, Sendable { + @frozen public enum permissionPayload: String, Codable, Hashable, Sendable, CaseIterable { case pull = "pull" case push = "push" case admin = "admin" @@ -15642,6 +15923,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_repo_hyphen_permissions_hyphen_legacy.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/repos/{owner}/{repo}/put(teams/add-or-update-repo-permissions-legacy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -15798,6 +16087,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.teams_sol_remove_hyphen_repo_hyphen_legacy.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//teams/{team_id}/repos/{owner}/{repo}/delete(teams/remove-repo-legacy)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -16209,6 +16506,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/teams/get(teams/list-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. diff --git a/Sources/users/Types.swift b/Sources/users/Types.swift index 0e488ea2f03..4772b64d5ff 100644 --- a/Sources/users/Types.swift +++ b/Sources/users/Types.swift @@ -1087,6 +1087,15 @@ extension APIProtocol { /// Server URLs defined in the OpenAPI document. public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") public static func server1() throws -> Foundation.URL { try Foundation.URL( validatingOpenAPIServerURL: "https://api.github.com", @@ -1695,163 +1704,163 @@ public enum Components { } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - login = try container.decode( + self.login = try container.decode( Swift.String.self, forKey: .login ) - id = try container.decode( + self.id = try container.decode( Swift.Int64.self, forKey: .id ) - user_view_type = try container.decodeIfPresent( + self.user_view_type = try container.decodeIfPresent( Swift.String.self, forKey: .user_view_type ) - node_id = try container.decode( + self.node_id = try container.decode( Swift.String.self, forKey: .node_id ) - avatar_url = try container.decode( + self.avatar_url = try container.decode( Swift.String.self, forKey: .avatar_url ) - gravatar_id = try container.decodeIfPresent( + self.gravatar_id = try container.decodeIfPresent( Swift.String.self, forKey: .gravatar_id ) - url = try container.decode( + self.url = try container.decode( Swift.String.self, forKey: .url ) - html_url = try container.decode( + self.html_url = try container.decode( Swift.String.self, forKey: .html_url ) - followers_url = try container.decode( + self.followers_url = try container.decode( Swift.String.self, forKey: .followers_url ) - following_url = try container.decode( + self.following_url = try container.decode( Swift.String.self, forKey: .following_url ) - gists_url = try container.decode( + self.gists_url = try container.decode( Swift.String.self, forKey: .gists_url ) - starred_url = try container.decode( + self.starred_url = try container.decode( Swift.String.self, forKey: .starred_url ) - subscriptions_url = try container.decode( + self.subscriptions_url = try container.decode( Swift.String.self, forKey: .subscriptions_url ) - organizations_url = try container.decode( + self.organizations_url = try container.decode( Swift.String.self, forKey: .organizations_url ) - repos_url = try container.decode( + self.repos_url = try container.decode( Swift.String.self, forKey: .repos_url ) - events_url = try container.decode( + self.events_url = try container.decode( Swift.String.self, forKey: .events_url ) - received_events_url = try container.decode( + self.received_events_url = try container.decode( Swift.String.self, forKey: .received_events_url ) - _type = try container.decode( + self._type = try container.decode( Swift.String.self, forKey: ._type ) - site_admin = try container.decode( + self.site_admin = try container.decode( Swift.Bool.self, forKey: .site_admin ) - name = try container.decodeIfPresent( + self.name = try container.decodeIfPresent( Swift.String.self, forKey: .name ) - company = try container.decodeIfPresent( + self.company = try container.decodeIfPresent( Swift.String.self, forKey: .company ) - blog = try container.decodeIfPresent( + self.blog = try container.decodeIfPresent( Swift.String.self, forKey: .blog ) - location = try container.decodeIfPresent( + self.location = try container.decodeIfPresent( Swift.String.self, forKey: .location ) - email = try container.decodeIfPresent( + self.email = try container.decodeIfPresent( Swift.String.self, forKey: .email ) - notification_email = try container.decodeIfPresent( + self.notification_email = try container.decodeIfPresent( Swift.String.self, forKey: .notification_email ) - hireable = try container.decodeIfPresent( + self.hireable = try container.decodeIfPresent( Swift.Bool.self, forKey: .hireable ) - bio = try container.decodeIfPresent( + self.bio = try container.decodeIfPresent( Swift.String.self, forKey: .bio ) - twitter_username = try container.decodeIfPresent( + self.twitter_username = try container.decodeIfPresent( Swift.String.self, forKey: .twitter_username ) - public_repos = try container.decode( + self.public_repos = try container.decode( Swift.Int.self, forKey: .public_repos ) - public_gists = try container.decode( + self.public_gists = try container.decode( Swift.Int.self, forKey: .public_gists ) - followers = try container.decode( + self.followers = try container.decode( Swift.Int.self, forKey: .followers ) - following = try container.decode( + self.following = try container.decode( Swift.Int.self, forKey: .following ) - created_at = try container.decode( + self.created_at = try container.decode( Foundation.Date.self, forKey: .created_at ) - updated_at = try container.decode( + self.updated_at = try container.decode( Foundation.Date.self, forKey: .updated_at ) - plan = try container.decodeIfPresent( + self.plan = try container.decodeIfPresent( Components.Schemas.public_hyphen_user.planPayload.self, forKey: .plan ) - private_gists = try container.decodeIfPresent( + self.private_gists = try container.decodeIfPresent( Swift.Int.self, forKey: .private_gists ) - total_private_repos = try container.decodeIfPresent( + self.total_private_repos = try container.decodeIfPresent( Swift.Int.self, forKey: .total_private_repos ) - owned_private_repos = try container.decodeIfPresent( + self.owned_private_repos = try container.decodeIfPresent( Swift.Int.self, forKey: .owned_private_repos ) - disk_usage = try container.decodeIfPresent( + self.disk_usage = try container.decodeIfPresent( Swift.Int.self, forKey: .disk_usage ) - collaborators = try container.decodeIfPresent( + self.collaborators = try container.decodeIfPresent( Swift.Int.self, forKey: .collaborators ) @@ -2984,6 +2993,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/get(users/get-authenticated)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -3251,6 +3268,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/patch(users/update-authenticated)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -3507,6 +3532,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/blocks/get(users/list-blocked-by-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -3684,6 +3717,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_check_hyphen_blocked.Output.NoContent) + /// If the user is blocked + /// + /// - Remark: Generated from `#/paths//user/blocks/{username}/get(users/check-blocked)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -3758,6 +3799,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/blocks/{username}/get(users/check-blocked)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -3912,6 +3961,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_block.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/blocks/{username}/put(users/block)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -3935,6 +3992,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/blocks/{username}/put(users/block)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4135,6 +4200,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_unblock.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/blocks/{username}/delete(users/unblock)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -4158,6 +4231,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/blocks/{username}/delete(users/unblock)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4303,7 +4384,7 @@ public enum Operations { /// Denotes whether an email is publicly visible. /// /// - Remark: Generated from `#/paths/user/email/visibility/PATCH/requestBody/json/visibility`. - @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable { + @frozen public enum visibilityPayload: String, Codable, Hashable, Sendable, CaseIterable { case _public = "public" case _private = "private" } @@ -4397,6 +4478,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/email/visibility/patch(users/set-primary-email-visibility-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4675,6 +4764,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/emails/get(users/list-emails-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -4975,6 +5072,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/emails/post(users/add-email-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5209,6 +5314,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_delete_hyphen_email_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/emails/delete(users/delete-email-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5232,6 +5345,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/emails/delete(users/delete-email-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5507,6 +5628,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/followers/get(users/list-followers-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5736,6 +5865,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/following/get(users/list-followed-by-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -5890,6 +6027,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_check_hyphen_person_hyphen_is_hyphen_followed_hyphen_by_hyphen_authenticated.Output.NoContent) + /// if the person is followed by the authenticated user + /// + /// - Remark: Generated from `#/paths//user/following/{username}/get(users/check-person-is-followed-by-authenticated)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -5964,6 +6109,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/following/{username}/get(users/check-person-is-followed-by-authenticated)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6120,6 +6273,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_follow.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/following/{username}/put(users/follow)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6143,6 +6304,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/following/{username}/put(users/follow)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6343,6 +6512,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_unfollow.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/following/{username}/delete(users/unfollow)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -6366,6 +6543,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/following/{username}/delete(users/unfollow)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6620,6 +6805,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/gpg_keys/get(users/list-gpg-keys-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -6887,6 +7080,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/gpg_keys/post(users/create-gpg-key-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7136,6 +7337,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/gpg_keys/{gpg_key_id}/get(users/get-gpg-key-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7292,6 +7501,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_delete_hyphen_gpg_hyphen_key_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/gpg_keys/{gpg_key_id}/delete(users/delete-gpg-key-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -7361,6 +7578,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/gpg_keys/{gpg_key_id}/delete(users/delete-gpg-key-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7592,6 +7817,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/keys/get(users/list-public-ssh-keys-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -7859,6 +8092,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/keys/post(users/create-public-ssh-key-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -8108,6 +8349,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/keys/{key_id}/get(users/get-public-ssh-key-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -8264,6 +8513,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_delete_hyphen_public_hyphen_ssh_hyphen_key_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/keys/{key_id}/delete(users/delete-public-ssh-key-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -8287,6 +8544,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/keys/{key_id}/delete(users/delete-public-ssh-key-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -8543,6 +8808,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/public_emails/get(users/list-public-emails-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -8795,6 +9068,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/social_accounts/get(users/list-social-accounts-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -9052,6 +9333,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/social_accounts/post(users/add-social-account-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -9239,6 +9528,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_delete_hyphen_social_hyphen_account_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/social_accounts/delete(users/delete-social-account-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -9285,6 +9582,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/social_accounts/delete(users/delete-social-account-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -9539,6 +9844,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/ssh_signing_keys/get(users/list-ssh-signing-keys-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -9806,6 +10119,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/ssh_signing_keys/post(users/create-ssh-signing-key-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -10055,6 +10376,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/ssh_signing_keys/{ssh_signing_key_id}/get(users/get-ssh-signing-key-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -10211,6 +10540,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_delete_hyphen_ssh_hyphen_signing_hyphen_key_hyphen_for_hyphen_authenticated_hyphen_user.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//user/ssh_signing_keys/{ssh_signing_key_id}/delete(users/delete-ssh-signing-key-for-authenticated-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -10234,6 +10571,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//user/ssh_signing_keys/{ssh_signing_key_id}/delete(users/delete-ssh-signing-key-for-authenticated-user)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -10686,6 +11031,14 @@ public enum Operations { /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.not_modified) + /// Not modified + /// + /// - Remark: Generated from `#/paths//users/get(users/list)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + public static var notModified: Self { + .notModified(.init()) + } /// The associated value of the enum case if `self` is `.notModified`. /// /// - Throws: An error if `self` is not `.notModified`. @@ -11266,6 +11619,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_list_hyphen_attestations.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -11743,6 +12104,14 @@ public enum Operations { /// /// HTTP response code: `204 noContent`. case noContent(Operations.users_sol_check_hyphen_following_hyphen_for_hyphen_user.Output.NoContent) + /// if the user follows the target user + /// + /// - Remark: Generated from `#/paths//users/{username}/following/{target_user}/get(users/check-following-for-user)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. @@ -11770,6 +12139,14 @@ public enum Operations { /// /// HTTP response code: `404 notFound`. case notFound(Operations.users_sol_check_hyphen_following_hyphen_for_hyphen_user.Output.NotFound) + /// if the user does not follow the target user + /// + /// - Remark: Generated from `#/paths//users/{username}/following/{target_user}/get(users/check-following-for-user)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. @@ -12002,7 +12379,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/hovercard/GET/query`. public struct Query: Sendable, Hashable { /// - Remark: Generated from `#/paths/users/{username}/hovercard/GET/query/subject_type`. - @frozen public enum subject_typePayload: String, Codable, Hashable, Sendable { + @frozen public enum subject_typePayload: String, Codable, Hashable, Sendable, CaseIterable { case organization = "organization" case repository = "repository" case issue = "issue" diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 8af3e59120f..0956844c508 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 8af3e59120fdf6294e2d385bdae74b39fa824da5 +Subproject commit 0956844c50850685dce43634d73a69f4dac7989e