contentmoderator

package
v46.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2020 License: Apache-2.0 Imports: 9 Imported by: 385

Documentation

Overview

Package contentmoderator implements the Azure ARM Contentmoderator service API version 1.0.

You use the API to scan your content as it is generated. Content Moderator then processes your content and sends the results along with relevant information either back to your systems or to the built-in review tool. You can use this information to take decisions e.g. take it down, send to human judge, etc.

When using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. Text can be at most 1024 characters long. If the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type APIError

type APIError struct {
	Error *Error `json:"Error,omitempty"`
}

APIError error information returned by the API

type Address

type Address struct {
	// Text - Detected Address.
	Text *string `json:"Text,omitempty"`
	// Index - Index(Location) of the Address in the input text content.
	Index *int32 `json:"Index,omitempty"`
}

Address address details.

type BaseClient

type BaseClient struct {
	autorest.Client
	Endpoint string
}

BaseClient is the base client for Contentmoderator.

func New

func New(endpoint string) BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults(endpoint string) BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

type Body

type Body struct {
	// Name - Name of the list.
	Name *string `json:"Name,omitempty"`
	// Description - Description of the list.
	Description *string `json:"Description,omitempty"`
	// Metadata - Metadata of the list.
	Metadata map[string]*string `json:"Metadata"`
}

Body ...

func (Body) MarshalJSON

func (b Body) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Body.

type Candidate

type Candidate struct {
	// Text - The text found.
	Text *string `json:"Text,omitempty"`
	// Confidence - The confidence level.
	Confidence *float64 `json:"Confidence,omitempty"`
}

Candidate OCR candidate text.

type Classification

type Classification struct {
	// Category1 - The category1 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.
	Category1 *ClassificationCategory1 `json:"Category1,omitempty"`
	// Category2 - The category2 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.
	Category2 *ClassificationCategory2 `json:"Category2,omitempty"`
	// Category3 - The category3 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.
	Category3 *ClassificationCategory3 `json:"Category3,omitempty"`
	// ReviewRecommended - The review recommended flag.
	ReviewRecommended *bool `json:"ReviewRecommended,omitempty"`
}

Classification the classification details of the text.

type ClassificationCategory1

type ClassificationCategory1 struct {
	// Score - The category1 score.
	Score *float64 `json:"Score,omitempty"`
}

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

type ClassificationCategory2

type ClassificationCategory2 struct {
	// Score - The category2 score.
	Score *float64 `json:"Score,omitempty"`
}

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

type ClassificationCategory3

type ClassificationCategory3 struct {
	// Score - The category3 score.
	Score *float64 `json:"Score,omitempty"`
}

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

type Content

type Content struct {
	// ContentValue - Content to evaluate for a job.
	ContentValue *string `json:"ContentValue,omitempty"`
}

Content ...

type CreateReviewBodyItem

type CreateReviewBodyItem struct {
	// Type - Type of the content. Possible values include: 'TypeImage', 'TypeText'
	Type Type `json:"Type,omitempty"`
	// Content - Content to review.
	Content *string `json:"Content,omitempty"`
	// ContentID - Content Identifier.
	ContentID *string `json:"ContentId,omitempty"`
	// CallbackEndpoint - Optional CallbackEndpoint.
	CallbackEndpoint *string `json:"CallbackEndpoint,omitempty"`
	// Metadata - Optional metadata details.
	Metadata *[]CreateReviewBodyItemMetadataItem `json:"Metadata,omitempty"`
}

CreateReviewBodyItem schema items of the body.

type CreateReviewBodyItemMetadataItem

type CreateReviewBodyItemMetadataItem struct {
	// Key - Your key parameter.
	Key *string `json:"Key,omitempty"`
	// Value - Your value parameter.
	Value *string `json:"Value,omitempty"`
}

CreateReviewBodyItemMetadataItem ...

type CreateVideoReviewsBodyItem

type CreateVideoReviewsBodyItem struct {
	// VideoFrames - Optional metadata details.
	VideoFrames *[]CreateVideoReviewsBodyItemVideoFramesItem `json:"VideoFrames,omitempty"`
	// Metadata - Optional metadata details.
	Metadata *[]CreateVideoReviewsBodyItemMetadataItem `json:"Metadata,omitempty"`
	// Type - Type of the content.
	Type *string `json:"Type,omitempty"`
	// Content - Video content url to review.
	Content *string `json:"Content,omitempty"`
	// ContentID - Content Identifier.
	ContentID *string `json:"ContentId,omitempty"`
	// Status - Status of the video(Complete,Unpublished,Pending). Possible values include: 'Complete', 'Unpublished', 'Pending'
	Status StatusEnum `json:"Status,omitempty"`
	// Timescale - Timescale of the video.
	Timescale *int32 `json:"Timescale,omitempty"`
	// CallbackEndpoint - Optional CallbackEndpoint.
	CallbackEndpoint *string `json:"CallbackEndpoint,omitempty"`
}

CreateVideoReviewsBodyItem schema items of the body.

type CreateVideoReviewsBodyItemMetadataItem

type CreateVideoReviewsBodyItemMetadataItem struct {
	// Key - Your key parameter.
	Key *string `json:"Key,omitempty"`
	// Value - Your value parameter.
	Value *string `json:"Value,omitempty"`
}

CreateVideoReviewsBodyItemMetadataItem ...

type CreateVideoReviewsBodyItemVideoFramesItem

type CreateVideoReviewsBodyItemVideoFramesItem struct {
	// ID - Id of the frame.
	ID *string `json:"Id,omitempty"`
	// Timestamp - Timestamp of the frame.
	Timestamp *int32 `json:"Timestamp,omitempty"`
	// FrameImage - Frame image Url.
	FrameImage         *string                                                            `json:"FrameImage,omitempty"`
	ReviewerResultTags *[]CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem `json:"ReviewerResultTags,omitempty"`
	// Metadata - Optional metadata details.
	Metadata *[]CreateVideoReviewsBodyItemVideoFramesItemMetadataItem `json:"Metadata,omitempty"`
}

CreateVideoReviewsBodyItemVideoFramesItem ...

type CreateVideoReviewsBodyItemVideoFramesItemMetadataItem

type CreateVideoReviewsBodyItemVideoFramesItemMetadataItem struct {
	// Key - Your key parameter.
	Key *string `json:"Key,omitempty"`
	// Value - Your value parameter.
	Value *string `json:"Value,omitempty"`
}

CreateVideoReviewsBodyItemVideoFramesItemMetadataItem ...

type CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem

type CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem struct {
	// Key - Your key parameter.
	Key *string `json:"Key,omitempty"`
	// Value - Your value parameter.
	Value *string `json:"Value,omitempty"`
}

CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem ...

type DetectedLanguage

type DetectedLanguage struct {
	autorest.Response `json:"-"`
	// DetectedLanguage - The detected language.
	DetectedLanguage *string `json:"DetectedLanguage,omitempty"`
	// Status - The detect language status
	Status *Status `json:"Status,omitempty"`
	// TrackingID - The tracking id.
	TrackingID *string `json:"TrackingId,omitempty"`
}

DetectedLanguage detect language result.

type DetectedTerms

type DetectedTerms struct {
	// Index - Index(Location) of the detected profanity term in the input text content.
	Index *int32 `json:"Index,omitempty"`
	// OriginalIndex - Original Index(Location) of the detected profanity term in the input text content.
	OriginalIndex *int32 `json:"OriginalIndex,omitempty"`
	// ListID - Matched Terms list Id.
	ListID *int32 `json:"ListId,omitempty"`
	// Term - Detected profanity term.
	Term *string `json:"Term,omitempty"`
}

DetectedTerms detected Terms details.

type Email

type Email struct {
	// Detected - Detected Email Address from the input text content.
	Detected *string `json:"Detected,omitempty"`
	// SubType - Subtype of the detected Email Address.
	SubType *string `json:"SubType,omitempty"`
	// Text - Email Address in the input text content.
	Text *string `json:"Text,omitempty"`
	// Index - Index(Location) of the Email address in the input text content.
	Index *int32 `json:"Index,omitempty"`
}

Email email Address details.

type Error

type Error struct {
	Code    *string `json:"Code,omitempty"`
	Message *string `json:"Message,omitempty"`
}

Error error body.

type Evaluate

type Evaluate struct {
	autorest.Response `json:"-"`
	// CacheID - The cache id.
	CacheID *string `json:"CacheID,omitempty"`
	// Result - Evaluate result.
	Result *bool `json:"Result,omitempty"`
	// TrackingID - The tracking id.
	TrackingID *string `json:"TrackingId,omitempty"`
	// AdultClassificationScore - The adult classification score.
	AdultClassificationScore *float64 `json:"AdultClassificationScore,omitempty"`
	// IsImageAdultClassified - Indicates if an image is classified as adult.
	IsImageAdultClassified *bool `json:"IsImageAdultClassified,omitempty"`
	// RacyClassificationScore - The racy classification score.
	RacyClassificationScore *float64 `json:"RacyClassificationScore,omitempty"`
	// IsImageRacyClassified - Indicates if the image is classified as racy.
	IsImageRacyClassified *bool `json:"IsImageRacyClassified,omitempty"`
	// AdvancedInfo - The advanced info.
	AdvancedInfo *[]KeyValuePair `json:"AdvancedInfo,omitempty"`
	// Status - The evaluate status
	Status *Status `json:"Status,omitempty"`
}

Evaluate evaluate response object.

type Face

type Face struct {
	// Bottom - The bottom coordinate.
	Bottom *int32 `json:"Bottom,omitempty"`
	// Left - The left coordinate.
	Left *int32 `json:"Left,omitempty"`
	// Right - The right coordinate.
	Right *int32 `json:"Right,omitempty"`
	// Top - The top coordinate.
	Top *int32 `json:"Top,omitempty"`
}

Face coordinates to the found face.

type FoundFaces

type FoundFaces struct {
	autorest.Response `json:"-"`
	// Status - The evaluate status
	Status *Status `json:"Status,omitempty"`
	// TrackingID - The tracking id.
	TrackingID *string `json:"TrackingId,omitempty"`
	// CacheID - The cache id.
	CacheID *string `json:"CacheId,omitempty"`
	// Result - True if result was found.
	Result *bool `json:"Result,omitempty"`
	// Count - Number of faces found.
	Count *int32 `json:"Count,omitempty"`
	// AdvancedInfo - The advanced info.
	AdvancedInfo *[]KeyValuePair `json:"AdvancedInfo,omitempty"`
	// Faces - The list of faces.
	Faces *[]Face `json:"Faces,omitempty"`
}

FoundFaces request object the contains found faces.

type Frame

type Frame struct {
	// Timestamp - Timestamp of the frame.
	Timestamp *string `json:"Timestamp,omitempty"`
	// FrameImage - Frame image.
	FrameImage *string `json:"FrameImage,omitempty"`
	// Metadata - Array of KeyValue.
	Metadata *[]KeyValuePair `json:"Metadata,omitempty"`
	// ReviewerResultTags - Reviewer result tags.
	ReviewerResultTags *[]Tag `json:"ReviewerResultTags,omitempty"`
}

Frame video frame property details.

type Frames

type Frames struct {
	autorest.Response `json:"-"`
	// ReviewID - Id of the review.
	ReviewID    *string  `json:"ReviewId,omitempty"`
	VideoFrames *[]Frame `json:"VideoFrames,omitempty"`
}

Frames the response for a Get Frames request.

type IPA

type IPA struct {
	// SubType - Subtype of the detected IP Address.
	SubType *string `json:"SubType,omitempty"`
	// Text - Detected IP Address.
	Text *string `json:"Text,omitempty"`
	// Index - Index(Location) of the IP Address in the input text content.
	Index *int32 `json:"Index,omitempty"`
}

IPA IP Address details.

type Image

type Image struct {
	autorest.Response `json:"-"`
	// ContentID - Content Id.
	ContentID *string `json:"ContentId,omitempty"`
	// AdditionalInfo - Advanced info list.
	AdditionalInfo *[]ImageAdditionalInfoItem `json:"AdditionalInfo,omitempty"`
	// Status - Status details.
	Status *Status `json:"Status,omitempty"`
	// TrackingID - Tracking Id.
	TrackingID *string `json:"TrackingId,omitempty"`
}

Image image Properties.

type ImageAdditionalInfoItem

type ImageAdditionalInfoItem struct {
	// Key - Key parameter.
	Key *string `json:"Key,omitempty"`
	// Value - Value parameter.
	Value *string `json:"Value,omitempty"`
}

ImageAdditionalInfoItem ...

type ImageIds

type ImageIds struct {
	autorest.Response `json:"-"`
	// ContentSource - Source of the content.
	ContentSource *string `json:"ContentSource,omitempty"`
	// ContentIds - Id of the contents.
	ContentIds *[]int32 `json:"ContentIds,omitempty"`
	// Status - Get Image status.
	Status *Status `json:"Status,omitempty"`
	// TrackingID - Tracking Id.
	TrackingID *string `json:"TrackingId,omitempty"`
}

ImageIds image Id properties.

type ImageList

type ImageList struct {
	autorest.Response `json:"-"`
	// ID - Image List Id.
	ID *int32 `json:"Id,omitempty"`
	// Name - Image List Name.
	Name *string `json:"Name,omitempty"`
	// Description - Description for image list.
	Description *string `json:"Description,omitempty"`
	// Metadata - Image List Metadata.
	Metadata map[string]*string `json:"Metadata"`
}

ImageList image List Properties.

func (ImageList) MarshalJSON

func (il ImageList) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ImageList.

type ImageModerationClient

type ImageModerationClient struct {
	BaseClient
}

ImageModerationClient is the you use the API to scan your content as it is generated. Content Moderator then processes your content and sends the results along with relevant information either back to your systems or to the built-in review tool. You can use this information to take decisions e.g. take it down, send to human judge, etc.

When using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. Text can be at most 1024 characters long. If the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue.

func NewImageModerationClient

func NewImageModerationClient(endpoint string) ImageModerationClient

NewImageModerationClient creates an instance of the ImageModerationClient client.

func (ImageModerationClient) EvaluateFileInput

func (client ImageModerationClient) EvaluateFileInput(ctx context.Context, imageStream io.ReadCloser, cacheImage *bool) (result Evaluate, err error)

EvaluateFileInput returns probabilities of the image containing racy or adult content. Parameters: imageStream - the image file. cacheImage - whether to retain the submitted image for future use; defaults to false if omitted.

func (ImageModerationClient) EvaluateFileInputPreparer

func (client ImageModerationClient) EvaluateFileInputPreparer(ctx context.Context, imageStream io.ReadCloser, cacheImage *bool) (*http.Request, error)

EvaluateFileInputPreparer prepares the EvaluateFileInput request.

func (ImageModerationClient) EvaluateFileInputResponder

func (client ImageModerationClient) EvaluateFileInputResponder(resp *http.Response) (result Evaluate, err error)

EvaluateFileInputResponder handles the response to the EvaluateFileInput request. The method always closes the http.Response Body.

func (ImageModerationClient) EvaluateFileInputSender

func (client ImageModerationClient) EvaluateFileInputSender(req *http.Request) (*http.Response, error)

EvaluateFileInputSender sends the EvaluateFileInput request. The method will close the http.Response Body if it receives an error.

func (ImageModerationClient) EvaluateMethod

func (client ImageModerationClient) EvaluateMethod(ctx context.Context, cacheImage *bool) (result Evaluate, err error)

EvaluateMethod returns probabilities of the image containing racy or adult content. Parameters: cacheImage - whether to retain the submitted image for future use; defaults to false if omitted.

func (ImageModerationClient) EvaluateMethodPreparer

func (client ImageModerationClient) EvaluateMethodPreparer(ctx context.Context, cacheImage *bool) (*http.Request, error)

EvaluateMethodPreparer prepares the EvaluateMethod request.

func (ImageModerationClient) EvaluateMethodResponder

func (client ImageModerationClient) EvaluateMethodResponder(resp *http.Response) (result Evaluate, err error)

EvaluateMethodResponder handles the response to the EvaluateMethod request. The method always closes the http.Response Body.

func (ImageModerationClient) EvaluateMethodSender

func (client ImageModerationClient) EvaluateMethodSender(req *http.Request) (*http.Response, error)

EvaluateMethodSender sends the EvaluateMethod request. The method will close the http.Response Body if it receives an error.

func (ImageModerationClient) EvaluateURLInput

func (client ImageModerationClient) EvaluateURLInput(ctx context.Context, contentType string, imageURL ImageURL, cacheImage *bool) (result Evaluate, err error)

EvaluateURLInput returns probabilities of the image containing racy or adult content. Parameters: contentType - the content type. imageURL - the image url. cacheImage - whether to retain the submitted image for future use; defaults to false if omitted.

func (ImageModerationClient) EvaluateURLInputPreparer

func (client ImageModerationClient) EvaluateURLInputPreparer(ctx context.Context, contentType string, imageURL ImageURL, cacheImage *bool) (*http.Request, error)

EvaluateURLInputPreparer prepares the EvaluateURLInput request.

func (ImageModerationClient) EvaluateURLInputResponder

func (client ImageModerationClient) EvaluateURLInputResponder(resp *http.Response) (result Evaluate, err error)

EvaluateURLInputResponder handles the response to the EvaluateURLInput request. The method always closes the http.Response Body.

func (ImageModerationClient) EvaluateURLInputSender

func (client ImageModerationClient) EvaluateURLInputSender(req *http.Request) (*http.Response, error)

EvaluateURLInputSender sends the EvaluateURLInput request. The method will close the http.Response Body if it receives an error.

func (ImageModerationClient) FindFaces

func (client ImageModerationClient) FindFaces(ctx context.Context, cacheImage *bool) (result FoundFaces, err error)

FindFaces returns the list of faces found. Parameters: cacheImage - whether to retain the submitted image for future use; defaults to false if omitted.

func (ImageModerationClient) FindFacesFileInput

func (client ImageModerationClient) FindFacesFileInput(ctx context.Context, imageStream io.ReadCloser, cacheImage *bool) (result FoundFaces, err error)

FindFacesFileInput returns the list of faces found. Parameters: imageStream - the image file. cacheImage - whether to retain the submitted image for future use; defaults to false if omitted.

func (ImageModerationClient) FindFacesFileInputPreparer

func (client ImageModerationClient) FindFacesFileInputPreparer(ctx context.Context, imageStream io.ReadCloser, cacheImage *bool) (*http.Request, error)

FindFacesFileInputPreparer prepares the FindFacesFileInput request.

func (ImageModerationClient) FindFacesFileInputResponder

func (client ImageModerationClient) FindFacesFileInputResponder(resp *http.Response) (result FoundFaces, err error)

FindFacesFileInputResponder handles the response to the FindFacesFileInput request. The method always closes the http.Response Body.

func (ImageModerationClient) FindFacesFileInputSender

func (client ImageModerationClient) FindFacesFileInputSender(req *http.Request) (*http.Response, error)

FindFacesFileInputSender sends the FindFacesFileInput request. The method will close the http.Response Body if it receives an error.

func (ImageModerationClient) FindFacesPreparer

func (client ImageModerationClient) FindFacesPreparer(ctx context.Context, cacheImage *bool) (*http.Request, error)

FindFacesPreparer prepares the FindFaces request.

func (ImageModerationClient) FindFacesResponder

func (client ImageModerationClient) FindFacesResponder(resp *http.Response) (result FoundFaces, err error)

FindFacesResponder handles the response to the FindFaces request. The method always closes the http.Response Body.

func (ImageModerationClient) FindFacesSender

func (client ImageModerationClient) FindFacesSender(req *http.Request) (*http.Response, error)

FindFacesSender sends the FindFaces request. The method will close the http.Response Body if it receives an error.

func (ImageModerationClient) FindFacesURLInput

func (client ImageModerationClient) FindFacesURLInput(ctx context.Context, contentType string, imageURL ImageURL, cacheImage *bool) (result FoundFaces, err error)

FindFacesURLInput returns the list of faces found. Parameters: contentType - the content type. imageURL - the image url. cacheImage - whether to retain the submitted image for future use; defaults to false if omitted.

func (ImageModerationClient) FindFacesURLInputPreparer

func (client ImageModerationClient) FindFacesURLInputPreparer(ctx context.Context, contentType string, imageURL ImageURL, cacheImage *bool) (*http.Request, error)

FindFacesURLInputPreparer prepares the FindFacesURLInput request.

func (ImageModerationClient) FindFacesURLInputResponder

func (client ImageModerationClient) FindFacesURLInputResponder(resp *http.Response) (result FoundFaces, err error)

FindFacesURLInputResponder handles the response to the FindFacesURLInput request. The method always closes the http.Response Body.

func (ImageModerationClient) FindFacesURLInputSender

func (client ImageModerationClient) FindFacesURLInputSender(req *http.Request) (*http.Response, error)

FindFacesURLInputSender sends the FindFacesURLInput request. The method will close the http.Response Body if it receives an error.

func (ImageModerationClient) MatchFileInput

func (client ImageModerationClient) MatchFileInput(ctx context.Context, imageStream io.ReadCloser, listID string, cacheImage *bool) (result MatchResponse, err error)

MatchFileInput fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API.

Returns ID and tags of matching image.<br/> <br/> Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. Parameters: imageStream - the image file. listID - the list Id. cacheImage - whether to retain the submitted image for future use; defaults to false if omitted.

func (ImageModerationClient) MatchFileInputPreparer

func (client ImageModerationClient) MatchFileInputPreparer(ctx context.Context, imageStream io.ReadCloser, listID string, cacheImage *bool) (*http.Request, error)

MatchFileInputPreparer prepares the MatchFileInput request.

func (ImageModerationClient) MatchFileInputResponder

func (client ImageModerationClient) MatchFileInputResponder(resp *http.Response) (result MatchResponse, err error)

MatchFileInputResponder handles the response to the MatchFileInput request. The method always closes the http.Response Body.

func (ImageModerationClient) MatchFileInputSender

func (client ImageModerationClient) MatchFileInputSender(req *http.Request) (*http.Response, error)

MatchFileInputSender sends the MatchFileInput request. The method will close the http.Response Body if it receives an error.

func (ImageModerationClient) MatchMethod

func (client ImageModerationClient) MatchMethod(ctx context.Context, listID string, cacheImage *bool) (result MatchResponse, err error)

MatchMethod fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API.

Returns ID and tags of matching image.<br/> <br/> Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. Parameters: listID - the list Id. cacheImage - whether to retain the submitted image for future use; defaults to false if omitted.

func (ImageModerationClient) MatchMethodPreparer

func (client ImageModerationClient) MatchMethodPreparer(ctx context.Context, listID string, cacheImage *bool) (*http.Request, error)

MatchMethodPreparer prepares the MatchMethod request.

func (ImageModerationClient) MatchMethodResponder

func (client ImageModerationClient) MatchMethodResponder(resp *http.Response) (result MatchResponse, err error)

MatchMethodResponder handles the response to the MatchMethod request. The method always closes the http.Response Body.

func (ImageModerationClient) MatchMethodSender

func (client ImageModerationClient) MatchMethodSender(req *http.Request) (*http.Response, error)

MatchMethodSender sends the MatchMethod request. The method will close the http.Response Body if it receives an error.

func (ImageModerationClient) MatchURLInput

func (client ImageModerationClient) MatchURLInput(ctx context.Context, contentType string, imageURL ImageURL, listID string, cacheImage *bool) (result MatchResponse, err error)

MatchURLInput fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API.

Returns ID and tags of matching image.<br/> <br/> Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. Parameters: contentType - the content type. imageURL - the image url. listID - the list Id. cacheImage - whether to retain the submitted image for future use; defaults to false if omitted.

func (ImageModerationClient) MatchURLInputPreparer

func (client ImageModerationClient) MatchURLInputPreparer(ctx context.Context, contentType string, imageURL ImageURL, listID string, cacheImage *bool) (*http.Request, error)

MatchURLInputPreparer prepares the MatchURLInput request.

func (ImageModerationClient) MatchURLInputResponder

func (client ImageModerationClient) MatchURLInputResponder(resp *http.Response) (result MatchResponse, err error)

MatchURLInputResponder handles the response to the MatchURLInput request. The method always closes the http.Response Body.

func (ImageModerationClient) MatchURLInputSender

func (client ImageModerationClient) MatchURLInputSender(req *http.Request) (*http.Response, error)

MatchURLInputSender sends the MatchURLInput request. The method will close the http.Response Body if it receives an error.

func (ImageModerationClient) OCRFileInput

func (client ImageModerationClient) OCRFileInput(ctx context.Context, language string, imageStream io.ReadCloser, cacheImage *bool, enhanced *bool) (result OCR, err error)

OCRFileInput returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. Parameters: language - language of the terms. imageStream - the image file. cacheImage - whether to retain the submitted image for future use; defaults to false if omitted. enhanced - when set to True, the image goes through additional processing to come with additional candidates.

image/tiff is not supported when enhanced is set to true

Note: This impacts the response time.

func (ImageModerationClient) OCRFileInputPreparer

func (client ImageModerationClient) OCRFileInputPreparer(ctx context.Context, language string, imageStream io.ReadCloser, cacheImage *bool, enhanced *bool) (*http.Request, error)

OCRFileInputPreparer prepares the OCRFileInput request.

func (ImageModerationClient) OCRFileInputResponder

func (client ImageModerationClient) OCRFileInputResponder(resp *http.Response) (result OCR, err error)

OCRFileInputResponder handles the response to the OCRFileInput request. The method always closes the http.Response Body.

func (ImageModerationClient) OCRFileInputSender

func (client ImageModerationClient) OCRFileInputSender(req *http.Request) (*http.Response, error)

OCRFileInputSender sends the OCRFileInput request. The method will close the http.Response Body if it receives an error.

func (ImageModerationClient) OCRMethod

func (client ImageModerationClient) OCRMethod(ctx context.Context, language string, cacheImage *bool, enhanced *bool) (result OCR, err error)

OCRMethod returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. Parameters: language - language of the terms. cacheImage - whether to retain the submitted image for future use; defaults to false if omitted. enhanced - when set to True, the image goes through additional processing to come with additional candidates.

image/tiff is not supported when enhanced is set to true

Note: This impacts the response time.

func (ImageModerationClient) OCRMethodPreparer

func (client ImageModerationClient) OCRMethodPreparer(ctx context.Context, language string, cacheImage *bool, enhanced *bool) (*http.Request, error)

OCRMethodPreparer prepares the OCRMethod request.

func (ImageModerationClient) OCRMethodResponder

func (client ImageModerationClient) OCRMethodResponder(resp *http.Response) (result OCR, err error)

OCRMethodResponder handles the response to the OCRMethod request. The method always closes the http.Response Body.

func (ImageModerationClient) OCRMethodSender

func (client ImageModerationClient) OCRMethodSender(req *http.Request) (*http.Response, error)

OCRMethodSender sends the OCRMethod request. The method will close the http.Response Body if it receives an error.

func (ImageModerationClient) OCRURLInput

func (client ImageModerationClient) OCRURLInput(ctx context.Context, language string, contentType string, imageURL ImageURL, cacheImage *bool, enhanced *bool) (result OCR, err error)

OCRURLInput returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. Parameters: language - language of the terms. contentType - the content type. imageURL - the image url. cacheImage - whether to retain the submitted image for future use; defaults to false if omitted. enhanced - when set to True, the image goes through additional processing to come with additional candidates.

image/tiff is not supported when enhanced is set to true

Note: This impacts the response time.

func (ImageModerationClient) OCRURLInputPreparer

func (client ImageModerationClient) OCRURLInputPreparer(ctx context.Context, language string, contentType string, imageURL ImageURL, cacheImage *bool, enhanced *bool) (*http.Request, error)

OCRURLInputPreparer prepares the OCRURLInput request.

func (ImageModerationClient) OCRURLInputResponder

func (client ImageModerationClient) OCRURLInputResponder(resp *http.Response) (result OCR, err error)

OCRURLInputResponder handles the response to the OCRURLInput request. The method always closes the http.Response Body.

func (ImageModerationClient) OCRURLInputSender

func (client ImageModerationClient) OCRURLInputSender(req *http.Request) (*http.Response, error)

OCRURLInputSender sends the OCRURLInput request. The method will close the http.Response Body if it receives an error.

type ImageURL

type ImageURL struct {
	DataRepresentation *string `json:"DataRepresentation,omitempty"`
	Value              *string `json:"Value,omitempty"`
}

ImageURL ...

type Job

type Job struct {
	autorest.Response `json:"-"`
	// ID - The job id.
	ID *string `json:"Id,omitempty"`
	// TeamName - The team name associated with the job.
	TeamName *string `json:"TeamName,omitempty"`
	// Status - The status string (<Pending, Failed, Completed>).
	Status *string `json:"Status,omitempty"`
	// WorkflowID - The Id of the workflow.
	WorkflowID *string `json:"WorkflowId,omitempty"`
	// Type - Type of the content.
	Type *string `json:"Type,omitempty"`
	// CallBackEndpoint - The callback endpoint.
	CallBackEndpoint *string `json:"CallBackEndpoint,omitempty"`
	// ReviewID - Review Id if one is created.
	ReviewID *string `json:"ReviewId,omitempty"`
	// ResultMetaData - Array of KeyValue pairs.
	ResultMetaData *[]KeyValuePair `json:"ResultMetaData,omitempty"`
	// JobExecutionReport - Job execution report- Array of KeyValue pairs object.
	JobExecutionReport *[]JobExecutionReportDetails `json:"JobExecutionReport,omitempty"`
}

Job the Job object.

type JobExecutionReportDetails

type JobExecutionReportDetails struct {
	// Ts - Time details.
	Ts *string `json:"Ts,omitempty"`
	// Msg - Message details.
	Msg *string `json:"Msg,omitempty"`
}

JobExecutionReportDetails job Execution Report Values.

type JobID

type JobID struct {
	autorest.Response `json:"-"`
	// JobID - Id of the created job.
	JobID *string `json:"JobId,omitempty"`
}

JobID ...

type JobListResult

type JobListResult struct {
	// Value - The job id.
	Value *[]string `json:"Value,omitempty"`
}

JobListResult the list of job ids.

type KeyValuePair

type KeyValuePair struct {
	// Key - The key parameter.
	Key *string `json:"Key,omitempty"`
	// Value - The value parameter.
	Value *string `json:"Value,omitempty"`
}

KeyValuePair the key value pair object properties.

type ListImageList

type ListImageList struct {
	autorest.Response `json:"-"`
	Value             *[]ImageList `json:"value,omitempty"`
}

ListImageList ...

type ListManagementImageClient

type ListManagementImageClient struct {
	BaseClient
}

ListManagementImageClient is the you use the API to scan your content as it is generated. Content Moderator then processes your content and sends the results along with relevant information either back to your systems or to the built-in review tool. You can use this information to take decisions e.g. take it down, send to human judge, etc.

When using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. Text can be at most 1024 characters long. If the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue.

func NewListManagementImageClient

func NewListManagementImageClient(endpoint string) ListManagementImageClient

NewListManagementImageClient creates an instance of the ListManagementImageClient client.

func (ListManagementImageClient) AddImage

func (client ListManagementImageClient) AddImage(ctx context.Context, listID string, tag *int32, label string) (result Image, err error)

AddImage add an image to the list with list Id equal to list Id passed. Parameters: listID - list Id of the image list. tag - tag for the image. label - the image label.

func (ListManagementImageClient) AddImageFileInput

func (client ListManagementImageClient) AddImageFileInput(ctx context.Context, listID string, imageStream io.ReadCloser, tag *int32, label string) (result Image, err error)

AddImageFileInput add an image to the list with list Id equal to list Id passed. Parameters: listID - list Id of the image list. imageStream - the image file. tag - tag for the image. label - the image label.

func (ListManagementImageClient) AddImageFileInputPreparer

func (client ListManagementImageClient) AddImageFileInputPreparer(ctx context.Context, listID string, imageStream io.ReadCloser, tag *int32, label string) (*http.Request, error)

AddImageFileInputPreparer prepares the AddImageFileInput request.

func (ListManagementImageClient) AddImageFileInputResponder

func (client ListManagementImageClient) AddImageFileInputResponder(resp *http.Response) (result Image, err error)

AddImageFileInputResponder handles the response to the AddImageFileInput request. The method always closes the http.Response Body.

func (ListManagementImageClient) AddImageFileInputSender

func (client ListManagementImageClient) AddImageFileInputSender(req *http.Request) (*http.Response, error)

AddImageFileInputSender sends the AddImageFileInput request. The method will close the http.Response Body if it receives an error.

func (ListManagementImageClient) AddImagePreparer

func (client ListManagementImageClient) AddImagePreparer(ctx context.Context, listID string, tag *int32, label string) (*http.Request, error)

AddImagePreparer prepares the AddImage request.

func (ListManagementImageClient) AddImageResponder

func (client ListManagementImageClient) AddImageResponder(resp *http.Response) (result Image, err error)

AddImageResponder handles the response to the AddImage request. The method always closes the http.Response Body.

func (ListManagementImageClient) AddImageSender

func (client ListManagementImageClient) AddImageSender(req *http.Request) (*http.Response, error)

AddImageSender sends the AddImage request. The method will close the http.Response Body if it receives an error.

func (ListManagementImageClient) AddImageURLInput

func (client ListManagementImageClient) AddImageURLInput(ctx context.Context, listID string, contentType string, imageURL ImageURL, tag *int32, label string) (result Image, err error)

AddImageURLInput add an image to the list with list Id equal to list Id passed. Parameters: listID - list Id of the image list. contentType - the content type. imageURL - the image url. tag - tag for the image. label - the image label.

func (ListManagementImageClient) AddImageURLInputPreparer

func (client ListManagementImageClient) AddImageURLInputPreparer(ctx context.Context, listID string, contentType string, imageURL ImageURL, tag *int32, label string) (*http.Request, error)

AddImageURLInputPreparer prepares the AddImageURLInput request.

func (ListManagementImageClient) AddImageURLInputResponder

func (client ListManagementImageClient) AddImageURLInputResponder(resp *http.Response) (result Image, err error)

AddImageURLInputResponder handles the response to the AddImageURLInput request. The method always closes the http.Response Body.

func (ListManagementImageClient) AddImageURLInputSender

func (client ListManagementImageClient) AddImageURLInputSender(req *http.Request) (*http.Response, error)

AddImageURLInputSender sends the AddImageURLInput request. The method will close the http.Response Body if it receives an error.

func (ListManagementImageClient) DeleteAllImages

func (client ListManagementImageClient) DeleteAllImages(ctx context.Context, listID string) (result String, err error)

DeleteAllImages deletes all images from the list with list Id equal to list Id passed. Parameters: listID - list Id of the image list.

func (ListManagementImageClient) DeleteAllImagesPreparer

func (client ListManagementImageClient) DeleteAllImagesPreparer(ctx context.Context, listID string) (*http.Request, error)

DeleteAllImagesPreparer prepares the DeleteAllImages request.

func (ListManagementImageClient) DeleteAllImagesResponder

func (client ListManagementImageClient) DeleteAllImagesResponder(resp *http.Response) (result String, err error)

DeleteAllImagesResponder handles the response to the DeleteAllImages request. The method always closes the http.Response Body.

func (ListManagementImageClient) DeleteAllImagesSender

func (client ListManagementImageClient) DeleteAllImagesSender(req *http.Request) (*http.Response, error)

DeleteAllImagesSender sends the DeleteAllImages request. The method will close the http.Response Body if it receives an error.

func (ListManagementImageClient) DeleteImage

func (client ListManagementImageClient) DeleteImage(ctx context.Context, listID string, imageID string) (result String, err error)

DeleteImage deletes an image from the list with list Id and image Id passed. Parameters: listID - list Id of the image list. imageID - id of the image.

func (ListManagementImageClient) DeleteImagePreparer

func (client ListManagementImageClient) DeleteImagePreparer(ctx context.Context, listID string, imageID string) (*http.Request, error)

DeleteImagePreparer prepares the DeleteImage request.

func (ListManagementImageClient) DeleteImageResponder

func (client ListManagementImageClient) DeleteImageResponder(resp *http.Response) (result String, err error)

DeleteImageResponder handles the response to the DeleteImage request. The method always closes the http.Response Body.

func (ListManagementImageClient) DeleteImageSender

func (client ListManagementImageClient) DeleteImageSender(req *http.Request) (*http.Response, error)

DeleteImageSender sends the DeleteImage request. The method will close the http.Response Body if it receives an error.

func (ListManagementImageClient) GetAllImageIds

func (client ListManagementImageClient) GetAllImageIds(ctx context.Context, listID string) (result ImageIds, err error)

GetAllImageIds gets all image Ids from the list with list Id equal to list Id passed. Parameters: listID - list Id of the image list.

func (ListManagementImageClient) GetAllImageIdsPreparer

func (client ListManagementImageClient) GetAllImageIdsPreparer(ctx context.Context, listID string) (*http.Request, error)

GetAllImageIdsPreparer prepares the GetAllImageIds request.

func (ListManagementImageClient) GetAllImageIdsResponder

func (client ListManagementImageClient) GetAllImageIdsResponder(resp *http.Response) (result ImageIds, err error)

GetAllImageIdsResponder handles the response to the GetAllImageIds request. The method always closes the http.Response Body.

func (ListManagementImageClient) GetAllImageIdsSender

func (client ListManagementImageClient) GetAllImageIdsSender(req *http.Request) (*http.Response, error)

GetAllImageIdsSender sends the GetAllImageIds request. The method will close the http.Response Body if it receives an error.

type ListManagementImageListsClient

type ListManagementImageListsClient struct {
	BaseClient
}

ListManagementImageListsClient is the you use the API to scan your content as it is generated. Content Moderator then processes your content and sends the results along with relevant information either back to your systems or to the built-in review tool. You can use this information to take decisions e.g. take it down, send to human judge, etc.

When using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. Text can be at most 1024 characters long. If the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue.

func NewListManagementImageListsClient

func NewListManagementImageListsClient(endpoint string) ListManagementImageListsClient

NewListManagementImageListsClient creates an instance of the ListManagementImageListsClient client.

func (ListManagementImageListsClient) Create

func (client ListManagementImageListsClient) Create(ctx context.Context, contentType string, body Body) (result ImageList, err error)

Create creates an image list. Parameters: contentType - the content type. body - schema of the body.

func (ListManagementImageListsClient) CreatePreparer

func (client ListManagementImageListsClient) CreatePreparer(ctx context.Context, contentType string, body Body) (*http.Request, error)

CreatePreparer prepares the Create request.

func (ListManagementImageListsClient) CreateResponder

func (client ListManagementImageListsClient) CreateResponder(resp *http.Response) (result ImageList, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (ListManagementImageListsClient) CreateSender

func (client ListManagementImageListsClient) CreateSender(req *http.Request) (*http.Response, error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

func (ListManagementImageListsClient) Delete

func (client ListManagementImageListsClient) Delete(ctx context.Context, listID string) (result String, err error)

Delete deletes image list with the list Id equal to list Id passed. Parameters: listID - list Id of the image list.

func (ListManagementImageListsClient) DeletePreparer

func (client ListManagementImageListsClient) DeletePreparer(ctx context.Context, listID string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (ListManagementImageListsClient) DeleteResponder

func (client ListManagementImageListsClient) DeleteResponder(resp *http.Response) (result String, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (ListManagementImageListsClient) DeleteSender

func (client ListManagementImageListsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (ListManagementImageListsClient) GetAllImageLists

func (client ListManagementImageListsClient) GetAllImageLists(ctx context.Context) (result ListImageList, err error)

GetAllImageLists gets all the Image Lists.

func (ListManagementImageListsClient) GetAllImageListsPreparer

func (client ListManagementImageListsClient) GetAllImageListsPreparer(ctx context.Context) (*http.Request, error)

GetAllImageListsPreparer prepares the GetAllImageLists request.

func (ListManagementImageListsClient) GetAllImageListsResponder

func (client ListManagementImageListsClient) GetAllImageListsResponder(resp *http.Response) (result ListImageList, err error)

GetAllImageListsResponder handles the response to the GetAllImageLists request. The method always closes the http.Response Body.

func (ListManagementImageListsClient) GetAllImageListsSender

func (client ListManagementImageListsClient) GetAllImageListsSender(req *http.Request) (*http.Response, error)

GetAllImageListsSender sends the GetAllImageLists request. The method will close the http.Response Body if it receives an error.

func (ListManagementImageListsClient) GetDetails

func (client ListManagementImageListsClient) GetDetails(ctx context.Context, listID string) (result ImageList, err error)

GetDetails returns the details of the image list with list Id equal to list Id passed. Parameters: listID - list Id of the image list.

func (ListManagementImageListsClient) GetDetailsPreparer

func (client ListManagementImageListsClient) GetDetailsPreparer(ctx context.Context, listID string) (*http.Request, error)

GetDetailsPreparer prepares the GetDetails request.

func (ListManagementImageListsClient) GetDetailsResponder

func (client ListManagementImageListsClient) GetDetailsResponder(resp *http.Response) (result ImageList, err error)

GetDetailsResponder handles the response to the GetDetails request. The method always closes the http.Response Body.

func (ListManagementImageListsClient) GetDetailsSender

func (client ListManagementImageListsClient) GetDetailsSender(req *http.Request) (*http.Response, error)

GetDetailsSender sends the GetDetails request. The method will close the http.Response Body if it receives an error.

func (ListManagementImageListsClient) RefreshIndexMethod

func (client ListManagementImageListsClient) RefreshIndexMethod(ctx context.Context, listID string) (result RefreshIndex, err error)

RefreshIndexMethod refreshes the index of the list with list Id equal to list Id passed. Parameters: listID - list Id of the image list.

func (ListManagementImageListsClient) RefreshIndexMethodPreparer

func (client ListManagementImageListsClient) RefreshIndexMethodPreparer(ctx context.Context, listID string) (*http.Request, error)

RefreshIndexMethodPreparer prepares the RefreshIndexMethod request.

func (ListManagementImageListsClient) RefreshIndexMethodResponder

func (client ListManagementImageListsClient) RefreshIndexMethodResponder(resp *http.Response) (result RefreshIndex, err error)

RefreshIndexMethodResponder handles the response to the RefreshIndexMethod request. The method always closes the http.Response Body.

func (ListManagementImageListsClient) RefreshIndexMethodSender

func (client ListManagementImageListsClient) RefreshIndexMethodSender(req *http.Request) (*http.Response, error)

RefreshIndexMethodSender sends the RefreshIndexMethod request. The method will close the http.Response Body if it receives an error.

func (ListManagementImageListsClient) Update

func (client ListManagementImageListsClient) Update(ctx context.Context, listID string, contentType string, body Body) (result ImageList, err error)

Update updates an image list with list Id equal to list Id passed. Parameters: listID - list Id of the image list. contentType - the content type. body - schema of the body.

func (ListManagementImageListsClient) UpdatePreparer

func (client ListManagementImageListsClient) UpdatePreparer(ctx context.Context, listID string, contentType string, body Body) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (ListManagementImageListsClient) UpdateResponder

func (client ListManagementImageListsClient) UpdateResponder(resp *http.Response) (result ImageList, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (ListManagementImageListsClient) UpdateSender

func (client ListManagementImageListsClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type ListManagementTermClient

type ListManagementTermClient struct {
	BaseClient
}

ListManagementTermClient is the you use the API to scan your content as it is generated. Content Moderator then processes your content and sends the results along with relevant information either back to your systems or to the built-in review tool. You can use this information to take decisions e.g. take it down, send to human judge, etc.

When using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. Text can be at most 1024 characters long. If the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue.

func NewListManagementTermClient

func NewListManagementTermClient(endpoint string) ListManagementTermClient

NewListManagementTermClient creates an instance of the ListManagementTermClient client.

func (ListManagementTermClient) AddTerm

func (client ListManagementTermClient) AddTerm(ctx context.Context, listID string, term string, language string) (result autorest.Response, err error)

AddTerm add a term to the term list with list Id equal to list Id passed. Parameters: listID - list Id of the image list. term - term to be deleted language - language of the terms.

func (ListManagementTermClient) AddTermPreparer

func (client ListManagementTermClient) AddTermPreparer(ctx context.Context, listID string, term string, language string) (*http.Request, error)

AddTermPreparer prepares the AddTerm request.

func (ListManagementTermClient) AddTermResponder

func (client ListManagementTermClient) AddTermResponder(resp *http.Response) (result autorest.Response, err error)

AddTermResponder handles the response to the AddTerm request. The method always closes the http.Response Body.

func (ListManagementTermClient) AddTermSender

func (client ListManagementTermClient) AddTermSender(req *http.Request) (*http.Response, error)

AddTermSender sends the AddTerm request. The method will close the http.Response Body if it receives an error.

func (ListManagementTermClient) DeleteAllTerms

func (client ListManagementTermClient) DeleteAllTerms(ctx context.Context, listID string, language string) (result String, err error)

DeleteAllTerms deletes all terms from the list with list Id equal to the list Id passed. Parameters: listID - list Id of the image list. language - language of the terms.

func (ListManagementTermClient) DeleteAllTermsPreparer

func (client ListManagementTermClient) DeleteAllTermsPreparer(ctx context.Context, listID string, language string) (*http.Request, error)

DeleteAllTermsPreparer prepares the DeleteAllTerms request.

func (ListManagementTermClient) DeleteAllTermsResponder

func (client ListManagementTermClient) DeleteAllTermsResponder(resp *http.Response) (result String, err error)

DeleteAllTermsResponder handles the response to the DeleteAllTerms request. The method always closes the http.Response Body.

func (ListManagementTermClient) DeleteAllTermsSender

func (client ListManagementTermClient) DeleteAllTermsSender(req *http.Request) (*http.Response, error)

DeleteAllTermsSender sends the DeleteAllTerms request. The method will close the http.Response Body if it receives an error.

func (ListManagementTermClient) DeleteTerm

func (client ListManagementTermClient) DeleteTerm(ctx context.Context, listID string, term string, language string) (result String, err error)

DeleteTerm deletes a term from the list with list Id equal to the list Id passed. Parameters: listID - list Id of the image list. term - term to be deleted language - language of the terms.

func (ListManagementTermClient) DeleteTermPreparer

func (client ListManagementTermClient) DeleteTermPreparer(ctx context.Context, listID string, term string, language string) (*http.Request, error)

DeleteTermPreparer prepares the DeleteTerm request.

func (ListManagementTermClient) DeleteTermResponder

func (client ListManagementTermClient) DeleteTermResponder(resp *http.Response) (result String, err error)

DeleteTermResponder handles the response to the DeleteTerm request. The method always closes the http.Response Body.

func (ListManagementTermClient) DeleteTermSender

func (client ListManagementTermClient) DeleteTermSender(req *http.Request) (*http.Response, error)

DeleteTermSender sends the DeleteTerm request. The method will close the http.Response Body if it receives an error.

func (ListManagementTermClient) GetAllTerms

func (client ListManagementTermClient) GetAllTerms(ctx context.Context, listID string, language string, offset *int32, limit *int32) (result Terms, err error)

GetAllTerms gets all terms from the list with list Id equal to the list Id passed. Parameters: listID - list Id of the image list. language - language of the terms. offset - the pagination start index. limit - the max limit.

func (ListManagementTermClient) GetAllTermsPreparer

func (client ListManagementTermClient) GetAllTermsPreparer(ctx context.Context, listID string, language string, offset *int32, limit *int32) (*http.Request, error)

GetAllTermsPreparer prepares the GetAllTerms request.

func (ListManagementTermClient) GetAllTermsResponder

func (client ListManagementTermClient) GetAllTermsResponder(resp *http.Response) (result Terms, err error)

GetAllTermsResponder handles the response to the GetAllTerms request. The method always closes the http.Response Body.

func (ListManagementTermClient) GetAllTermsSender

func (client ListManagementTermClient) GetAllTermsSender(req *http.Request) (*http.Response, error)

GetAllTermsSender sends the GetAllTerms request. The method will close the http.Response Body if it receives an error.

type ListManagementTermListsClient

type ListManagementTermListsClient struct {
	BaseClient
}

ListManagementTermListsClient is the you use the API to scan your content as it is generated. Content Moderator then processes your content and sends the results along with relevant information either back to your systems or to the built-in review tool. You can use this information to take decisions e.g. take it down, send to human judge, etc.

When using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. Text can be at most 1024 characters long. If the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue.

func NewListManagementTermListsClient

func NewListManagementTermListsClient(endpoint string) ListManagementTermListsClient

NewListManagementTermListsClient creates an instance of the ListManagementTermListsClient client.

func (ListManagementTermListsClient) Create

func (client ListManagementTermListsClient) Create(ctx context.Context, contentType string, body Body) (result TermList, err error)

Create creates a Term List Parameters: contentType - the content type. body - schema of the body.

func (ListManagementTermListsClient) CreatePreparer

func (client ListManagementTermListsClient) CreatePreparer(ctx context.Context, contentType string, body Body) (*http.Request, error)

CreatePreparer prepares the Create request.

func (ListManagementTermListsClient) CreateResponder

func (client ListManagementTermListsClient) CreateResponder(resp *http.Response) (result TermList, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (ListManagementTermListsClient) CreateSender

func (client ListManagementTermListsClient) CreateSender(req *http.Request) (*http.Response, error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

func (ListManagementTermListsClient) Delete

func (client ListManagementTermListsClient) Delete(ctx context.Context, listID string) (result String, err error)

Delete deletes term list with the list Id equal to list Id passed. Parameters: listID - list Id of the image list.

func (ListManagementTermListsClient) DeletePreparer

func (client ListManagementTermListsClient) DeletePreparer(ctx context.Context, listID string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (ListManagementTermListsClient) DeleteResponder

func (client ListManagementTermListsClient) DeleteResponder(resp *http.Response) (result String, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (ListManagementTermListsClient) DeleteSender

func (client ListManagementTermListsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (ListManagementTermListsClient) GetAllTermLists

func (client ListManagementTermListsClient) GetAllTermLists(ctx context.Context) (result ListTermList, err error)

GetAllTermLists gets all the Term Lists

func (ListManagementTermListsClient) GetAllTermListsPreparer

func (client ListManagementTermListsClient) GetAllTermListsPreparer(ctx context.Context) (*http.Request, error)

GetAllTermListsPreparer prepares the GetAllTermLists request.

func (ListManagementTermListsClient) GetAllTermListsResponder

func (client ListManagementTermListsClient) GetAllTermListsResponder(resp *http.Response) (result ListTermList, err error)

GetAllTermListsResponder handles the response to the GetAllTermLists request. The method always closes the http.Response Body.

func (ListManagementTermListsClient) GetAllTermListsSender

func (client ListManagementTermListsClient) GetAllTermListsSender(req *http.Request) (*http.Response, error)

GetAllTermListsSender sends the GetAllTermLists request. The method will close the http.Response Body if it receives an error.

func (ListManagementTermListsClient) GetDetails

func (client ListManagementTermListsClient) GetDetails(ctx context.Context, listID string) (result TermList, err error)

GetDetails returns list Id details of the term list with list Id equal to list Id passed. Parameters: listID - list Id of the image list.

func (ListManagementTermListsClient) GetDetailsPreparer

func (client ListManagementTermListsClient) GetDetailsPreparer(ctx context.Context, listID string) (*http.Request, error)

GetDetailsPreparer prepares the GetDetails request.

func (ListManagementTermListsClient) GetDetailsResponder

func (client ListManagementTermListsClient) GetDetailsResponder(resp *http.Response) (result TermList, err error)

GetDetailsResponder handles the response to the GetDetails request. The method always closes the http.Response Body.

func (ListManagementTermListsClient) GetDetailsSender

func (client ListManagementTermListsClient) GetDetailsSender(req *http.Request) (*http.Response, error)

GetDetailsSender sends the GetDetails request. The method will close the http.Response Body if it receives an error.

func (ListManagementTermListsClient) RefreshIndexMethod

func (client ListManagementTermListsClient) RefreshIndexMethod(ctx context.Context, listID string, language string) (result RefreshIndex, err error)

RefreshIndexMethod refreshes the index of the list with list Id equal to list ID passed. Parameters: listID - list Id of the image list. language - language of the terms.

func (ListManagementTermListsClient) RefreshIndexMethodPreparer

func (client ListManagementTermListsClient) RefreshIndexMethodPreparer(ctx context.Context, listID string, language string) (*http.Request, error)

RefreshIndexMethodPreparer prepares the RefreshIndexMethod request.

func (ListManagementTermListsClient) RefreshIndexMethodResponder

func (client ListManagementTermListsClient) RefreshIndexMethodResponder(resp *http.Response) (result RefreshIndex, err error)

RefreshIndexMethodResponder handles the response to the RefreshIndexMethod request. The method always closes the http.Response Body.

func (ListManagementTermListsClient) RefreshIndexMethodSender

func (client ListManagementTermListsClient) RefreshIndexMethodSender(req *http.Request) (*http.Response, error)

RefreshIndexMethodSender sends the RefreshIndexMethod request. The method will close the http.Response Body if it receives an error.

func (ListManagementTermListsClient) Update

func (client ListManagementTermListsClient) Update(ctx context.Context, listID string, contentType string, body Body) (result TermList, err error)

Update updates an Term List. Parameters: listID - list Id of the image list. contentType - the content type. body - schema of the body.

func (ListManagementTermListsClient) UpdatePreparer

func (client ListManagementTermListsClient) UpdatePreparer(ctx context.Context, listID string, contentType string, body Body) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (ListManagementTermListsClient) UpdateResponder

func (client ListManagementTermListsClient) UpdateResponder(resp *http.Response) (result TermList, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (ListManagementTermListsClient) UpdateSender

func (client ListManagementTermListsClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type ListString

type ListString struct {
	autorest.Response `json:"-"`
	Value             *[]string `json:"value,omitempty"`
}

ListString ...

type ListTermList

type ListTermList struct {
	autorest.Response `json:"-"`
	Value             *[]TermList `json:"value,omitempty"`
}

ListTermList ...

type Match

type Match struct {
	// Score - Confidence score of the image match.
	Score *float64 `json:"Score,omitempty"`
	// MatchID - The match id.
	MatchID *int32 `json:"MatchId,omitempty"`
	// Source - The source.
	Source *string `json:"Source,omitempty"`
	// Tags - The tags for match details.
	Tags *[]int32 `json:"Tags,omitempty"`
	// Label - The label.
	Label *string `json:"Label,omitempty"`
}

Match the match details.

type MatchResponse

type MatchResponse struct {
	autorest.Response `json:"-"`
	// TrackingID - The tracking id.
	TrackingID *string `json:"TrackingId,omitempty"`
	// CacheID - The cache id.
	CacheID *string `json:"CacheID,omitempty"`
	// IsMatch - Indicates if there is a match.
	IsMatch *bool `json:"IsMatch,omitempty"`
	// Matches - The match details.
	Matches *[]Match `json:"Matches,omitempty"`
	// Status - The evaluate status
	Status *Status `json:"Status,omitempty"`
}

MatchResponse the response for a Match request.

type OCR

type OCR struct {
	autorest.Response `json:"-"`
	// Status - The evaluate status
	Status *Status `json:"Status,omitempty"`
	// Metadata - Array of KeyValue.
	Metadata *[]KeyValuePair `json:"Metadata,omitempty"`
	// TrackingID - The tracking id.
	TrackingID *string `json:"TrackingId,omitempty"`
	// CacheID - The cache id.
	CacheID *string `json:"CacheId,omitempty"`
	// Language - The ISO 639-3 code.
	Language *string `json:"Language,omitempty"`
	// Text - The found text.
	Text *string `json:"Text,omitempty"`
	// Candidates - The list of candidate text.
	Candidates *[]Candidate `json:"Candidates,omitempty"`
}

OCR contains the text found in image for the language specified.

type PII

type PII struct {
	Email   *[]Email   `json:"Email,omitempty"`
	SSN     *[]SSN     `json:"SSN,omitempty"`
	IPA     *[]IPA     `json:"IPA,omitempty"`
	Phone   *[]Phone   `json:"Phone,omitempty"`
	Address *[]Address `json:"Address,omitempty"`
}

PII personal Identifier Information details.

type Phone

type Phone struct {
	// CountryCode - CountryCode of the detected Phone number.
	CountryCode *string `json:"CountryCode,omitempty"`
	// Text - Detected Phone number.
	Text *string `json:"Text,omitempty"`
	// Index - Index(Location) of the Phone number in the input text content.
	Index *int32 `json:"Index,omitempty"`
}

Phone phone Property details.

type RefreshIndex

type RefreshIndex struct {
	autorest.Response `json:"-"`
	// ContentSourceID - Content source Id.
	ContentSourceID *string `json:"ContentSourceId,omitempty"`
	// IsUpdateSuccess - Update success status.
	IsUpdateSuccess *bool `json:"IsUpdateSuccess,omitempty"`
	// AdvancedInfo - Advanced info list.
	AdvancedInfo *[]map[string]*string `json:"AdvancedInfo,omitempty"`
	// Status - Refresh index status.
	Status *Status `json:"Status,omitempty"`
	// TrackingID - Tracking Id.
	TrackingID *string `json:"TrackingId,omitempty"`
}

RefreshIndex refresh Index Response.

type Review

type Review struct {
	autorest.Response `json:"-"`
	// ReviewID - Id of the review.
	ReviewID *string `json:"ReviewId,omitempty"`
	// SubTeam - Name of the subteam.
	SubTeam *string `json:"SubTeam,omitempty"`
	// Status - The status string (<Pending, Complete>).
	Status *string `json:"Status,omitempty"`
	// ReviewerResultTags - Array of KeyValue with Reviewer set Tags.
	ReviewerResultTags *[]KeyValuePair `json:"ReviewerResultTags,omitempty"`
	// CreatedBy - The reviewer name.
	CreatedBy *string `json:"CreatedBy,omitempty"`
	// Metadata - Array of KeyValue.
	Metadata *[]KeyValuePair `json:"Metadata,omitempty"`
	// Type - The type of content.
	Type *string `json:"Type,omitempty"`
	// Content - The content value.
	Content *string `json:"Content,omitempty"`
	// ContentID - Id of the content.
	ContentID *string `json:"ContentId,omitempty"`
	// CallbackEndpoint - The callback endpoint.
	CallbackEndpoint *string `json:"CallbackEndpoint,omitempty"`
}

Review the Review object.

type ReviewsClient

type ReviewsClient struct {
	BaseClient
}

ReviewsClient is the you use the API to scan your content as it is generated. Content Moderator then processes your content and sends the results along with relevant information either back to your systems or to the built-in review tool. You can use this information to take decisions e.g. take it down, send to human judge, etc.

When using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. Text can be at most 1024 characters long. If the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue.

func NewReviewsClient

func NewReviewsClient(endpoint string) ReviewsClient

NewReviewsClient creates an instance of the ReviewsClient client.

func (ReviewsClient) AddVideoFrame

func (client ReviewsClient) AddVideoFrame(ctx context.Context, teamName string, reviewID string, timescale *int32) (result autorest.Response, err error)

AddVideoFrame the reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

<h3>CallBack Schemas </h3> <h4>Review Completion CallBack Sample</h4> <p> {<br/> "ReviewId": "<Review Id>",<br/> "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> "ModifiedBy": "<Name of the Reviewer>",<br/> "CallBackType": "Review",<br/> "ContentId": "<The ContentId that was specified input>",<br/> "Metadata": {<br/> "adultscore": "0.xxx",<br/> "a": "False",<br/> "racyscore": "0.xxx",<br/> "r": "True"<br/> },<br/> "ReviewerResultTags": {<br/> "a": "False",<br/> "r": "True"<br/> }<br/> }<br/>

</p>. Parameters: teamName - your team name. reviewID - id of the review. timescale - timescale of the video you are adding frames to.

func (ReviewsClient) AddVideoFramePreparer

func (client ReviewsClient) AddVideoFramePreparer(ctx context.Context, teamName string, reviewID string, timescale *int32) (*http.Request, error)

AddVideoFramePreparer prepares the AddVideoFrame request.

func (ReviewsClient) AddVideoFrameResponder

func (client ReviewsClient) AddVideoFrameResponder(resp *http.Response) (result autorest.Response, err error)

AddVideoFrameResponder handles the response to the AddVideoFrame request. The method always closes the http.Response Body.

func (ReviewsClient) AddVideoFrameSender

func (client ReviewsClient) AddVideoFrameSender(req *http.Request) (*http.Response, error)

AddVideoFrameSender sends the AddVideoFrame request. The method will close the http.Response Body if it receives an error.

func (ReviewsClient) AddVideoFrameStream

func (client ReviewsClient) AddVideoFrameStream(ctx context.Context, contentType string, teamName string, reviewID string, frameImageZip io.ReadCloser, frameMetadata string, timescale *int32) (result autorest.Response, err error)

AddVideoFrameStream use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. Parameters: contentType - the content type. teamName - your team name. reviewID - id of the review. frameImageZip - zip file containing frame images. frameMetadata - metadata of the frame. timescale - timescale of the video .

func (ReviewsClient) AddVideoFrameStreamPreparer

func (client ReviewsClient) AddVideoFrameStreamPreparer(ctx context.Context, contentType string, teamName string, reviewID string, frameImageZip io.ReadCloser, frameMetadata string, timescale *int32) (*http.Request, error)

AddVideoFrameStreamPreparer prepares the AddVideoFrameStream request.

func (ReviewsClient) AddVideoFrameStreamResponder

func (client ReviewsClient) AddVideoFrameStreamResponder(resp *http.Response) (result autorest.Response, err error)

AddVideoFrameStreamResponder handles the response to the AddVideoFrameStream request. The method always closes the http.Response Body.

func (ReviewsClient) AddVideoFrameStreamSender

func (client ReviewsClient) AddVideoFrameStreamSender(req *http.Request) (*http.Response, error)

AddVideoFrameStreamSender sends the AddVideoFrameStream request. The method will close the http.Response Body if it receives an error.

func (ReviewsClient) AddVideoFrameURL

func (client ReviewsClient) AddVideoFrameURL(ctx context.Context, contentType string, teamName string, reviewID string, videoFrameBody []VideoFrameBodyItem, timescale *int32) (result autorest.Response, err error)

AddVideoFrameURL use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. Parameters: contentType - the content type. teamName - your team name. reviewID - id of the review. videoFrameBody - body for add video frames API timescale - timescale of the video.

func (ReviewsClient) AddVideoFrameURLPreparer

func (client ReviewsClient) AddVideoFrameURLPreparer(ctx context.Context, contentType string, teamName string, reviewID string, videoFrameBody []VideoFrameBodyItem, timescale *int32) (*http.Request, error)

AddVideoFrameURLPreparer prepares the AddVideoFrameURL request.

func (ReviewsClient) AddVideoFrameURLResponder

func (client ReviewsClient) AddVideoFrameURLResponder(resp *http.Response) (result autorest.Response, err error)

AddVideoFrameURLResponder handles the response to the AddVideoFrameURL request. The method always closes the http.Response Body.

func (ReviewsClient) AddVideoFrameURLSender

func (client ReviewsClient) AddVideoFrameURLSender(req *http.Request) (*http.Response, error)

AddVideoFrameURLSender sends the AddVideoFrameURL request. The method will close the http.Response Body if it receives an error.

func (ReviewsClient) AddVideoTranscript

func (client ReviewsClient) AddVideoTranscript(ctx context.Context, teamName string, reviewID string, vttfile io.ReadCloser) (result autorest.Response, err error)

AddVideoTranscript this API adds a transcript file (text version of all the words spoken in a video) to a video review. The file should be a valid WebVTT format. Parameters: teamName - your team name. reviewID - id of the review. vttfile - transcript file of the video.

func (ReviewsClient) AddVideoTranscriptModerationResult

func (client ReviewsClient) AddVideoTranscriptModerationResult(ctx context.Context, contentType string, teamName string, reviewID string, transcriptModerationBody []TranscriptModerationBodyItem) (result autorest.Response, err error)

AddVideoTranscriptModerationResult this API adds a transcript screen text result file for a video review. Transcript screen text result file is a result of Screen Text API . In order to generate transcript screen text result file , a transcript file has to be screened for profanity using Screen Text API. Parameters: contentType - the content type. teamName - your team name. reviewID - id of the review. transcriptModerationBody - body for add video transcript moderation result API

func (ReviewsClient) AddVideoTranscriptModerationResultPreparer

func (client ReviewsClient) AddVideoTranscriptModerationResultPreparer(ctx context.Context, contentType string, teamName string, reviewID string, transcriptModerationBody []TranscriptModerationBodyItem) (*http.Request, error)

AddVideoTranscriptModerationResultPreparer prepares the AddVideoTranscriptModerationResult request.

func (ReviewsClient) AddVideoTranscriptModerationResultResponder

func (client ReviewsClient) AddVideoTranscriptModerationResultResponder(resp *http.Response) (result autorest.Response, err error)

AddVideoTranscriptModerationResultResponder handles the response to the AddVideoTranscriptModerationResult request. The method always closes the http.Response Body.

func (ReviewsClient) AddVideoTranscriptModerationResultSender

func (client ReviewsClient) AddVideoTranscriptModerationResultSender(req *http.Request) (*http.Response, error)

AddVideoTranscriptModerationResultSender sends the AddVideoTranscriptModerationResult request. The method will close the http.Response Body if it receives an error.

func (ReviewsClient) AddVideoTranscriptPreparer

func (client ReviewsClient) AddVideoTranscriptPreparer(ctx context.Context, teamName string, reviewID string, vttfile io.ReadCloser) (*http.Request, error)

AddVideoTranscriptPreparer prepares the AddVideoTranscript request.

func (ReviewsClient) AddVideoTranscriptResponder

func (client ReviewsClient) AddVideoTranscriptResponder(resp *http.Response) (result autorest.Response, err error)

AddVideoTranscriptResponder handles the response to the AddVideoTranscript request. The method always closes the http.Response Body.

func (ReviewsClient) AddVideoTranscriptSender

func (client ReviewsClient) AddVideoTranscriptSender(req *http.Request) (*http.Response, error)

AddVideoTranscriptSender sends the AddVideoTranscript request. The method will close the http.Response Body if it receives an error.

func (ReviewsClient) CreateJob

func (client ReviewsClient) CreateJob(ctx context.Context, teamName string, contentType string, contentID string, workflowName string, jobContentType string, content Content, callBackEndpoint string) (result JobID, err error)

CreateJob a job Id will be returned for the content posted on this endpoint.

Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression.

<h3>CallBack Schemas </h3>

<p> <h4>Job Completion CallBack Sample</h4><br/>

{<br/> "JobId": "<Job Id>,<br/> "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> "WorkFlowId": "default",<br/> "Status": "<This will be one of Complete, InProgress, Error>",<br/> "ContentType": "Image",<br/> "ContentId": "<This is the ContentId that was specified on input>",<br/> "CallBackType": "Job",<br/> "Metadata": {<br/> "adultscore": "0.xxx",<br/> "a": "False",<br/> "racyscore": "0.xxx",<br/> "r": "True"<br/> }<br/> }<br/>

</p> <p> <h4>Review Completion CallBack Sample</h4><br/>

{ "ReviewId": "<Review Id>",<br/> "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> "ModifiedBy": "<Name of the Reviewer>",<br/> "CallBackType": "Review",<br/> "ContentId": "<The ContentId that was specified input>",<br/> "Metadata": {<br/> "adultscore": "0.xxx", "a": "False",<br/> "racyscore": "0.xxx",<br/> "r": "True"<br/> },<br/> "ReviewerResultTags": {<br/> "a": "False",<br/> "r": "True"<br/> }<br/> }<br/>

</p>. Parameters: teamName - your team name. contentType - image, Text or Video. contentID - id/Name to identify the content submitted. workflowName - workflow Name that you want to invoke. jobContentType - the content type. content - content to evaluate. callBackEndpoint - callback endpoint for posting the create job result.

func (ReviewsClient) CreateJobPreparer

func (client ReviewsClient) CreateJobPreparer(ctx context.Context, teamName string, contentType string, contentID string, workflowName string, jobContentType string, content Content, callBackEndpoint string) (*http.Request, error)

CreateJobPreparer prepares the CreateJob request.

func (ReviewsClient) CreateJobResponder

func (client ReviewsClient) CreateJobResponder(resp *http.Response) (result JobID, err error)

CreateJobResponder handles the response to the CreateJob request. The method always closes the http.Response Body.

func (ReviewsClient) CreateJobSender

func (client ReviewsClient) CreateJobSender(req *http.Request) (*http.Response, error)

CreateJobSender sends the CreateJob request. The method will close the http.Response Body if it receives an error.

func (ReviewsClient) CreateReviews

func (client ReviewsClient) CreateReviews(ctx context.Context, URLContentType string, teamName string, createReviewBody []CreateReviewBodyItem, subTeam string) (result ListString, err error)

CreateReviews the reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

<h3>CallBack Schemas </h3> <h4>Review Completion CallBack Sample</h4> <p> {<br/> "ReviewId": "<Review Id>",<br/> "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> "ModifiedBy": "<Name of the Reviewer>",<br/> "CallBackType": "Review",<br/> "ContentId": "<The ContentId that was specified input>",<br/> "Metadata": {<br/> "adultscore": "0.xxx",<br/> "a": "False",<br/> "racyscore": "0.xxx",<br/> "r": "True"<br/> },<br/> "ReviewerResultTags": {<br/> "a": "False",<br/> "r": "True"<br/> }<br/> }<br/>

</p>. Parameters: URLContentType - the content type. teamName - your team name. createReviewBody - body for create reviews API subTeam - subTeam of your team, you want to assign the created review to.

func (ReviewsClient) CreateReviewsPreparer

func (client ReviewsClient) CreateReviewsPreparer(ctx context.Context, URLContentType string, teamName string, createReviewBody []CreateReviewBodyItem, subTeam string) (*http.Request, error)

CreateReviewsPreparer prepares the CreateReviews request.

func (ReviewsClient) CreateReviewsResponder

func (client ReviewsClient) CreateReviewsResponder(resp *http.Response) (result ListString, err error)

CreateReviewsResponder handles the response to the CreateReviews request. The method always closes the http.Response Body.

func (ReviewsClient) CreateReviewsSender

func (client ReviewsClient) CreateReviewsSender(req *http.Request) (*http.Response, error)

CreateReviewsSender sends the CreateReviews request. The method will close the http.Response Body if it receives an error.

func (ReviewsClient) CreateVideoReviews

func (client ReviewsClient) CreateVideoReviews(ctx context.Context, contentType string, teamName string, createVideoReviewsBody []CreateVideoReviewsBodyItem, subTeam string) (result ListString, err error)

CreateVideoReviews the reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

<h3>CallBack Schemas </h3> <h4>Review Completion CallBack Sample</h4> <p> {<br/> "ReviewId": "<Review Id>",<br/> "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> "ModifiedBy": "<Name of the Reviewer>",<br/> "CallBackType": "Review",<br/> "ContentId": "<The ContentId that was specified input>",<br/> "Metadata": {<br/> "adultscore": "0.xxx",<br/> "a": "False",<br/> "racyscore": "0.xxx",<br/> "r": "True"<br/> },<br/> "ReviewerResultTags": {<br/> "a": "False",<br/> "r": "True"<br/> }<br/> }<br/>

</p>. Parameters: contentType - the content type. teamName - your team name. createVideoReviewsBody - body for create reviews API subTeam - subTeam of your team, you want to assign the created review to.

func (ReviewsClient) CreateVideoReviewsPreparer

func (client ReviewsClient) CreateVideoReviewsPreparer(ctx context.Context, contentType string, teamName string, createVideoReviewsBody []CreateVideoReviewsBodyItem, subTeam string) (*http.Request, error)

CreateVideoReviewsPreparer prepares the CreateVideoReviews request.

func (ReviewsClient) CreateVideoReviewsResponder

func (client ReviewsClient) CreateVideoReviewsResponder(resp *http.Response) (result ListString, err error)

CreateVideoReviewsResponder handles the response to the CreateVideoReviews request. The method always closes the http.Response Body.

func (ReviewsClient) CreateVideoReviewsSender

func (client ReviewsClient) CreateVideoReviewsSender(req *http.Request) (*http.Response, error)

CreateVideoReviewsSender sends the CreateVideoReviews request. The method will close the http.Response Body if it receives an error.

func (ReviewsClient) GetJobDetails

func (client ReviewsClient) GetJobDetails(ctx context.Context, teamName string, jobID string) (result Job, err error)

GetJobDetails get the Job Details for a Job Id. Parameters: teamName - your Team Name. jobID - id of the job.

func (ReviewsClient) GetJobDetailsPreparer

func (client ReviewsClient) GetJobDetailsPreparer(ctx context.Context, teamName string, jobID string) (*http.Request, error)

GetJobDetailsPreparer prepares the GetJobDetails request.

func (ReviewsClient) GetJobDetailsResponder

func (client ReviewsClient) GetJobDetailsResponder(resp *http.Response) (result Job, err error)

GetJobDetailsResponder handles the response to the GetJobDetails request. The method always closes the http.Response Body.

func (ReviewsClient) GetJobDetailsSender

func (client ReviewsClient) GetJobDetailsSender(req *http.Request) (*http.Response, error)

GetJobDetailsSender sends the GetJobDetails request. The method will close the http.Response Body if it receives an error.

func (ReviewsClient) GetReview

func (client ReviewsClient) GetReview(ctx context.Context, teamName string, reviewID string) (result Review, err error)

GetReview returns review details for the review Id passed. Parameters: teamName - your Team Name. reviewID - id of the review.

func (ReviewsClient) GetReviewPreparer

func (client ReviewsClient) GetReviewPreparer(ctx context.Context, teamName string, reviewID string) (*http.Request, error)

GetReviewPreparer prepares the GetReview request.

func (ReviewsClient) GetReviewResponder

func (client ReviewsClient) GetReviewResponder(resp *http.Response) (result Review, err error)

GetReviewResponder handles the response to the GetReview request. The method always closes the http.Response Body.

func (ReviewsClient) GetReviewSender

func (client ReviewsClient) GetReviewSender(req *http.Request) (*http.Response, error)

GetReviewSender sends the GetReview request. The method will close the http.Response Body if it receives an error.

func (ReviewsClient) GetVideoFrames

func (client ReviewsClient) GetVideoFrames(ctx context.Context, teamName string, reviewID string, startSeed *int32, noOfRecords *int32, filter string) (result Frames, err error)

GetVideoFrames the reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

<h3>CallBack Schemas </h3> <h4>Review Completion CallBack Sample</h4> <p> {<br/> "ReviewId": "<Review Id>",<br/> "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> "ModifiedBy": "<Name of the Reviewer>",<br/> "CallBackType": "Review",<br/> "ContentId": "<The ContentId that was specified input>",<br/> "Metadata": {<br/> "adultscore": "0.xxx",<br/> "a": "False",<br/> "racyscore": "0.xxx",<br/> "r": "True"<br/> },<br/> "ReviewerResultTags": {<br/> "a": "False",<br/> "r": "True"<br/> }<br/> }<br/>

</p>. Parameters: teamName - your team name. reviewID - id of the review. startSeed - time stamp of the frame from where you want to start fetching the frames. noOfRecords - number of frames to fetch. filter - get frames filtered by tags.

func (ReviewsClient) GetVideoFramesPreparer

func (client ReviewsClient) GetVideoFramesPreparer(ctx context.Context, teamName string, reviewID string, startSeed *int32, noOfRecords *int32, filter string) (*http.Request, error)

GetVideoFramesPreparer prepares the GetVideoFrames request.

func (ReviewsClient) GetVideoFramesResponder

func (client ReviewsClient) GetVideoFramesResponder(resp *http.Response) (result Frames, err error)

GetVideoFramesResponder handles the response to the GetVideoFrames request. The method always closes the http.Response Body.

func (ReviewsClient) GetVideoFramesSender

func (client ReviewsClient) GetVideoFramesSender(req *http.Request) (*http.Response, error)

GetVideoFramesSender sends the GetVideoFrames request. The method will close the http.Response Body if it receives an error.

func (ReviewsClient) PublishVideoReview

func (client ReviewsClient) PublishVideoReview(ctx context.Context, teamName string, reviewID string) (result autorest.Response, err error)

PublishVideoReview publish video review to make it available for review. Parameters: teamName - your team name. reviewID - id of the review.

func (ReviewsClient) PublishVideoReviewPreparer

func (client ReviewsClient) PublishVideoReviewPreparer(ctx context.Context, teamName string, reviewID string) (*http.Request, error)

PublishVideoReviewPreparer prepares the PublishVideoReview request.

func (ReviewsClient) PublishVideoReviewResponder

func (client ReviewsClient) PublishVideoReviewResponder(resp *http.Response) (result autorest.Response, err error)

PublishVideoReviewResponder handles the response to the PublishVideoReview request. The method always closes the http.Response Body.

func (ReviewsClient) PublishVideoReviewSender

func (client ReviewsClient) PublishVideoReviewSender(req *http.Request) (*http.Response, error)

PublishVideoReviewSender sends the PublishVideoReview request. The method will close the http.Response Body if it receives an error.

type SSN

type SSN struct {
	// Text - Detected SSN in the input text content.
	Text *string `json:"Text,omitempty"`
	// Index - Index(Location) of the SSN in the input text content.
	Index *int32 `json:"Index,omitempty"`
}

SSN detected SSN details.

type Screen

type Screen struct {
	autorest.Response `json:"-"`
	// OriginalText - The original text.
	OriginalText *string `json:"OriginalText,omitempty"`
	// NormalizedText - The normalized text.
	NormalizedText *string `json:"NormalizedText,omitempty"`
	// AutoCorrectedText - The autocorrected text
	AutoCorrectedText *string `json:"AutoCorrectedText,omitempty"`
	// Misrepresentation - The misrepresentation text.
	Misrepresentation *[]string `json:"Misrepresentation,omitempty"`
	// Classification - The classification details of the text.
	Classification *Classification `json:"Classification,omitempty"`
	// Status - The evaluate status.
	Status *Status `json:"Status,omitempty"`
	// PII - Personal Identifier Information details.
	PII *PII `json:"PII,omitempty"`
	// Language - Language of the input text content.
	Language *string          `json:"Language,omitempty"`
	Terms    *[]DetectedTerms `json:"Terms,omitempty"`
	// TrackingID - Unique Content Moderator transaction Id.
	TrackingID *string `json:"TrackingId,omitempty"`
}

Screen the response for a Screen text request.

type Status

type Status struct {
	// Code - Status code.
	Code *int32 `json:"Code,omitempty"`
	// Description - Status description.
	Description *string `json:"Description,omitempty"`
	// Exception - Exception status.
	Exception *string `json:"Exception,omitempty"`
}

Status status properties.

type StatusEnum

type StatusEnum string

StatusEnum enumerates the values for status enum.

const (
	// Complete ...
	Complete StatusEnum = "Complete"
	// Pending ...
	Pending StatusEnum = "Pending"
	// Unpublished ...
	Unpublished StatusEnum = "Unpublished"
)

func PossibleStatusEnumValues

func PossibleStatusEnumValues() []StatusEnum

PossibleStatusEnumValues returns an array of possible values for the StatusEnum const type.

type String

type String struct {
	autorest.Response `json:"-"`
	Value             *string `json:"value,omitempty"`
}

String ...

type Tag

type Tag struct {
	// Key - The key parameter.
	Key *string `json:"Key,omitempty"`
	// Value - The value parameter.
	Value *string `json:"Value,omitempty"`
}

Tag tag details.

type TermList

type TermList struct {
	autorest.Response `json:"-"`
	// ID - Term list Id.
	ID *int32 `json:"Id,omitempty"`
	// Name - Term list name.
	Name *string `json:"Name,omitempty"`
	// Description - Description for term list.
	Description *string `json:"Description,omitempty"`
	// Metadata - Term list metadata.
	Metadata map[string]*string `json:"Metadata"`
}

TermList term List Properties.

func (TermList) MarshalJSON

func (tl TermList) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for TermList.

type Terms

type Terms struct {
	autorest.Response `json:"-"`
	// Data - Term data details.
	Data *TermsData `json:"Data,omitempty"`
	// Paging - Paging details.
	Paging *TermsPaging `json:"Paging,omitempty"`
}

Terms terms properties.

type TermsData

type TermsData struct {
	// Language - Language of the terms.
	Language *string `json:"Language,omitempty"`
	// Terms - List of terms.
	Terms *[]TermsInList `json:"Terms,omitempty"`
	// Status - Term Status.
	Status *Status `json:"Status,omitempty"`
	// TrackingID - Tracking Id.
	TrackingID *string `json:"TrackingId,omitempty"`
}

TermsData all term Id response properties.

type TermsInList

type TermsInList struct {
	// Term - Added term details.
	Term *string `json:"Term,omitempty"`
}

TermsInList terms in list Id passed.

type TermsPaging

type TermsPaging struct {
	// Total - Total details.
	Total *int32 `json:"Total,omitempty"`
	// Limit - Limit details.
	Limit *int32 `json:"Limit,omitempty"`
	// Offset - Offset details.
	Offset *int32 `json:"Offset,omitempty"`
	// Returned - Returned text details.
	Returned *int32 `json:"Returned,omitempty"`
}

TermsPaging paging details.

type TextModerationClient

type TextModerationClient struct {
	BaseClient
}

TextModerationClient is the you use the API to scan your content as it is generated. Content Moderator then processes your content and sends the results along with relevant information either back to your systems or to the built-in review tool. You can use this information to take decisions e.g. take it down, send to human judge, etc.

When using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. Text can be at most 1024 characters long. If the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue.

func NewTextModerationClient

func NewTextModerationClient(endpoint string) TextModerationClient

NewTextModerationClient creates an instance of the TextModerationClient client.

func (TextModerationClient) DetectLanguage

func (client TextModerationClient) DetectLanguage(ctx context.Context, textContentType string, textContent io.ReadCloser) (result DetectedLanguage, err error)

DetectLanguage this operation will detect the language of given input content. Returns the <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the predominant language comprising the submitted text. Over 110 languages supported. Parameters: textContentType - the content type. textContent - content to screen.

func (TextModerationClient) DetectLanguagePreparer

func (client TextModerationClient) DetectLanguagePreparer(ctx context.Context, textContentType string, textContent io.ReadCloser) (*http.Request, error)

DetectLanguagePreparer prepares the DetectLanguage request.

func (TextModerationClient) DetectLanguageResponder

func (client TextModerationClient) DetectLanguageResponder(resp *http.Response) (result DetectedLanguage, err error)

DetectLanguageResponder handles the response to the DetectLanguage request. The method always closes the http.Response Body.

func (TextModerationClient) DetectLanguageSender

func (client TextModerationClient) DetectLanguageSender(req *http.Request) (*http.Response, error)

DetectLanguageSender sends the DetectLanguage request. The method will close the http.Response Body if it receives an error.

func (TextModerationClient) ScreenText

func (client TextModerationClient) ScreenText(ctx context.Context, textContentType string, textContent io.ReadCloser, language string, autocorrect *bool, pii *bool, listID string, classify *bool) (result Screen, err error)

ScreenText detects profanity in more than 100 languages and match against custom and shared blacklists. Parameters: textContentType - the content type. textContent - content to screen. language - language of the text. autocorrect - autocorrect text. pii - detect personal identifiable information. listID - the list Id. classify - classify input.

func (TextModerationClient) ScreenTextPreparer

func (client TextModerationClient) ScreenTextPreparer(ctx context.Context, textContentType string, textContent io.ReadCloser, language string, autocorrect *bool, pii *bool, listID string, classify *bool) (*http.Request, error)

ScreenTextPreparer prepares the ScreenText request.

func (TextModerationClient) ScreenTextResponder

func (client TextModerationClient) ScreenTextResponder(resp *http.Response) (result Screen, err error)

ScreenTextResponder handles the response to the ScreenText request. The method always closes the http.Response Body.

func (TextModerationClient) ScreenTextSender

func (client TextModerationClient) ScreenTextSender(req *http.Request) (*http.Response, error)

ScreenTextSender sends the ScreenText request. The method will close the http.Response Body if it receives an error.

type TranscriptModerationBodyItem

type TranscriptModerationBodyItem struct {
	// Timestamp - Timestamp of the image.
	Timestamp *string `json:"Timestamp,omitempty"`
	// Terms - Optional metadata details.
	Terms *[]TranscriptModerationBodyItemTermsItem `json:"Terms,omitempty"`
}

TranscriptModerationBodyItem schema items of the body.

type TranscriptModerationBodyItemTermsItem

type TranscriptModerationBodyItemTermsItem struct {
	// Index - Index of the word
	Index *int32 `json:"Index,omitempty"`
	// Term - Detected word.
	Term *string `json:"Term,omitempty"`
}

TranscriptModerationBodyItemTermsItem ...

type Type

type Type string

Type enumerates the values for type.

const (
	// TypeImage ...
	TypeImage Type = "Image"
	// TypeText ...
	TypeText Type = "Text"
)

func PossibleTypeValues

func PossibleTypeValues() []Type

PossibleTypeValues returns an array of possible values for the Type const type.

type VideoFrameBodyItem

type VideoFrameBodyItem struct {
	// Timestamp - Timestamp of the frame.
	Timestamp *string `json:"Timestamp,omitempty"`
	// FrameImage - Content to review.
	FrameImage         *string                                     `json:"FrameImage,omitempty"`
	ReviewerResultTags *[]VideoFrameBodyItemReviewerResultTagsItem `json:"ReviewerResultTags,omitempty"`
	// Metadata - Optional metadata details.
	Metadata *[]VideoFrameBodyItemMetadataItem `json:"Metadata,omitempty"`
}

VideoFrameBodyItem schema items of the body.

type VideoFrameBodyItemMetadataItem

type VideoFrameBodyItemMetadataItem struct {
	// Key - Your key parameter.
	Key *string `json:"Key,omitempty"`
	// Value - Your value parameter.
	Value *string `json:"Value,omitempty"`
}

VideoFrameBodyItemMetadataItem ...

type VideoFrameBodyItemReviewerResultTagsItem

type VideoFrameBodyItemReviewerResultTagsItem struct {
	// Key - Your key parameter.
	Key *string `json:"Key,omitempty"`
	// Value - Your value parameter.
	Value *string `json:"Value,omitempty"`
}

VideoFrameBodyItemReviewerResultTagsItem ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL