// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.servicefabric.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;

/** The service resource properties for patch operations. */
@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    include = JsonTypeInfo.As.PROPERTY,
    property = "serviceKind",
    defaultImpl = ServiceResourceUpdateProperties.class)
@JsonTypeName("ServiceResourceUpdateProperties")
@JsonSubTypes({
    @JsonSubTypes.Type(name = "Stateful", value = StatefulServiceUpdateProperties.class),
    @JsonSubTypes.Type(name = "Stateless", value = StatelessServiceUpdateProperties.class)
})
@Fluent
public class ServiceResourceUpdateProperties extends ServiceResourcePropertiesBase {
    /** Creates an instance of ServiceResourceUpdateProperties class. */
    public ServiceResourceUpdateProperties() {
    }

    /** {@inheritDoc} */
    @Override
    public ServiceResourceUpdateProperties withPlacementConstraints(String placementConstraints) {
        super.withPlacementConstraints(placementConstraints);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ServiceResourceUpdateProperties withCorrelationScheme(
        List<ServiceCorrelationDescription> correlationScheme) {
        super.withCorrelationScheme(correlationScheme);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ServiceResourceUpdateProperties withServiceLoadMetrics(
        List<ServiceLoadMetricDescription> serviceLoadMetrics) {
        super.withServiceLoadMetrics(serviceLoadMetrics);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ServiceResourceUpdateProperties withServicePlacementPolicies(
        List<ServicePlacementPolicyDescription> servicePlacementPolicies) {
        super.withServicePlacementPolicies(servicePlacementPolicies);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ServiceResourceUpdateProperties withDefaultMoveCost(MoveCost defaultMoveCost) {
        super.withDefaultMoveCost(defaultMoveCost);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
    }
}
