#[non_exhaustive]pub struct HealthStatus {
pub annotations: HashMap<String, String>,
pub forwarding_rule: Option<String>,
pub forwarding_rule_ip: Option<String>,
pub health_state: Option<HealthState>,
pub instance: Option<String>,
pub ip_address: Option<String>,
pub ipv_6_address: Option<String>,
pub ipv_6_health_state: Option<Ipv6HealthState>,
pub port: Option<i32>,
pub weight: Option<String>,
pub weight_error: Option<WeightError>,
/* private fields */
}backend-services or region-backend-services or target-pools only.Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.annotations: HashMap<String, String>Metadata defined as annotations for network endpoint.
forwarding_rule: Option<String>URL of the forwarding rule associated with the health status of the instance.
forwarding_rule_ip: Option<String>A forwarding rule IP address assigned to this instance.
health_state: Option<HealthState>Health state of the IPv4 address of the instance.
instance: Option<String>URL of the instance resource.
ip_address: Option<String>For target pool based Network Load Balancing, it indicates the forwarding rule’s IP address assigned to this instance. For other types of load balancing, the field indicates VM internal ip.
ipv_6_address: Option<String>§ipv_6_health_state: Option<Ipv6HealthState>Health state of the IPv6 address of the instance.
port: Option<i32>The named port of the instance group, not necessarily the port that is health-checked.
weight: Option<String>§weight_error: Option<WeightError>Implementations§
Source§impl HealthStatus
impl HealthStatus
pub fn new() -> Self
Sourcepub fn set_annotations<T, K, V>(self, v: T) -> Self
pub fn set_annotations<T, K, V>(self, v: T) -> Self
Sets the value of annotations.
§Example
let x = HealthStatus::new().set_annotations([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_forwarding_rule<T>(self, v: T) -> Self
pub fn set_forwarding_rule<T>(self, v: T) -> Self
Sets the value of forwarding_rule.
§Example
let x = HealthStatus::new().set_forwarding_rule("example");Sourcepub fn set_or_clear_forwarding_rule<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_forwarding_rule<T>(self, v: Option<T>) -> Self
Sets or clears the value of forwarding_rule.
§Example
let x = HealthStatus::new().set_or_clear_forwarding_rule(Some("example"));
let x = HealthStatus::new().set_or_clear_forwarding_rule(None::<String>);Sourcepub fn set_forwarding_rule_ip<T>(self, v: T) -> Self
pub fn set_forwarding_rule_ip<T>(self, v: T) -> Self
Sets the value of forwarding_rule_ip.
§Example
let x = HealthStatus::new().set_forwarding_rule_ip("example");Sourcepub fn set_or_clear_forwarding_rule_ip<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_forwarding_rule_ip<T>(self, v: Option<T>) -> Self
Sets or clears the value of forwarding_rule_ip.
§Example
let x = HealthStatus::new().set_or_clear_forwarding_rule_ip(Some("example"));
let x = HealthStatus::new().set_or_clear_forwarding_rule_ip(None::<String>);Sourcepub fn set_health_state<T>(self, v: T) -> Selfwhere
T: Into<HealthState>,
pub fn set_health_state<T>(self, v: T) -> Selfwhere
T: Into<HealthState>,
Sets the value of health_state.
§Example
use google_cloud_compute_v1::model::health_status::HealthState;
let x0 = HealthStatus::new().set_health_state(HealthState::Unhealthy);Sourcepub fn set_or_clear_health_state<T>(self, v: Option<T>) -> Selfwhere
T: Into<HealthState>,
pub fn set_or_clear_health_state<T>(self, v: Option<T>) -> Selfwhere
T: Into<HealthState>,
Sets or clears the value of health_state.
§Example
use google_cloud_compute_v1::model::health_status::HealthState;
let x0 = HealthStatus::new().set_or_clear_health_state(Some(HealthState::Unhealthy));
let x_none = HealthStatus::new().set_or_clear_health_state(None::<HealthState>);Sourcepub fn set_instance<T>(self, v: T) -> Self
pub fn set_instance<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_instance<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_instance<T>(self, v: Option<T>) -> Self
Sourcepub fn set_ip_address<T>(self, v: T) -> Self
pub fn set_ip_address<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_ip_address<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ip_address<T>(self, v: Option<T>) -> Self
Sets or clears the value of ip_address.
§Example
let x = HealthStatus::new().set_or_clear_ip_address(Some("example"));
let x = HealthStatus::new().set_or_clear_ip_address(None::<String>);Sourcepub fn set_ipv_6_address<T>(self, v: T) -> Self
pub fn set_ipv_6_address<T>(self, v: T) -> Self
Sets the value of ipv_6_address.
§Example
let x = HealthStatus::new().set_ipv_6_address("example");Sourcepub fn set_or_clear_ipv_6_address<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ipv_6_address<T>(self, v: Option<T>) -> Self
Sets or clears the value of ipv_6_address.
§Example
let x = HealthStatus::new().set_or_clear_ipv_6_address(Some("example"));
let x = HealthStatus::new().set_or_clear_ipv_6_address(None::<String>);Sourcepub fn set_ipv_6_health_state<T>(self, v: T) -> Selfwhere
T: Into<Ipv6HealthState>,
pub fn set_ipv_6_health_state<T>(self, v: T) -> Selfwhere
T: Into<Ipv6HealthState>,
Sets the value of ipv_6_health_state.
§Example
use google_cloud_compute_v1::model::health_status::Ipv6HealthState;
let x0 = HealthStatus::new().set_ipv_6_health_state(Ipv6HealthState::Unhealthy);Sourcepub fn set_or_clear_ipv_6_health_state<T>(self, v: Option<T>) -> Selfwhere
T: Into<Ipv6HealthState>,
pub fn set_or_clear_ipv_6_health_state<T>(self, v: Option<T>) -> Selfwhere
T: Into<Ipv6HealthState>,
Sets or clears the value of ipv_6_health_state.
§Example
use google_cloud_compute_v1::model::health_status::Ipv6HealthState;
let x0 = HealthStatus::new().set_or_clear_ipv_6_health_state(Some(Ipv6HealthState::Unhealthy));
let x_none = HealthStatus::new().set_or_clear_ipv_6_health_state(None::<Ipv6HealthState>);Sourcepub fn set_or_clear_port<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_port<T>(self, v: Option<T>) -> Self
Sourcepub fn set_weight<T>(self, v: T) -> Self
pub fn set_weight<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_weight<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_weight<T>(self, v: Option<T>) -> Self
Sourcepub fn set_weight_error<T>(self, v: T) -> Selfwhere
T: Into<WeightError>,
pub fn set_weight_error<T>(self, v: T) -> Selfwhere
T: Into<WeightError>,
Sets the value of weight_error.
§Example
use google_cloud_compute_v1::model::health_status::WeightError;
let x0 = HealthStatus::new().set_weight_error(WeightError::MissingWeight);
let x1 = HealthStatus::new().set_weight_error(WeightError::UnavailableWeight);
let x2 = HealthStatus::new().set_weight_error(WeightError::WeightNone);Sourcepub fn set_or_clear_weight_error<T>(self, v: Option<T>) -> Selfwhere
T: Into<WeightError>,
pub fn set_or_clear_weight_error<T>(self, v: Option<T>) -> Selfwhere
T: Into<WeightError>,
Sets or clears the value of weight_error.
§Example
use google_cloud_compute_v1::model::health_status::WeightError;
let x0 = HealthStatus::new().set_or_clear_weight_error(Some(WeightError::MissingWeight));
let x1 = HealthStatus::new().set_or_clear_weight_error(Some(WeightError::UnavailableWeight));
let x2 = HealthStatus::new().set_or_clear_weight_error(Some(WeightError::WeightNone));
let x_none = HealthStatus::new().set_or_clear_weight_error(None::<WeightError>);Trait Implementations§
Source§impl Clone for HealthStatus
impl Clone for HealthStatus
Source§fn clone(&self) -> HealthStatus
fn clone(&self) -> HealthStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more