openapi_github/models/
rate_limit.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RateLimit {
16    #[serde(rename = "limit")]
17    pub limit: i32,
18    #[serde(rename = "remaining")]
19    pub remaining: i32,
20    #[serde(rename = "reset")]
21    pub reset: i32,
22    #[serde(rename = "used")]
23    pub used: i32,
24}
25
26impl RateLimit {
27    pub fn new(limit: i32, remaining: i32, reset: i32, used: i32) -> RateLimit {
28        RateLimit {
29            limit,
30            remaining,
31            reset,
32            used,
33        }
34    }
35}
36