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

package com.azure.resourcemanager.desktopvirtualization.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.desktopvirtualization.models.ApplicationType;
import com.azure.resourcemanager.desktopvirtualization.models.SessionState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Schema for UserSession properties. */
@Fluent
public final class UserSessionProperties {
    /*
     * ObjectId of user session. (internal use)
     */
    @JsonProperty(value = "objectId", access = JsonProperty.Access.WRITE_ONLY)
    private String objectId;

    /*
     * The user principal name.
     */
    @JsonProperty(value = "userPrincipalName")
    private String userPrincipalName;

    /*
     * Application type of application.
     */
    @JsonProperty(value = "applicationType")
    private ApplicationType applicationType;

    /*
     * State of user session.
     */
    @JsonProperty(value = "sessionState")
    private SessionState sessionState;

    /*
     * The active directory user name.
     */
    @JsonProperty(value = "activeDirectoryUserName")
    private String activeDirectoryUsername;

    /*
     * The timestamp of the user session create.
     */
    @JsonProperty(value = "createTime")
    private OffsetDateTime createTime;

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

    /**
     * Get the objectId property: ObjectId of user session. (internal use).
     *
     * @return the objectId value.
     */
    public String objectId() {
        return this.objectId;
    }

    /**
     * Get the userPrincipalName property: The user principal name.
     *
     * @return the userPrincipalName value.
     */
    public String userPrincipalName() {
        return this.userPrincipalName;
    }

    /**
     * Set the userPrincipalName property: The user principal name.
     *
     * @param userPrincipalName the userPrincipalName value to set.
     * @return the UserSessionProperties object itself.
     */
    public UserSessionProperties withUserPrincipalName(String userPrincipalName) {
        this.userPrincipalName = userPrincipalName;
        return this;
    }

    /**
     * Get the applicationType property: Application type of application.
     *
     * @return the applicationType value.
     */
    public ApplicationType applicationType() {
        return this.applicationType;
    }

    /**
     * Set the applicationType property: Application type of application.
     *
     * @param applicationType the applicationType value to set.
     * @return the UserSessionProperties object itself.
     */
    public UserSessionProperties withApplicationType(ApplicationType applicationType) {
        this.applicationType = applicationType;
        return this;
    }

    /**
     * Get the sessionState property: State of user session.
     *
     * @return the sessionState value.
     */
    public SessionState sessionState() {
        return this.sessionState;
    }

    /**
     * Set the sessionState property: State of user session.
     *
     * @param sessionState the sessionState value to set.
     * @return the UserSessionProperties object itself.
     */
    public UserSessionProperties withSessionState(SessionState sessionState) {
        this.sessionState = sessionState;
        return this;
    }

    /**
     * Get the activeDirectoryUsername property: The active directory user name.
     *
     * @return the activeDirectoryUsername value.
     */
    public String activeDirectoryUsername() {
        return this.activeDirectoryUsername;
    }

    /**
     * Set the activeDirectoryUsername property: The active directory user name.
     *
     * @param activeDirectoryUsername the activeDirectoryUsername value to set.
     * @return the UserSessionProperties object itself.
     */
    public UserSessionProperties withActiveDirectoryUsername(String activeDirectoryUsername) {
        this.activeDirectoryUsername = activeDirectoryUsername;
        return this;
    }

    /**
     * Get the createTime property: The timestamp of the user session create.
     *
     * @return the createTime value.
     */
    public OffsetDateTime createTime() {
        return this.createTime;
    }

    /**
     * Set the createTime property: The timestamp of the user session create.
     *
     * @param createTime the createTime value to set.
     * @return the UserSessionProperties object itself.
     */
    public UserSessionProperties withCreateTime(OffsetDateTime createTime) {
        this.createTime = createTime;
        return this;
    }

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