commentanalyzer
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package commentanalyzer provides access to the Perspective Comment Analyzer API.
For product documentation, see:https://github.com/conversationai/perspectiveapi/blob/master/README.md
Creating a client¶
Usage example:
import "google.golang.org/api/commentanalyzer/v1alpha1"...ctx := context.Background()commentanalyzerService, err := commentanalyzer.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication.
For information on how to create and obtain Application Default Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options¶
To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
commentanalyzerService, err := commentanalyzer.NewService(ctx, option.WithAPIKey("AIza..."))To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)commentanalyzerService, err := commentanalyzer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seehttps://godoc.org/google.golang.org/api/option/ for details on options.
Index¶
- Constants
- type AnalyzeCommentRequest
- type AnalyzeCommentResponse
- type ArticleAndParentComment
- type AttributeParameters
- type AttributeScores
- type CommentsAnalyzeCall
- func (c *CommentsAnalyzeCall) Context(ctx context.Context) *CommentsAnalyzeCall
- func (c *CommentsAnalyzeCall) Do(opts ...googleapi.CallOption) (*AnalyzeCommentResponse, error)
- func (c *CommentsAnalyzeCall) Fields(s ...googleapi.Field) *CommentsAnalyzeCall
- func (c *CommentsAnalyzeCall) Header() http.Header
- type CommentsService
- type CommentsSuggestscoreCall
- func (c *CommentsSuggestscoreCall) Context(ctx context.Context) *CommentsSuggestscoreCall
- func (c *CommentsSuggestscoreCall) Do(opts ...googleapi.CallOption) (*SuggestCommentScoreResponse, error)
- func (c *CommentsSuggestscoreCall) Fields(s ...googleapi.Field) *CommentsSuggestscoreCall
- func (c *CommentsSuggestscoreCall) Header() http.Header
- type Context
- type Score
- type Service
- type SpanScore
- type SuggestCommentScoreRequest
- type SuggestCommentScoreResponse
- type TextEntry
Constants¶
const (// View your email addressUserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email")OAuth2 scopes used by this API.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeAnalyzeCommentRequest¶
type AnalyzeCommentRequest struct {// ClientToken: Opaque token that is echoed from the request to the// response.ClientTokenstring `json:"clientToken,omitempty"`// Comment: The comment to analyze.Comment *TextEntry `json:"comment,omitempty"`// CommunityId: Optional identifier associating this// AnalyzeCommentRequest with a// particular client's community. Different communities may have// different// norms and rules. Specifying this value enables us to explore// building// community-specific models for clients.CommunityIdstring `json:"communityId,omitempty"`// Context: The context of the comment.Context *Context `json:"context,omitempty"`// DoNotStore: Do not store the comment or context sent in this request.// By default, the// service may store comments/context for debugging purposes.DoNotStorebool `json:"doNotStore,omitempty"`// Languages: The language(s) of the comment and context. If none are// specified, we// attempt to automatically detect the language. Specifying multiple// languages// means the text contains multiple lanugages. Both ISO and BCP-47// language// codes are accepted.//// The server returns an error if no language was specified and// language// detection fails. The server also returns an error if the languages// (either// specified by the caller, or auto-detected) are not *all* supported by// the// service.Languages []string `json:"languages,omitempty"`// RequestedAttributes: Specification of requested attributes. The// AttributeParameters serve as// configuration for each associated attribute. The map keys are// attribute// names. The available attributes may be different on each RFE// installation,// and can be seen by calling ListAttributes (see above).// For the prod installation, known as Perspective API,// at// blade:commentanalyzer-esf and commentanalyzer.googleapis.com,// see// go/checker-models (internal)// and//https://github.com/conversationai/perspectiveapi/blob/master/2-api// /models.md#all-attribute-types.RequestedAttributes map[string]AttributeParameters `json:"requestedAttributes,omitempty"`// SessionId: Session ID. Used to join related RPCs into a single// session. For example,// an interactive tool that calls both the AnalyzeComment// and// SuggestCommentScore RPCs should set all invocations of both RPCs to// the// same Session ID, typically a random 64-bit integer.SessionIdstring `json:"sessionId,omitempty"`// SpanAnnotations: An advisory parameter that will return span// annotations if the model// is capable of providing scores with sub-comment resolution. This// will// likely increase the size of the returned message.SpanAnnotationsbool `json:"spanAnnotations,omitempty"`// ForceSendFields is a list of field names (e.g. "ClientToken") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ClientToken") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}AnalyzeCommentRequest: The comment analysis requestmessage.LINT.IfChange
func (*AnalyzeCommentRequest)MarshalJSON¶
func (s *AnalyzeCommentRequest) MarshalJSON() ([]byte,error)
typeAnalyzeCommentResponse¶
type AnalyzeCommentResponse struct {// AttributeScores: Scores for the requested attributes. The map keys// are attribute names (same// as the requested_attribute field in AnalyzeCommentRequest, for// example// "ATTACK_ON_AUTHOR", "INFLAMMATORY", etc).AttributeScores map[string]AttributeScores `json:"attributeScores,omitempty"`// ClientToken: Same token from the original AnalyzeCommentRequest.ClientTokenstring `json:"clientToken,omitempty"`// DetectedLanguages: Contains the languages detected from the text// content, sorted in order of// likelihood.DetectedLanguages []string `json:"detectedLanguages,omitempty"`// Languages: The language(s) used by CommentAnalyzer service to choose// which Model to// use when analyzing the comment. Might better be// called// "effective_languages". The logic used to make the choice is as// follows:// if !Request.languages.empty()// effective_languages = Request.languages// else// effective_languages = detected_languages[0]Languages []string `json:"languages,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AttributeScores") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AttributeScores") to// include in API requests with the JSON null value. By default, fields// with empty values are omitted from API requests. However, any field// with an empty value appearing in NullFields will be sent to the// server as null. It is an error if a field in this list has a// non-empty value. This may be used to include null fields in Patch// requests.NullFields []string `json:"-"`}AnalyzeCommentResponse: The comment analysis response message.
func (*AnalyzeCommentResponse)MarshalJSON¶
func (s *AnalyzeCommentResponse) MarshalJSON() ([]byte,error)
typeArticleAndParentComment¶
type ArticleAndParentComment struct {// Article: The source content about which the comment was made (article// text, article// summary, video transcript, etc).Article *TextEntry `json:"article,omitempty"`// ParentComment: Refers to text that is a direct parent of the source// comment, such as in a// one-deep threaded message board. This field will only be present// for// comments that are replies to other comments and will not be populated// for// direct comments on the article_text.ParentComment *TextEntry `json:"parentComment,omitempty"`// ForceSendFields is a list of field names (e.g. "Article") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Article") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}ArticleAndParentComment: A type of context specific to a comment lefton a single-threaded commentmessage board, where comments are either a top level comment or thechild ofa top level comment.
func (*ArticleAndParentComment)MarshalJSON¶
func (s *ArticleAndParentComment) MarshalJSON() ([]byte,error)
typeAttributeParameters¶
type AttributeParameters struct {// ScoreThreshold: Don't return scores for this attribute that are below// this threshold. If// unset, a default threshold will be applied. A FloatValue wrapper is// used to// distinguish between 0 vs. default/unset.ScoreThresholdfloat64 `json:"scoreThreshold,omitempty"`// ScoreType: What type of scores to return. If unset, defaults to// probability scores.//// Possible values:// "SCORE_TYPE_UNSPECIFIED" - Unspecified. Defaults to PROBABILITY// scores if available, and otherwise// RAW. Every model has a RAW score.// "PROBABILITY" - Probability scores are in the range [0, 1] and// indicate level of confidence// in the attribute label.// "STD_DEV_SCORE" - Standard deviation scores are in the range (-inf,// +inf).// "PERCENTILE" - Percentile scores are in the range [0, 1] and// indicate the percentile of// the raw score, normalized with a test dataset. This is not// generally// recommended, as the normalization is dependent on the dataset used,// which// may not match other usecases.// "RAW" - Raw scores are the raw values from the model, and may take// any value. This// is primarily for debugging/testing, and not generally recommended.ScoreTypestring `json:"scoreType,omitempty"`// ForceSendFields is a list of field names (e.g. "ScoreThreshold") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ScoreThreshold") to// include in API requests with the JSON null value. By default, fields// with empty values are omitted from API requests. However, any field// with an empty value appearing in NullFields will be sent to the// server as null. It is an error if a field in this list has a// non-empty value. This may be used to include null fields in Patch// requests.NullFields []string `json:"-"`}AttributeParameters: Configurable parameters for attribute scoring.
func (*AttributeParameters)MarshalJSON¶
func (s *AttributeParameters) MarshalJSON() ([]byte,error)
func (*AttributeParameters)UnmarshalJSON¶
func (s *AttributeParameters) UnmarshalJSON(data []byte)error
typeAttributeScores¶
type AttributeScores struct {// SpanScores: Per-span scores.SpanScores []*SpanScore `json:"spanScores,omitempty"`// SummaryScore: Overall score for comment as a whole.SummaryScore *Score `json:"summaryScore,omitempty"`// ForceSendFields is a list of field names (e.g. "SpanScores") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "SpanScores") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}AttributeScores: This holds score values for a single attribute. Itcontains both per-spanscores as well as an overall summary score..
func (*AttributeScores)MarshalJSON¶
func (s *AttributeScores) MarshalJSON() ([]byte,error)
typeCommentsAnalyzeCall¶
type CommentsAnalyzeCall struct {// contains filtered or unexported fields}func (*CommentsAnalyzeCall)Context¶
func (c *CommentsAnalyzeCall) Context(ctxcontext.Context) *CommentsAnalyzeCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*CommentsAnalyzeCall)Do¶
func (c *CommentsAnalyzeCall) Do(opts ...googleapi.CallOption) (*AnalyzeCommentResponse,error)
Do executes the "commentanalyzer.comments.analyze" call.Exactly one of *AnalyzeCommentResponse or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*AnalyzeCommentResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.
func (*CommentsAnalyzeCall)Fields¶
func (c *CommentsAnalyzeCall) Fields(s ...googleapi.Field) *CommentsAnalyzeCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*CommentsAnalyzeCall)Header¶
func (c *CommentsAnalyzeCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeCommentsService¶
type CommentsService struct {// contains filtered or unexported fields}funcNewCommentsService¶
func NewCommentsService(s *Service) *CommentsService
func (*CommentsService)Analyze¶
func (r *CommentsService) Analyze(analyzecommentrequest *AnalyzeCommentRequest) *CommentsAnalyzeCall
Analyze: Analyzes the provided text and returns scores for requestedattributes.
func (*CommentsService)Suggestscore¶
func (r *CommentsService) Suggestscore(suggestcommentscorerequest *SuggestCommentScoreRequest) *CommentsSuggestscoreCall
Suggestscore: Suggest comment scores as training data.
typeCommentsSuggestscoreCall¶
type CommentsSuggestscoreCall struct {// contains filtered or unexported fields}func (*CommentsSuggestscoreCall)Context¶
func (c *CommentsSuggestscoreCall) Context(ctxcontext.Context) *CommentsSuggestscoreCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*CommentsSuggestscoreCall)Do¶
func (c *CommentsSuggestscoreCall) Do(opts ...googleapi.CallOption) (*SuggestCommentScoreResponse,error)
Do executes the "commentanalyzer.comments.suggestscore" call.Exactly one of *SuggestCommentScoreResponse or error will be non-nil.Any non-2xx status code is an error. Response headers are in either*SuggestCommentScoreResponse.ServerResponse.Header or (if a responsewas returned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.
func (*CommentsSuggestscoreCall)Fields¶
func (c *CommentsSuggestscoreCall) Fields(s ...googleapi.Field) *CommentsSuggestscoreCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*CommentsSuggestscoreCall)Header¶
func (c *CommentsSuggestscoreCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeContext¶
type Context struct {// ArticleAndParentComment: Information about the source for which the// original comment was made, and// any parent comment info.ArticleAndParentComment *ArticleAndParentComment `json:"articleAndParentComment,omitempty"`// Entries: A list of messages. For example, a linear comments section// or forum thread.Entries []*TextEntry `json:"entries,omitempty"`// ForceSendFields is a list of field names (e.g.// "ArticleAndParentComment") to unconditionally include in API// requests. By default, fields with empty values are omitted from API// requests. However, any non-pointer, non-interface field appearing in// ForceSendFields will be sent to the server regardless of whether the// field is empty or not. This may be used to include empty fields in// Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ArticleAndParentComment")// to include in API requests with the JSON null value. By default,// fields with empty values are omitted from API requests. However, any// field with an empty value appearing in NullFields will be sent to the// server as null. It is an error if a field in this list has a// non-empty value. This may be used to include null fields in Patch// requests.NullFields []string `json:"-"`}Context: Context is typically something that a Comment is referencingor replying to(such as an article, or previous comment).Note: Populate only ONE OF the following fields. The oneof syntaxcannot beused because that would require nesting entries inside anothermessage andbreaking backwards compatibility. The server will return an error ifmorethan one of the following fields is present.
func (*Context)MarshalJSON¶
typeScore¶
type Score struct {// Type: The type of the above value.//// Possible values:// "SCORE_TYPE_UNSPECIFIED" - Unspecified. Defaults to PROBABILITY// scores if available, and otherwise// RAW. Every model has a RAW score.// "PROBABILITY" - Probability scores are in the range [0, 1] and// indicate level of confidence// in the attribute label.// "STD_DEV_SCORE" - Standard deviation scores are in the range (-inf,// +inf).// "PERCENTILE" - Percentile scores are in the range [0, 1] and// indicate the percentile of// the raw score, normalized with a test dataset. This is not// generally// recommended, as the normalization is dependent on the dataset used,// which// may not match other usecases.// "RAW" - Raw scores are the raw values from the model, and may take// any value. This// is primarily for debugging/testing, and not generally recommended.Typestring `json:"type,omitempty"`// Value: Score value. Semantics described by type below.Valuefloat64 `json:"value,omitempty"`// ForceSendFields is a list of field names (e.g. "Type") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Type") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}Score: Analysis scores are described by a value and a ScoreType.
func (*Score)MarshalJSON¶
func (*Score)UnmarshalJSON¶
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentComments *CommentsService// contains filtered or unexported fields} funcNewdeprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
funcNewService¶
NewService creates a new Service.
typeSpanScore¶
type SpanScore struct {// Begin: "begin" and "end" describe the span of the original text that// the attribute// score applies to. The values are the UTF-16 codepoint range. "end"// is// exclusive. For example, with the text "Hi there", the begin/end pair// (0,2)// describes the text "Hi".//// If "begin" and "end" are unset, the score applies to the full text.Beginint64 `json:"begin,omitempty"`Endint64 `json:"end,omitempty"`// Score: The score value.Score *Score `json:"score,omitempty"`// ForceSendFields is a list of field names (e.g. "Begin") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Begin") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}SpanScore: This is a single score for a given span of text.
func (*SpanScore)MarshalJSON¶
typeSuggestCommentScoreRequest¶
type SuggestCommentScoreRequest struct {// AttributeScores: Attribute scores for the comment. The map keys are// attribute names, same as// the requested_attribute field in AnalyzeCommentRequest (for// example// "ATTACK_ON_AUTHOR", "INFLAMMATORY", etc.). This field has the same// type as// the `attribute_scores` field in AnalyzeCommentResponse.//// To specify an overall attribute score for the entire comment as a// whole,// use the `summary_score` field of the mapped AttributeScores object.// To// specify scores on specific subparts of the comment, use the// `span_scores`// field. All SpanScore objects must have begin and end fields set.//// All Score objects must be explicitly set (for binary classification,// use// the score values 0 and 1). If Score objects don't include a// ScoreType,// `PROBABILITY` is assumed.//// `attribute_scores` must not be empty. The mapped AttributeScores// objects// also must not be empty. An `INVALID_ARGUMENT` error is returned for// all// malformed requests.AttributeScores map[string]AttributeScores `json:"attributeScores,omitempty"`// ClientToken: Opaque token that is echoed from the request to the// response.ClientTokenstring `json:"clientToken,omitempty"`// Comment: The comment being scored.Comment *TextEntry `json:"comment,omitempty"`// CommunityId: Optional identifier associating this comment score// suggestion with a// particular sub-community. Different communities may have different// norms// and rules. Specifying this value enables training// community-specific// models.CommunityIdstring `json:"communityId,omitempty"`// Context: The context of the comment.Context *Context `json:"context,omitempty"`// Languages: The language(s) of the comment and context. If none are// specified, we// attempt to automatically detect the language. Both ISO and BCP-47// language// codes are accepted.Languages []string `json:"languages,omitempty"`// SessionId: Session ID. Used to join related RPCs into a single// session. For example,// an interactive tool that calls both the AnalyzeComment// and// SuggestCommentScore RPCs should set all invocations of both RPCs to// the// same Session ID, typically a random 64-bit integer.SessionIdstring `json:"sessionId,omitempty"`// ForceSendFields is a list of field names (e.g. "AttributeScores") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AttributeScores") to// include in API requests with the JSON null value. By default, fields// with empty values are omitted from API requests. However, any field// with an empty value appearing in NullFields will be sent to the// server as null. It is an error if a field in this list has a// non-empty value. This may be used to include null fields in Patch// requests.NullFields []string `json:"-"`}SuggestCommentScoreRequest: The comment score suggestion requestmessage.
func (*SuggestCommentScoreRequest)MarshalJSON¶
func (s *SuggestCommentScoreRequest) MarshalJSON() ([]byte,error)
typeSuggestCommentScoreResponse¶
type SuggestCommentScoreResponse struct {// ClientToken: Same token from the original SuggestCommentScoreRequest.ClientTokenstring `json:"clientToken,omitempty"`// DetectedLanguages: The list of languages detected from the comment// text.DetectedLanguages []string `json:"detectedLanguages,omitempty"`// RequestedLanguages: The list of languages provided in the request.RequestedLanguages []string `json:"requestedLanguages,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "ClientToken") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ClientToken") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}SuggestCommentScoreResponse: The comment score suggestion responsemessage.
func (*SuggestCommentScoreResponse)MarshalJSON¶
func (s *SuggestCommentScoreResponse) MarshalJSON() ([]byte,error)
typeTextEntry¶
type TextEntry struct {// Text: UTF-8 encoded text.Textstring `json:"text,omitempty"`// Type: Type of the text field.//// Possible values:// "TEXT_TYPE_UNSPECIFIED" - The content type is not specified. Text// will be interpreted as plain text// by default.// "PLAIN_TEXT" - Plain text.// "HTML" - HTML.Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "Text") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Text") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}TextEntry: Represents a body of text.