Skip to main content

akeyless_api/models/
null_string.rs

1/*
2 * Akeyless API
3 *
4 * The purpose of this application is to provide access to Akeyless API.
5 *
6 * The version of the OpenAPI document: 3.0
7 * Contact: support@akeyless.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// NullString : var s NullString err := db.QueryRow(\"SELECT name FROM foo WHERE id=?\", id).Scan(&s) ... if s.Valid { use s.String } else { NULL value }
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct NullString {
17    #[serde(rename = "String", skip_serializing_if = "Option::is_none")]
18    pub string: Option<String>,
19    #[serde(rename = "Valid", skip_serializing_if = "Option::is_none")]
20    pub valid: Option<bool>,
21}
22
23impl NullString {
24    /// var s NullString err := db.QueryRow(\"SELECT name FROM foo WHERE id=?\", id).Scan(&s) ... if s.Valid { use s.String } else { NULL value }
25    pub fn new() -> NullString {
26        NullString {
27            string: None,
28            valid: None,
29        }
30    }
31}
32