azure-sdk-for-go: github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/contentmoderator Index | Files | Directories

package contentmoderator

import "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/contentmoderator"

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

Package Files

client.go imagemoderation.go listmanagementimage.go listmanagementimagelists.go listmanagementterm.go listmanagementtermlists.go models.go reviews.go textmoderation.go version.go

func UserAgent Uses

func UserAgent() string

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

func Version Uses

func Version() string

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

type APIError Uses

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

APIError error information returned by the API

type Address Uses

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 Uses

type BaseClient struct {
    autorest.Client
    Endpoint string
}

BaseClient is the base client for Contentmoderator.

func New Uses

func New(endpoint string) BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults Uses

func NewWithoutDefaults(endpoint string) BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

type Body Uses

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 Uses

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

MarshalJSON is the custom marshaler for Body.

type Candidate Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

Content ...

type CreateReviewBodyItem Uses

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 Uses

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

CreateReviewBodyItemMetadataItem ...

type CreateVideoReviewsBodyItem Uses

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 Uses

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

CreateVideoReviewsBodyItemMetadataItem ...

type CreateVideoReviewsBodyItemVideoFramesItem Uses

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 Uses

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

CreateVideoReviewsBodyItemVideoFramesItemMetadataItem ...

type CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem Uses

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

CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem ...

type DetectedLanguage Uses

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 Uses

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 Uses

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 Uses

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

Error error body.

type Evaluate Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

ImageAdditionalInfoItem ...

type ImageIds Uses

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 Uses

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 Uses

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

MarshalJSON is the custom marshaler for ImageList.

type ImageModerationClient Uses

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 Uses

func NewImageModerationClient(endpoint string) ImageModerationClient

NewImageModerationClient creates an instance of the ImageModerationClient client.

func (ImageModerationClient) EvaluateFileInput Uses

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 Uses

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

EvaluateFileInputPreparer prepares the EvaluateFileInput request.

func (ImageModerationClient) EvaluateFileInputResponder Uses

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 Uses

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 Uses

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 Uses

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

EvaluateMethodPreparer prepares the EvaluateMethod request.

func (ImageModerationClient) EvaluateMethodResponder Uses

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 Uses

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 Uses

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 Uses

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

EvaluateURLInputPreparer prepares the EvaluateURLInput request.

func (ImageModerationClient) EvaluateURLInputResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

FindFacesFileInputPreparer prepares the FindFacesFileInput request.

func (ImageModerationClient) FindFacesFileInputResponder Uses

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 Uses

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 Uses

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

FindFacesPreparer prepares the FindFaces request.

func (ImageModerationClient) FindFacesResponder Uses

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 Uses

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 Uses

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 Uses

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

FindFacesURLInputPreparer prepares the FindFacesURLInput request.

func (ImageModerationClient) FindFacesURLInputResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

MatchMethodPreparer prepares the MatchMethod request.

func (ImageModerationClient) MatchMethodResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

OCRMethodPreparer prepares the OCRMethod request.

func (ImageModerationClient) OCRMethodResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

ImageURL ...

type Job Uses

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 Uses

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 Uses

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

JobID ...

type JobListResult Uses

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

JobListResult the list of job ids.

type KeyValuePair Uses

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 Uses

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

ListImageList ...

type ListManagementImageClient Uses

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 Uses

func NewListManagementImageClient(endpoint string) ListManagementImageClient

NewListManagementImageClient creates an instance of the ListManagementImageClient client.

func (ListManagementImageClient) AddImage Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

AddImagePreparer prepares the AddImage request.

func (ListManagementImageClient) AddImageResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

DeleteAllImagesPreparer prepares the DeleteAllImages request.

func (ListManagementImageClient) DeleteAllImagesResponder Uses

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 Uses

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 Uses

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 Uses

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

DeleteImagePreparer prepares the DeleteImage request.

func (ListManagementImageClient) DeleteImageResponder Uses

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 Uses

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 Uses

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 Uses

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

GetAllImageIdsPreparer prepares the GetAllImageIds request.

func (ListManagementImageClient) GetAllImageIdsResponder Uses

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 Uses

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 Uses

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 Uses

func NewListManagementImageListsClient(endpoint string) ListManagementImageListsClient

NewListManagementImageListsClient creates an instance of the ListManagementImageListsClient client.

func (ListManagementImageListsClient) Create Uses

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 Uses

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

CreatePreparer prepares the Create request.

func (ListManagementImageListsClient) CreateResponder Uses

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 Uses

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 Uses

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 Uses

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

DeletePreparer prepares the Delete request.

func (ListManagementImageListsClient) DeleteResponder Uses

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 Uses

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 Uses

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

GetAllImageLists gets all the Image Lists.

func (ListManagementImageListsClient) GetAllImageListsPreparer Uses

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

GetAllImageListsPreparer prepares the GetAllImageLists request.

func (ListManagementImageListsClient) GetAllImageListsResponder Uses

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 Uses

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 Uses

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 Uses

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

GetDetailsPreparer prepares the GetDetails request.

func (ListManagementImageListsClient) GetDetailsResponder Uses

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 Uses

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 Uses

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 Uses

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

RefreshIndexMethodPreparer prepares the RefreshIndexMethod request.

func (ListManagementImageListsClient) RefreshIndexMethodResponder Uses

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 Uses

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 Uses

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 Uses

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

UpdatePreparer prepares the Update request.

func (ListManagementImageListsClient) UpdateResponder Uses

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 Uses

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 Uses

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 Uses

func NewListManagementTermClient(endpoint string) ListManagementTermClient

NewListManagementTermClient creates an instance of the ListManagementTermClient client.

func (ListManagementTermClient) AddTerm Uses

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 Uses

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

AddTermPreparer prepares the AddTerm request.

func (ListManagementTermClient) AddTermResponder Uses

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 Uses

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 Uses

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 Uses

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

DeleteAllTermsPreparer prepares the DeleteAllTerms request.

func (ListManagementTermClient) DeleteAllTermsResponder Uses

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 Uses

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 Uses

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 Uses

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

DeleteTermPreparer prepares the DeleteTerm request.

func (ListManagementTermClient) DeleteTermResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func NewListManagementTermListsClient(endpoint string) ListManagementTermListsClient

NewListManagementTermListsClient creates an instance of the ListManagementTermListsClient client.

func (ListManagementTermListsClient) Create Uses

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 Uses

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

CreatePreparer prepares the Create request.

func (ListManagementTermListsClient) CreateResponder Uses

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 Uses

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 Uses

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 Uses

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

DeletePreparer prepares the Delete request.

func (ListManagementTermListsClient) DeleteResponder Uses

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 Uses

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 Uses

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

GetAllTermLists gets all the Term Lists

func (ListManagementTermListsClient) GetAllTermListsPreparer Uses

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

GetAllTermListsPreparer prepares the GetAllTermLists request.

func (ListManagementTermListsClient) GetAllTermListsResponder Uses

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 Uses

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 Uses

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 Uses

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

GetDetailsPreparer prepares the GetDetails request.

func (ListManagementTermListsClient) GetDetailsResponder Uses

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 Uses

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 Uses

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 Uses

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

RefreshIndexMethodPreparer prepares the RefreshIndexMethod request.

func (ListManagementTermListsClient) RefreshIndexMethodResponder Uses

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 Uses

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 Uses

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 Uses

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

UpdatePreparer prepares the Update request.

func (ListManagementTermListsClient) UpdateResponder Uses

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 Uses

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 Uses

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

ListString ...

type ListTermList Uses

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

ListTermList ...

type Match Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func NewReviewsClient(endpoint string) ReviewsClient

NewReviewsClient creates an instance of the ReviewsClient client.

func (ReviewsClient) AddVideoFrame Uses

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 Uses

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

AddVideoFramePreparer prepares the AddVideoFrame request.

func (ReviewsClient) AddVideoFrameResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

GetJobDetailsPreparer prepares the GetJobDetails request.

func (ReviewsClient) GetJobDetailsResponder Uses

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 Uses

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 Uses

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 Uses

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

GetReviewPreparer prepares the GetReview request.

func (ReviewsClient) GetReviewResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

PublishVideoReviewPreparer prepares the PublishVideoReview request.

func (ReviewsClient) PublishVideoReviewResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func PossibleStatusEnumValues() []StatusEnum

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

type String Uses

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

String ...

type Tag Uses

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 Uses

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 Uses

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

MarshalJSON is the custom marshaler for TermList.

type Terms Uses

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 Uses

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 Uses

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

TermsInList terms in list Id passed.

type TermsPaging Uses

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 Uses

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 Uses

func NewTextModerationClient(endpoint string) TextModerationClient

NewTextModerationClient creates an instance of the TextModerationClient client.

func (TextModerationClient) DetectLanguage Uses

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 Uses

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

DetectLanguagePreparer prepares the DetectLanguage request.

func (TextModerationClient) DetectLanguageResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

TranscriptModerationBodyItemTermsItem ...

type Type Uses

type Type string

Type enumerates the values for type.

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

func PossibleTypeValues Uses

func PossibleTypeValues() []Type

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

type VideoFrameBodyItem Uses

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 Uses

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

VideoFrameBodyItemMetadataItem ...

type VideoFrameBodyItemReviewerResultTagsItem Uses

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

VideoFrameBodyItemReviewerResultTagsItem ...

Directories

PathSynopsis
contentmoderatorapi

Package contentmoderator imports 9 packages (graph) and is imported by 4 packages. Updated 2019-07-31. Refresh now. Tools for package owners.