babelforce-manager-sdk 0.44.0

Rust SDK for the babelforce manager APIs — auth, user & agent management, call reporting, metrics, and task automations.
Documentation
/*
 * task-automation API
 *
 * task-automation engine to automate and customize web based integration processes
 *
 * The version of the OpenAPI document: 3.63.10
 * Contact: support@babelforce.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct JwtCreateProperties {
    /// Payload that contains claims that are statements about an entity (typically, the user) and additional data see https://jwt.io/introduction
    #[serde(rename = "payload")]
    pub payload: std::collections::HashMap<String, serde_json::Value>,
    /// The header typically consists of two parts. Type of the token, which is JWT, and the signing algorithm being used, such as HMAC SHA256 or RSA see https://jwt.io/introduction
    #[serde(rename = "header")]
    pub header: std::collections::HashMap<String, serde_json::Value>,
    /// Key ued to sign the JWT, must match the type specified in the header 'alg'.
    #[serde(rename = "signKey", skip_serializing_if = "Option::is_none")]
    pub sign_key: Option<String>,
    /// Milliseconds
    #[serde(rename = "expireIn", skip_serializing_if = "Option::is_none")]
    pub expire_in: Option<i64>,
}

impl JwtCreateProperties {
    pub fn new(
        payload: std::collections::HashMap<String, serde_json::Value>,
        header: std::collections::HashMap<String, serde_json::Value>,
    ) -> JwtCreateProperties {
        JwtCreateProperties {
            payload,
            header,
            sign_key: None,
            expire_in: None,
        }
    }
}