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, **kwargs)[source]

Bases: msrest.serialization.Model

Error information returned by the API.

Parameters

error (Error) –

class azure.cognitiveservices.vision.contentmoderator.models.Address(*, text: str = None, index: int = None, **kwargs)[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: str = None, description: str = None, metadata=None, **kwargs)[source]

Bases: msrest.serialization.Model

Body.

Parameters
  • name (str) – Name of the list.

  • description (str) – Description of the list.

  • metadata (dict[str, str]) – Metadata of the list.

class azure.cognitiveservices.vision.contentmoderator.models.BodyModel(*, data_representation: str = 'URL', value: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

BodyModel.

Parameters
  • data_representation (str) – Default value: “URL” .

  • value (str) –

class azure.cognitiveservices.vision.contentmoderator.models.Candidate(*, text: str = None, confidence: float = None, **kwargs)[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: bool = None, **kwargs)[source]

Bases: msrest.serialization.Model

The classification details of the text.

Parameters
class azure.cognitiveservices.vision.contentmoderator.models.ClassificationCategory1(*, score: float = None, **kwargs)[source]

Bases: msrest.serialization.Model

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

Parameters

score (float) – The category1 score.

class azure.cognitiveservices.vision.contentmoderator.models.ClassificationCategory2(*, score: float = None, **kwargs)[source]

Bases: msrest.serialization.Model

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

Parameters

score (float) – The category2 score.

class azure.cognitiveservices.vision.contentmoderator.models.ClassificationCategory3(*, score: float = None, **kwargs)[source]

Bases: msrest.serialization.Model

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

Parameters

score (float) – The category3 score.

class azure.cognitiveservices.vision.contentmoderator.models.Content(*, content_value: str, **kwargs)[source]

Bases: msrest.serialization.Model

Content.

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

Parameters

content_value (str) – Required. Content to evaluate for a job.

class azure.cognitiveservices.vision.contentmoderator.models.CreateReviewBodyItem(*, type, content: str, content_id: str, callback_endpoint: str = None, metadata=None, **kwargs)[source]

Bases: msrest.serialization.Model

Schema items of the body.

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

Parameters
  • type (str or enum) – Required. Type of the content. Possible values include: ‘Image’, ‘Text’

  • content (str) – Required. Content to review.

  • content_id (str) – Required. Content Identifier.

  • callback_endpoint (str) – Optional CallbackEndpoint.

  • metadata (list[CreateReviewBodyItemMetadataItem]) – Optional metadata details.

class azure.cognitiveservices.vision.contentmoderator.models.CreateReviewBodyItemMetadataItem(*, key: str, value: str, **kwargs)[source]

Bases: msrest.serialization.Model

CreateReviewBodyItemMetadataItem.

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

Parameters
  • key (str) – Required. Your key parameter.

  • value (str) – Required. Your value parameter.

class azure.cognitiveservices.vision.contentmoderator.models.CreateVideoReviewsBodyItem(*, content: str, content_id: str, status, video_frames=None, metadata=None, timescale: int = None, callback_endpoint: str = None, **kwargs)[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.

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

Parameters
  • video_frames (list[CreateVideoReviewsBodyItemVideoFramesItem]) – Optional metadata details.

  • metadata (list[CreateVideoReviewsBodyItemMetadataItem]) – Optional metadata details.

  • content (str) – Required. Video content url to review.

  • content_id (str) – Required. Content Identifier.

  • status (str or enum) – Required. 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) – Required. Type of the content. Default value: “Video” .

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

Bases: msrest.serialization.Model

CreateVideoReviewsBodyItemMetadataItem.

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

Parameters
  • key (str) – Required. Your key parameter.

  • value (str) – Required. Your value parameter.

class azure.cognitiveservices.vision.contentmoderator.models.CreateVideoReviewsBodyItemVideoFramesItem(*, id: str, timestamp: int, frame_image: str, reviewer_result_tags=None, metadata=None, **kwargs)[source]

Bases: msrest.serialization.Model

CreateVideoReviewsBodyItemVideoFramesItem.

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

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

Bases: msrest.serialization.Model

CreateVideoReviewsBodyItemVideoFramesItemMetadataItem.

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

Parameters
  • key (str) – Required. Your key parameter.

  • value (str) – Required. Your value parameter.

class azure.cognitiveservices.vision.contentmoderator.models.CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem(*, key: str, value: str, **kwargs)[source]

Bases: msrest.serialization.Model

CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem.

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

Parameters
  • key (str) – Required. Your key parameter.

  • value (str) – Required. Your value parameter.

class azure.cognitiveservices.vision.contentmoderator.models.DetectedLanguage(*, detected_language: str = None, status=None, tracking_id: str = None, **kwargs)[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: int = None, original_index: int = None, list_id: int = None, term: str = None, **kwargs)[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: str = None, sub_type: str = None, text: str = None, index: int = None, **kwargs)[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: str = None, message: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Error body.

Parameters
  • code (str) –

  • message (str) –

class azure.cognitiveservices.vision.contentmoderator.models.Evaluate(*, cache_id: str = None, result: bool = None, tracking_id: str = None, adult_classification_score: float = None, is_image_adult_classified: bool = None, racy_classification_score: float = None, is_image_racy_classified: bool = None, advanced_info=None, status=None, **kwargs)[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 classification 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: int = None, left: int = None, right: int = None, top: int = None, **kwargs)[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: str = None, cache_id: str = None, result: bool = None, count: int = None, advanced_info=None, faces=None, **kwargs)[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: str = None, frame_image: str = None, metadata=None, reviewer_result_tags=None, **kwargs)[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: str = None, video_frames=None, **kwargs)[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: str = None, text: str = None, index: int = None, **kwargs)[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: str = None, additional_info=None, status=None, tracking_id: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Image Properties.

Parameters
class azure.cognitiveservices.vision.contentmoderator.models.ImageAdditionalInfoItem(*, key: str = None, value: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

ImageAdditionalInfoItem.

Parameters
  • key (str) – Key parameter.

  • value (str) – Value parameter.

class azure.cognitiveservices.vision.contentmoderator.models.ImageIds(*, content_source: str = None, content_ids=None, status=None, tracking_id: str = None, **kwargs)[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: int = None, name: str = None, description: str = None, metadata=None, **kwargs)[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 (dict[str, str]) – Image List Metadata.

class azure.cognitiveservices.vision.contentmoderator.models.Job(*, id: str = None, team_name: str = None, status: str = None, workflow_id: str = None, type: str = None, call_back_endpoint: str = None, review_id: str = None, result_meta_data=None, job_execution_report=None, **kwargs)[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: str = None, msg: str = None, **kwargs)[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: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

JobId.

Parameters

job_id (str) – Id of the created job.

class azure.cognitiveservices.vision.contentmoderator.models.JobListResult(*, value=None, **kwargs)[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: str = None, value: str = None, **kwargs)[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: float = None, match_id: int = None, source: str = None, tags=None, label: str = None, **kwargs)[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: str = None, cache_id: str = None, is_match: bool = None, matches=None, status=None, **kwargs)[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: str = None, cache_id: str = None, language: str = None, text: str = None, candidates=None, **kwargs)[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, ssn=None, ipa=None, phone=None, address=None, **kwargs)[source]

Bases: msrest.serialization.Model

Personal Identifier Information details.

Parameters
class azure.cognitiveservices.vision.contentmoderator.models.Phone(*, country_code: str = None, text: str = None, index: int = None, **kwargs)[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: str = None, is_update_success: bool = None, advanced_info=None, status=None, tracking_id: str = None, **kwargs)[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[dict[str, str]]) – Advanced info list.

  • status (Status) – Refresh index status.

  • tracking_id (str) – Tracking Id.

class azure.cognitiveservices.vision.contentmoderator.models.Review(*, review_id: str = None, sub_team: str = None, status: str = None, reviewer_result_tags=None, created_by: str = None, metadata=None, type: str = None, content: str = None, content_id: str = None, callback_endpoint: str = None, **kwargs)[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.SSN(*, text: str = None, index: int = None, **kwargs)[source]

Bases: msrest.serialization.Model

Detected SSN details.

Parameters
  • text (str) – Detected SSN in the input text content.

  • index (int) – Index(Location) of the SSN in the input text content.

class azure.cognitiveservices.vision.contentmoderator.models.Screen(*, original_text: str = None, normalized_text: str = None, auto_corrected_text: str = None, misrepresentation=None, classification=None, status=None, pii=None, language: str = None, terms=None, tracking_id: str = None, **kwargs)[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: int = None, description: str = None, exception: str = None, **kwargs)[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: str = None, value: str = None, **kwargs)[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: int = None, name: str = None, description: str = None, metadata=None, **kwargs)[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 (dict[str, str]) – Term list metadata.

class azure.cognitiveservices.vision.contentmoderator.models.Terms(*, data=None, paging=None, **kwargs)[source]

Bases: msrest.serialization.Model

Terms properties.

Parameters
class azure.cognitiveservices.vision.contentmoderator.models.TermsData(*, language: str = None, terms=None, status=None, tracking_id: str = None, **kwargs)[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: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Terms in list Id passed.

Parameters

term (str) – Added term details.

class azure.cognitiveservices.vision.contentmoderator.models.TermsPaging(*, total: int = None, limit: int = None, offset: int = None, returned: int = None, **kwargs)[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: str, terms, **kwargs)[source]

Bases: msrest.serialization.Model

Schema items of the body.

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

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

Bases: msrest.serialization.Model

TranscriptModerationBodyItemTermsItem.

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

Parameters
  • index (int) – Required. Index of the word

  • term (str) – Required. Detected word.

class azure.cognitiveservices.vision.contentmoderator.models.VideoFrameBodyItem(*, timestamp: str, frame_image: str, reviewer_result_tags=None, metadata=None, **kwargs)[source]

Bases: msrest.serialization.Model

Schema items of the body.

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

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

Bases: msrest.serialization.Model

VideoFrameBodyItemMetadataItem.

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

Parameters
  • key (str) – Required. Your key parameter.

  • value (str) – Required. Your value parameter.

class azure.cognitiveservices.vision.contentmoderator.models.VideoFrameBodyItemReviewerResultTagsItem(*, key: str, value: str, **kwargs)[source]

Bases: msrest.serialization.Model

VideoFrameBodyItemReviewerResultTagsItem.

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

Parameters
  • key (str) – Required. Your key parameter.

  • value (str) – Required. Your value parameter.