8000 Merge pull request #890 from microsoft/trboehre/teams-models · il-null-yuyi/botbuilder-python@2305e20 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2305e20

Browse files
authored
Merge pull request microsoft#890 from microsoft/trboehre/teams-models
TaskModuleContinueResponse and TaskModuleMessageResponse corrections.
2 parents 3840f99 + 616d528 commit 2305e20

File tree

1 file changed

+25
-31
lines changed

1 file changed

+25
-31
lines changed

libraries/botbuilder-schema/botbuilder/schema/teams/_models_py3.py

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class FileConsentCardResponse(Model):
132132
133133
:param action: The action the user took. Possible values include:
134134
'accept', 'decline'
135-
:type action: str or ~botframework.connector.teams.models.enum
135+
:type action: str
136136
:param context: The context associated with the action.
137137
:type context: object
138138
:param upload_info: If the user accepted the file, contains information
@@ -346,7 +346,7 @@ class MessageActionsPayloadBody(Model):
346346
347347
:param content_type: Type of the content. Possible values include: 'html',
348348
'text'
349-
:type content_type: str or ~botframework.connector.teams.models.enum
349+
:type content_type: str
350350
:param content: The content of the body.
351351
:type content: str
352352
"""
@@ -463,7 +463,7 @@ class MessageActionsPayloadReaction(Model):
463463
464464
:param reaction_type: The type of reaction given to the message. Possible
465465
values include: 'like', 'heart', 'laugh', 'surprised', 'sad', 'angry'
466-
:type reaction_type: str or ~botframework.connector.teams.models.enum
466+
:type reaction_type: str
< 10000 /td>
467467
:param created_date_time: Timestamp of when the user reacted to the
468468
message.
469469
:type created_date_time: str
@@ -491,7 +491,7 @@ class MessageActionsPayloadUser(Model):
491491
492492
:param user_identity_type: The identity type of the user. Possible values
493493
include: 'aadUser', 'onPremiseAadUser', 'anonymousGuest', 'federatedUser'
494-
:type user_identity_type: str or ~botframework.connector.teams.models.enum
494+
:type user_identity_type: str
495495
:param id: The id of the user.
496496
:type id: str
497497
:param display_name: The plaintext display name of the user.
@@ -528,7 +528,7 @@ class MessageActionsPayload(Model):
528528
:type reply_to_id: str
529529
:param message_type: Type of message - automatically set to message.
530530
Possible values include: 'message'
531-
:type message_type: str or ~botframework.connector.teams.models.enum
531+
:type message_type: str
532532
:param created_date_time: Timestamp of when the message was created.
533533
:type created_date_time: str
534534
:param last_modified_date_time: Timestamp of when the message was edited
@@ -543,7 +543,7 @@ class MessageActionsPayload(Model):
543543
:type summary: str
544544
:param importance: The importance of the message. Possible values include:
545545
'normal', 'high', 'urgent'
546-
:type importance: str or ~botframework.connector.teams.models.enum
546+
:type importance: str
547547
:param locale: Locale of the message set by the client.
548548
:type locale: str
549549
:param from_property: Sender of the message.
@@ -639,7 +639,7 @@ class MessagingExtensionAction(TaskModuleRequest):
639639
:type command_id: str
640640
:param command_context: The context from which the command originates.
641641
Possible values include: 'message', 'compose', 'commandbox'
642-
:type command_context: str or ~botframework.connector.teams.models.enum
642+
:type command_context: str
643643
:param bot_message_preview_action: Bot message preview action taken by
644644
user. Possible values include: 'edit', 'send'
645645
:type bot_message_preview_action: str or
@@ -864,10 +864,10 @@ class MessagingExtensionResult(Model):
864864
865865
:param attachment_layout: Hint for how to deal with multiple attachments.
866866
Possible values include: 'list', 'grid'
867-
:type attachment_layout: str or ~botframework.connector.teams.models.enum
867+
:type attachment_layout: str
868868
:param type: The type of the result. Possible values include: 'result',
869869
'auth', 'config', 'message', 'botMessagePreview'
870-
:type type: str or ~botframework.connector.teams.models.enum
870+
:type type: str
871871
:param attachments: (Only when type is result) Attachments
872872
:type attachments:
873873
list[~botframework.connector.teams.models.MessagingExtensionAttachment]
@@ -1002,7 +1002,7 @@ class O365ConnectorCardInputBase(Model):
10021002
10031003
:param type: Input type name. Possible values include: 'textInput',
10041004
'dateInput', 'multichoiceInput'
1005-
:type type: str or ~botframework.connector.teams.models.enum
1005+
:type type: str
10061006
:param id: Input Id. It must be unique per entire O365 connector card.
10071007
:type id: str
10081008
:param is_required: Define if this input is a required field. Default
@@ -1045,7 +1045,7 @@ class O365ConnectorCardActionBase(Model):
10451045
10461046
:param type: Type of the action. Possible values include: 'ViewAction',
10471047
'OpenUri', 'HttpPOST', 'ActionCard'
1048-
:type type: str or ~botframework.connector.teams.models.enum
1048+
:type type: str
10491049
:param name: Name of the action that will be used as button title
10501050
:type name: str
10511051
:param id: Action Id
@@ -1072,7 +1072,7 @@ class O365ConnectorCardActionCard(O365ConnectorCardActionBase):
10721072
10731073
:param type: Type of the action. Possible values include: 'ViewAction',
10741074
'OpenUri', 'HttpPOST', 'ActionCard'
1075-
:type type: str or ~botframework.connector.teams.models.enum
1075+
:type type: str
10761076
:param name: Name of the action that will be used as button title
10771077
:type name: str
10781078
:param id: Action Id
@@ -1141,7 +1141,7 @@ class O365ConnectorCardDateInput(O365ConnectorCardInputBase):
11411141
11421142
:param type: Input type name. Possible values include: 'textInput',
11431143
'dateInput', 'multichoiceInput'
1144-
:type type: str or ~botframework.connector.teams.models.enum
1144+
:type type: str
11451145
:param id: Input Id. It must be unique per entire O365 connector card.
11461146
:type id: str
11471147
:param is_required: Define if this input is a required field. Default
@@ -1212,7 +1212,7 @@ class O365ConnectorCardHttpPOST(O365ConnectorCardActionBase):
12121212
12131213
:param type: Type of the action. Possible values include: 'ViewAction',
12141214
'OpenUri', 'HttpPOST', 'ActionCard'
1215-
:type type: str or ~botframework.connector.teams.models.enum
1215+
:type type: str
12161216
:param name: Name of the action that will be used as button title
12171217
:type name: str
12181218
:param id: Action Id
@@ -1262,7 +1262,7 @@ class O365ConnectorCardMultichoiceInput(O365ConnectorCardInputBase):
12621262
12631263
:param type: Input type name. Possible values include: 'textInput',
12641264
'dateInput', 'multichoiceInput'
1265-
:type type: str or ~botframework.connector.teams.models.enum
1265+
:type type: str
12661266
:param id: Input Id. It must be unique per entire O365 connector card.
12671267
:type id: str
12681268
:param is_required: Define if this input is a required field. Default
@@ -1278,7 +1278,7 @@ class O365ConnectorCardMultichoiceInput(O365ConnectorCardInputBase):
12781278
list[~botframework.connector.teams.models.O365ConnectorCardMultichoiceInputChoice]
12791279
:param style: Choice item rendering style. Default value is 'compact'.
12801280
Possible values include: 'compact', 'expanded'
1281-
:type style: str or ~botframework.connector.teams.models.enum
1281+
:type style: str
12821282
:param is_multi_select: Define if this input field allows multiple
12831283
selections. Default value is false.
12841284
:type is_multi_select: bool
@@ -1349,7 +1349,7 @@ class O365ConnectorCardOpenUri(O365ConnectorCardActionBase):
13491349
13501350
:param type: Type of the action. Possible values include: 'ViewAction',
13511351
'OpenUri', 'HttpPOST', 'ActionCard'
1352-
:type type: str or ~botframework.connector.teams.models.enum
1352+
:type type: str
13531353
:param name: Name of the action that will be used as button title
13541354
:type name: str
13551355
:param id: Action Id
@@ -1380,7 +1380,7 @@ class O365ConnectorCardOpenUriTarget(Model):
13801380
13811381
:param os: Target operating system. Possible values include: 'default',
13821382
'iOS', 'android', 'windows'
1383-
:type os: str or ~botframework.connector.teams.models.enum
1383+
:type os: str
13841384
:param uri: Target url
13851385
:type uri: str
13861386
"""
@@ -1481,7 +1481,7 @@ class O365ConnectorCardTextInput(O365ConnectorCardInputBase):
14811481
14821482
:param type: Input type name. Possible values include: 'textInput',
14831483
'dateInput', 'multichoiceInput'
1484-
:type type: str or ~botframework.connector.teams.models.enum
1484+
:type type: str
14851485
:param id: Input Id. It must be unique per entire O365 connector card.
14861486
:type id: str
14871487
:param is_required: Define if this input is a required field. Default
@@ -1538,7 +1538,7 @@ class O365ConnectorCardViewAction(O365ConnectorCardActionBase):
15381538
15391539
:param type: Type of the action. Possible values include: 'ViewAction',
15401540
'OpenUri', 'HttpPOST', 'ActionCard'
1541-
:type type: str or ~botframework.connector.teams.models.enum
1541+
:type type: str
15421542
:param name: Name of the action that will be used as button title
15431543
:type name: str
15441544
:param id: Action Id
@@ -1586,7 +1586,7 @@ class TaskModuleResponseBase(Model):
15861586
15871587
:param type: Choice of action options when responding to the task/submit
15881588
message. Possible values include: 'message', 'continue'
1589-
:type type: str or ~botframework.connector.teams.models.enum
1589+
:type type: str
15901590
"""
15911591

15921592
_attribute_map = {
@@ -1601,9 +1601,6 @@ def __init__(self, *, type=None, **kwargs) -> None:
16011601
class TaskModuleContinueResponse(TaskModuleResponseBase):
16021602
"""Task Module Response with continue action.
16031603
1604-
:param type: Choice of action options when responding to the task/submit
1605-
message. Possible values include: 'message', 'continue'
1606-
:type type: str or ~botframework.connector.teams.models.enum
16071604
:param value: The JSON for the Adaptive card to appear in the task module.
16081605
:type value: ~botframework.connector.teams.models.TaskModuleTaskInfo
16091606
"""
@@ -1613,17 +1610,14 @@ class TaskModuleContinueResponse(TaskModuleResponseBase):
16131610
"value": {"key": "value", "type": "TaskModuleTaskInfo"},
16141611
}
16151612

1616-
def __init__(self, *, type=None, value=None, **kwargs) -> None:
1617-
super(TaskModuleContinueResponse, self).__init__(type=type, **kwargs)
1613+
def __init__( C15E self, *, value=None, **kwargs) -> None:
1614+
super(TaskModuleContinueResponse, self).__init__(type="continue", **kwargs)
16181615
self.value = value
16191616

16201617

16211618
class TaskModuleMessageResponse(TaskModuleResponseBase):
16221619
"""Task Module response with message action.
16231620
1624-
:param type: Choice of action options when responding to the task/submit
1625-
message. Possible values include: 'message', 'continue'
1626-
:type type: str or ~botframework.connector.teams.models.enum
16271621
:param value: Teams will display the value of value in a popup message
16281622
box.
16291623
:type value: str
@@ -1634,8 +1628,8 @@ class TaskModuleMessageResponse(TaskModuleResponseBase):
16341628
"value": {"key": "value", "type": "str"},
16351629
}
16361630

1637-
def __init__(self, *, type=None, value: str = None, **kwargs) -> None:
1638-
super(TaskModuleMessageResponse, self).__init__(type=type, **kwargs)
1631+
def __init__(self, *, value: str = None, **kwargs) -> None:
1632+
super(TaskModuleMessageResponse, self).__init__(type="message", **kwargs)
16391633
self.value = value
16401634

16411635

0 commit comments

Comments
 (0)
0