opensearch-client 0.3.1

Strongly typed OpenSearch Client
Documentation
/*
 * opensearch-client
 *
 * Rust Client for OpenSearch
 *
 * The version of the OpenAPI document: 3.1.0
 * Contact: alberto.paro@gmail.com
 * Generated by Paro OpenAPI Generator
 */

use crate::common;
use serde::{Deserialize, Serialize};




#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AuthInfo {  /// The size of the user's custom attributes in bytes.
    #[serde(rename = "size_of_custom_attributes", default, skip_serializing_if = "Option::is_none")]
    pub size_of_custom_attributes: Option<String>,  /// The username.
    #[serde(rename = "user_name", default, skip_serializing_if = "Option::is_none")]
    pub user_name: Option<String>,  /// The backend roles associated with the user.
    #[serde(rename = "backend_roles", default, skip_serializing_if = "Option::is_none")]
    pub backend_roles: Option<Vec<String>>,  /// A user object as a string.
    #[serde(rename = "user", default, skip_serializing_if = "Option::is_none")]
    pub user: Option<String>,  /// The name of the attributes associated with the user.
    #[serde(rename = "custom_attribute_names", default, skip_serializing_if = "Option::is_none")]
    pub custom_attribute_names: Option<Vec<String>>,  /// The roles associated with the user.
    #[serde(rename = "roles", default, skip_serializing_if = "Option::is_none")]
    pub roles: Option<Vec<String>>,  /// The size of user contained in memory.
    #[serde(rename = "size_of_user", default, skip_serializing_if = "Option::is_none")]
    pub size_of_user: Option<String>,  /// The tenants the user has access to with `read-write` or `read-only` access indicators.
    #[serde(rename = "tenants", default, skip_serializing_if = "Option::is_none")]
    pub tenants: Option<serde_json::Value>,  /// The size of the user's backend roles in bytes.
    #[serde(rename = "size_of_backendroles", default, skip_serializing_if = "Option::is_none")]
    pub size_of_backendroles: Option<String>,
}

impl AuthInfo {
    
    pub fn new() -> AuthInfo {
        AuthInfo {
            size_of_custom_attributes: None,
            user_name: None,
            backend_roles: None,
            user: None,
            custom_attribute_names: None,
            roles: None,
            size_of_user: None,
            tenants: None,
            size_of_backendroles: None,
        }
    }
}