COMMENTANALYZER

commentanalyzer.comments.analyze

enum_AttributeParametersScoreType := [ "SCORE_TYPE_UNSPECIFIED", "PROBABILITY", "STD_DEV_SCORE", "PERCENTILE", "RAW" ]
enum_TextEntryType := [ "TEXT_TYPE_UNSPECIFIED", "PLAIN_TEXT", "HTML" ]

valid {
    input.Body.clientToken == STRING
    input.Body.comment.text == STRING
    input.Body.comment.type == enum_TextEntryType[_]
    input.Body.communityId == STRING
    input.Body.context.articleAndParentComment.article.text == STRING
    input.Body.context.articleAndParentComment.article.type == enum_TextEntryType[_]
    input.Body.context.articleAndParentComment.parentComment.text == STRING
    input.Body.context.articleAndParentComment.parentComment.type == enum_TextEntryType[_]
    input.Body.context.entries[_].text == STRING
    input.Body.context.entries[_].type == enum_TextEntryType[_]
    input.Body.doNotStore == BOOLEAN
    input.Body.languages[_] == STRING
    input.Body.requestedAttributes.STRING.scoreThreshold == NUMBER
    input.Body.requestedAttributes.STRING.scoreType == enum_AttributeParametersScoreType[_]
    input.Body.sessionId == STRING
    input.Body.spanAnnotations == BOOLEAN
    input.ProviderMetadata.Region == STRING
}

commentanalyzer.comments.suggestscore

enum_ScoreType := [ "SCORE_TYPE_UNSPECIFIED", "PROBABILITY", "STD_DEV_SCORE", "PERCENTILE", "RAW" ]
enum_TextEntryType := [ "TEXT_TYPE_UNSPECIFIED", "PLAIN_TEXT", "HTML" ]

valid {
    input.Body.attributeScores.STRING.spanScores[_].begin == INTEGER
    input.Body.attributeScores.STRING.spanScores[_].end == INTEGER
    input.Body.attributeScores.STRING.spanScores[_].score.type == enum_ScoreType[_]
    input.Body.attributeScores.STRING.spanScores[_].score.value == NUMBER
    input.Body.attributeScores.STRING.summaryScore.type == enum_ScoreType[_]
    input.Body.attributeScores.STRING.summaryScore.value == NUMBER
    input.Body.clientToken == STRING
    input.Body.comment.text == STRING
    input.Body.comment.type == enum_TextEntryType[_]
    input.Body.communityId == STRING
    input.Body.context.articleAndParentComment.article.text == STRING
    input.Body.context.articleAndParentComment.article.type == enum_TextEntryType[_]
    input.Body.context.articleAndParentComment.parentComment.text == STRING
    input.Body.context.articleAndParentComment.parentComment.type == enum_TextEntryType[_]
    input.Body.context.entries[_].text == STRING
    input.Body.context.entries[_].type == enum_TextEntryType[_]
    input.Body.languages[_] == STRING
    input.Body.sessionId == STRING
    input.ProviderMetadata.Region == STRING
}