[][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. LINT.IfChange

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, 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.

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 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.

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 Clone for AnalyzeCommentRequest[src]

impl Debug for AnalyzeCommentRequest[src]

impl Default for AnalyzeCommentRequest[src]

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

impl RequestValue for AnalyzeCommentRequest[src]

impl Serialize for AnalyzeCommentRequest[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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> Typeable for T where
    T: Any