1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/* 
 * Sematext Cloud API
 *
 * API Explorer provides access and documentation for Sematext REST API. The REST API requires the API Key to be sent as part of `Authorization` header. E.g.: `Authorization : apiKey e5f18450-205a-48eb-8589-7d49edaea813`.
 *
 * OpenAPI spec version: v3
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */


#[allow(unused_imports)]
use serde_json::Value;

#[derive(Debug, Serialize, Deserialize)]
pub struct AlertRuleScheduleWeekdayDto {
  #[serde(rename = "day")]
  day: Option<String>,
  #[serde(rename = "index")]
  index: Option<i32>,
  #[serde(rename = "intervals")]
  intervals: Option<Vec<::models::AlertRuleScheduleTimeRangeDto>>,
  #[serde(rename = "label")]
  label: Option<String>,
  #[serde(rename = "type")]
  _type: Option<String>
}

impl AlertRuleScheduleWeekdayDto {
  pub fn new() -> AlertRuleScheduleWeekdayDto {
    AlertRuleScheduleWeekdayDto {
      day: None,
      index: None,
      intervals: None,
      label: None,
      _type: None
    }
  }

  pub fn set_day(&mut self, day: String) {
    self.day = Some(day);
  }

  pub fn with_day(mut self, day: String) -> AlertRuleScheduleWeekdayDto {
    self.day = Some(day);
    self
  }

  pub fn day(&self) -> Option<&String> {
    self.day.as_ref()
  }

  pub fn reset_day(&mut self) {
    self.day = None;
  }

  pub fn set_index(&mut self, index: i32) {
    self.index = Some(index);
  }

  pub fn with_index(mut self, index: i32) -> AlertRuleScheduleWeekdayDto {
    self.index = Some(index);
    self
  }

  pub fn index(&self) -> Option<&i32> {
    self.index.as_ref()
  }

  pub fn reset_index(&mut self) {
    self.index = None;
  }

  pub fn set_intervals(&mut self, intervals: Vec<::models::AlertRuleScheduleTimeRangeDto>) {
    self.intervals = Some(intervals);
  }

  pub fn with_intervals(mut self, intervals: Vec<::models::AlertRuleScheduleTimeRangeDto>) -> AlertRuleScheduleWeekdayDto {
    self.intervals = Some(intervals);
    self
  }

  pub fn intervals(&self) -> Option<&Vec<::models::AlertRuleScheduleTimeRangeDto>> {
    self.intervals.as_ref()
  }

  pub fn reset_intervals(&mut self) {
    self.intervals = None;
  }

  pub fn set_label(&mut self, label: String) {
    self.label = Some(label);
  }

  pub fn with_label(mut self, label: String) -> AlertRuleScheduleWeekdayDto {
    self.label = Some(label);
    self
  }

  pub fn label(&self) -> Option<&String> {
    self.label.as_ref()
  }

  pub fn reset_label(&mut self) {
    self.label = None;
  }

  pub fn set__type(&mut self, _type: String) {
    self._type = Some(_type);
  }

  pub fn with__type(mut self, _type: String) -> AlertRuleScheduleWeekdayDto {
    self._type = Some(_type);
    self
  }

  pub fn _type(&self) -> Option<&String> {
    self._type.as_ref()
  }

  pub fn reset__type(&mut self) {
    self._type = None;
  }

}