/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.104.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BusinessAgentConnector {
/// Unique per number.
#[serde(rename = "name")]
pub name: String,
/// Tell the agent what the service provides.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// Public HTTPS URL reachable from Meta.
#[serde(rename = "base_url")]
pub base_url: String,
#[serde(rename = "connector_protocol", skip_serializing_if = "Option::is_none")]
pub connector_protocol: Option<String>,
#[serde(rename = "auth_type")]
pub auth_type: AuthType,
#[serde(rename = "auth_config", skip_serializing_if = "Option::is_none")]
pub auth_config: Option<Box<models::BusinessAgentConnectorInputAuthConfig>>,
#[serde(
rename = "user_auth_injection_config",
skip_serializing_if = "Option::is_none"
)]
pub user_auth_injection_config:
Option<Box<models::BusinessAgentConnectorInputUserAuthInjectionConfig>>,
#[serde(
rename = "requires_certificate",
skip_serializing_if = "Option::is_none"
)]
pub requires_certificate: Option<bool>,
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "mcp_tool_sync", skip_serializing_if = "Option::is_none")]
pub mcp_tool_sync: Option<std::collections::HashMap<String, serde_json::Value>>,
#[serde(rename = "mtls_config", skip_serializing_if = "Option::is_none")]
pub mtls_config: Option<std::collections::HashMap<String, serde_json::Value>>,
#[serde(rename = "connection_status", skip_serializing_if = "Option::is_none")]
pub connection_status: Option<Box<models::BusinessAgentConnectorAllOfConnectionStatus>>,
}
impl BusinessAgentConnector {
pub fn new(
name: String,
base_url: String,
auth_type: AuthType,
id: String,
) -> BusinessAgentConnector {
BusinessAgentConnector {
name,
description: None,
base_url,
connector_protocol: None,
auth_type,
auth_config: None,
user_auth_injection_config: None,
requires_certificate: None,
id,
mcp_tool_sync: None,
mtls_config: None,
connection_status: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AuthType {
#[serde(rename = "OAUTH2_CLIENT_CREDENTIALS")]
Oauth2ClientCredentials,
#[serde(rename = "API_KEY")]
ApiKey,
#[serde(rename = "NONE")]
None,
}
impl Default for AuthType {
fn default() -> AuthType {
Self::Oauth2ClientCredentials
}
}