Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.servicefabric;

import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Defines a delta health policy used to evaluate the health of an application
* or one of its child entities when upgrading the cluster.
*/
public class ApplicationDeltaHealthPolicy {
/**
* The delta health policy used by default to evaluate the health of a
* service type when upgrading the cluster.
*/
@JsonProperty(value = "defaultServiceTypeDeltaHealthPolicy")
private ServiceTypeDeltaHealthPolicy defaultServiceTypeDeltaHealthPolicy;

/**
* The map with service type delta health policy per service type name. The
* map is empty by default.
*/
@JsonProperty(value = "serviceTypeDeltaHealthPolicies")
private Map<String, ServiceTypeDeltaHealthPolicy> serviceTypeDeltaHealthPolicies;

/**
* Get the defaultServiceTypeDeltaHealthPolicy value.
*
* @return the defaultServiceTypeDeltaHealthPolicy value
*/
public ServiceTypeDeltaHealthPolicy defaultServiceTypeDeltaHealthPolicy() {
return this.defaultServiceTypeDeltaHealthPolicy;
}

/**
* Set the defaultServiceTypeDeltaHealthPolicy value.
*
* @param defaultServiceTypeDeltaHealthPolicy the defaultServiceTypeDeltaHealthPolicy value to set
* @return the ApplicationDeltaHealthPolicy object itself.
*/
public ApplicationDeltaHealthPolicy withDefaultServiceTypeDeltaHealthPolicy(ServiceTypeDeltaHealthPolicy defaultServiceTypeDeltaHealthPolicy) {
this.defaultServiceTypeDeltaHealthPolicy = defaultServiceTypeDeltaHealthPolicy;
return this;
}

/**
* Get the serviceTypeDeltaHealthPolicies value.
*
* @return the serviceTypeDeltaHealthPolicies value
*/
public Map<String, ServiceTypeDeltaHealthPolicy> serviceTypeDeltaHealthPolicies() {
return this.serviceTypeDeltaHealthPolicies;
}

/**
* Set the serviceTypeDeltaHealthPolicies value.
*
* @param serviceTypeDeltaHealthPolicies the serviceTypeDeltaHealthPolicies value to set
* @return the ApplicationDeltaHealthPolicy object itself.
*/
public ApplicationDeltaHealthPolicy withServiceTypeDeltaHealthPolicies(Map<String, ServiceTypeDeltaHealthPolicy> serviceTypeDeltaHealthPolicies) {
this.serviceTypeDeltaHealthPolicies = serviceTypeDeltaHealthPolicies;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.servicefabric;

import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Defines a health policy used to evaluate the health of an application or one
* of its children entities.
*/
public class ApplicationHealthPolicy {
/**
* The health policy used by default to evaluate the health of a service
* type.
*/
@JsonProperty(value = "defaultServiceTypeHealthPolicy")
private ServiceTypeHealthPolicy defaultServiceTypeHealthPolicy;

/**
* The map with service type health policy per service type name. The map
* is empty by default.
*/
@JsonProperty(value = "serviceTypeHealthPolicies")
private Map<String, ServiceTypeHealthPolicy> serviceTypeHealthPolicies;

/**
* Indicates whether warnings are treated with the same severity as errors.
*/
@JsonProperty(value = "ConsiderWarningAsError")
private Boolean considerWarningAsError;

/**
* The maximum allowed percentage of unhealthy deployed applications.
* Allowed values are Byte values from zero to 100.
* The percentage represents the maximum tolerated percentage of deployed
* applications that can be unhealthy before the application is considered
* in error.
* This is calculated by dividing the number of unhealthy deployed
* applications over the number of nodes where the application is currently
* deployed on in the cluster.
* The computation rounds up to tolerate one failure on small numbers of
* nodes. Default percentage is zero.
*/
@JsonProperty(value = "MaxPercentUnhealthyDeployedApplications")
private Integer maxPercentUnhealthyDeployedApplications;

/**
* The health policy used by default to evaluate the health of a service
* type.
*/
@JsonProperty(value = "DefaultServiceTypeHealthPolicy")
private ServiceTypeHealthPolicy defaultServiceTypeHealthPolicy1;

/**
* The map with service type health policy per service type name. The map
* is empty by default.
*/
@JsonProperty(value = "ServiceTypeHealthPolicyMap")
private Map<String, ServiceTypeHealthPolicy> serviceTypeHealthPolicyMap;

/**
* Get the defaultServiceTypeHealthPolicy value.
*
* @return the defaultServiceTypeHealthPolicy value
*/
public ServiceTypeHealthPolicy defaultServiceTypeHealthPolicy() {
return this.defaultServiceTypeHealthPolicy;
}

/**
* Set the defaultServiceTypeHealthPolicy value.
*
* @param defaultServiceTypeHealthPolicy the defaultServiceTypeHealthPolicy value to set
* @return the ApplicationHealthPolicy object itself.
*/
public ApplicationHealthPolicy withDefaultServiceTypeHealthPolicy(ServiceTypeHealthPolicy defaultServiceTypeHealthPolicy) {
this.defaultServiceTypeHealthPolicy = defaultServiceTypeHealthPolicy;
return this;
}

/**
* Get the serviceTypeHealthPolicies value.
*
* @return the serviceTypeHealthPolicies value
*/
public Map<String, ServiceTypeHealthPolicy> serviceTypeHealthPolicies() {
return this.serviceTypeHealthPolicies;
}

/**
* Set the serviceTypeHealthPolicies value.
*
* @param serviceTypeHealthPolicies the serviceTypeHealthPolicies value to set
* @return the ApplicationHealthPolicy object itself.
*/
public ApplicationHealthPolicy withServiceTypeHealthPolicies(Map<String, ServiceTypeHealthPolicy> serviceTypeHealthPolicies) {
this.serviceTypeHealthPolicies = serviceTypeHealthPolicies;
return this;
}

/**
* Get the considerWarningAsError value.
*
* @return the considerWarningAsError value
*/
public Boolean considerWarningAsError() {
return this.considerWarningAsError;
}

/**
* Set the considerWarningAsError value.
*
* @param considerWarningAsError the considerWarningAsError value to set
* @return the ApplicationHealthPolicy object itself.
*/
public ApplicationHealthPolicy withConsiderWarningAsError(Boolean considerWarningAsError) {
this.considerWarningAsError = considerWarningAsError;
return this;
}

/**
* Get the maxPercentUnhealthyDeployedApplications value.
*
* @return the maxPercentUnhealthyDeployedApplications value
*/
public Integer maxPercentUnhealthyDeployedApplications() {
return this.maxPercentUnhealthyDeployedApplications;
}

/**
* Set the maxPercentUnhealthyDeployedApplications value.
*
* @param maxPercentUnhealthyDeployedApplications the maxPercentUnhealthyDeployedApplications value to set
* @return the ApplicationHealthPolicy object itself.
*/
public ApplicationHealthPolicy withMaxPercentUnhealthyDeployedApplications(Integer maxPercentUnhealthyDeployedApplications) {
this.maxPercentUnhealthyDeployedApplications = maxPercentUnhealthyDeployedApplications;
return this;
}

/**
* Get the defaultServiceTypeHealthPolicy1 value.
*
* @return the defaultServiceTypeHealthPolicy1 value
*/
public ServiceTypeHealthPolicy defaultServiceTypeHealthPolicy1() {
return this.defaultServiceTypeHealthPolicy1;
}

/**
* Set the defaultServiceTypeHealthPolicy1 value.
*
* @param defaultServiceTypeHealthPolicy1 the defaultServiceTypeHealthPolicy1 value to set
* @return the ApplicationHealthPolicy object itself.
*/
public ApplicationHealthPolicy withDefaultServiceTypeHealthPolicy1(ServiceTypeHealthPolicy defaultServiceTypeHealthPolicy1) {
this.defaultServiceTypeHealthPolicy1 = defaultServiceTypeHealthPolicy1;
return this;
}

/**
* Get the serviceTypeHealthPolicyMap value.
*
* @return the serviceTypeHealthPolicyMap value
*/
public Map<String, ServiceTypeHealthPolicy> serviceTypeHealthPolicyMap() {
return this.serviceTypeHealthPolicyMap;
}

/**
* Set the serviceTypeHealthPolicyMap value.
*
* @param serviceTypeHealthPolicyMap the serviceTypeHealthPolicyMap value to set
* @return the ApplicationHealthPolicy object itself.
*/
public ApplicationHealthPolicy withServiceTypeHealthPolicyMap(Map<String, ServiceTypeHealthPolicy> serviceTypeHealthPolicyMap) {
this.serviceTypeHealthPolicyMap = serviceTypeHealthPolicyMap;
return this;
}

}
Loading