use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use super::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UpdateProxyConfigurationDetails {
pub is_enabled: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub hosts: Option<Vec<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub port: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub forward: Option<String>,
}
pub struct UpdateProxyConfigurationDetailsRequired {
pub is_enabled: bool,
}
impl UpdateProxyConfigurationDetails {
pub fn new(required: UpdateProxyConfigurationDetailsRequired) -> Self {
Self {
is_enabled: required.is_enabled,
hosts: None,
port: None,
forward: None,
}
}
pub fn set_is_enabled(mut self, value: bool) -> Self {
self.is_enabled = value;
self
}
pub fn set_hosts(mut self, value: Option<Vec<String>>) -> Self {
self.hosts = value;
self
}
pub fn set_port(mut self, value: Option<String>) -> Self {
self.port = value;
self
}
pub fn set_forward(mut self, value: Option<String>) -> Self {
self.forward = value;
self
}
pub fn with_hosts(mut self, value: Vec<String>) -> Self {
self.hosts = Some(value);
self
}
pub fn with_port(mut self, value: impl Into<String>) -> Self {
self.port = Some(value.into());
self
}
pub fn with_forward(mut self, value: impl Into<String>) -> Self {
self.forward = Some(value.into());
self
}
}