openapi_service_fabric/models/restart_deployed_code_package_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/// RestartDeployedCodePackageDescription : Defines description for restarting a deployed code package on Service Fabric node.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RestartDeployedCodePackageDescription {
17 /// The name of the service manifest.
18 #[serde(rename = "ServiceManifestName")]
19 pub service_manifest_name: String,
20 /// The ActivationId of a deployed service package. If ServicePackageActivationMode specified at the time of creating the service is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId is always an empty string.
21 #[serde(
22 rename = "ServicePackageActivationId",
23 skip_serializing_if = "Option::is_none"
24 )]
25 pub service_package_activation_id: Option<String>,
26 /// The name of the code package defined in the service manifest.
27 #[serde(rename = "CodePackageName")]
28 pub code_package_name: String,
29 /// The instance ID for current running entry point. For a code package setup entry point (if specified) runs first and after it finishes main entry point is started. Each time entry point executable is run, its instance id will change.
30 #[serde(rename = "CodePackageInstanceId")]
31 pub code_package_instance_id: String,
32}
33
34impl RestartDeployedCodePackageDescription {
35 /// Defines description for restarting a deployed code package on Service Fabric node.
36 pub fn new(
37 service_manifest_name: String,
38 code_package_name: String,
39 code_package_instance_id: String,
40 ) -> RestartDeployedCodePackageDescription {
41 RestartDeployedCodePackageDescription {
42 service_manifest_name,
43 service_package_activation_id: None,
44 code_package_name,
45 code_package_instance_id,
46 }
47 }
48}