Skip to main content

hanzo_client/models/
subscription_view.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
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 SubscriptionView {
16    /// Channel is the Slack channel id or name the notifier posts to.
17    #[serde(rename = "channel", skip_serializing_if = "Option::is_none")]
18    pub channel: Option<String>,
19    /// CreatedAt is RFC 3339 UTC.
20    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
21    pub created_at: Option<String>,
22    /// Events is the kind filter; absent means every deliverable kind.
23    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
24    pub events: Option<Vec<String>>,
25    /// ID is the subscription's identifier (\"sub_…\"), the handle to delete it by.
26    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
27    pub id: Option<String>,
28    /// Repo is the repo whose lifecycle events are delivered.
29    #[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
30    pub repo: Option<String>,
31}
32
33impl SubscriptionView {
34    pub fn new() -> SubscriptionView {
35        SubscriptionView {
36            channel: None,
37            created_at: None,
38            events: None,
39            id: None,
40            repo: None,
41        }
42    }
43}
44