Skip to content
Closed
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,103 @@
/**
* 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.servicefabricmesh;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
* Describes the horizontal auto scaling mechanism that adds or removes
* replicas (containers or container groups).
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind")
@JsonTypeName("AddRemoveReplica")
public class AddRemoveReplicaScalingMechanism extends AutoScalingMechanism {
/**
* Minimum number of containers (scale down won't be performed below this
* number).
*/
@JsonProperty(value = "minCount", required = true)
private int minCount;

/**
* Maximum number of containers (scale up won't be performed above this
* number).
*/
@JsonProperty(value = "maxCount", required = true)
private int maxCount;

/**
* Each time auto scaling is performed, this number of containers will be
* added or removed.
*/
@JsonProperty(value = "scaleIncrement", required = true)
private int scaleIncrement;

/**
* Get minimum number of containers (scale down won't be performed below this number).
*
* @return the minCount value
*/
public int minCount() {
return this.minCount;
}

/**
* Set minimum number of containers (scale down won't be performed below this number).
*
* @param minCount the minCount value to set
* @return the AddRemoveReplicaScalingMechanism object itself.
*/
public AddRemoveReplicaScalingMechanism withMinCount(int minCount) {
this.minCount = minCount;
return this;
}

/**
* Get maximum number of containers (scale up won't be performed above this number).
*
* @return the maxCount value
*/
public int maxCount() {
return this.maxCount;
}

/**
* Set maximum number of containers (scale up won't be performed above this number).
*
* @param maxCount the maxCount value to set
* @return the AddRemoveReplicaScalingMechanism object itself.
*/
public AddRemoveReplicaScalingMechanism withMaxCount(int maxCount) {
this.maxCount = maxCount;
return this;
}

/**
* Get each time auto scaling is performed, this number of containers will be added or removed.
*
* @return the scaleIncrement value
*/
public int scaleIncrement() {
return this.scaleIncrement;
}

/**
* Set each time auto scaling is performed, this number of containers will be added or removed.
*
* @param scaleIncrement the scaleIncrement value to set
* @return the AddRemoveReplicaScalingMechanism object itself.
*/
public AddRemoveReplicaScalingMechanism withScaleIncrement(int scaleIncrement) {
this.scaleIncrement = scaleIncrement;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
/**
* 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.servicefabricmesh;

import java.util.List;
import com.microsoft.azure.management.servicefabricmesh.implementation.ServiceResourceDescriptionInner;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* This type describes properties of an application resource.
*/
public class ApplicationProperties {
/**
* User readable description of the application.
*/
@JsonProperty(value = "description")
private String description;

/**
* Internal use.
*/
@JsonProperty(value = "debugParams")
private String debugParams;

/**
* describes the services in the application.
*/
@JsonProperty(value = "services")
private List<ServiceResourceDescriptionInner> services;

/**
* Describes the health state of an application resource. Possible values
* include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'.
*/
@JsonProperty(value = "healthState", access = JsonProperty.Access.WRITE_ONLY)
private HealthState healthState;

/**
* When the application's health state is not 'Ok', this additional details
* from service fabric Health Manager for the user to know why the
* application is marked unhealthy.
*/
@JsonProperty(value = "unhealthyEvaluation", access = JsonProperty.Access.WRITE_ONLY)
private String unhealthyEvaluation;

/**
* Status of the application resource. Possible values include: 'Invalid',
* 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'.
*/
@JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
private ApplicationResourceStatus status;

/**
* Gives additional information about the current status of the application
* deployment.
*/
@JsonProperty(value = "statusDetails", access = JsonProperty.Access.WRITE_ONLY)
private String statusDetails;

/**
* Names of the services in the application.
*/
@JsonProperty(value = "serviceNames", access = JsonProperty.Access.WRITE_ONLY)
private List<String> serviceNames;

/**
* Describes the diagnostics definition and usage for an application
* resource.
*/
@JsonProperty(value = "diagnostics")
private DiagnosticsDescription diagnostics;

/**
* Get user readable description of the application.
*
* @return the description value
*/
public String description() {
return this.description;
}

/**
* Set user readable description of the application.
*
* @param description the description value to set
* @return the ApplicationProperties object itself.
*/
public ApplicationProperties withDescription(String description) {
this.description = description;
return this;
}

/**
* Get internal use.
*
* @return the debugParams value
*/
public String debugParams() {
return this.debugParams;
}

/**
* Set internal use.
*
* @param debugParams the debugParams value to set
* @return the ApplicationProperties object itself.
*/
public ApplicationProperties withDebugParams(String debugParams) {
this.debugParams = debugParams;
return this;
}

/**
* Get describes the services in the application.
*
* @return the services value
*/
public List<ServiceResourceDescriptionInner> services() {
return this.services;
}

/**
* Set describes the services in the application.
*
* @param services the services value to set
* @return the ApplicationProperties object itself.
*/
public ApplicationProperties withServices(List<ServiceResourceDescriptionInner> services) {
this.services = services;
return this;
}

/**
* Get describes the health state of an application resource. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'.
*
* @return the healthState value
*/
public HealthState healthState() {
return this.healthState;
}

/**
* Get when the application's health state is not 'Ok', this additional details from service fabric Health Manager for the user to know why the application is marked unhealthy.
*
* @return the unhealthyEvaluation value
*/
public String unhealthyEvaluation() {
return this.unhealthyEvaluation;
}

/**
* Get status of the application resource. Possible values include: 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'.
*
* @return the status value
*/
public ApplicationResourceStatus status() {
return this.status;
}

/**
* Get gives additional information about the current status of the application deployment.
*
* @return the statusDetails value
*/
public String statusDetails() {
return this.statusDetails;
}

/**
* Get names of the services in the application.
*
* @return the serviceNames value
*/
public List<String> serviceNames() {
return this.serviceNames;
}

/**
* Get describes the diagnostics definition and usage for an application resource.
*
* @return the diagnostics value
*/
public DiagnosticsDescription diagnostics() {
return this.diagnostics;
}

/**
* Set describes the diagnostics definition and usage for an application resource.
*
* @param diagnostics the diagnostics value to set
* @return the ApplicationProperties object itself.
*/
public ApplicationProperties withDiagnostics(DiagnosticsDescription diagnostics) {
this.diagnostics = diagnostics;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* 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.servicefabricmesh;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for ApplicationResourceStatus.
*/
public final class ApplicationResourceStatus extends ExpandableStringEnum<ApplicationResourceStatus> {
/** Static value Invalid for ApplicationResourceStatus. */
public static final ApplicationResourceStatus INVALID = fromString("Invalid");

/** Static value Ready for ApplicationResourceStatus. */
public static final ApplicationResourceStatus READY = fromString("Ready");

/** Static value Upgrading for ApplicationResourceStatus. */
public static final ApplicationResourceStatus UPGRADING = fromString("Upgrading");

/** Static value Creating for ApplicationResourceStatus. */
public static final ApplicationResourceStatus CREATING = fromString("Creating");

/** Static value Deleting for ApplicationResourceStatus. */
public static final ApplicationResourceStatus DELETING = fromString("Deleting");

/** Static value Failed for ApplicationResourceStatus. */
public static final ApplicationResourceStatus FAILED = fromString("Failed");

/**
* Creates or finds a ApplicationResourceStatus from its string representation.
* @param name a name to look for
* @return the corresponding ApplicationResourceStatus
*/
@JsonCreator
public static ApplicationResourceStatus fromString(String name) {
return fromString(name, ApplicationResourceStatus.class);
}

/**
* @return known ApplicationResourceStatus values
*/
public static Collection<ApplicationResourceStatus> values() {
return values(ApplicationResourceStatus.class);
}
}
Loading