import { CommentRequest, JsonWrappedComment, BasicIdRequest, FollowPostRequest, InfoRequest, MoreChildrenRequest, ReportRequest, ReportAwardRequest, SaveRequest, SendRepliesRequest, SetContestModeRequest, EditCustomPostRequest, SetCustomPostPreviewRequest, SetSubredditStickyRequest, SetSuggestedSortRequest, SubmitRequest, SubmitResponse, VoteRequest, GetIsPostHighlightedRequest, GetIsPostHighlightedResponse, AddPostToHighlightsRequest, AddPostToHighlightsResponse, RemovePostFromHighlightsRequest, RemovePostFromHighlightsResponse, SetCustomPostStylesRequest, GetCustomPostStylesRequest, } from './linksandcomments_msg.js';
import { Empty } from '../../../../google/protobuf/empty.js';
import { Listing, JsonStatus, JsonRedditObjects } from '../common/common_msg.js';
import { CustomPostStyles } from '../../../../reddit/devvit/post/v1/post.js';
export class LinksAndCommentsClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.Comment.bind(this);
        this.Del.bind(this);
        this.EditUserText.bind(this);
        this.FollowPost.bind(this);
        this.Hide.bind(this);
        this.Info.bind(this);
        this.Lock.bind(this);
        this.MarkNSFW.bind(this);
        this.MoreChildren.bind(this);
        this.Report.bind(this);
        this.ReportAward.bind(this);
        this.Save.bind(this);
        this.SendReplies.bind(this);
        this.SetContestMode.bind(this);
        this.EditCustomPost.bind(this);
        this.SetCustomPostPreview.bind(this);
        this.SetSubredditSticky.bind(this);
        this.SetSuggestedSort.bind(this);
        this.Spoiler.bind(this);
        this.Submit.bind(this);
        this.SubmitCustomPost.bind(this);
        this.Unhide.bind(this);
        this.Unlock.bind(this);
        this.UnmarkNSFW.bind(this);
        this.Unsave.bind(this);
        this.Unspoiler.bind(this);
        this.Vote.bind(this);
        this.GetIsPostHighlighted.bind(this);
        this.AddPostToHighlights.bind(this);
        this.RemovePostFromHighlights.bind(this);
        this.SetCustomPostStyles.bind(this);
        this.GetCustomPostStyles.bind(this);
    }
    Comment(request) {
        const data = CommentRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Comment', 'application/json', data);
        return promise.then((data) => JsonWrappedComment.fromJSON(data));
    }
    Del(request) {
        const data = BasicIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Del', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    EditUserText(request) {
        const data = CommentRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'EditUserText', 'application/json', data);
        return promise.then((data) => JsonWrappedComment.fromJSON(data));
    }
    FollowPost(request) {
        const data = FollowPostRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'FollowPost', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    Hide(request) {
        const data = BasicIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Hide', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    Info(request) {
        const data = InfoRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Info', 'application/json', data);
        return promise.then((data) => Listing.fromJSON(data));
    }
    Lock(request) {
        const data = BasicIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Lock', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    MarkNSFW(request) {
        const data = BasicIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'MarkNSFW', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    MoreChildren(request) {
        const data = MoreChildrenRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'MoreChildren', 'application/json', data);
        return promise.then((data) => JsonWrappedComment.fromJSON(data));
    }
    Report(request) {
        const data = ReportRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Report', 'application/json', data);
        return promise.then((data) => JsonStatus.fromJSON(data));
    }
    ReportAward(request) {
        const data = ReportAwardRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'ReportAward', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    Save(request) {
        const data = SaveRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Save', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    SendReplies(request) {
        const data = SendRepliesRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SendReplies', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    SetContestMode(request) {
        const data = SetContestModeRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SetContestMode', 'application/json', data);
        return promise.then((data) => JsonStatus.fromJSON(data));
    }
    EditCustomPost(request) {
        const data = EditCustomPostRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'EditCustomPost', 'application/json', data);
        return promise.then((data) => JsonRedditObjects.fromJSON(data));
    }
    SetCustomPostPreview(request) {
        const data = SetCustomPostPreviewRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SetCustomPostPreview', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    SetSubredditSticky(request) {
        const data = SetSubredditStickyRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SetSubredditSticky', 'application/json', data);
        return promise.then((data) => JsonStatus.fromJSON(data));
    }
    SetSuggestedSort(request) {
        const data = SetSuggestedSortRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SetSuggestedSort', 'application/json', data);
        return promise.then((data) => JsonStatus.fromJSON(data));
    }
    Spoiler(request) {
        const data = BasicIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Spoiler', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    Submit(request) {
        const data = SubmitRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Submit', 'application/json', data);
        return promise.then((data) => SubmitResponse.fromJSON(data));
    }
    SubmitCustomPost(request) {
        const data = SubmitRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SubmitCustomPost', 'application/json', data);
        return promise.then((data) => SubmitResponse.fromJSON(data));
    }
    Unhide(request) {
        const data = BasicIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Unhide', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    Unlock(request) {
        const data = BasicIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Unlock', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    UnmarkNSFW(request) {
        const data = BasicIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'UnmarkNSFW', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    Unsave(request) {
        const data = BasicIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Unsave', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    Unspoiler(request) {
        const data = BasicIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Unspoiler', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    Vote(request) {
        const data = VoteRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Vote', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    GetIsPostHighlighted(request) {
        const data = GetIsPostHighlightedRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'GetIsPostHighlighted', 'application/json', data);
        return promise.then((data) => GetIsPostHighlightedResponse.fromJSON(data));
    }
    AddPostToHighlights(request) {
        const data = AddPostToHighlightsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'AddPostToHighlights', 'application/json', data);
        return promise.then((data) => AddPostToHighlightsResponse.fromJSON(data));
    }
    RemovePostFromHighlights(request) {
        const data = RemovePostFromHighlightsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'RemovePostFromHighlights', 'application/json', data);
        return promise.then((data) => RemovePostFromHighlightsResponse.fromJSON(data));
    }
    SetCustomPostStyles(request) {
        const data = SetCustomPostStylesRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SetCustomPostStyles', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    GetCustomPostStyles(request) {
        const data = GetCustomPostStylesRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'GetCustomPostStyles', 'application/json', data);
        return promise.then((data) => CustomPostStyles.fromJSON(data));
    }
}
export class LinksAndCommentsClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.Comment.bind(this);
        this.Del.bind(this);
        this.EditUserText.bind(this);
        this.FollowPost.bind(this);
        this.Hide.bind(this);
        this.Info.bind(this);
        this.Lock.bind(this);
        this.MarkNSFW.bind(this);
        this.MoreChildren.bind(this);
        this.Report.bind(this);
        this.ReportAward.bind(this);
        this.Save.bind(this);
        this.SendReplies.bind(this);
        this.SetContestMode.bind(this);
        this.EditCustomPost.bind(this);
        this.SetCustomPostPreview.bind(this);
        this.SetSubredditSticky.bind(this);
        this.SetSuggestedSort.bind(this);
        this.Spoiler.bind(this);
        this.Submit.bind(this);
        this.SubmitCustomPost.bind(this);
        this.Unhide.bind(this);
        this.Unlock.bind(this);
        this.UnmarkNSFW.bind(this);
        this.Unsave.bind(this);
        this.Unspoiler.bind(this);
        this.Vote.bind(this);
        this.GetIsPostHighlighted.bind(this);
        this.AddPostToHighlights.bind(this);
        this.RemovePostFromHighlights.bind(this);
        this.SetCustomPostStyles.bind(this);
        this.GetCustomPostStyles.bind(this);
    }
    Comment(request) {
        const data = CommentRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Comment', 'application/protobuf', data);
        return promise.then((data) => JsonWrappedComment.decode(data));
    }
    Del(request) {
        const data = BasicIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Del', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    EditUserText(request) {
        const data = CommentRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'EditUserText', 'application/protobuf', data);
        return promise.then((data) => JsonWrappedComment.decode(data));
    }
    FollowPost(request) {
        const data = FollowPostRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'FollowPost', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    Hide(request) {
        const data = BasicIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Hide', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    Info(request) {
        const data = InfoRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Info', 'application/protobuf', data);
        return promise.then((data) => Listing.decode(data));
    }
    Lock(request) {
        const data = BasicIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Lock', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    MarkNSFW(request) {
        const data = BasicIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'MarkNSFW', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    MoreChildren(request) {
        const data = MoreChildrenRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'MoreChildren', 'application/protobuf', data);
        return promise.then((data) => JsonWrappedComment.decode(data));
    }
    Report(request) {
        const data = ReportRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Report', 'application/protobuf', data);
        return promise.then((data) => JsonStatus.decode(data));
    }
    ReportAward(request) {
        const data = ReportAwardRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'ReportAward', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    Save(request) {
        const data = SaveRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Save', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    SendReplies(request) {
        const data = SendRepliesRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SendReplies', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    SetContestMode(request) {
        const data = SetContestModeRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SetContestMode', 'application/protobuf', data);
        return promise.then((data) => JsonStatus.decode(data));
    }
    EditCustomPost(request) {
        const data = EditCustomPostRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'EditCustomPost', 'application/protobuf', data);
        return promise.then((data) => JsonRedditObjects.decode(data));
    }
    SetCustomPostPreview(request) {
        const data = SetCustomPostPreviewRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SetCustomPostPreview', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    SetSubredditSticky(request) {
        const data = SetSubredditStickyRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SetSubredditSticky', 'application/protobuf', data);
        return promise.then((data) => JsonStatus.decode(data));
    }
    SetSuggestedSort(request) {
        const data = SetSuggestedSortRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SetSuggestedSort', 'application/protobuf', data);
        return promise.then((data) => JsonStatus.decode(data));
    }
    Spoiler(request) {
        const data = BasicIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Spoiler', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    Submit(request) {
        const data = SubmitRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Submit', 'application/protobuf', data);
        return promise.then((data) => SubmitResponse.decode(data));
    }
    SubmitCustomPost(request) {
        const data = SubmitRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SubmitCustomPost', 'application/protobuf', data);
        return promise.then((data) => SubmitResponse.decode(data));
    }
    Unhide(request) {
        const data = BasicIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Unhide', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    Unlock(request) {
        const data = BasicIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Unlock', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    UnmarkNSFW(request) {
        const data = BasicIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'UnmarkNSFW', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    Unsave(request) {
        const data = BasicIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Unsave', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    Unspoiler(request) {
        const data = BasicIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Unspoiler', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    Vote(request) {
        const data = VoteRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'Vote', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    GetIsPostHighlighted(request) {
        const data = GetIsPostHighlightedRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'GetIsPostHighlighted', 'application/protobuf', data);
        return promise.then((data) => GetIsPostHighlightedResponse.decode(data));
    }
    AddPostToHighlights(request) {
        const data = AddPostToHighlightsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'AddPostToHighlights', 'application/protobuf', data);
        return promise.then((data) => AddPostToHighlightsResponse.decode(data));
    }
    RemovePostFromHighlights(request) {
        const data = RemovePostFromHighlightsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'RemovePostFromHighlights', 'application/protobuf', data);
        return promise.then((data) => RemovePostFromHighlightsResponse.decode(data));
    }
    SetCustomPostStyles(request) {
        const data = SetCustomPostStylesRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'SetCustomPostStyles', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    GetCustomPostStyles(request) {
        const data = GetCustomPostStylesRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.redditapi.linksandcomments.LinksAndComments', 'GetCustomPostStyles', 'application/protobuf', data);
        return promise.then((data) => CustomPostStyles.decode(data));
    }
}
