# azure.cognitiveservices.search.customimagesearch.models module

exception `azure.cognitiveservices.search.customimagesearch.models.``ErrorResponseException`(deserialize, response, *args)

  Bases: `msrest.exceptions.HttpOperationError`

  Server responsed with exception of type: ‘ErrorResponse’.

  Parameters:

  - deserialize – A deserializer
  - response – Server response to be deserialized.

class `azure.cognitiveservices.search.customimagesearch.models.``Answer`(**kwargs)

  Bases: `azure.cognitiveservices.search.customimagesearch.models._models_py3.Response`

  Defines an answer.

  You probably want to use the sub-classes and not this class directly. Known sub-classes are: SearchResultsAnswer

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters: | _type (str) – Required. Constant filled by server.

  Variables:

  - id (str) – A String identifier.
  - read_link (str) – The URL that returns this resource.
  - web_search_url (str) – The URL To Bing’s search result for this item.

class `azure.cognitiveservices.search.customimagesearch.models.``CreativeWork`(**kwargs)

  Bases: `azure.cognitiveservices.search.customimagesearch.models._models_py3.Thing`

  The most generic kind of creative work, including books, movies, photographs, software programs, etc.

  You probably want to use the sub-classes and not this class directly. Known sub-classes are: MediaObject, WebPage

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters: | _type (str) – Required. Constant filled by server.

  Variables:

  - id (str) – A String identifier.
  - read_link (str) – The URL that returns this resource.
  - web_search_url (str) – The URL To Bing’s search result for this item.
  - name (str) – The name of the thing represented by this object.
  - url (str) – The URL to get more information about the thing represented by this object.
  - image (ImageObject) – An image of the item.
  - description (str) – A short description of the item.
  - alternate_name (str) – An alias for the item
  - bing_id (str) – An ID that uniquely identifies this item.
  - thumbnail_url (str) – The URL to a thumbnail of the item.
  - provider (list[Thing]) – The source of the creative work.
  - text (str) – Text content of this creative work

class `azure.cognitiveservices.search.customimagesearch.models.``Error`(*, message: str, code='None', **kwargs)

  Bases: `msrest.serialization.Model`

  Defines the error that occurred.

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters:

  - code (str or ErrorCode) – Required. The error code that identifies the category of error. Possible values include: ‘None’, ‘ServerError’, ‘InvalidRequest’, ‘RateLimitExceeded’, ‘InvalidAuthorization’, ‘InsufficientAuthorization’. Default value: “None” .
  - message (str) – Required. A description of the error.

  Variables:

  - sub_code (str or ErrorSubCode) – The error code that further helps to identify the error. Possible values include: ‘UnexpectedError’, ‘ResourceError’, ‘NotImplemented’, ‘ParameterMissing’, ‘ParameterInvalidValue’, ‘HttpNotAllowed’, ‘Blocked’, ‘AuthorizationMissing’, ‘AuthorizationRedundancy’, ‘AuthorizationDisabled’, ‘AuthorizationExpired’
  - more_details (str) – A description that provides additional information about the error.
  - parameter (str) – The parameter in the request that caused the error.
  - value (str) – The parameter’s value in the request that was not valid.

class `azure.cognitiveservices.search.customimagesearch.models.``ErrorResponse`(*, errors, **kwargs)

  Bases: `azure.cognitiveservices.search.customimagesearch.models._models_py3.Response`

  The top-level response that represents a failed request.

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters:

  - _type (str) – Required. Constant filled by server.
  - errors (list[Error]) – Required. A list of errors that describe the reasons why the request failed.

  Variables:

  - id (str) – A String identifier.
  - read_link (str) – The URL that returns this resource.
  - web_search_url (str) – The URL To Bing’s search result for this item.

class `azure.cognitiveservices.search.customimagesearch.models.``Identifiable`(**kwargs)

  Bases: `azure.cognitiveservices.search.customimagesearch.models._models_py3.ResponseBase`

  Defines the identity of a resource.

  You probably want to use the sub-classes and not this class directly. Known sub-classes are: Response

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters: | _type (str) – Required. Constant filled by server.
  Variables: | id (str) – A String identifier.

class `azure.cognitiveservices.search.customimagesearch.models.``ImageObject`(**kwargs)

  Bases: `azure.cognitiveservices.search.customimagesearch.models._models_py3.MediaObject`

  Defines an image.

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters: | _type (str) – Required. Constant filled by server.

  Variables:

  - id (str) – A String identifier.
  - read_link (str) – The URL that returns this resource.
  - web_search_url (str) – The URL To Bing’s search result for this item.
  - name (str) – The name of the thing represented by this object.
  - url (str) – The URL to get more information about the thing represented by this object.
  - image (ImageObject) – An image of the item.
  - description (str) – A short description of the item.
  - alternate_name (str) – An alias for the item
  - bing_id (str) – An ID that uniquely identifies this item.
  - thumbnail_url (str) – The URL to a thumbnail of the item.
  - provider (list[Thing]) – The source of the creative work.
  - text (str) – Text content of this creative work
  - content_url (str) – Original URL to retrieve the source (file) for the media object (e.g the source URL for the image).
  - host_page_url (str) – URL of the page that hosts the media object.
  - content_size (str) – Size of the media object content (use format “value unit” e.g “1024 B”).
  - encoding_format (str) – Encoding format (e.g mp3, mp4, jpeg, etc).
  - host_page_display_url (str) – Display URL of the page that hosts the media object.
  - width (int) – The width of the media object, in pixels.
  - height (int) – The height of the media object, in pixels.
  - thumbnail (ImageObject) – The URL to a thumbnail of the image
  - image_insights_token (str) – The token that you use in a subsequent call to the Image Search API to get additional information about the image. For information about using this token, see the insightsToken query parameter.
  - image_id (str) – Unique Id for the image
  - accent_color (str) – A three-byte hexadecimal number that represents the color that dominates the image. Use the color as the temporary background in your client until the image is loaded.
  - visual_words (str) – Visual representation of the image. Used for getting more sizes

class `azure.cognitiveservices.search.customimagesearch.models.``Images`(*, value, **kwargs)

  Bases: `azure.cognitiveservices.search.customimagesearch.models._models_py3.SearchResultsAnswer`

  Defines an image answer.

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters:

  - _type (str) – Required. Constant filled by server.
  - value (list[ImageObject]) – Required. A list of image objects that are relevant to the query. If there are no results, the List is empty.

  Variables:

  - id (str) – A String identifier.
  - read_link (str) – The URL that returns this resource.
  - web_search_url (str) – The URL To Bing’s search result for this item.
  - total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.
  - next_offset (int) – Used as part of deduping. Tells client the next offset that client should use in the next pagination request

class `azure.cognitiveservices.search.customimagesearch.models.``MediaObject`(**kwargs)

  Bases: `azure.cognitiveservices.search.customimagesearch.models._models_py3.CreativeWork`

  Defines a media object.

  You probably want to use the sub-classes and not this class directly. Known sub-classes are: ImageObject

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters: | _type (str) – Required. Constant filled by server.

  Variables:

  - id (str) – A String identifier.
  - read_link (str) – The URL that returns this resource.
  - web_search_url (str) – The URL To Bing’s search result for this item.
  - name (str) – The name of the thing represented by this object.
  - url (str) – The URL to get more information about the thing represented by this object.
  - image (ImageObject) – An image of the item.
  - description (str) – A short description of the item.
  - alternate_name (str) – An alias for the item
  - bing_id (str) – An ID that uniquely identifies this item.
  - thumbnail_url (str) – The URL to a thumbnail of the item.
  - provider (list[Thing]) – The source of the creative work.
  - text (str) – Text content of this creative work
  - content_url (str) – Original URL to retrieve the source (file) for the media object (e.g the source URL for the image).
  - host_page_url (str) – URL of the page that hosts the media object.
  - content_size (str) – Size of the media object content (use format “value unit” e.g “1024 B”).
  - encoding_format (str) – Encoding format (e.g mp3, mp4, jpeg, etc).
  - host_page_display_url (str) – Display URL of the page that hosts the media object.
  - width (int) – The width of the media object, in pixels.
  - height (int) – The height of the media object, in pixels.

class `azure.cognitiveservices.search.customimagesearch.models.``Query`(*, text: str, **kwargs)

  Bases: `msrest.serialization.Model`

  Defines a search query.

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters: | text (str) – Required. The query string. Use this string as the query term in a new search request.

  Variables:

  - display_text (str) – The display version of the query term. This version of the query term may contain special characters that highlight the search term found in the query string. The string contains the highlighting characters only if the query enabled hit highlighting
  - web_search_url (str) – The URL that takes the user to the Bing search results page for the query.Only related search results include this field.
  - search_link (str) – The URL that you use to get the results of the related search. Before using the URL, you must append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL if you’re displaying the results in your own user interface. Otherwise, use the webSearchUrl URL.
  - thumbnail (ImageObject) – The URL to a thumbnail of a related image.

class `azure.cognitiveservices.search.customimagesearch.models.``Response`(**kwargs)

  Bases: `azure.cognitiveservices.search.customimagesearch.models._models_py3.Identifiable`

  Defines a response. All schemas that could be returned at the root of a response should inherit from this.

  You probably want to use the sub-classes and not this class directly. Known sub-classes are: Answer, Thing, ErrorResponse

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters: | _type (str) – Required. Constant filled by server.

  Variables:

  - id (str) – A String identifier.
  - read_link (str) – The URL that returns this resource.
  - web_search_url (str) – The URL To Bing’s search result for this item.

class `azure.cognitiveservices.search.customimagesearch.models.``ResponseBase`(**kwargs)

  Bases: `msrest.serialization.Model`

  Response base.

  You probably want to use the sub-classes and not this class directly. Known sub-classes are: Identifiable

  All required parameters must be populated in order to send to Azure.

  Parameters: | _type (str) – Required. Constant filled by server.

class `azure.cognitiveservices.search.customimagesearch.models.``SearchResultsAnswer`(**kwargs)

  Bases: `azure.cognitiveservices.search.customimagesearch.models._models_py3.Answer`

  Defines a search result answer.

  You probably want to use the sub-classes and not this class directly. Known sub-classes are: Images

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters: | _type (str) – Required. Constant filled by server.

  Variables:

  - id (str) – A String identifier.
  - read_link (str) – The URL that returns this resource.
  - web_search_url (str) – The URL To Bing’s search result for this item.
  - total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

class `azure.cognitiveservices.search.customimagesearch.models.``Thing`(**kwargs)

  Bases: `azure.cognitiveservices.search.customimagesearch.models._models_py3.Response`

  Defines a thing.

  You probably want to use the sub-classes and not this class directly. Known sub-classes are: CreativeWork

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters: | _type (str) – Required. Constant filled by server.

  Variables:

  - id (str) – A String identifier.
  - read_link (str) – The URL that returns this resource.
  - web_search_url (str) – The URL To Bing’s search result for this item.
  - name (str) – The name of the thing represented by this object.
  - url (str) – The URL to get more information about the thing represented by this object.
  - image (ImageObject) – An image of the item.
  - description (str) – A short description of the item.
  - alternate_name (str) – An alias for the item
  - bing_id (str) – An ID that uniquely identifies this item.

class `azure.cognitiveservices.search.customimagesearch.models.``WebPage`(**kwargs)

  Bases: `azure.cognitiveservices.search.customimagesearch.models._models_py3.CreativeWork`

  Defines a webpage that is relevant to the query.

  Variables are only populated by the server, and will be ignored when sending a request.

  All required parameters must be populated in order to send to Azure.

  Parameters: | _type (str) – Required. Constant filled by server.

  Variables:

  - id (str) – A String identifier.
  - read_link (str) – The URL that returns this resource.
  - web_search_url (str) – The URL To Bing’s search result for this item.
  - name (str) – The name of the thing represented by this object.
  - url (str) – The URL to get more information about the thing represented by this object.
  - image (ImageObject) – An image of the item.
  - description (str) – A short description of the item.
  - alternate_name (str) – An alias for the item
  - bing_id (str) – An ID that uniquely identifies this item.
  - thumbnail_url (str) – The URL to a thumbnail of the item.
  - provider (list[Thing]) – The source of the creative work.
  - text (str) – Text content of this creative work

class `azure.cognitiveservices.search.customimagesearch.models.``ErrorCode`

  Bases: `str`, `enum.Enum`

  An enumeration.

  `insufficient_authorization` = 'InsufficientAuthorization'
  `invalid_authorization` = 'InvalidAuthorization'
  `invalid_request` = 'InvalidRequest'
  `none` = 'None'
  `rate_limit_exceeded` = 'RateLimitExceeded'
  `server_error` = 'ServerError'

class `azure.cognitiveservices.search.customimagesearch.models.``ErrorSubCode`

  Bases: `str`, `enum.Enum`

  An enumeration.

  `authorization_disabled` = 'AuthorizationDisabled'
  `authorization_expired` = 'AuthorizationExpired'
  `authorization_missing` = 'AuthorizationMissing'
  `authorization_redundancy` = 'AuthorizationRedundancy'
  `blocked` = 'Blocked'
  `http_not_allowed` = 'HttpNotAllowed'
  `not_implemented` = 'NotImplemented'
  `parameter_invalid_value` = 'ParameterInvalidValue'
  `parameter_missing` = 'ParameterMissing'
  `resource_error` = 'ResourceError'
  `unexpected_error` = 'UnexpectedError'

class `azure.cognitiveservices.search.customimagesearch.models.``ImageAspect`

  Bases: `str`, `enum.Enum`

  An enumeration.

  `all` = 'All'
  `square` = 'Square'
  `tall` = 'Tall'
  `wide` = 'Wide'

class `azure.cognitiveservices.search.customimagesearch.models.``ImageColor`

  Bases: `str`, `enum.Enum`

  An enumeration.

  `black` = 'Black'
  `blue` = 'Blue'
  `brown` = 'Brown'
  `color_only` = 'ColorOnly'
  `gray` = 'Gray'
  `green` = 'Green'
  `monochrome` = 'Monochrome'
  `orange` = 'Orange'
  `pink` = 'Pink'
  `purple` = 'Purple'
  `red` = 'Red'
  `teal` = 'Teal'
  `white` = 'White'
  `yellow` = 'Yellow'

class `azure.cognitiveservices.search.customimagesearch.models.``Freshness`

  Bases: `str`, `enum.Enum`

  An enumeration.

  `day` = 'Day'
  `month` = 'Month'
  `week` = 'Week'

class `azure.cognitiveservices.search.customimagesearch.models.``ImageContent`

  Bases: `str`, `enum.Enum`

  An enumeration.

  `face` = 'Face'
  `portrait` = 'Portrait'

class `azure.cognitiveservices.search.customimagesearch.models.``ImageType`

  Bases: `str`, `enum.Enum`

  An enumeration.

  `animated_gif` = 'AnimatedGif'
  `clipart` = 'Clipart'
  `line` = 'Line'
  `photo` = 'Photo'
  `shopping` = 'Shopping'
  `transparent` = 'Transparent'

class `azure.cognitiveservices.search.customimagesearch.models.``ImageLicense`

  Bases: `str`, `enum.Enum`

  An enumeration.

  `all` = 'All'
  `any` = 'Any'
  `modify` = 'Modify'
  `modify_commercially` = 'ModifyCommercially'
  `public` = 'Public'
  `share` = 'Share'
  `share_commercially` = 'ShareCommercially'

class `azure.cognitiveservices.search.customimagesearch.models.``SafeSearch`

  Bases: `str`, `enum.Enum`

  An enumeration.

  `moderate` = 'Moderate'
  `off` = 'Off'
  `strict` = 'Strict'

class `azure.cognitiveservices.search.customimagesearch.models.``ImageSize`

  Bases: `str`, `enum.Enum`

  An enumeration.

  `all` = 'All'
  `large` = 'Large'
  `medium` = 'Medium'
  `small` = 'Small'
  `wallpaper` = 'Wallpaper'