1+ package com.pengrad.telegrambot.request.business
2+
3+ import com.pengrad.telegrambot.model.MessageEntity
4+ import com.pengrad.telegrambot.model.story.StoryArea
5+ import com.pengrad.telegrambot.model.story.inputstory.InputStoryContent
6+ import com.pengrad.telegrambot.request.KBaseRequest
7+ import com.pengrad.telegrambot.response.EditStoryResponse
8+ import com.pengrad.telegrambot.utility.kotlin.optionalRequestParameter
9+ import com.pengrad.telegrambot.utility.kotlin.requestParameter
10+
11+ @Suppress(" unused" )
12+ class EditStory private constructor(
13+ businessConnectionId : String ,
14+ storyId : Int ,
15+ content : InputStoryContent ,
16+ caption : String? ,
17+ parseMode : String? ,
18+ captionEntities : Array <MessageEntity >? ,
19+ areas : Array <StoryArea >?
20+ ): KBaseRequest<EditStory, EditStoryResponse>(EditStoryResponse : :class) {
21+
22+ constructor (businessConnectionId: String , storyId: Int , content: InputStoryContent ) : this (
23+ businessConnectionId = businessConnectionId,
24+ storyId = storyId,
25+ content = content,
26+ caption = null ,
27+ parseMode = null ,
28+ captionEntities = null ,
29+ areas = null
30+ )
31+
32+ val businessConnectionId: String by requestParameter(businessConnectionId, customParameterName = " business_connection_id" )
33+ val storyId: Int by requestParameter(storyId, customParameterName = " story_id" )
34+ val content: InputStoryContent by requestParameter(content, customParameterName = " content" )
35+
36+ var caption: String? by optionalRequestParameter(caption, customParameterName = " caption" )
37+ fun caption (caption : String ) = applySelf { this .caption = caption }
38+
39+ var parseMode: String? by optionalRequestParameter(parseMode, customParameterName = " parse_mode" )
40+ fun parseMode (parseMode : String ) = applySelf { this .parseMode = parseMode }
41+
42+ var captionEntities: Array <MessageEntity >? by optionalRequestParameter(captionEntities, customParameterName = " caption_entities" )
43+ fun captionEntities (captionEntities : Array <MessageEntity >) = applySelf { this .captionEntities = captionEntities }
44+
45+ var areas: Array <StoryArea >? by optionalRequestParameter(areas, customParameterName = " areas" )
46+ fun areas (areas : Array <StoryArea >) = applySelf { this .areas = areas }
47+
48+ }
0 commit comments