Skip to content

Commit

Permalink
Detect optional parameters that have "pass null" in their description
Browse files Browse the repository at this point in the history
  • Loading branch information
nikstar committed Jun 16, 2023
1 parent d35f8cc commit 785c780
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 72 deletions.
12 changes: 6 additions & 6 deletions Sources/TDLibKit/Generated/Models/InputIdentityDocument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Foundation
public struct InputIdentityDocument: Codable, Equatable, Hashable {

/// Document expiry date; pass null if not applicable
public let expiryDate: Date
public let expiryDate: Date?

/// Front side of the document
public let frontSide: InputFile
Expand All @@ -23,21 +23,21 @@ public struct InputIdentityDocument: Codable, Equatable, Hashable {
public let number: String

/// Reverse side of the document; only for driver license and identity card; pass null otherwise
public let reverseSide: InputFile
public let reverseSide: InputFile?

/// Selfie with the document; pass null if unavailable
public let selfie: InputFile
public let selfie: InputFile?

/// List of files containing a certified English translation of the document
public let translation: [InputFile]


public init(
expiryDate: Date,
expiryDate: Date?,
frontSide: InputFile,
number: String,
reverseSide: InputFile,
selfie: InputFile,
reverseSide: InputFile?,
selfie: InputFile?,
translation: [InputFile]
) {
self.expiryDate = expiryDate
Expand Down
48 changes: 24 additions & 24 deletions Sources/TDLibKit/Generated/Models/InputInlineQueryResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public struct InputInlineQueryResultAnimation: Codable, Equatable, Hashable, Ide
public let inputMessageContent: InputMessageContent

/// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
public let replyMarkup: ReplyMarkup
public let replyMarkup: ReplyMarkup?

/// MIME type of the video thumbnail. If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4"
public let thumbnailMimeType: String
Expand Down Expand Up @@ -191,7 +191,7 @@ public struct InputInlineQueryResultAnimation: Codable, Equatable, Hashable, Ide
public init(
id: String,
inputMessageContent: InputMessageContent,
replyMarkup: ReplyMarkup,
replyMarkup: ReplyMarkup?,
thumbnailMimeType: String,
thumbnailUrl: String,
title: String,
Expand Down Expand Up @@ -230,7 +230,7 @@ public struct InputInlineQueryResultArticle: Codable, Equatable, Hashable, Ident
public let inputMessageContent: InputMessageContent

/// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
public let replyMarkup: ReplyMarkup
public let replyMarkup: ReplyMarkup?

/// Thumbnail height, if known
public let thumbnailHeight: Int
Expand All @@ -253,7 +253,7 @@ public struct InputInlineQueryResultArticle: Codable, Equatable, Hashable, Ident
hideUrl: Bool,
id: String,
inputMessageContent: InputMessageContent,
replyMarkup: ReplyMarkup,
replyMarkup: ReplyMarkup?,
thumbnailHeight: Int,
thumbnailUrl: String,
thumbnailWidth: Int,
Expand Down Expand Up @@ -292,7 +292,7 @@ public struct InputInlineQueryResultAudio: Codable, Equatable, Hashable, Identif
public let performer: String

/// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
public let replyMarkup: ReplyMarkup
public let replyMarkup: ReplyMarkup?

/// Title of the audio file
public let title: String
Expand All @@ -304,7 +304,7 @@ public struct InputInlineQueryResultAudio: Codable, Equatable, Hashable, Identif
id: String,
inputMessageContent: InputMessageContent,
performer: String,
replyMarkup: ReplyMarkup,
replyMarkup: ReplyMarkup?,
title: String
) {
self.audioDuration = audioDuration
Expand All @@ -330,7 +330,7 @@ public struct InputInlineQueryResultContact: Codable, Equatable, Hashable, Ident
public let inputMessageContent: InputMessageContent

/// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
public let replyMarkup: ReplyMarkup
public let replyMarkup: ReplyMarkup?

/// Thumbnail height, if known
public let thumbnailHeight: Int
Expand All @@ -346,7 +346,7 @@ public struct InputInlineQueryResultContact: Codable, Equatable, Hashable, Ident
contact: Contact,
id: String,
inputMessageContent: InputMessageContent,
replyMarkup: ReplyMarkup,
replyMarkup: ReplyMarkup?,
thumbnailHeight: Int,
thumbnailUrl: String,
thumbnailWidth: Int
Expand Down Expand Up @@ -379,7 +379,7 @@ public struct InputInlineQueryResultDocument: Codable, Equatable, Hashable, Iden
public let mimeType: String

/// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
public let replyMarkup: ReplyMarkup
public let replyMarkup: ReplyMarkup?

/// Height of the thumbnail
public let thumbnailHeight: Int
Expand All @@ -400,7 +400,7 @@ public struct InputInlineQueryResultDocument: Codable, Equatable, Hashable, Iden
id: String,
inputMessageContent: InputMessageContent,
mimeType: String,
replyMarkup: ReplyMarkup,
replyMarkup: ReplyMarkup?,
thumbnailHeight: Int,
thumbnailUrl: String,
thumbnailWidth: Int,
Expand Down Expand Up @@ -429,13 +429,13 @@ public struct InputInlineQueryResultGame: Codable, Equatable, Hashable, Identifi
public let id: String

/// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
public let replyMarkup: ReplyMarkup
public let replyMarkup: ReplyMarkup?


public init(
gameShortName: String,
id: String,
replyMarkup: ReplyMarkup
replyMarkup: ReplyMarkup?
) {
self.gameShortName = gameShortName
self.id = id
Expand All @@ -459,7 +459,7 @@ public struct InputInlineQueryResultLocation: Codable, Equatable, Hashable, Iden
public let location: Location

/// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
public let replyMarkup: ReplyMarkup
public let replyMarkup: ReplyMarkup?

/// Thumbnail height, if known
public let thumbnailHeight: Int
Expand All @@ -479,7 +479,7 @@ public struct InputInlineQueryResultLocation: Codable, Equatable, Hashable, Iden
inputMessageContent: InputMessageContent,
livePeriod: Int,
location: Location,
replyMarkup: ReplyMarkup,
replyMarkup: ReplyMarkup?,
thumbnailHeight: Int,
thumbnailUrl: String,
thumbnailWidth: Int,
Expand Down Expand Up @@ -518,7 +518,7 @@ public struct InputInlineQueryResultPhoto: Codable, Equatable, Hashable, Identif
public let photoWidth: Int

/// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
public let replyMarkup: ReplyMarkup
public let replyMarkup: ReplyMarkup?

/// URL of the photo thumbnail, if it exists
public let thumbnailUrl: String
Expand All @@ -534,7 +534,7 @@ public struct InputInlineQueryResultPhoto: Codable, Equatable, Hashable, Identif
photoHeight: Int,
photoUrl: String,
photoWidth: Int,
replyMarkup: ReplyMarkup,
replyMarkup: ReplyMarkup?,
thumbnailUrl: String,
title: String
) {
Expand All @@ -560,7 +560,7 @@ public struct InputInlineQueryResultSticker: Codable, Equatable, Hashable, Ident
public let inputMessageContent: InputMessageContent

/// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
public let replyMarkup: ReplyMarkup
public let replyMarkup: ReplyMarkup?

/// Height of the sticker
public let stickerHeight: Int
Expand All @@ -578,7 +578,7 @@ public struct InputInlineQueryResultSticker: Codable, Equatable, Hashable, Ident
public init(
id: String,
inputMessageContent: InputMessageContent,
replyMarkup: ReplyMarkup,
replyMarkup: ReplyMarkup?,
stickerHeight: Int,
stickerUrl: String,
stickerWidth: Int,
Expand All @@ -604,7 +604,7 @@ public struct InputInlineQueryResultVenue: Codable, Equatable, Hashable, Identif
public let inputMessageContent: InputMessageContent

/// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
public let replyMarkup: ReplyMarkup
public let replyMarkup: ReplyMarkup?

/// Thumbnail height, if known
public let thumbnailHeight: Int
Expand All @@ -622,7 +622,7 @@ public struct InputInlineQueryResultVenue: Codable, Equatable, Hashable, Identif
public init(
id: String,
inputMessageContent: InputMessageContent,
replyMarkup: ReplyMarkup,
replyMarkup: ReplyMarkup?,
thumbnailHeight: Int,
thumbnailUrl: String,
thumbnailWidth: Int,
Expand Down Expand Up @@ -653,7 +653,7 @@ public struct InputInlineQueryResultVideo: Codable, Equatable, Hashable, Identif
public let mimeType: String

/// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
public let replyMarkup: ReplyMarkup
public let replyMarkup: ReplyMarkup?

/// The URL of the video thumbnail (JPEG), if it exists
public let thumbnailUrl: String
Expand All @@ -679,7 +679,7 @@ public struct InputInlineQueryResultVideo: Codable, Equatable, Hashable, Identif
id: String,
inputMessageContent: InputMessageContent,
mimeType: String,
replyMarkup: ReplyMarkup,
replyMarkup: ReplyMarkup?,
thumbnailUrl: String,
title: String,
videoDuration: Int,
Expand Down Expand Up @@ -711,7 +711,7 @@ public struct InputInlineQueryResultVoiceNote: Codable, Equatable, Hashable, Ide
public let inputMessageContent: InputMessageContent

/// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
public let replyMarkup: ReplyMarkup
public let replyMarkup: ReplyMarkup?

/// Title of the voice note
public let title: String
Expand All @@ -726,7 +726,7 @@ public struct InputInlineQueryResultVoiceNote: Codable, Equatable, Hashable, Ide
public init(
id: String,
inputMessageContent: InputMessageContent,
replyMarkup: ReplyMarkup,
replyMarkup: ReplyMarkup?,
title: String,
voiceNoteDuration: Int,
voiceNoteUrl: String
Expand Down
Loading

0 comments on commit 785c780

Please sign in to comment.