1 package contentmoderatorapi
2
3
4
5
6
7
8
9 import (
10 "context"
11 "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/contentmoderator"
12 "github.com/Azure/go-autorest/autorest"
13 "io"
14 )
15
16
17 type ImageModerationClientAPI interface {
18 EvaluateFileInput(ctx context.Context, imageStream io.ReadCloser, cacheImage *bool) (result contentmoderator.Evaluate, err error)
19 EvaluateMethod(ctx context.Context, cacheImage *bool) (result contentmoderator.Evaluate, err error)
20 EvaluateURLInput(ctx context.Context, contentType string, imageURL contentmoderator.ImageURL, cacheImage *bool) (result contentmoderator.Evaluate, err error)
21 FindFaces(ctx context.Context, cacheImage *bool) (result contentmoderator.FoundFaces, err error)
22 FindFacesFileInput(ctx context.Context, imageStream io.ReadCloser, cacheImage *bool) (result contentmoderator.FoundFaces, err error)
23 FindFacesURLInput(ctx context.Context, contentType string, imageURL contentmoderator.ImageURL, cacheImage *bool) (result contentmoderator.FoundFaces, err error)
24 MatchFileInput(ctx context.Context, imageStream io.ReadCloser, listID string, cacheImage *bool) (result contentmoderator.MatchResponse, err error)
25 MatchMethod(ctx context.Context, listID string, cacheImage *bool) (result contentmoderator.MatchResponse, err error)
26 MatchURLInput(ctx context.Context, contentType string, imageURL contentmoderator.ImageURL, listID string, cacheImage *bool) (result contentmoderator.MatchResponse, err error)
27 OCRFileInput(ctx context.Context, language string, imageStream io.ReadCloser, cacheImage *bool, enhanced *bool) (result contentmoderator.OCR, err error)
28 OCRMethod(ctx context.Context, language string, cacheImage *bool, enhanced *bool) (result contentmoderator.OCR, err error)
29 OCRURLInput(ctx context.Context, language string, contentType string, imageURL contentmoderator.ImageURL, cacheImage *bool, enhanced *bool) (result contentmoderator.OCR, err error)
30 }
31
32 var _ ImageModerationClientAPI = (*contentmoderator.ImageModerationClient)(nil)
33
34
35 type TextModerationClientAPI interface {
36 DetectLanguage(ctx context.Context, textContentType string, textContent io.ReadCloser) (result contentmoderator.DetectedLanguage, err error)
37 ScreenText(ctx context.Context, textContentType string, textContent io.ReadCloser, language string, autocorrect *bool, pii *bool, listID string, classify *bool) (result contentmoderator.Screen, err error)
38 }
39
40 var _ TextModerationClientAPI = (*contentmoderator.TextModerationClient)(nil)
41
42
43 type ListManagementImageListsClientAPI interface {
44 Create(ctx context.Context, contentType string, body contentmoderator.Body) (result contentmoderator.ImageList, err error)
45 Delete(ctx context.Context, listID string) (result contentmoderator.String, err error)
46 GetAllImageLists(ctx context.Context) (result contentmoderator.ListImageList, err error)
47 GetDetails(ctx context.Context, listID string) (result contentmoderator.ImageList, err error)
48 RefreshIndexMethod(ctx context.Context, listID string) (result contentmoderator.RefreshIndex, err error)
49 Update(ctx context.Context, listID string, contentType string, body contentmoderator.Body) (result contentmoderator.ImageList, err error)
50 }
51
52 var _ ListManagementImageListsClientAPI = (*contentmoderator.ListManagementImageListsClient)(nil)
53
54
55 type ListManagementTermListsClientAPI interface {
56 Create(ctx context.Context, contentType string, body contentmoderator.Body) (result contentmoderator.TermList, err error)
57 Delete(ctx context.Context, listID string) (result contentmoderator.String, err error)
58 GetAllTermLists(ctx context.Context) (result contentmoderator.ListTermList, err error)
59 GetDetails(ctx context.Context, listID string) (result contentmoderator.TermList, err error)
60 RefreshIndexMethod(ctx context.Context, listID string, language string) (result contentmoderator.RefreshIndex, err error)
61 Update(ctx context.Context, listID string, contentType string, body contentmoderator.Body) (result contentmoderator.TermList, err error)
62 }
63
64 var _ ListManagementTermListsClientAPI = (*contentmoderator.ListManagementTermListsClient)(nil)
65
66
67 type ListManagementImageClientAPI interface {
68 AddImage(ctx context.Context, listID string, tag *int32, label string) (result contentmoderator.Image, err error)
69 AddImageFileInput(ctx context.Context, listID string, imageStream io.ReadCloser, tag *int32, label string) (result contentmoderator.Image, err error)
70 AddImageURLInput(ctx context.Context, listID string, contentType string, imageURL contentmoderator.ImageURL, tag *int32, label string) (result contentmoderator.Image, err error)
71 DeleteAllImages(ctx context.Context, listID string) (result contentmoderator.String, err error)
72 DeleteImage(ctx context.Context, listID string, imageID string) (result contentmoderator.String, err error)
73 GetAllImageIds(ctx context.Context, listID string) (result contentmoderator.ImageIds, err error)
74 }
75
76 var _ ListManagementImageClientAPI = (*contentmoderator.ListManagementImageClient)(nil)
77
78
79 type ListManagementTermClientAPI interface {
80 AddTerm(ctx context.Context, listID string, term string, language string) (result autorest.Response, err error)
81 DeleteAllTerms(ctx context.Context, listID string, language string) (result contentmoderator.String, err error)
82 DeleteTerm(ctx context.Context, listID string, term string, language string) (result contentmoderator.String, err error)
83 GetAllTerms(ctx context.Context, listID string, language string, offset *int32, limit *int32) (result contentmoderator.Terms, err error)
84 }
85
86 var _ ListManagementTermClientAPI = (*contentmoderator.ListManagementTermClient)(nil)
87
88
89 type ReviewsClientAPI interface {
90 AddVideoFrame(ctx context.Context, teamName string, reviewID string, timescale *int32) (result autorest.Response, err error)
91 AddVideoFrameStream(ctx context.Context, contentType string, teamName string, reviewID string, frameImageZip io.ReadCloser, frameMetadata string, timescale *int32) (result autorest.Response, err error)
92 AddVideoFrameURL(ctx context.Context, contentType string, teamName string, reviewID string, videoFrameBody []contentmoderator.VideoFrameBodyItem, timescale *int32) (result autorest.Response, err error)
93 AddVideoTranscript(ctx context.Context, teamName string, reviewID string, vttfile io.ReadCloser) (result autorest.Response, err error)
94 AddVideoTranscriptModerationResult(ctx context.Context, contentType string, teamName string, reviewID string, transcriptModerationBody []contentmoderator.TranscriptModerationBodyItem) (result autorest.Response, err error)
95 CreateJob(ctx context.Context, teamName string, contentType string, contentID string, workflowName string, jobContentType string, content contentmoderator.Content, callBackEndpoint string) (result contentmoderator.JobID, err error)
96 CreateReviews(ctx context.Context, URLContentType string, teamName string, createReviewBody []contentmoderator.CreateReviewBodyItem, subTeam string) (result contentmoderator.ListString, err error)
97 CreateVideoReviews(ctx context.Context, contentType string, teamName string, createVideoReviewsBody []contentmoderator.CreateVideoReviewsBodyItem, subTeam string) (result contentmoderator.ListString, err error)
98 GetJobDetails(ctx context.Context, teamName string, jobID string) (result contentmoderator.Job, err error)
99 GetReview(ctx context.Context, teamName string, reviewID string) (result contentmoderator.Review, err error)
100 GetVideoFrames(ctx context.Context, teamName string, reviewID string, startSeed *int32, noOfRecords *int32, filter string) (result contentmoderator.Frames, err error)
101 PublishVideoReview(ctx context.Context, teamName string, reviewID string) (result autorest.Response, err error)
102 }
103
104 var _ ReviewsClientAPI = (*contentmoderator.ReviewsClient)(nil)
105
View as plain text