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

package com.azure.communication.callautomation.implementation.models;

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

/** Channel affinity for a participant. */
@Fluent
public final class ChannelAffinityInternal {
    /*
     * Channel number to which bitstream from a particular participant will be
     * written.
     */
    @JsonProperty(value = "channel")
    private Integer channel;

    /*
     * The identifier for the participant whose bitstream will be written to
     * the channel
     * represented by the channel number.
     */
    @JsonProperty(value = "participant", required = true)
    private CommunicationIdentifierModel participant;

    /**
     * Get the channel property: Channel number to which bitstream from a particular participant will be written.
     *
     * @return the channel value.
     */
    public Integer getChannel() {
        return this.channel;
    }

    /**
     * Set the channel property: Channel number to which bitstream from a particular participant will be written.
     *
     * @param channel the channel value to set.
     * @return the ChannelAffinityInternal object itself.
     */
    public ChannelAffinityInternal setChannel(Integer channel) {
        this.channel = channel;
        return this;
    }

    /**
     * Get the participant property: The identifier for the participant whose bitstream will be written to the channel
     * represented by the channel number.
     *
     * @return the participant value.
     */
    public CommunicationIdentifierModel getParticipant() {
        return this.participant;
    }

    /**
     * Set the participant property: The identifier for the participant whose bitstream will be written to the channel
     * represented by the channel number.
     *
     * @param participant the participant value to set.
     * @return the ChannelAffinityInternal object itself.
     */
    public ChannelAffinityInternal setParticipant(CommunicationIdentifierModel participant) {
        this.participant = participant;
        return this;
    }
}
