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

com.azure.communication.rooms.models.RoomParticipant Maven / Gradle / Ivy

Go to download

This package contains clients and data structures used to create, update, get, delete the Azure Communication Room Service. For this release, see notes Microsoft Azure Communication Rooms quickstart

There is a newer version: 1.1.5
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.communication.rooms.models;

import com.azure.communication.common.CommunicationIdentifier;
import com.azure.core.annotation.Fluent;

/** The RoomParticipant model. */
@Fluent
public final class RoomParticipant {
    /*
     * Identifies a participant in Azure Communication services. A participant
     * is, for example, a phone number or an Azure communication user. This
     * model must be interpreted as a union: Apart from rawId, at most one
     * further property may be set.
     */
    private final CommunicationIdentifier communicationIdentifier;

    /*
     * The Role of a room participant.
     */
    private ParticipantRole role;

    /**
     * Default constructor for Room Participant. Default role is Attendee
     *
     * @param communicationIdentifier The communication identifier.
     */
    public RoomParticipant(CommunicationIdentifier communicationIdentifier) {
        this.communicationIdentifier = communicationIdentifier;
        this.role = ParticipantRole.ATTENDEE;
    }

       /**
     * Set the role property: The role of a room participant. The default value is Attendee.
     *
     * @param role the role value to set.
     * @return the RoomParticipant object itself.
     */
    public RoomParticipant setRole(ParticipantRole role) {
        if (role == null) {
            this.role = ParticipantRole.ATTENDEE;
        } else {
            this.role = role;
        }
        return this;
    }

    /**
     * Get the communicationIdentifier property: Identifies a participant in Azure
     * Communication services. A participant
     * is, for example, a phone number or an Azure communication user. This model
     * must be interpreted as a union: Apart
     * from rawId, at most one further property may be set.
     *
     * @return the communicationIdentifier value.
     */
    public CommunicationIdentifier getCommunicationIdentifier() {
        return this.communicationIdentifier;
    }

    /**
     * Get the role property: The Role of a room participant.
     *
     * @return the role value.
     */
    public ParticipantRole getRole() {
        return this.role;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy