Skip to main content

openapi_service_fabric/models/
application_update_description.rs

1/*
2 * Service Fabric Client APIs
3 *
4 * Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services.
5 *
6 * The version of the OpenAPI document: 8.2
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ApplicationUpdateDescription : Describes the parameters for updating an application instance.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ApplicationUpdateDescription {
17    /// Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified. If flags are not specified for a certain property, the property will not be updated even if the new value is provided. This property can be a combination of those flags obtained using bitwise 'OR' operator. Exception is RemoveApplicationCapacity which cannot be specified along with other parameters. For example, if the provided value is 3 then the flags for MinimumNodes (1) and MaximumNodes (2) are set.  - None - Does not indicate any other properties are set. The value is 0. - MinimumNodes - Indicates whether the MinimumNodes property is set. The value is 1. - MaximumNodes - Indicates whether the MinimumNodes property is set. The value is  2. - ApplicationMetrics - Indicates whether the ApplicationMetrics property is set. The value is 4.
18    #[serde(rename = "Flags", skip_serializing_if = "Option::is_none")]
19    pub flags: Option<String>,
20    /// Used to clear all parameters related to Application Capacity for this application. | It is not possible to specify this parameter together with other Application Capacity parameters.
21    #[serde(
22        rename = "RemoveApplicationCapacity",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub remove_application_capacity: Option<bool>,
26    /// The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of the MaximumNodes property.
27    #[serde(rename = "MinimumNodes", skip_serializing_if = "Option::is_none")]
28    pub minimum_nodes: Option<i64>,
29    /// The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. By default, the value of this property is zero and it means that the services can be placed on any node.
30    #[serde(rename = "MaximumNodes", skip_serializing_if = "Option::is_none")]
31    pub maximum_nodes: Option<i64>,
32    /// List of application capacity metric description.
33    #[serde(rename = "ApplicationMetrics", skip_serializing_if = "Option::is_none")]
34    pub application_metrics: Option<Vec<models::ApplicationMetricDescription>>,
35}
36
37impl ApplicationUpdateDescription {
38    /// Describes the parameters for updating an application instance.
39    pub fn new() -> ApplicationUpdateDescription {
40        ApplicationUpdateDescription {
41            flags: None,
42            remove_application_capacity: None,
43            minimum_nodes: None,
44            maximum_nodes: None,
45            application_metrics: None,
46        }
47    }
48}