|
- /*
- * Gitea API.
- *
- * This documentation describes the Gitea API.
- *
- * OpenAPI spec version: 1.1.1
- *
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
- /// WatchInfo : WatchInfo represents an API watch status of one repository
-
- #[allow(unused_imports)]
- use serde_json::Value;
-
- #[derive(Debug, Serialize, Deserialize)]
- pub struct WatchInfo {
- #[serde(rename = "created_at")]
- created_at: Option<String>,
- #[serde(rename = "ignored")]
- ignored: Option<bool>,
- #[serde(rename = "reason")]
- reason: Option<Value>,
- #[serde(rename = "repository_url")]
- repository_url: Option<String>,
- #[serde(rename = "subscribed")]
- subscribed: Option<bool>,
- #[serde(rename = "url")]
- url: Option<String>
- }
-
- impl WatchInfo {
- /// WatchInfo represents an API watch status of one repository
- pub fn new() -> WatchInfo {
- WatchInfo {
- created_at: None,
- ignored: None,
- reason: None,
- repository_url: None,
- subscribed: None,
- url: None
- }
- }
-
- pub fn set_created_at(&mut self, created_at: String) {
- self.created_at = Some(created_at);
- }
-
- pub fn with_created_at(mut self, created_at: String) -> WatchInfo {
- self.created_at = Some(created_at);
- self
- }
-
- pub fn created_at(&self) -> Option<&String> {
- self.created_at.as_ref()
- }
-
- pub fn reset_created_at(&mut self) {
- self.created_at = None;
- }
-
- pub fn set_ignored(&mut self, ignored: bool) {
- self.ignored = Some(ignored);
- }
-
- pub fn with_ignored(mut self, ignored: bool) -> WatchInfo {
- self.ignored = Some(ignored);
- self
- }
-
- pub fn ignored(&self) -> Option<&bool> {
- self.ignored.as_ref()
- }
-
- pub fn reset_ignored(&mut self) {
- self.ignored = None;
- }
-
- pub fn set_reason(&mut self, reason: Value) {
- self.reason = Some(reason);
- }
-
- pub fn with_reason(mut self, reason: Value) -> WatchInfo {
- self.reason = Some(reason);
- self
- }
-
- pub fn reason(&self) -> Option<&Value> {
- self.reason.as_ref()
- }
-
- pub fn reset_reason(&mut self) {
- self.reason = None;
- }
-
- pub fn set_repository_url(&mut self, repository_url: String) {
- self.repository_url = Some(repository_url);
- }
-
- pub fn with_repository_url(mut self, repository_url: String) -> WatchInfo {
- self.repository_url = Some(repository_url);
- self
- }
-
- pub fn repository_url(&self) -> Option<&String> {
- self.repository_url.as_ref()
- }
-
- pub fn reset_repository_url(&mut self) {
- self.repository_url = None;
- }
-
- pub fn set_subscribed(&mut self, subscribed: bool) {
- self.subscribed = Some(subscribed);
- }
-
- pub fn with_subscribed(mut self, subscribed: bool) -> WatchInfo {
- self.subscribed = Some(subscribed);
- self
- }
-
- pub fn subscribed(&self) -> Option<&bool> {
- self.subscribed.as_ref()
- }
-
- pub fn reset_subscribed(&mut self) {
- self.subscribed = None;
- }
-
- pub fn set_url(&mut self, url: String) {
- self.url = Some(url);
- }
-
- pub fn with_url(mut self, url: String) -> WatchInfo {
- self.url = Some(url);
- self
- }
-
- pub fn url(&self) -> Option<&String> {
- self.url.as_ref()
- }
-
- pub fn reset_url(&mut self) {
- self.url = None;
- }
-
- }
-
-
|