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
use serde::{Deserialize, Serialize}; /*
* Compute Engine API
*
* Creates and runs virtual machines on Google Cloud Platform.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::google_rest_apis::compute_v1::models;
/// Subsetting : Subsetting configuration for this BackendService. Currently this is applicable only for Internal TCP/UDP load balancing, Internal HTTP(S) load balancing and Traffic Director.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Subsetting {
#[serde(rename = "policy", skip_serializing_if = "Option::is_none")]
pub policy: Option<Policy>,
}
impl Subsetting {
/// Subsetting configuration for this BackendService. Currently this is applicable only for Internal TCP/UDP load balancing, Internal HTTP(S) load balancing and Traffic Director.
pub fn new() -> Subsetting {
Subsetting { policy: None }
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Policy {
#[serde(rename = "CONSISTENT_HASH_SUBSETTING")]
ConsistentHashSubsetting,
#[serde(rename = "NONE")]
None,
}
impl Default for Policy {
fn default() -> Policy {
Self::ConsistentHashSubsetting
}
}