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

package com.azure.resourcemanager.appcontainers.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Sticky Sessions for Single Revision Mode. */
@Fluent
public final class IngressStickySessions {
    /*
     * Sticky Session Affinity
     */
    @JsonProperty(value = "affinity")
    private Affinity affinity;

    /** Creates an instance of IngressStickySessions class. */
    public IngressStickySessions() {
    }

    /**
     * Get the affinity property: Sticky Session Affinity.
     *
     * @return the affinity value.
     */
    public Affinity affinity() {
        return this.affinity;
    }

    /**
     * Set the affinity property: Sticky Session Affinity.
     *
     * @param affinity the affinity value to set.
     * @return the IngressStickySessions object itself.
     */
    public IngressStickySessions withAffinity(Affinity affinity) {
        this.affinity = affinity;
        return this;
    }

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