azure.cognitiveservices.vision.contentmoderator.models module

exception azure.cognitiveservices.vision.contentmoderator.models.APIErrorException(deserialize, response, *args)[source]

Bases: msrest.exceptions.HttpOperationError

Server responsed with exception of type: ‘APIError’.

Parameters:
  • deserialize – A deserializer
  • response – Server response to be deserialized.
class azure.cognitiveservices.vision.contentmoderator.models.APIError(error=None)[source]

Bases: msrest.serialization.Model

Error information returned by the API.

Parameters:error (Error) –
class azure.cognitiveservices.vision.contentmoderator.models.Address(text=None, index=None)[source]

Bases: msrest.serialization.Model

Address details.

Parameters:
  • text (str) – Detected Address.
  • index (int) – Index(Location) of the Address in the input text content.
class azure.cognitiveservices.vision.contentmoderator.models.Body(name=None, description=None, metadata=None)[source]

Bases: msrest.serialization.Model

Body.

Parameters:
  • name (str) – Name of the list.
  • description (str) – Description of the list.
  • metadata (BodyMetadata) – Metadata of the list.
class azure.cognitiveservices.vision.contentmoderator.models.BodyMetadata(key_one=None, key_two=None)[source]

Bases: msrest.serialization.Model

Metadata of the list.

Parameters:
  • key_one (str) – Optional key value pair to describe your list.
  • key_two (str) – Optional key value pair to describe your list.
class azure.cognitiveservices.vision.contentmoderator.models.BodyModel(data_representation='URL', value=None)[source]

Bases: msrest.serialization.Model

BodyModel.

Parameters:
  • data_representation (str) – Default value: “URL” .
  • value (str) –
class azure.cognitiveservices.vision.contentmoderator.models.Candidate(text=None, confidence=None)[source]

Bases: msrest.serialization.Model

OCR candidate text.

Parameters:
  • text (str) – The text found.
  • confidence (float) – The confidence level.
class azure.cognitiveservices.vision.contentmoderator.models.Classification(category1=None, category2=None, category3=None, review_recommended=None)[source]

Bases: msrest.serialization.Model

The classification details of the text.

Parameters:
  • category1 (Score) –
  • category2 (Score) –
  • category3 (Score) –
  • review_recommended (bool) – The review recommended flag.
class azure.cognitiveservices.vision.contentmoderator.models.Content(content_value)[source]

Bases: msrest.serialization.Model

Content.

Parameters:content_value (str) – Content to evaluate for a job.
class azure.cognitiveservices.vision.contentmoderator.models.CreateReviewBodyItem(type, content, content_id, callback_endpoint=None, metadata=None)[source]

Bases: msrest.serialization.Model

Schema items of the body.

Parameters:
  • type (str or enum) – Type of the content. Possible values include: ‘Image’, ‘Text’
  • content (str) – Content to review.
  • content_id (str) – Content Identifier.
  • callback_endpoint (str) – Optional CallbackEndpoint.
  • metadata (list[CreateReviewBodyItemMetadataItem]) – Optional metadata details.
class azure.cognitiveservices.vision.contentmoderator.models.CreateReviewBodyItemMetadataItem(key, value)[source]

Bases: msrest.serialization.Model

CreateReviewBodyItemMetadataItem.

Parameters:
  • key (str) – Your key parameter.
  • value (str) – Your value parameter.
class azure.cognitiveservices.vision.contentmoderator.models.CreateVideoReviewsBodyItem(content, content_id, status, video_frames=None, metadata=None, timescale=None, callback_endpoint=None)[source]

Bases: msrest.serialization.Model

Schema items of the body.

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

Parameters:
  • video_frames (list[CreateVideoReviewsBodyItemVideoFramesItem]) – Optional metadata details.
  • metadata (list[CreateVideoReviewsBodyItemMetadataItem]) – Optional metadata details.
  • content (str) – Video content url to review.
  • content_id (str) – Content Identifier.
  • status (str or enum) – Status of the video(Complete,Unpublished,Pending). Possible values include: ‘Complete’, ‘Unpublished’, ‘Pending’
  • timescale (int) – Timescale of the video.
  • callback_endpoint (str) – Optional CallbackEndpoint.
Variables:

type (str) – Type of the content. Default value: “Video” .

type = 'Video'
class azure.cognitiveservices.vision.contentmoderator.models.CreateVideoReviewsBodyItemMetadataItem(key, value)[source]

Bases: msrest.serialization.Model

CreateVideoReviewsBodyItemMetadataItem.

Parameters:
  • key (str) – Your key parameter.
  • value (str) – Your value parameter.
class azure.cognitiveservices.vision.contentmoderator.models.CreateVideoReviewsBodyItemVideoFramesItem(id, timestamp, frame_image, reviewer_result_tags=None, metadata=None)[source]

Bases: msrest.serialization.Model

CreateVideoReviewsBodyItemVideoFramesItem.

Parameters:
class azure.cognitiveservices.vision.contentmoderator.models.CreateVideoReviewsBodyItemVideoFramesItemMetadataItem(key, value)[source]

Bases: msrest.serialization.Model

CreateVideoReviewsBodyItemVideoFramesItemMetadataItem.

Parameters:
  • key (str) – Your key parameter.
  • value (str) – Your value parameter.
class azure.cognitiveservices.vision.contentmoderator.models.CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem(key, value)[source]

Bases: msrest.serialization.Model

CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem.

Parameters:
  • key (str) – Your key parameter.
  • value (str) – Your value parameter.
class azure.cognitiveservices.vision.contentmoderator.models.DetectedLanguage(detected_language=None, status=None, tracking_id=None)[source]

Bases: msrest.serialization.Model

Detect language result.

Parameters:
  • detected_language (str) – The detected language.
  • status (Status) – The detect language status
  • tracking_id (str) – The tracking id.
class azure.cognitiveservices.vision.contentmoderator.models.DetectedTerms(index=None, original_index=None, list_id=None, term=None)[source]

Bases: msrest.serialization.Model

Detected Terms details.

Parameters:
  • index (int) – Index(Location) of the detected profanity term in the input text content.
  • original_index (int) – Original Index(Location) of the detected profanity term in the input text content.
  • list_id (int) – Matched Terms list Id.
  • term (str) – Detected profanity term.
class azure.cognitiveservices.vision.contentmoderator.models.Email(detected=None, sub_type=None, text=None, index=None)[source]

Bases: msrest.serialization.Model

Email Address details.

Parameters:
  • detected (str) – Detected Email Address from the input text content.
  • sub_type (str) – Subtype of the detected Email Address.
  • text (str) – Email Address in the input text content.
  • index (int) – Index(Location) of the Email address in the input text content.
class azure.cognitiveservices.vision.contentmoderator.models.Error(code=None, message=None)[source]

Bases: msrest.serialization.Model

Error body.

Parameters:
  • code (str) –
  • message (str) –
class azure.cognitiveservices.vision.contentmoderator.models.Evaluate(cache_id=None, result=None, tracking_id=None, adult_classification_score=None, is_image_adult_classified=None, racy_classification_score=None, is_image_racy_classified=None, advanced_info=None, status=None)[source]

Bases: msrest.serialization.Model

Evaluate response object.

Parameters:
  • cache_id (str) – The cache id.
  • result (bool) – Evaluate result.
  • tracking_id (str) – The tracking id.
  • adult_classification_score (float) – The adult classification score.
  • is_image_adult_classified (bool) – Indicates if an image is classified as adult.
  • racy_classification_score (float) – The racy classication score.
  • is_image_racy_classified (bool) – Indicates if the image is classified as racy.
  • advanced_info (list[KeyValuePair]) – The advanced info.
  • status (Status) – The evaluate status
class azure.cognitiveservices.vision.contentmoderator.models.Face(bottom=None, left=None, right=None, top=None)[source]

Bases: msrest.serialization.Model

Coordinates to the found face.

Parameters:
  • bottom (int) – The bottom coordinate.
  • left (int) – The left coordinate.
  • right (int) – The right coordinate.
  • top (int) – The top coordinate.
class azure.cognitiveservices.vision.contentmoderator.models.FoundFaces(status=None, tracking_id=None, cache_id=None, result=None, count=None, advanced_info=None, faces=None)[source]

Bases: msrest.serialization.Model

Request object the contains found faces.

Parameters:
  • status (Status) – The evaluate status
  • tracking_id (str) – The tracking id.
  • cache_id (str) – The cache id.
  • result (bool) – True if result was found.
  • count (int) – Number of faces found.
  • advanced_info (list[KeyValuePair]) – The advanced info.
  • faces (list[Face]) – The list of faces.
class azure.cognitiveservices.vision.contentmoderator.models.Frame(timestamp=None, frame_image=None, metadata=None, reviewer_result_tags=None)[source]

Bases: msrest.serialization.Model

Video frame property details.

Parameters:
  • timestamp (str) – Timestamp of the frame.
  • frame_image (str) – Frame image.
  • metadata (list[KeyValuePair]) – Array of KeyValue.
  • reviewer_result_tags (list[Tag]) – Reviewer result tags.
class azure.cognitiveservices.vision.contentmoderator.models.Frames(review_id=None, video_frames=None)[source]

Bases: msrest.serialization.Model

The response for a Get Frames request.

Parameters:
  • review_id (str) – Id of the review.
  • video_frames (list[Frame]) –
class azure.cognitiveservices.vision.contentmoderator.models.IPA(sub_type=None, text=None, index=None)[source]

Bases: msrest.serialization.Model

IP Address details.

Parameters:
  • sub_type (str) – Subtype of the detected IP Address.
  • text (str) – Detected IP Address.
  • index (int) – Index(Location) of the IP Address in the input text content.
class azure.cognitiveservices.vision.contentmoderator.models.Image(content_id=None, additional_info=None, status=None, tracking_id=None)[source]

Bases: msrest.serialization.Model

Image Properties.

Parameters:
  • content_id (str) – Content Id.
  • additional_info (list[ImageAdditionalInfoItem]) – Advanced info list.
  • status (Status) – Status details.
  • tracking_id (str) – Tracking Id.
class azure.cognitiveservices.vision.contentmoderator.models.ImageAdditionalInfoItem(key=None, value=None)[source]

Bases: msrest.serialization.Model

ImageAdditionalInfoItem.

Parameters:
  • key (str) – Key parameter.
  • value (str) – Value parameter.
class azure.cognitiveservices.vision.contentmoderator.models.ImageIds(content_source=None, content_ids=None, status=None, tracking_id=None)[source]

Bases: msrest.serialization.Model

Image Id properties.

Parameters:
  • content_source (str) – Source of the content.
  • content_ids (list[int]) – Id of the contents.
  • status (Status) – Get Image status.
  • tracking_id (str) – Tracking Id.
class azure.cognitiveservices.vision.contentmoderator.models.ImageList(id=None, name=None, description=None, metadata=None)[source]

Bases: msrest.serialization.Model

Image List Properties.

Parameters:
  • id (int) – Image List Id.
  • name (str) – Image List Name.
  • description (str) – Description for image list.
  • metadata (ImageListMetadata) – Image List Metadata.
class azure.cognitiveservices.vision.contentmoderator.models.ImageListMetadata(key_one=None, key_two=None)[source]

Bases: msrest.serialization.Model

Image List Metadata.

Parameters:
  • key_one (str) – Optional Key value pair to describe your list.
  • key_two (str) – Optional Key value pair to describe your list.
class azure.cognitiveservices.vision.contentmoderator.models.Job(id=None, team_name=None, status=None, workflow_id=None, type=None, call_back_endpoint=None, review_id=None, result_meta_data=None, job_execution_report=None)[source]

Bases: msrest.serialization.Model

The Job object.

Parameters:
  • id (str) – The job id.
  • team_name (str) – The team name associated with the job.
  • status (str) – The status string (<Pending, Failed, Completed>).
  • workflow_id (str) – The Id of the workflow.
  • type (str) – Type of the content.
  • call_back_endpoint (str) – The callback endpoint.
  • review_id (str) – Review Id if one is created.
  • result_meta_data (list[KeyValuePair]) – Array of KeyValue pairs.
  • job_execution_report (list[JobExecutionReportDetails]) – Job execution report- Array of KeyValue pairs object.
class azure.cognitiveservices.vision.contentmoderator.models.JobExecutionReportDetails(ts=None, msg=None)[source]

Bases: msrest.serialization.Model

Job Execution Report Values.

Parameters:
  • ts (str) – Time details.
  • msg (str) – Message details.
class azure.cognitiveservices.vision.contentmoderator.models.JobId(job_id=None)[source]

Bases: msrest.serialization.Model

JobId.

Parameters:job_id (str) – Id of the created job.
class azure.cognitiveservices.vision.contentmoderator.models.JobListResult(value=None)[source]

Bases: msrest.serialization.Model

The list of job ids.

Parameters:value (list[str]) – The job id.
class azure.cognitiveservices.vision.contentmoderator.models.KeyValuePair(key=None, value=None)[source]

Bases: msrest.serialization.Model

The key value pair object properties.

Parameters:
  • key (str) – The key parameter.
  • value (str) – The value parameter.
class azure.cognitiveservices.vision.contentmoderator.models.Match(score=None, match_id=None, source=None, tags=None, label=None)[source]

Bases: msrest.serialization.Model

The match details.

Parameters:
  • score (float) – Confidence score of the image match.
  • match_id (int) – The match id.
  • source (str) – The source.
  • tags (list[int]) – The tags for match details.
  • label (str) – The label.
class azure.cognitiveservices.vision.contentmoderator.models.MatchResponse(tracking_id=None, cache_id=None, is_match=None, matches=None, status=None)[source]

Bases: msrest.serialization.Model

The response for a Match request.

Parameters:
  • tracking_id (str) – The tracking id.
  • cache_id (str) – The cache id.
  • is_match (bool) – Indicates if there is a match.
  • matches (list[Match]) – The match details.
  • status (Status) – The evaluate status
class azure.cognitiveservices.vision.contentmoderator.models.OCR(status=None, metadata=None, tracking_id=None, cache_id=None, language=None, text=None, candidates=None)[source]

Bases: msrest.serialization.Model

Contains the text found in image for the language specified.

Parameters:
  • status (Status) – The evaluate status
  • metadata (list[KeyValuePair]) – Array of KeyValue.
  • tracking_id (str) – The tracking id.
  • cache_id (str) – The cache id.
  • language (str) – The ISO 639-3 code.
  • text (str) – The found text.
  • candidates (list[Candidate]) – The list of candidate text.
class azure.cognitiveservices.vision.contentmoderator.models.PII(email=None, ipa=None, phone=None, address=None)[source]

Bases: msrest.serialization.Model

Personal Identifier Information details.

Parameters:
class azure.cognitiveservices.vision.contentmoderator.models.Phone(country_code=None, text=None, index=None)[source]

Bases: msrest.serialization.Model

Phone Property details.

Parameters:
  • country_code (str) – CountryCode of the detected Phone number.
  • text (str) – Detected Phone number.
  • index (int) – Index(Location) of the Phone number in the input text content.
class azure.cognitiveservices.vision.contentmoderator.models.RefreshIndex(content_source_id=None, is_update_success=None, advanced_info=None, status=None, tracking_id=None)[source]

Bases: msrest.serialization.Model

Refresh Index Response.

Parameters:
  • content_source_id (str) – Content source Id.
  • is_update_success (bool) – Update success status.
  • advanced_info (list[RefreshIndexAdvancedInfoItem]) – Advanced info list.
  • status (Status) – Refresh index status.
  • tracking_id (str) – Tracking Id.
class azure.cognitiveservices.vision.contentmoderator.models.RefreshIndexAdvancedInfoItem(key_one=None, key_two=None)[source]

Bases: msrest.serialization.Model

RefreshIndexAdvancedInfoItem.

Parameters:
  • key_one (str) – Key parameter to describe advanced info.
  • key_two (str) – Key parameter to describe advanced info.
class azure.cognitiveservices.vision.contentmoderator.models.Review(review_id=None, sub_team=None, status=None, reviewer_result_tags=None, created_by=None, metadata=None, type=None, content=None, content_id=None, callback_endpoint=None)[source]

Bases: msrest.serialization.Model

The Review object.

Parameters:
  • review_id (str) – Id of the review.
  • sub_team (str) – Name of the subteam.
  • status (str) – The status string (<Pending, Complete>).
  • reviewer_result_tags (list[KeyValuePair]) – Array of KeyValue with Reviewer set Tags.
  • created_by (str) – The reviewer name.
  • metadata (list[KeyValuePair]) – Array of KeyValue.
  • type (str) – The type of content.
  • content (str) – The content value.
  • content_id (str) – Id of the content.
  • callback_endpoint (str) – The callback endpoint.
class azure.cognitiveservices.vision.contentmoderator.models.Score(score=None)[source]

Bases: msrest.serialization.Model

The classification score details of the text. <a href=”https://aka.ms/textClassifyCategories”>Click here</a> for more details on category classification.

Parameters:score (float) – The category score.
class azure.cognitiveservices.vision.contentmoderator.models.Screen(original_text=None, normalized_text=None, auto_corrected_text=None, misrepresentation=None, classification=None, status=None, pii=None, language=None, terms=None, tracking_id=None)[source]

Bases: msrest.serialization.Model

The response for a Screen text request.

Parameters:
  • original_text (str) – The original text.
  • normalized_text (str) – The normalized text.
  • auto_corrected_text (str) – The autocorrected text
  • misrepresentation (list[str]) – The misrepresentation text.
  • classification (Classification) – The classification details of the text.
  • status (Status) – The evaluate status.
  • pii (PII) – Personal Identifier Information details.
  • language (str) – Language of the input text content.
  • terms (list[DetectedTerms]) –
  • tracking_id (str) – Unique Content Moderator transaction Id.
class azure.cognitiveservices.vision.contentmoderator.models.Status(code=None, description=None, exception=None)[source]

Bases: msrest.serialization.Model

Status properties.

Parameters:
  • code (int) – Status code.
  • description (str) – Status description.
  • exception (str) – Exception status.
class azure.cognitiveservices.vision.contentmoderator.models.Tag(key=None, value=None)[source]

Bases: msrest.serialization.Model

Tag details.

Parameters:
  • key (str) – The key parameter.
  • value (str) – The value parameter.
class azure.cognitiveservices.vision.contentmoderator.models.TermList(id=None, name=None, description=None, metadata=None)[source]

Bases: msrest.serialization.Model

Term List Properties.

Parameters:
  • id (int) – Term list Id.
  • name (str) – Term list name.
  • description (str) – Description for term list.
  • metadata (TermListMetadata) – Term list metadata.
class azure.cognitiveservices.vision.contentmoderator.models.TermListMetadata(key_one=None, key_two=None)[source]

Bases: msrest.serialization.Model

Term list metadata.

Parameters:
  • key_one (str) – Optional Key value pair to describe your list.
  • key_two (str) – Optional Key value pair to describe your list.
class azure.cognitiveservices.vision.contentmoderator.models.Terms(data=None, paging=None)[source]

Bases: msrest.serialization.Model

Terms properties.

Parameters:
class azure.cognitiveservices.vision.contentmoderator.models.TermsData(language=None, terms=None, status=None, tracking_id=None)[source]

Bases: msrest.serialization.Model

All term Id response properties.

Parameters:
  • language (str) – Language of the terms.
  • terms (list[TermsInList]) – List of terms.
  • status (Status) – Term Status.
  • tracking_id (str) – Tracking Id.
class azure.cognitiveservices.vision.contentmoderator.models.TermsInList(term=None)[source]

Bases: msrest.serialization.Model

Terms in list Id passed.

Parameters:term (str) – Added term details.
class azure.cognitiveservices.vision.contentmoderator.models.TermsPaging(total=None, limit=None, offset=None, returned=None)[source]

Bases: msrest.serialization.Model

Paging details.

Parameters:
  • total (int) – Total details.
  • limit (int) – Limit details.
  • offset (int) – Offset details.
  • returned (int) – Returned text details.
class azure.cognitiveservices.vision.contentmoderator.models.TranscriptModerationBodyItem(timestamp, terms)[source]

Bases: msrest.serialization.Model

Schema items of the body.

Parameters:
class azure.cognitiveservices.vision.contentmoderator.models.TranscriptModerationBodyItemTermsItem(index, term)[source]

Bases: msrest.serialization.Model

TranscriptModerationBodyItemTermsItem.

Parameters:
  • index (int) – Index of the word
  • term (str) – Detected word.
class azure.cognitiveservices.vision.contentmoderator.models.VideoFrameBodyItem(timestamp, frame_image, reviewer_result_tags=None, metadata=None)[source]

Bases: msrest.serialization.Model

Schema items of the body.

Parameters:
class azure.cognitiveservices.vision.contentmoderator.models.VideoFrameBodyItemMetadataItem(key, value)[source]

Bases: msrest.serialization.Model

VideoFrameBodyItemMetadataItem.

Parameters:
  • key (str) – Your key parameter.
  • value (str) – Your value parameter.
class azure.cognitiveservices.vision.contentmoderator.models.VideoFrameBodyItemReviewerResultTagsItem(key, value)[source]

Bases: msrest.serialization.Model

VideoFrameBodyItemReviewerResultTagsItem.

Parameters:
  • key (str) – Your key parameter.
  • value (str) – Your value parameter.
class azure.cognitiveservices.vision.contentmoderator.models.AzureRegionBaseUrl[source]

Bases: enum.Enum

An enumeration.

australiaeastapicognitivemicrosoftcom = 'australiaeast.api.cognitive.microsoft.com'
brazilsouthapicognitivemicrosoftcom = 'brazilsouth.api.cognitive.microsoft.com'
contentmoderatortestazure_apinet = 'contentmoderatortest.azure-api.net'
eastasiaapicognitivemicrosoftcom = 'eastasia.api.cognitive.microsoft.com'
eastus2apicognitivemicrosoftcom = 'eastus2.api.cognitive.microsoft.com'
eastusapicognitivemicrosoftcom = 'eastus.api.cognitive.microsoft.com'
northeuropeapicognitivemicrosoftcom = 'northeurope.api.cognitive.microsoft.com'
southcentralusapicognitivemicrosoftcom = 'southcentralus.api.cognitive.microsoft.com'
southeastasiaapicognitivemicrosoftcom = 'southeastasia.api.cognitive.microsoft.com'
westcentralusapicognitivemicrosoftcom = 'westcentralus.api.cognitive.microsoft.com'
westeuropeapicognitivemicrosoftcom = 'westeurope.api.cognitive.microsoft.com'
westus2apicognitivemicrosoftcom = 'westus2.api.cognitive.microsoft.com'
westusapicognitivemicrosoftcom = 'westus.api.cognitive.microsoft.com'