Skip to content

Commit

Permalink
Rerunning autogen on 0.19.0
Browse files Browse the repository at this point in the history
Signed-off-by: Charlie Fish <[email protected]>
  • Loading branch information
fishcharlie committed Mar 17, 2024
1 parent ec03625 commit b8beba5
Show file tree
Hide file tree
Showing 168 changed files with 1,310 additions and 1,310 deletions.
12 changes: 6 additions & 6 deletions Sources/Lemmy-Swift-Client/Lemmy API/Requests/AddAdmin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ public struct AddAdminRequest: APIRequest {
public static let httpMethod: HTTPMethod = .post
public static let path: String = "/admin/add"

public let person_id: PersonId
public let added: Bool
public let person_id: PersonId?
public let added: Bool?

public init(
person_id: PersonId,
added: Bool
person_id: PersonId? = nil,
added: Bool? = nil
) {
self.person_id = person_id
self.added = added
}
}

public struct AddAdminResponse: APIResponse {
public let admins: [PersonView]
public let admins: [PersonView]?

public init(
admins: [PersonView]
admins: [PersonView]? = nil
) {
self.admins = admins
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ public struct AddModToCommunityRequest: APIRequest {
public static let httpMethod: HTTPMethod = .post
public static let path: String = "/community/mod"

public let community_id: CommunityId
public let person_id: PersonId
public let added: Bool
public let community_id: CommunityId?
public let person_id: PersonId?
public let added: Bool?

public init(
community_id: CommunityId,
person_id: PersonId,
added: Bool
community_id: CommunityId? = nil,
person_id: PersonId? = nil,
added: Bool? = nil
) {
self.community_id = community_id
self.person_id = person_id
Expand All @@ -22,10 +22,10 @@ public struct AddModToCommunityRequest: APIRequest {
}

public struct AddModToCommunityResponse: APIResponse {
public let moderators: [CommunityModeratorView]
public let moderators: [CommunityModeratorView]?

public init(
moderators: [CommunityModeratorView]
moderators: [CommunityModeratorView]? = nil
) {
self.moderators = moderators
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ public struct BanFromCommunityRequest: APIRequest {
public static let httpMethod: HTTPMethod = .post
public static let path: String = "/community/ban_user"

public let community_id: CommunityId
public let person_id: PersonId
public let ban: Bool
public let community_id: CommunityId?
public let person_id: PersonId?
public let ban: Bool?
public let remove_data: Bool?
public let reason: String?
public let expires: Int?

public init(
community_id: CommunityId,
person_id: PersonId,
ban: Bool,
community_id: CommunityId? = nil,
person_id: PersonId? = nil,
ban: Bool? = nil,
remove_data: Bool? = nil,
reason: String? = nil,
expires: Int? = nil
Expand All @@ -31,12 +31,12 @@ public struct BanFromCommunityRequest: APIRequest {
}

public struct BanFromCommunityResponse: APIResponse {
public let person_view: PersonView
public let banned: Bool
public let person_view: PersonView?
public let banned: Bool?

public init(
person_view: PersonView,
banned: Bool
person_view: PersonView? = nil,
banned: Bool? = nil
) {
self.person_view = person_view
self.banned = banned
Expand Down
16 changes: 8 additions & 8 deletions Sources/Lemmy-Swift-Client/Lemmy API/Requests/BanPerson.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ public struct BanPersonRequest: APIRequest {
public static let httpMethod: HTTPMethod = .post
public static let path: String = "/user/ban"

public let person_id: PersonId
public let ban: Bool
public let person_id: PersonId?
public let ban: Bool?
public let remove_data: Bool?
public let reason: String?
public let expires: Int?

public init(
person_id: PersonId,
ban: Bool,
person_id: PersonId? = nil,
ban: Bool? = nil,
remove_data: Bool? = nil,
reason: String? = nil,
expires: Int? = nil
Expand All @@ -28,12 +28,12 @@ public struct BanPersonRequest: APIRequest {
}

public struct BanPersonResponse: APIResponse {
public let person_view: PersonView
public let banned: Bool
public let person_view: PersonView?
public let banned: Bool?

public init(
person_view: PersonView,
banned: Bool
person_view: PersonView? = nil,
banned: Bool? = nil
) {
self.person_view = person_view
self.banned = banned
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ public struct BlockCommunityRequest: APIRequest {
public static let httpMethod: HTTPMethod = .post
public static let path: String = "/community/block"

public let community_id: CommunityId
public let block: Bool
public let community_id: CommunityId?
public let block: Bool?

public init(
community_id: CommunityId,
block: Bool
community_id: CommunityId? = nil,
block: Bool? = nil
) {
self.community_id = community_id
self.block = block
}
}

public struct BlockCommunityResponse: APIResponse {
public let community_view: CommunityView
public let blocked: Bool
public let community_view: CommunityView?
public let blocked: Bool?

public init(
community_view: CommunityView,
blocked: Bool
community_view: CommunityView? = nil,
blocked: Bool? = nil
) {
self.community_view = community_view
self.blocked = blocked
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ public struct BlockInstanceRequest: APIRequest {
public static let httpMethod: HTTPMethod = .post
public static let path: String = "/site/block"

public let instance_id: InstanceId
public let block: Bool
public let instance_id: InstanceId?
public let block: Bool?

public init(
instance_id: InstanceId,
block: Bool
instance_id: InstanceId? = nil,
block: Bool? = nil
) {
self.instance_id = instance_id
self.block = block
}
}

public struct BlockInstanceResponse: APIResponse {
public let blocked: Bool
public let blocked: Bool?

public init(
blocked: Bool
blocked: Bool? = nil
) {
self.blocked = blocked
}
Expand Down
16 changes: 8 additions & 8 deletions Sources/Lemmy-Swift-Client/Lemmy API/Requests/BlockPerson.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ public struct BlockPersonRequest: APIRequest {
public static let httpMethod: HTTPMethod = .post
public static let path: String = "/user/block"

public let person_id: PersonId
public let block: Bool
public let person_id: PersonId?
public let block: Bool?

public init(
person_id: PersonId,
block: Bool
person_id: PersonId? = nil,
block: Bool? = nil
) {
self.person_id = person_id
self.block = block
}
}

public struct BlockPersonResponse: APIResponse {
public let person_view: PersonView
public let blocked: Bool
public let person_view: PersonView?
public let blocked: Bool?

public init(
person_view: PersonView,
blocked: Bool
person_view: PersonView? = nil,
blocked: Bool? = nil
) {
self.person_view = person_view
self.blocked = blocked
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ public struct ChangePasswordRequest: APIRequest {
public static let httpMethod: HTTPMethod = .put
public static let path: String = "/user/change_password"

public let new_password: String
public let new_password_verify: String
public let old_password: String
public let new_password: String?
public let new_password_verify: String?
public let old_password: String?

public init(
new_password: String,
new_password_verify: String,
old_password: String
new_password: String? = nil,
new_password_verify: String? = nil,
old_password: String? = nil
) {
self.new_password = new_password
self.new_password_verify = new_password_verify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ public struct CreateCommentRequest: APIRequest {
public static let httpMethod: HTTPMethod = .post
public static let path: String = "/comment"

public let content: String
public let post_id: PostId
public let content: String?
public let post_id: PostId?
public let parent_id: CommentId?
public let language_id: LanguageId?

public init(
content: String,
post_id: PostId,
content: String? = nil,
post_id: PostId? = nil,
parent_id: CommentId? = nil,
language_id: LanguageId? = nil
) {
Expand All @@ -25,12 +25,12 @@ public struct CreateCommentRequest: APIRequest {
}

public struct CommentResponse: APIResponse {
public let comment_view: CommentView
public let recipient_ids: [LocalUserId]
public let comment_view: CommentView?
public let recipient_ids: [LocalUserId]?

public init(
comment_view: CommentView,
recipient_ids: [LocalUserId]
comment_view: CommentView? = nil,
recipient_ids: [LocalUserId]? = nil
) {
self.comment_view = comment_view
self.recipient_ids = recipient_ids
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ public struct CreateCommentLikeRequest: APIRequest {
public static let httpMethod: HTTPMethod = .post
public static let path: String = "/comment/like"

public let comment_id: CommentId
public let score: Int
public let comment_id: CommentId?
public let score: Int?

public init(
comment_id: CommentId,
score: Int
comment_id: CommentId? = nil,
score: Int? = nil
) {
self.comment_id = comment_id
self.score = score
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ public struct CreateCommentReportRequest: APIRequest {
public static let httpMethod: HTTPMethod = .post
public static let path: String = "/comment/report"

public let comment_id: CommentId
public let reason: String
public let comment_id: CommentId?
public let reason: String?

public init(
comment_id: CommentId,
reason: String
comment_id: CommentId? = nil,
reason: String? = nil
) {
self.comment_id = comment_id
self.reason = reason
}
}

public struct CommentReportResponse: APIResponse {
public let comment_report_view: CommentReportView
public let comment_report_view: CommentReportView?

public init(
comment_report_view: CommentReportView
comment_report_view: CommentReportView? = nil
) {
self.comment_report_view = comment_report_view
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ public struct CreateCommunityRequest: APIRequest {
public static let httpMethod: HTTPMethod = .post
public static let path: String = "/community"

public let name: String
public let title: String
public let name: String?
public let title: String?
public let description: String?
public let icon: String?
public let banner: String?
Expand All @@ -16,8 +16,8 @@ public struct CreateCommunityRequest: APIRequest {
public let discussion_languages: [LanguageId]?

public init(
name: String,
title: String,
name: String? = nil,
title: String? = nil,
description: String? = nil,
icon: String? = nil,
banner: String? = nil,
Expand All @@ -37,12 +37,12 @@ public struct CreateCommunityRequest: APIRequest {
}

public struct CommunityResponse: APIResponse {
public let community_view: CommunityView
public let discussion_languages: [LanguageId]
public let community_view: CommunityView?
public let discussion_languages: [LanguageId]?

public init(
community_view: CommunityView,
discussion_languages: [LanguageId]
community_view: CommunityView? = nil,
discussion_languages: [LanguageId]? = nil
) {
self.community_view = community_view
self.discussion_languages = discussion_languages
Expand Down
Loading

0 comments on commit b8beba5

Please sign in to comment.