All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.servicefabric.outputs.StatelessServicePropertiesResponse Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.servicefabric.outputs;

import com.pulumi.azurenative.servicefabric.outputs.NamedPartitionSchemeResponse;
import com.pulumi.azurenative.servicefabric.outputs.ScalingPolicyResponse;
import com.pulumi.azurenative.servicefabric.outputs.ServiceCorrelationResponse;
import com.pulumi.azurenative.servicefabric.outputs.ServiceLoadMetricResponse;
import com.pulumi.azurenative.servicefabric.outputs.ServicePlacementInvalidDomainPolicyResponse;
import com.pulumi.azurenative.servicefabric.outputs.ServicePlacementNonPartiallyPlaceServicePolicyResponse;
import com.pulumi.azurenative.servicefabric.outputs.ServicePlacementPreferPrimaryDomainPolicyResponse;
import com.pulumi.azurenative.servicefabric.outputs.ServicePlacementRequireDomainDistributionPolicyResponse;
import com.pulumi.azurenative.servicefabric.outputs.ServicePlacementRequiredDomainPolicyResponse;
import com.pulumi.azurenative.servicefabric.outputs.SingletonPartitionSchemeResponse;
import com.pulumi.azurenative.servicefabric.outputs.UniformInt64RangePartitionSchemeResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class StatelessServicePropertiesResponse {
    /**
     * @return A list that describes the correlation of the service with other services.
     * 
     */
    private @Nullable List correlationScheme;
    /**
     * @return Specifies the move cost for the service.
     * 
     */
    private @Nullable String defaultMoveCost;
    /**
     * @return The instance count.
     * 
     */
    private Integer instanceCount;
    /**
     * @return MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.
     * 
     */
    private @Nullable Integer minInstanceCount;
    /**
     * @return MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.
     * 
     */
    private @Nullable Integer minInstancePercentage;
    /**
     * @return Describes how the service is partitioned.
     * 
     */
    private Object partitionDescription;
    /**
     * @return The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".
     * 
     */
    private @Nullable String placementConstraints;
    /**
     * @return The current deployment or provisioning state, which only appears in the response
     * 
     */
    private String provisioningState;
    /**
     * @return Scaling policies for this service.
     * 
     */
    private @Nullable List scalingPolicies;
    /**
     * @return Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP).
     * When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name.
     * When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable.
     * 
     */
    private @Nullable String serviceDnsName;
    /**
     * @return The kind of service (Stateless or Stateful).
     * Expected value is 'Stateless'.
     * 
     */
    private String serviceKind;
    /**
     * @return The service load metrics is given as an array of ServiceLoadMetric objects.
     * 
     */
    private @Nullable List serviceLoadMetrics;
    /**
     * @return The activation Mode of the service package
     * 
     */
    private @Nullable String servicePackageActivationMode;
    /**
     * @return A list that describes the correlation of the service with other services.
     * 
     */
    private @Nullable List servicePlacementPolicies;
    /**
     * @return The name of the service type
     * 
     */
    private String serviceTypeName;

    private StatelessServicePropertiesResponse() {}
    /**
     * @return A list that describes the correlation of the service with other services.
     * 
     */
    public List correlationScheme() {
        return this.correlationScheme == null ? List.of() : this.correlationScheme;
    }
    /**
     * @return Specifies the move cost for the service.
     * 
     */
    public Optional defaultMoveCost() {
        return Optional.ofNullable(this.defaultMoveCost);
    }
    /**
     * @return The instance count.
     * 
     */
    public Integer instanceCount() {
        return this.instanceCount;
    }
    /**
     * @return MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.
     * 
     */
    public Optional minInstanceCount() {
        return Optional.ofNullable(this.minInstanceCount);
    }
    /**
     * @return MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.
     * 
     */
    public Optional minInstancePercentage() {
        return Optional.ofNullable(this.minInstancePercentage);
    }
    /**
     * @return Describes how the service is partitioned.
     * 
     */
    public Object partitionDescription() {
        return this.partitionDescription;
    }
    /**
     * @return The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".
     * 
     */
    public Optional placementConstraints() {
        return Optional.ofNullable(this.placementConstraints);
    }
    /**
     * @return The current deployment or provisioning state, which only appears in the response
     * 
     */
    public String provisioningState() {
        return this.provisioningState;
    }
    /**
     * @return Scaling policies for this service.
     * 
     */
    public List scalingPolicies() {
        return this.scalingPolicies == null ? List.of() : this.scalingPolicies;
    }
    /**
     * @return Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP).
     * When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name.
     * When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable.
     * 
     */
    public Optional serviceDnsName() {
        return Optional.ofNullable(this.serviceDnsName);
    }
    /**
     * @return The kind of service (Stateless or Stateful).
     * Expected value is 'Stateless'.
     * 
     */
    public String serviceKind() {
        return this.serviceKind;
    }
    /**
     * @return The service load metrics is given as an array of ServiceLoadMetric objects.
     * 
     */
    public List serviceLoadMetrics() {
        return this.serviceLoadMetrics == null ? List.of() : this.serviceLoadMetrics;
    }
    /**
     * @return The activation Mode of the service package
     * 
     */
    public Optional servicePackageActivationMode() {
        return Optional.ofNullable(this.servicePackageActivationMode);
    }
    /**
     * @return A list that describes the correlation of the service with other services.
     * 
     */
    public List servicePlacementPolicies() {
        return this.servicePlacementPolicies == null ? List.of() : this.servicePlacementPolicies;
    }
    /**
     * @return The name of the service type
     * 
     */
    public String serviceTypeName() {
        return this.serviceTypeName;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(StatelessServicePropertiesResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List correlationScheme;
        private @Nullable String defaultMoveCost;
        private Integer instanceCount;
        private @Nullable Integer minInstanceCount;
        private @Nullable Integer minInstancePercentage;
        private Object partitionDescription;
        private @Nullable String placementConstraints;
        private String provisioningState;
        private @Nullable List scalingPolicies;
        private @Nullable String serviceDnsName;
        private String serviceKind;
        private @Nullable List serviceLoadMetrics;
        private @Nullable String servicePackageActivationMode;
        private @Nullable List servicePlacementPolicies;
        private String serviceTypeName;
        public Builder() {}
        public Builder(StatelessServicePropertiesResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.correlationScheme = defaults.correlationScheme;
    	      this.defaultMoveCost = defaults.defaultMoveCost;
    	      this.instanceCount = defaults.instanceCount;
    	      this.minInstanceCount = defaults.minInstanceCount;
    	      this.minInstancePercentage = defaults.minInstancePercentage;
    	      this.partitionDescription = defaults.partitionDescription;
    	      this.placementConstraints = defaults.placementConstraints;
    	      this.provisioningState = defaults.provisioningState;
    	      this.scalingPolicies = defaults.scalingPolicies;
    	      this.serviceDnsName = defaults.serviceDnsName;
    	      this.serviceKind = defaults.serviceKind;
    	      this.serviceLoadMetrics = defaults.serviceLoadMetrics;
    	      this.servicePackageActivationMode = defaults.servicePackageActivationMode;
    	      this.servicePlacementPolicies = defaults.servicePlacementPolicies;
    	      this.serviceTypeName = defaults.serviceTypeName;
        }

        @CustomType.Setter
        public Builder correlationScheme(@Nullable List correlationScheme) {

            this.correlationScheme = correlationScheme;
            return this;
        }
        public Builder correlationScheme(ServiceCorrelationResponse... correlationScheme) {
            return correlationScheme(List.of(correlationScheme));
        }
        @CustomType.Setter
        public Builder defaultMoveCost(@Nullable String defaultMoveCost) {

            this.defaultMoveCost = defaultMoveCost;
            return this;
        }
        @CustomType.Setter
        public Builder instanceCount(Integer instanceCount) {
            if (instanceCount == null) {
              throw new MissingRequiredPropertyException("StatelessServicePropertiesResponse", "instanceCount");
            }
            this.instanceCount = instanceCount;
            return this;
        }
        @CustomType.Setter
        public Builder minInstanceCount(@Nullable Integer minInstanceCount) {

            this.minInstanceCount = minInstanceCount;
            return this;
        }
        @CustomType.Setter
        public Builder minInstancePercentage(@Nullable Integer minInstancePercentage) {

            this.minInstancePercentage = minInstancePercentage;
            return this;
        }
        @CustomType.Setter
        public Builder partitionDescription(Object partitionDescription) {
            if (partitionDescription == null) {
              throw new MissingRequiredPropertyException("StatelessServicePropertiesResponse", "partitionDescription");
            }
            this.partitionDescription = partitionDescription;
            return this;
        }
        @CustomType.Setter
        public Builder placementConstraints(@Nullable String placementConstraints) {

            this.placementConstraints = placementConstraints;
            return this;
        }
        @CustomType.Setter
        public Builder provisioningState(String provisioningState) {
            if (provisioningState == null) {
              throw new MissingRequiredPropertyException("StatelessServicePropertiesResponse", "provisioningState");
            }
            this.provisioningState = provisioningState;
            return this;
        }
        @CustomType.Setter
        public Builder scalingPolicies(@Nullable List scalingPolicies) {

            this.scalingPolicies = scalingPolicies;
            return this;
        }
        public Builder scalingPolicies(ScalingPolicyResponse... scalingPolicies) {
            return scalingPolicies(List.of(scalingPolicies));
        }
        @CustomType.Setter
        public Builder serviceDnsName(@Nullable String serviceDnsName) {

            this.serviceDnsName = serviceDnsName;
            return this;
        }
        @CustomType.Setter
        public Builder serviceKind(String serviceKind) {
            if (serviceKind == null) {
              throw new MissingRequiredPropertyException("StatelessServicePropertiesResponse", "serviceKind");
            }
            this.serviceKind = serviceKind;
            return this;
        }
        @CustomType.Setter
        public Builder serviceLoadMetrics(@Nullable List serviceLoadMetrics) {

            this.serviceLoadMetrics = serviceLoadMetrics;
            return this;
        }
        public Builder serviceLoadMetrics(ServiceLoadMetricResponse... serviceLoadMetrics) {
            return serviceLoadMetrics(List.of(serviceLoadMetrics));
        }
        @CustomType.Setter
        public Builder servicePackageActivationMode(@Nullable String servicePackageActivationMode) {

            this.servicePackageActivationMode = servicePackageActivationMode;
            return this;
        }
        @CustomType.Setter
        public Builder servicePlacementPolicies(@Nullable List servicePlacementPolicies) {

            this.servicePlacementPolicies = servicePlacementPolicies;
            return this;
        }
        public Builder servicePlacementPolicies(Object... servicePlacementPolicies) {
            return servicePlacementPolicies(List.of(servicePlacementPolicies));
        }
        @CustomType.Setter
        public Builder serviceTypeName(String serviceTypeName) {
            if (serviceTypeName == null) {
              throw new MissingRequiredPropertyException("StatelessServicePropertiesResponse", "serviceTypeName");
            }
            this.serviceTypeName = serviceTypeName;
            return this;
        }
        public StatelessServicePropertiesResponse build() {
            final var _resultValue = new StatelessServicePropertiesResponse();
            _resultValue.correlationScheme = correlationScheme;
            _resultValue.defaultMoveCost = defaultMoveCost;
            _resultValue.instanceCount = instanceCount;
            _resultValue.minInstanceCount = minInstanceCount;
            _resultValue.minInstancePercentage = minInstancePercentage;
            _resultValue.partitionDescription = partitionDescription;
            _resultValue.placementConstraints = placementConstraints;
            _resultValue.provisioningState = provisioningState;
            _resultValue.scalingPolicies = scalingPolicies;
            _resultValue.serviceDnsName = serviceDnsName;
            _resultValue.serviceKind = serviceKind;
            _resultValue.serviceLoadMetrics = serviceLoadMetrics;
            _resultValue.servicePackageActivationMode = servicePackageActivationMode;
            _resultValue.servicePlacementPolicies = servicePlacementPolicies;
            _resultValue.serviceTypeName = serviceTypeName;
            return _resultValue;
        }
    }
}