openai-client-base 0.12.0

Auto-generated Rust client for the OpenAI API
/*
 * OpenAI API
 *
 * The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
 *
 * The version of the OpenAPI document: 2.3.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// AuditLogOrganizationUpdatedChangesRequested : The payload used to update the organization settings.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct AuditLogOrganizationUpdatedChangesRequested {
    /// The organization title.
    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    /// The organization description.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// The organization name.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Visibility of the threads page which shows messages created with the Assistants API and Playground. One of `ANY_ROLE`, `OWNERS`, or `NONE`.
    #[serde(
        rename = "threads_ui_visibility",
        skip_serializing_if = "Option::is_none"
    )]
    pub threads_ui_visibility: Option<String>,
    /// Visibility of the usage dashboard which shows activity and costs for your organization. One of `ANY_ROLE` or `OWNERS`.
    #[serde(
        rename = "usage_dashboard_visibility",
        skip_serializing_if = "Option::is_none"
    )]
    pub usage_dashboard_visibility: Option<String>,
    /// How your organization logs data from supported API calls. One of `disabled`, `enabled_per_call`, `enabled_for_all_projects`, or `enabled_for_selected_projects`
    #[serde(rename = "api_call_logging", skip_serializing_if = "Option::is_none")]
    pub api_call_logging: Option<String>,
    /// The list of project ids if api_call_logging is set to `enabled_for_selected_projects`
    #[serde(
        rename = "api_call_logging_project_ids",
        skip_serializing_if = "Option::is_none"
    )]
    pub api_call_logging_project_ids: Option<String>,
}

impl AuditLogOrganizationUpdatedChangesRequested {
    /// The payload used to update the organization settings.
    pub fn new() -> AuditLogOrganizationUpdatedChangesRequested {
        AuditLogOrganizationUpdatedChangesRequested {
            title: None,
            description: None,
            name: None,
            threads_ui_visibility: None,
            usage_dashboard_visibility: None,
            api_call_logging: None,
            api_call_logging_project_ids: None,
        }
    }
}

impl std::fmt::Display for AuditLogOrganizationUpdatedChangesRequested {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match serde_json::to_string(self) {
            Ok(s) => write!(f, "{}", s),
            Err(_) => Err(std::fmt::Error),
        }
    }
}