|
| 1 | +# coding=utf-8 |
| 2 | +# -------------------------------------------------------------------------- |
| 3 | +# Copyright (c) Microsoft Corporation. All rights reserved. |
| 4 | +# Licensed under the MIT License. See License.txt in the project root for |
| 5 | +# license information. |
| 6 | +# |
| 7 | +# Code generated by Microsoft (R) AutoRest Code Generator. |
| 8 | +# Changes may cause incorrect behavior and will be lost if the code is |
| 9 | +# regenerated. |
| 10 | +# -------------------------------------------------------------------------- |
| 11 | + |
| 12 | +from .thing import Thing |
| 13 | + |
| 14 | + |
| 15 | +class CreativeWork(Thing): |
| 16 | + """The most generic kind of creative work, including books, movies, |
| 17 | + photographs, software programs, etc. |
| 18 | +
|
| 19 | + You probably want to use the sub-classes and not this class directly. Known |
| 20 | + sub-classes are: MediaObject, WebPage |
| 21 | +
|
| 22 | + Variables are only populated by the server, and will be ignored when |
| 23 | + sending a request. |
| 24 | +
|
| 25 | + All required parameters must be populated in order to send to Azure. |
| 26 | +
|
| 27 | + :param _type: Required. Constant filled by server. |
| 28 | + :type _type: str |
| 29 | + :ivar id: A String identifier. |
| 30 | + :vartype id: str |
| 31 | + :ivar read_link: The URL that returns this resource. |
| 32 | + :vartype read_link: str |
| 33 | + :ivar web_search_url: The URL To Bing's search result for this item. |
| 34 | + :vartype web_search_url: str |
| 35 | + :ivar name: The name of the thing represented by this object. |
| 36 | + :vartype name: str |
| 37 | + :ivar url: The URL to get more information about the thing represented by |
| 38 | + this object. |
| 39 | + :vartype url: str |
| 40 | + :ivar image: An image of the item. |
| 41 | + :vartype image: |
| 42 | + ~azure.cognitiveservices.search.customimagesearch.models.ImageObject |
| 43 | + :ivar description: A short description of the item. |
| 44 | + :vartype description: str |
| 45 | + :ivar alternate_name: An alias for the item |
| 46 | + :vartype alternate_name: str |
| 47 | + :ivar bing_id: An ID that uniquely identifies this item. |
| 48 | + :vartype bing_id: str |
| 49 | + :ivar thumbnail_url: The URL to a thumbnail of the item. |
| 50 | + :vartype thumbnail_url: str |
| 51 | + :ivar provider: The source of the creative work. |
| 52 | + :vartype provider: |
| 53 | + list[~azure.cognitiveservices.search.customimagesearch.models.Thing] |
| 54 | + :ivar text: Text content of this creative work |
| 55 | + :vartype text: str |
| 56 | + """ |
| 57 | + |
| 58 | + _validation = { |
| 59 | + '_type': {'required': True}, |
| 60 | + 'id': {'readonly': True}, |
| 61 | + 'read_link': {'readonly': True}, |
| 62 | + 'web_search_url': {'readonly': True}, |
| 63 | + 'name': {'readonly': True}, |
| 64 | + 'url': {'readonly': True}, |
| 65 | + 'image': {'readonly': True}, |
| 66 | + 'description': {'readonly': True}, |
| 67 | + 'alternate_name': {'readonly': True}, |
| 68 | + 'bing_id': {'readonly': True}, |
| 69 | + 'thumbnail_url': {'readonly': True}, |
| 70 | + 'provider': {'readonly': True}, |
| 71 | + 'text': {'readonly': True}, |
| 72 | + } |
| 73 | + |
| 74 | + _attribute_map = { |
| 75 | + '_type': {'key': '_type', 'type': 'str'}, |
| 76 | + 'id': {'key': 'id', 'type': 'str'}, |
| 77 | + 'read_link': {'key': 'readLink', 'type': 'str'}, |
| 78 | + 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, |
| 79 | + 'name': {'key': 'name', 'type': 'str'}, |
| 80 | + 'url': {'key': 'url', 'type': 'str'}, |
| 81 | + 'image': {'key': 'image', 'type': 'ImageObject'}, |
| 82 | + 'description': {'key': 'description', 'type': 'str'}, |
| 83 | + 'alternate_name': {'key': 'alternateName', 'type': 'str'}, |
| 84 | + 'bing_id': {'key': 'bingId', 'type': 'str'}, |
| 85 | + 'thumbnail_url': {'key': 'thumbnailUrl', 'type': 'str'}, |
| 86 | + 'provider': {'key': 'provider', 'type': '[Thing]'}, |
| 87 | + 'text': {'key': 'text', 'type': 'str'}, |
| 88 | + } |
| 89 | + |
| 90 | + _subtype_map = { |
| 91 | + '_type': {'MediaObject': 'MediaObject', 'WebPage': 'WebPage'} |
| 92 | + } |
| 93 | + |
| 94 | + def __init__(self, **kwargs): |
| 95 | + super(CreativeWork, self).__init__(**kwargs) |
| 96 | + self.thumbnail_url = None |
| 97 | + self.provider = None |
| 98 | + self.text = None |
| 99 | + self._type = 'CreativeWork' |
0 commit comments