Skip to main content

hanzo_client/models/
subscribe_req.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 SubscribeReq {
16    /// Channel is the Slack channel the notifier posts to — an id (C…/G…), a #name, or a bare name. Required.
17    #[serde(rename = "channel", skip_serializing_if = "Option::is_none")]
18    pub channel: Option<String>,
19    /// Events narrows delivery to these lifecycle kinds (push.landed, deploy.live, deploy.failed). Omit it to receive every deliverable kind; a kind that is never posted to Slack is refused rather than silently dropped.
20    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
21    pub events: Option<Vec<String>>,
22    /// Name is the repo to subscribe, from the :name path segment.
23    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
24    pub name: Option<String>,
25}
26
27impl SubscribeReq {
28    pub fn new() -> SubscribeReq {
29        SubscribeReq {
30            channel: None,
31            events: None,
32            name: None,
33        }
34    }
35}
36