@@ -13909,6 +13909,109 @@ public struct Client: APIProtocol {
1390913909 }
1391013910 )
1391113911 }
13912+ /// Create or update custom property values for a repository
13913+ ///
13914+ /// Create new or update existing custom property values for a repository.
13915+ /// Using a value of `null` for a custom property will remove or 'unset' the property value from the repository.
13916+ ///
13917+ /// Repository admins and other users with the repository-level "edit custom property values" fine-grained permission can use this endpoint.
13918+ ///
13919+ /// GitHub Apps must have the `repository_custom_properties:write` permission to use this endpoint.
13920+ ///
13921+ /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/properties/values`.
13922+ /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/properties/values/patch(repos/create-or-update-custom-properties-values)`.
13923+ public func repos_sol_create_hyphen_or_hyphen_update_hyphen_custom_hyphen_properties_hyphen_values(_ input: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_custom_hyphen_properties_hyphen_values.Input) async throws -> Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_custom_hyphen_properties_hyphen_values.Output {
13924+ try await client.send(
13925+ input: input,
13926+ forOperation: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_custom_hyphen_properties_hyphen_values.id,
13927+ serializer: { input in
13928+ let path = try converter.renderedPath(
13929+ template: "/repos/{}/{}/properties/values",
13930+ parameters: [
13931+ input.path.owner,
13932+ input.path.repo
13933+ ]
13934+ )
13935+ var request: HTTPTypes.HTTPRequest = .init(
13936+ soar_path: path,
13937+ method: .patch
13938+ )
13939+ suppressMutabilityWarning(&request)
13940+ converter.setAcceptHeader(
13941+ in: &request.headerFields,
13942+ contentTypes: input.headers.accept
13943+ )
13944+ let body: OpenAPIRuntime.HTTPBody?
13945+ switch input.body {
13946+ case let .json(value):
13947+ body = try converter.setRequiredRequestBodyAsJSON(
13948+ value,
13949+ headerFields: &request.headerFields,
13950+ contentType: "application/json; charset=utf-8"
13951+ )
13952+ }
13953+ return (request, body)
13954+ },
13955+ deserializer: { response, responseBody in
13956+ switch response.status.code {
13957+ case 204:
13958+ return .noContent(.init())
13959+ case 403:
13960+ let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
13961+ let body: Components.Responses.forbidden.Body
13962+ let chosenContentType = try converter.bestContentType(
13963+ received: contentType,
13964+ options: [
13965+ "application/json"
13966+ ]
13967+ )
13968+ switch chosenContentType {
13969+ case "application/json":
13970+ body = try await converter.getResponseBodyAsJSON(
13971+ Components.Schemas.basic_hyphen_error.self,
13972+ from: responseBody,
13973+ transforming: { value in
13974+ .json(value)
13975+ }
13976+ )
13977+ default:
13978+ preconditionFailure("bestContentType chose an invalid content type.")
13979+ }
13980+ return .forbidden(.init(body: body))
13981+ case 404:
13982+ let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
13983+ let body: Components.Responses.not_found.Body
13984+ let chosenContentType = try converter.bestContentType(
13985+ received: contentType,
13986+ options: [
13987+ "application/json"
13988+ ]
13989+ )
13990+ switch chosenContentType {
13991+ case "application/json":
13992+ body = try await converter.getResponseBodyAsJSON(
13993+ Components.Schemas.basic_hyphen_error.self,
13994+ from: responseBody,
13995+ transforming: { value in
13996+ .json(value)
13997+ }
13998+ )
13999+ default:
14000+ preconditionFailure("bestContentType chose an invalid content type.")
14001+ }
14002+ return .notFound(.init(body: body))
14003+ default:
14004+ return .undocumented(
14005+ statusCode: response.status.code,
14006+ .init(
14007+ headerFields: response.headerFields,
14008+ body: responseBody
14009+ )
14010+ )
14011+ }
14012+ }
14013+ )
14014+ }
1391214015 /// Get a repository README
1391314016 ///
1391414017 /// Gets the preferred README for a repository.
0 commit comments