[][src]Struct google_commentanalyzer1_alpha1::AnalyzeCommentRequest

pub struct AnalyzeCommentRequest {
    pub comment: Option<TextEntry>,
    pub do_not_store: Option<bool>,
    pub languages: Option<Vec<String>>,
    pub session_id: Option<String>,
    pub context: Option<Context>,
    pub client_token: Option<String>,
    pub requested_attributes: Option<HashMap<String, AttributeParameters>>,
    pub span_annotations: Option<bool>,
    pub community_id: Option<String>,
}

The comment analysis request message.

Activities

This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).

Fields

comment: Option<TextEntry>

The comment to analyze.

do_not_store: Option<bool>

Do not store the comment or context sent in this request. By default, the service may store comments/context for debugging purposes.

languages: Option<Vec<String>>

The language(s) of the comment and context (if none are specified, the language is automatically detected). If multiple languages are specified, the text is checked in all of them that are supported. Both ISO and BCP-47 language codes are accepted. Current Language Restrictions:

  • Only English text ("en") is supported. If none of the languages specified by the caller are supported, an UNIMPLEMENTED error is returned.
session_id: Option<String>

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.

context: Option<Context>

The context of the comment.

client_token: Option<String>

Opaque token that is echoed from the request to the response.

requested_attributes: Option<HashMap<String, AttributeParameters>>

Specification of requested attributes. The AttributeParameters serve as configuration for each associated attribute. The map keys are attribute names. The following attributes are available: "ATTACK_ON_AUTHOR" - Attack on author of original article or post. "ATTACK_ON_COMMENTER" - Attack on fellow commenter. "ATTACK_ON_PUBLISHER" - Attack on publisher of article/post. "INCOHERENT" - Difficult to understand, nonsensical. "INFLAMMATORY" - Intending to provoke or inflame. "OBSCENE" - Obscene, such as cursing. "OFF_TOPIC" - Not related to the original topic. "SPAM" - Commercial/advertising spam content. "UNSUBSTANTIAL" - Trivial.

span_annotations: Option<bool>

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.

community_id: Option<String>

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.

Trait Implementations

impl RequestValue for AnalyzeCommentRequest[src]

impl Default for AnalyzeCommentRequest[src]

impl Clone for AnalyzeCommentRequest[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for AnalyzeCommentRequest[src]

impl Serialize for AnalyzeCommentRequest[src]

impl<'de> Deserialize<'de> for AnalyzeCommentRequest[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]