#[non_exhaustive]pub struct GenerateSyntheticDataRequest {
pub location: String,
pub count: i32,
pub output_field_specs: Vec<OutputFieldSpec>,
pub examples: Vec<SyntheticExample>,
pub strategy: Option<Strategy>,
/* private fields */
}data-foundry-service only.Expand description
Request message for DataFoundryService.GenerateSyntheticData.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.location: StringRequired. The resource name of the Location to run the job.
Format: projects/{project}/locations/{location}
count: i32Required. The number of synthetic examples to generate. For this stateless API, the count is limited to a small number.
output_field_specs: Vec<OutputFieldSpec>Required. The schema of the desired output, defined by a list of fields.
examples: Vec<SyntheticExample>Optional. A list of few-shot examples to guide the model’s output style and format.
strategy: Option<Strategy>The generation strategy to use.
Implementations§
Source§impl GenerateSyntheticDataRequest
impl GenerateSyntheticDataRequest
pub fn new() -> Self
Sourcepub fn set_location<T: Into<String>>(self, v: T) -> Self
pub fn set_location<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_output_field_specs<T, V>(self, v: T) -> Self
pub fn set_output_field_specs<T, V>(self, v: T) -> Self
Sets the value of output_field_specs.
§Example
use google_cloud_aiplatform_v1::model::OutputFieldSpec;
let x = GenerateSyntheticDataRequest::new()
.set_output_field_specs([
OutputFieldSpec::default()/* use setters */,
OutputFieldSpec::default()/* use (different) setters */,
]);Sourcepub fn set_examples<T, V>(self, v: T) -> Self
pub fn set_examples<T, V>(self, v: T) -> Self
Sourcepub fn set_strategy<T: Into<Option<Strategy>>>(self, v: T) -> Self
pub fn set_strategy<T: Into<Option<Strategy>>>(self, v: T) -> Self
Sets the value of strategy.
Note that all the setters affecting strategy are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::TaskDescriptionStrategy;
let x = GenerateSyntheticDataRequest::new().set_strategy(Some(
google_cloud_aiplatform_v1::model::generate_synthetic_data_request::Strategy::TaskDescription(TaskDescriptionStrategy::default().into())));Sourcepub fn task_description(&self) -> Option<&Box<TaskDescriptionStrategy>>
pub fn task_description(&self) -> Option<&Box<TaskDescriptionStrategy>>
The value of strategy
if it holds a TaskDescription, None if the field is not set or
holds a different branch.
Sourcepub fn set_task_description<T: Into<Box<TaskDescriptionStrategy>>>(
self,
v: T,
) -> Self
pub fn set_task_description<T: Into<Box<TaskDescriptionStrategy>>>( self, v: T, ) -> Self
Sets the value of strategy
to hold a TaskDescription.
Note that all the setters affecting strategy are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::TaskDescriptionStrategy;
let x = GenerateSyntheticDataRequest::new().set_task_description(TaskDescriptionStrategy::default()/* use setters */);
assert!(x.task_description().is_some());Trait Implementations§
Source§impl Clone for GenerateSyntheticDataRequest
impl Clone for GenerateSyntheticDataRequest
Source§fn clone(&self) -> GenerateSyntheticDataRequest
fn clone(&self) -> GenerateSyntheticDataRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GenerateSyntheticDataRequest
impl Debug for GenerateSyntheticDataRequest
Source§impl Default for GenerateSyntheticDataRequest
impl Default for GenerateSyntheticDataRequest
Source§fn default() -> GenerateSyntheticDataRequest
fn default() -> GenerateSyntheticDataRequest
Source§impl PartialEq for GenerateSyntheticDataRequest
impl PartialEq for GenerateSyntheticDataRequest
Source§fn eq(&self, other: &GenerateSyntheticDataRequest) -> bool
fn eq(&self, other: &GenerateSyntheticDataRequest) -> bool
self and other values to be equal, and is used by ==.