google_cloud_aiplatform_v1_schema_predict_instance/model.rs
1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::bare_urls)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![allow(rustdoc::invalid_html_tags)]
20#![allow(rustdoc::redundant_explicit_links)]
21#![no_implicit_prelude]
22extern crate bytes;
23extern crate serde;
24extern crate serde_json;
25extern crate serde_with;
26extern crate std;
27extern crate wkt;
28
29mod debug;
30mod deserialize;
31mod serialize;
32
33/// Prediction input format for Image Classification.
34#[derive(Clone, Default, PartialEq)]
35#[non_exhaustive]
36pub struct ImageClassificationPredictionInstance {
37 /// The image bytes or Cloud Storage URI to make the prediction on.
38 pub content: std::string::String,
39
40 /// The MIME type of the content of the image. Only the images in below listed
41 /// MIME types are supported.
42 ///
43 /// - image/jpeg
44 /// - image/gif
45 /// - image/png
46 /// - image/webp
47 /// - image/bmp
48 /// - image/tiff
49 /// - image/vnd.microsoft.icon
50 pub mime_type: std::string::String,
51
52 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53}
54
55impl ImageClassificationPredictionInstance {
56 /// Creates a new default instance.
57 pub fn new() -> Self {
58 std::default::Default::default()
59 }
60
61 /// Sets the value of [content][crate::model::ImageClassificationPredictionInstance::content].
62 ///
63 /// # Example
64 /// ```ignore,no_run
65 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::ImageClassificationPredictionInstance;
66 /// let x = ImageClassificationPredictionInstance::new().set_content("example");
67 /// ```
68 pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69 self.content = v.into();
70 self
71 }
72
73 /// Sets the value of [mime_type][crate::model::ImageClassificationPredictionInstance::mime_type].
74 ///
75 /// # Example
76 /// ```ignore,no_run
77 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::ImageClassificationPredictionInstance;
78 /// let x = ImageClassificationPredictionInstance::new().set_mime_type("example");
79 /// ```
80 pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81 self.mime_type = v.into();
82 self
83 }
84}
85
86impl wkt::message::Message for ImageClassificationPredictionInstance {
87 fn typename() -> &'static str {
88 "type.googleapis.com/google.cloud.aiplatform.v1.schema.predict.instance.ImageClassificationPredictionInstance"
89 }
90}
91
92/// Prediction input format for Image Object Detection.
93#[derive(Clone, Default, PartialEq)]
94#[non_exhaustive]
95pub struct ImageObjectDetectionPredictionInstance {
96 /// The image bytes or Cloud Storage URI to make the prediction on.
97 pub content: std::string::String,
98
99 /// The MIME type of the content of the image. Only the images in below listed
100 /// MIME types are supported.
101 ///
102 /// - image/jpeg
103 /// - image/gif
104 /// - image/png
105 /// - image/webp
106 /// - image/bmp
107 /// - image/tiff
108 /// - image/vnd.microsoft.icon
109 pub mime_type: std::string::String,
110
111 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
112}
113
114impl ImageObjectDetectionPredictionInstance {
115 /// Creates a new default instance.
116 pub fn new() -> Self {
117 std::default::Default::default()
118 }
119
120 /// Sets the value of [content][crate::model::ImageObjectDetectionPredictionInstance::content].
121 ///
122 /// # Example
123 /// ```ignore,no_run
124 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::ImageObjectDetectionPredictionInstance;
125 /// let x = ImageObjectDetectionPredictionInstance::new().set_content("example");
126 /// ```
127 pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
128 self.content = v.into();
129 self
130 }
131
132 /// Sets the value of [mime_type][crate::model::ImageObjectDetectionPredictionInstance::mime_type].
133 ///
134 /// # Example
135 /// ```ignore,no_run
136 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::ImageObjectDetectionPredictionInstance;
137 /// let x = ImageObjectDetectionPredictionInstance::new().set_mime_type("example");
138 /// ```
139 pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
140 self.mime_type = v.into();
141 self
142 }
143}
144
145impl wkt::message::Message for ImageObjectDetectionPredictionInstance {
146 fn typename() -> &'static str {
147 "type.googleapis.com/google.cloud.aiplatform.v1.schema.predict.instance.ImageObjectDetectionPredictionInstance"
148 }
149}
150
151/// Prediction input format for Image Segmentation.
152#[derive(Clone, Default, PartialEq)]
153#[non_exhaustive]
154pub struct ImageSegmentationPredictionInstance {
155 /// The image bytes to make the predictions on.
156 pub content: std::string::String,
157
158 /// The MIME type of the content of the image. Only the images in below listed
159 /// MIME types are supported.
160 ///
161 /// - image/jpeg
162 /// - image/png
163 pub mime_type: std::string::String,
164
165 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
166}
167
168impl ImageSegmentationPredictionInstance {
169 /// Creates a new default instance.
170 pub fn new() -> Self {
171 std::default::Default::default()
172 }
173
174 /// Sets the value of [content][crate::model::ImageSegmentationPredictionInstance::content].
175 ///
176 /// # Example
177 /// ```ignore,no_run
178 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::ImageSegmentationPredictionInstance;
179 /// let x = ImageSegmentationPredictionInstance::new().set_content("example");
180 /// ```
181 pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
182 self.content = v.into();
183 self
184 }
185
186 /// Sets the value of [mime_type][crate::model::ImageSegmentationPredictionInstance::mime_type].
187 ///
188 /// # Example
189 /// ```ignore,no_run
190 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::ImageSegmentationPredictionInstance;
191 /// let x = ImageSegmentationPredictionInstance::new().set_mime_type("example");
192 /// ```
193 pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
194 self.mime_type = v.into();
195 self
196 }
197}
198
199impl wkt::message::Message for ImageSegmentationPredictionInstance {
200 fn typename() -> &'static str {
201 "type.googleapis.com/google.cloud.aiplatform.v1.schema.predict.instance.ImageSegmentationPredictionInstance"
202 }
203}
204
205/// Prediction input format for Text Classification.
206#[derive(Clone, Default, PartialEq)]
207#[non_exhaustive]
208pub struct TextClassificationPredictionInstance {
209 /// The text snippet to make the predictions on.
210 pub content: std::string::String,
211
212 /// The MIME type of the text snippet. The supported MIME types are listed
213 /// below.
214 ///
215 /// - text/plain
216 pub mime_type: std::string::String,
217
218 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
219}
220
221impl TextClassificationPredictionInstance {
222 /// Creates a new default instance.
223 pub fn new() -> Self {
224 std::default::Default::default()
225 }
226
227 /// Sets the value of [content][crate::model::TextClassificationPredictionInstance::content].
228 ///
229 /// # Example
230 /// ```ignore,no_run
231 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::TextClassificationPredictionInstance;
232 /// let x = TextClassificationPredictionInstance::new().set_content("example");
233 /// ```
234 pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
235 self.content = v.into();
236 self
237 }
238
239 /// Sets the value of [mime_type][crate::model::TextClassificationPredictionInstance::mime_type].
240 ///
241 /// # Example
242 /// ```ignore,no_run
243 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::TextClassificationPredictionInstance;
244 /// let x = TextClassificationPredictionInstance::new().set_mime_type("example");
245 /// ```
246 pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
247 self.mime_type = v.into();
248 self
249 }
250}
251
252impl wkt::message::Message for TextClassificationPredictionInstance {
253 fn typename() -> &'static str {
254 "type.googleapis.com/google.cloud.aiplatform.v1.schema.predict.instance.TextClassificationPredictionInstance"
255 }
256}
257
258/// Prediction input format for Text Extraction.
259#[derive(Clone, Default, PartialEq)]
260#[non_exhaustive]
261pub struct TextExtractionPredictionInstance {
262 /// The text snippet to make the predictions on.
263 pub content: std::string::String,
264
265 /// The MIME type of the text snippet. The supported MIME types are listed
266 /// below.
267 ///
268 /// - text/plain
269 pub mime_type: std::string::String,
270
271 /// This field is only used for batch prediction. If a key is provided, the
272 /// batch prediction result will by mapped to this key. If omitted, then the
273 /// batch prediction result will contain the entire input instance. Vertex AI
274 /// will not check if keys in the request are duplicates, so it is up to the
275 /// caller to ensure the keys are unique.
276 pub key: std::string::String,
277
278 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
279}
280
281impl TextExtractionPredictionInstance {
282 /// Creates a new default instance.
283 pub fn new() -> Self {
284 std::default::Default::default()
285 }
286
287 /// Sets the value of [content][crate::model::TextExtractionPredictionInstance::content].
288 ///
289 /// # Example
290 /// ```ignore,no_run
291 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::TextExtractionPredictionInstance;
292 /// let x = TextExtractionPredictionInstance::new().set_content("example");
293 /// ```
294 pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
295 self.content = v.into();
296 self
297 }
298
299 /// Sets the value of [mime_type][crate::model::TextExtractionPredictionInstance::mime_type].
300 ///
301 /// # Example
302 /// ```ignore,no_run
303 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::TextExtractionPredictionInstance;
304 /// let x = TextExtractionPredictionInstance::new().set_mime_type("example");
305 /// ```
306 pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
307 self.mime_type = v.into();
308 self
309 }
310
311 /// Sets the value of [key][crate::model::TextExtractionPredictionInstance::key].
312 ///
313 /// # Example
314 /// ```ignore,no_run
315 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::TextExtractionPredictionInstance;
316 /// let x = TextExtractionPredictionInstance::new().set_key("example");
317 /// ```
318 pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
319 self.key = v.into();
320 self
321 }
322}
323
324impl wkt::message::Message for TextExtractionPredictionInstance {
325 fn typename() -> &'static str {
326 "type.googleapis.com/google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance"
327 }
328}
329
330/// Prediction input format for Text Sentiment.
331#[derive(Clone, Default, PartialEq)]
332#[non_exhaustive]
333pub struct TextSentimentPredictionInstance {
334 /// The text snippet to make the predictions on.
335 pub content: std::string::String,
336
337 /// The MIME type of the text snippet. The supported MIME types are listed
338 /// below.
339 ///
340 /// - text/plain
341 pub mime_type: std::string::String,
342
343 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
344}
345
346impl TextSentimentPredictionInstance {
347 /// Creates a new default instance.
348 pub fn new() -> Self {
349 std::default::Default::default()
350 }
351
352 /// Sets the value of [content][crate::model::TextSentimentPredictionInstance::content].
353 ///
354 /// # Example
355 /// ```ignore,no_run
356 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::TextSentimentPredictionInstance;
357 /// let x = TextSentimentPredictionInstance::new().set_content("example");
358 /// ```
359 pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
360 self.content = v.into();
361 self
362 }
363
364 /// Sets the value of [mime_type][crate::model::TextSentimentPredictionInstance::mime_type].
365 ///
366 /// # Example
367 /// ```ignore,no_run
368 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::TextSentimentPredictionInstance;
369 /// let x = TextSentimentPredictionInstance::new().set_mime_type("example");
370 /// ```
371 pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
372 self.mime_type = v.into();
373 self
374 }
375}
376
377impl wkt::message::Message for TextSentimentPredictionInstance {
378 fn typename() -> &'static str {
379 "type.googleapis.com/google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance"
380 }
381}
382
383/// Prediction input format for Video Action Recognition.
384#[derive(Clone, Default, PartialEq)]
385#[non_exhaustive]
386pub struct VideoActionRecognitionPredictionInstance {
387 /// The Google Cloud Storage location of the video on which to perform the
388 /// prediction.
389 pub content: std::string::String,
390
391 /// The MIME type of the content of the video. Only the following are
392 /// supported: video/mp4 video/avi video/quicktime
393 pub mime_type: std::string::String,
394
395 /// The beginning, inclusive, of the video's time segment on which to perform
396 /// the prediction. Expressed as a number of seconds as measured from the
397 /// start of the video, with "s" appended at the end. Fractions are allowed,
398 /// up to a microsecond precision.
399 pub time_segment_start: std::string::String,
400
401 /// The end, exclusive, of the video's time segment on which to perform
402 /// the prediction. Expressed as a number of seconds as measured from the
403 /// start of the video, with "s" appended at the end. Fractions are allowed,
404 /// up to a microsecond precision, and "inf" or "Infinity" is allowed, which
405 /// means the end of the video.
406 pub time_segment_end: std::string::String,
407
408 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
409}
410
411impl VideoActionRecognitionPredictionInstance {
412 /// Creates a new default instance.
413 pub fn new() -> Self {
414 std::default::Default::default()
415 }
416
417 /// Sets the value of [content][crate::model::VideoActionRecognitionPredictionInstance::content].
418 ///
419 /// # Example
420 /// ```ignore,no_run
421 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::VideoActionRecognitionPredictionInstance;
422 /// let x = VideoActionRecognitionPredictionInstance::new().set_content("example");
423 /// ```
424 pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
425 self.content = v.into();
426 self
427 }
428
429 /// Sets the value of [mime_type][crate::model::VideoActionRecognitionPredictionInstance::mime_type].
430 ///
431 /// # Example
432 /// ```ignore,no_run
433 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::VideoActionRecognitionPredictionInstance;
434 /// let x = VideoActionRecognitionPredictionInstance::new().set_mime_type("example");
435 /// ```
436 pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
437 self.mime_type = v.into();
438 self
439 }
440
441 /// Sets the value of [time_segment_start][crate::model::VideoActionRecognitionPredictionInstance::time_segment_start].
442 ///
443 /// # Example
444 /// ```ignore,no_run
445 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::VideoActionRecognitionPredictionInstance;
446 /// let x = VideoActionRecognitionPredictionInstance::new().set_time_segment_start("example");
447 /// ```
448 pub fn set_time_segment_start<T: std::convert::Into<std::string::String>>(
449 mut self,
450 v: T,
451 ) -> Self {
452 self.time_segment_start = v.into();
453 self
454 }
455
456 /// Sets the value of [time_segment_end][crate::model::VideoActionRecognitionPredictionInstance::time_segment_end].
457 ///
458 /// # Example
459 /// ```ignore,no_run
460 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::VideoActionRecognitionPredictionInstance;
461 /// let x = VideoActionRecognitionPredictionInstance::new().set_time_segment_end("example");
462 /// ```
463 pub fn set_time_segment_end<T: std::convert::Into<std::string::String>>(
464 mut self,
465 v: T,
466 ) -> Self {
467 self.time_segment_end = v.into();
468 self
469 }
470}
471
472impl wkt::message::Message for VideoActionRecognitionPredictionInstance {
473 fn typename() -> &'static str {
474 "type.googleapis.com/google.cloud.aiplatform.v1.schema.predict.instance.VideoActionRecognitionPredictionInstance"
475 }
476}
477
478/// Prediction input format for Video Classification.
479#[derive(Clone, Default, PartialEq)]
480#[non_exhaustive]
481pub struct VideoClassificationPredictionInstance {
482 /// The Google Cloud Storage location of the video on which to perform the
483 /// prediction.
484 pub content: std::string::String,
485
486 /// The MIME type of the content of the video. Only the following are
487 /// supported: video/mp4 video/avi video/quicktime
488 pub mime_type: std::string::String,
489
490 /// The beginning, inclusive, of the video's time segment on which to perform
491 /// the prediction. Expressed as a number of seconds as measured from the
492 /// start of the video, with "s" appended at the end. Fractions are allowed,
493 /// up to a microsecond precision.
494 pub time_segment_start: std::string::String,
495
496 /// The end, exclusive, of the video's time segment on which to perform
497 /// the prediction. Expressed as a number of seconds as measured from the
498 /// start of the video, with "s" appended at the end. Fractions are allowed,
499 /// up to a microsecond precision, and "inf" or "Infinity" is allowed, which
500 /// means the end of the video.
501 pub time_segment_end: std::string::String,
502
503 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
504}
505
506impl VideoClassificationPredictionInstance {
507 /// Creates a new default instance.
508 pub fn new() -> Self {
509 std::default::Default::default()
510 }
511
512 /// Sets the value of [content][crate::model::VideoClassificationPredictionInstance::content].
513 ///
514 /// # Example
515 /// ```ignore,no_run
516 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::VideoClassificationPredictionInstance;
517 /// let x = VideoClassificationPredictionInstance::new().set_content("example");
518 /// ```
519 pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
520 self.content = v.into();
521 self
522 }
523
524 /// Sets the value of [mime_type][crate::model::VideoClassificationPredictionInstance::mime_type].
525 ///
526 /// # Example
527 /// ```ignore,no_run
528 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::VideoClassificationPredictionInstance;
529 /// let x = VideoClassificationPredictionInstance::new().set_mime_type("example");
530 /// ```
531 pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
532 self.mime_type = v.into();
533 self
534 }
535
536 /// Sets the value of [time_segment_start][crate::model::VideoClassificationPredictionInstance::time_segment_start].
537 ///
538 /// # Example
539 /// ```ignore,no_run
540 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::VideoClassificationPredictionInstance;
541 /// let x = VideoClassificationPredictionInstance::new().set_time_segment_start("example");
542 /// ```
543 pub fn set_time_segment_start<T: std::convert::Into<std::string::String>>(
544 mut self,
545 v: T,
546 ) -> Self {
547 self.time_segment_start = v.into();
548 self
549 }
550
551 /// Sets the value of [time_segment_end][crate::model::VideoClassificationPredictionInstance::time_segment_end].
552 ///
553 /// # Example
554 /// ```ignore,no_run
555 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::VideoClassificationPredictionInstance;
556 /// let x = VideoClassificationPredictionInstance::new().set_time_segment_end("example");
557 /// ```
558 pub fn set_time_segment_end<T: std::convert::Into<std::string::String>>(
559 mut self,
560 v: T,
561 ) -> Self {
562 self.time_segment_end = v.into();
563 self
564 }
565}
566
567impl wkt::message::Message for VideoClassificationPredictionInstance {
568 fn typename() -> &'static str {
569 "type.googleapis.com/google.cloud.aiplatform.v1.schema.predict.instance.VideoClassificationPredictionInstance"
570 }
571}
572
573/// Prediction input format for Video Object Tracking.
574#[derive(Clone, Default, PartialEq)]
575#[non_exhaustive]
576pub struct VideoObjectTrackingPredictionInstance {
577 /// The Google Cloud Storage location of the video on which to perform the
578 /// prediction.
579 pub content: std::string::String,
580
581 /// The MIME type of the content of the video. Only the following are
582 /// supported: video/mp4 video/avi video/quicktime
583 pub mime_type: std::string::String,
584
585 /// The beginning, inclusive, of the video's time segment on which to perform
586 /// the prediction. Expressed as a number of seconds as measured from the
587 /// start of the video, with "s" appended at the end. Fractions are allowed,
588 /// up to a microsecond precision.
589 pub time_segment_start: std::string::String,
590
591 /// The end, exclusive, of the video's time segment on which to perform
592 /// the prediction. Expressed as a number of seconds as measured from the
593 /// start of the video, with "s" appended at the end. Fractions are allowed,
594 /// up to a microsecond precision, and "inf" or "Infinity" is allowed, which
595 /// means the end of the video.
596 pub time_segment_end: std::string::String,
597
598 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
599}
600
601impl VideoObjectTrackingPredictionInstance {
602 /// Creates a new default instance.
603 pub fn new() -> Self {
604 std::default::Default::default()
605 }
606
607 /// Sets the value of [content][crate::model::VideoObjectTrackingPredictionInstance::content].
608 ///
609 /// # Example
610 /// ```ignore,no_run
611 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::VideoObjectTrackingPredictionInstance;
612 /// let x = VideoObjectTrackingPredictionInstance::new().set_content("example");
613 /// ```
614 pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
615 self.content = v.into();
616 self
617 }
618
619 /// Sets the value of [mime_type][crate::model::VideoObjectTrackingPredictionInstance::mime_type].
620 ///
621 /// # Example
622 /// ```ignore,no_run
623 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::VideoObjectTrackingPredictionInstance;
624 /// let x = VideoObjectTrackingPredictionInstance::new().set_mime_type("example");
625 /// ```
626 pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
627 self.mime_type = v.into();
628 self
629 }
630
631 /// Sets the value of [time_segment_start][crate::model::VideoObjectTrackingPredictionInstance::time_segment_start].
632 ///
633 /// # Example
634 /// ```ignore,no_run
635 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::VideoObjectTrackingPredictionInstance;
636 /// let x = VideoObjectTrackingPredictionInstance::new().set_time_segment_start("example");
637 /// ```
638 pub fn set_time_segment_start<T: std::convert::Into<std::string::String>>(
639 mut self,
640 v: T,
641 ) -> Self {
642 self.time_segment_start = v.into();
643 self
644 }
645
646 /// Sets the value of [time_segment_end][crate::model::VideoObjectTrackingPredictionInstance::time_segment_end].
647 ///
648 /// # Example
649 /// ```ignore,no_run
650 /// # use google_cloud_aiplatform_v1_schema_predict_instance::model::VideoObjectTrackingPredictionInstance;
651 /// let x = VideoObjectTrackingPredictionInstance::new().set_time_segment_end("example");
652 /// ```
653 pub fn set_time_segment_end<T: std::convert::Into<std::string::String>>(
654 mut self,
655 v: T,
656 ) -> Self {
657 self.time_segment_end = v.into();
658 self
659 }
660}
661
662impl wkt::message::Message for VideoObjectTrackingPredictionInstance {
663 fn typename() -> &'static str {
664 "type.googleapis.com/google.cloud.aiplatform.v1.schema.predict.instance.VideoObjectTrackingPredictionInstance"
665 }
666}