Struct google_api_proto::google::cloud::aiplatform::v1::SafetyRating
source · pub struct SafetyRating {
pub category: i32,
pub probability: i32,
pub probability_score: f32,
pub severity: i32,
pub severity_score: f32,
pub blocked: bool,
}
Expand description
Safety rating corresponding to the generated content.
Fields§
§category: i32
Output only. Harm category.
probability: i32
Output only. Harm probability levels in the content.
probability_score: f32
Output only. Harm probability score.
severity: i32
Output only. Harm severity levels in the content.
severity_score: f32
Output only. Harm severity score.
blocked: bool
Output only. Indicates whether the content was filtered out because of this rating.
Implementations§
source§impl SafetyRating
impl SafetyRating
sourcepub fn category(&self) -> HarmCategory
pub fn category(&self) -> HarmCategory
Returns the enum value of category
, or the default if the field is set to an invalid enum value.
sourcepub fn set_category(&mut self, value: HarmCategory)
pub fn set_category(&mut self, value: HarmCategory)
Sets category
to the provided enum value.
sourcepub fn probability(&self) -> HarmProbability
pub fn probability(&self) -> HarmProbability
Returns the enum value of probability
, or the default if the field is set to an invalid enum value.
sourcepub fn set_probability(&mut self, value: HarmProbability)
pub fn set_probability(&mut self, value: HarmProbability)
Sets probability
to the provided enum value.
sourcepub fn severity(&self) -> HarmSeverity
pub fn severity(&self) -> HarmSeverity
Returns the enum value of severity
, or the default if the field is set to an invalid enum value.
sourcepub fn set_severity(&mut self, value: HarmSeverity)
pub fn set_severity(&mut self, value: HarmSeverity)
Sets severity
to the provided enum value.
Trait Implementations§
source§impl Clone for SafetyRating
impl Clone for SafetyRating
source§fn clone(&self) -> SafetyRating
fn clone(&self) -> SafetyRating
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SafetyRating
impl Debug for SafetyRating
source§impl Default for SafetyRating
impl Default for SafetyRating
source§impl Message for SafetyRating
impl Message for SafetyRating
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for SafetyRating
impl PartialEq for SafetyRating
source§fn eq(&self, other: &SafetyRating) -> bool
fn eq(&self, other: &SafetyRating) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for SafetyRating
impl StructuralPartialEq for SafetyRating
Auto Trait Implementations§
impl Freeze for SafetyRating
impl RefUnwindSafe for SafetyRating
impl Send for SafetyRating
impl Sync for SafetyRating
impl Unpin for SafetyRating
impl UnwindSafe for SafetyRating
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request