/*
 * Jellyfin API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 10.11.6
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package org.openhab.binding.jellyfin.internal.gen.current.model;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.StringJoiner;
import java.util.UUID;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * UserPolicy
 */
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "OpenAPI Generator")
public class UserPolicy {
    public static final String JSON_PROPERTY_IS_ADMINISTRATOR = "IsAdministrator";
    private @org.eclipse.jdt.annotation.Nullable Boolean isAdministrator;

    public static final String JSON_PROPERTY_IS_HIDDEN = "IsHidden";
    private @org.eclipse.jdt.annotation.Nullable Boolean isHidden;

    public static final String JSON_PROPERTY_ENABLE_COLLECTION_MANAGEMENT = "EnableCollectionManagement";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableCollectionManagement = false;

    public static final String JSON_PROPERTY_ENABLE_SUBTITLE_MANAGEMENT = "EnableSubtitleManagement";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableSubtitleManagement = false;

    public static final String JSON_PROPERTY_ENABLE_LYRIC_MANAGEMENT = "EnableLyricManagement";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableLyricManagement = false;

    public static final String JSON_PROPERTY_IS_DISABLED = "IsDisabled";
    private @org.eclipse.jdt.annotation.Nullable Boolean isDisabled;

    public static final String JSON_PROPERTY_MAX_PARENTAL_RATING = "MaxParentalRating";
    private @org.eclipse.jdt.annotation.Nullable Integer maxParentalRating;

    public static final String JSON_PROPERTY_MAX_PARENTAL_SUB_RATING = "MaxParentalSubRating";
    private @org.eclipse.jdt.annotation.Nullable Integer maxParentalSubRating;

    public static final String JSON_PROPERTY_BLOCKED_TAGS = "BlockedTags";
    private @org.eclipse.jdt.annotation.Nullable List<String> blockedTags;

    public static final String JSON_PROPERTY_ALLOWED_TAGS = "AllowedTags";
    private @org.eclipse.jdt.annotation.Nullable List<String> allowedTags;

    public static final String JSON_PROPERTY_ENABLE_USER_PREFERENCE_ACCESS = "EnableUserPreferenceAccess";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableUserPreferenceAccess;

    public static final String JSON_PROPERTY_ACCESS_SCHEDULES = "AccessSchedules";
    private @org.eclipse.jdt.annotation.Nullable List<AccessSchedule> accessSchedules;

    public static final String JSON_PROPERTY_BLOCK_UNRATED_ITEMS = "BlockUnratedItems";
    private @org.eclipse.jdt.annotation.Nullable List<UnratedItem> blockUnratedItems;

    public static final String JSON_PROPERTY_ENABLE_REMOTE_CONTROL_OF_OTHER_USERS = "EnableRemoteControlOfOtherUsers";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableRemoteControlOfOtherUsers;

    public static final String JSON_PROPERTY_ENABLE_SHARED_DEVICE_CONTROL = "EnableSharedDeviceControl";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableSharedDeviceControl;

    public static final String JSON_PROPERTY_ENABLE_REMOTE_ACCESS = "EnableRemoteAccess";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableRemoteAccess;

    public static final String JSON_PROPERTY_ENABLE_LIVE_TV_MANAGEMENT = "EnableLiveTvManagement";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableLiveTvManagement;

    public static final String JSON_PROPERTY_ENABLE_LIVE_TV_ACCESS = "EnableLiveTvAccess";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableLiveTvAccess;

    public static final String JSON_PROPERTY_ENABLE_MEDIA_PLAYBACK = "EnableMediaPlayback";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableMediaPlayback;

    public static final String JSON_PROPERTY_ENABLE_AUDIO_PLAYBACK_TRANSCODING = "EnableAudioPlaybackTranscoding";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableAudioPlaybackTranscoding;

    public static final String JSON_PROPERTY_ENABLE_VIDEO_PLAYBACK_TRANSCODING = "EnableVideoPlaybackTranscoding";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableVideoPlaybackTranscoding;

    public static final String JSON_PROPERTY_ENABLE_PLAYBACK_REMUXING = "EnablePlaybackRemuxing";
    private @org.eclipse.jdt.annotation.Nullable Boolean enablePlaybackRemuxing;

    public static final String JSON_PROPERTY_FORCE_REMOTE_SOURCE_TRANSCODING = "ForceRemoteSourceTranscoding";
    private @org.eclipse.jdt.annotation.Nullable Boolean forceRemoteSourceTranscoding;

    public static final String JSON_PROPERTY_ENABLE_CONTENT_DELETION = "EnableContentDeletion";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableContentDeletion;

    public static final String JSON_PROPERTY_ENABLE_CONTENT_DELETION_FROM_FOLDERS = "EnableContentDeletionFromFolders";
    private @org.eclipse.jdt.annotation.Nullable List<String> enableContentDeletionFromFolders;

    public static final String JSON_PROPERTY_ENABLE_CONTENT_DOWNLOADING = "EnableContentDownloading";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableContentDownloading;

    public static final String JSON_PROPERTY_ENABLE_SYNC_TRANSCODING = "EnableSyncTranscoding";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableSyncTranscoding;

    public static final String JSON_PROPERTY_ENABLE_MEDIA_CONVERSION = "EnableMediaConversion";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableMediaConversion;

    public static final String JSON_PROPERTY_ENABLED_DEVICES = "EnabledDevices";
    private @org.eclipse.jdt.annotation.Nullable List<String> enabledDevices;

    public static final String JSON_PROPERTY_ENABLE_ALL_DEVICES = "EnableAllDevices";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableAllDevices;

    public static final String JSON_PROPERTY_ENABLED_CHANNELS = "EnabledChannels";
    private @org.eclipse.jdt.annotation.Nullable List<UUID> enabledChannels;

    public static final String JSON_PROPERTY_ENABLE_ALL_CHANNELS = "EnableAllChannels";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableAllChannels;

    public static final String JSON_PROPERTY_ENABLED_FOLDERS = "EnabledFolders";
    private @org.eclipse.jdt.annotation.Nullable List<UUID> enabledFolders;

    public static final String JSON_PROPERTY_ENABLE_ALL_FOLDERS = "EnableAllFolders";
    private @org.eclipse.jdt.annotation.Nullable Boolean enableAllFolders;

    public static final String JSON_PROPERTY_INVALID_LOGIN_ATTEMPT_COUNT = "InvalidLoginAttemptCount";
    private @org.eclipse.jdt.annotation.Nullable Integer invalidLoginAttemptCount;

    public static final String JSON_PROPERTY_LOGIN_ATTEMPTS_BEFORE_LOCKOUT = "LoginAttemptsBeforeLockout";
    private @org.eclipse.jdt.annotation.Nullable Integer loginAttemptsBeforeLockout;

    public static final String JSON_PROPERTY_MAX_ACTIVE_SESSIONS = "MaxActiveSessions";
    private @org.eclipse.jdt.annotation.Nullable Integer maxActiveSessions;

    public static final String JSON_PROPERTY_ENABLE_PUBLIC_SHARING = "EnablePublicSharing";
    private @org.eclipse.jdt.annotation.Nullable Boolean enablePublicSharing;

    public static final String JSON_PROPERTY_BLOCKED_MEDIA_FOLDERS = "BlockedMediaFolders";
    private @org.eclipse.jdt.annotation.Nullable List<UUID> blockedMediaFolders;

    public static final String JSON_PROPERTY_BLOCKED_CHANNELS = "BlockedChannels";
    private @org.eclipse.jdt.annotation.Nullable List<UUID> blockedChannels;

    public static final String JSON_PROPERTY_REMOTE_CLIENT_BITRATE_LIMIT = "RemoteClientBitrateLimit";
    private @org.eclipse.jdt.annotation.Nullable Integer remoteClientBitrateLimit;

    public static final String JSON_PROPERTY_AUTHENTICATION_PROVIDER_ID = "AuthenticationProviderId";
    private @org.eclipse.jdt.annotation.Nullable String authenticationProviderId;

    public static final String JSON_PROPERTY_PASSWORD_RESET_PROVIDER_ID = "PasswordResetProviderId";
    private @org.eclipse.jdt.annotation.Nullable String passwordResetProviderId;

    public static final String JSON_PROPERTY_SYNC_PLAY_ACCESS = "SyncPlayAccess";
    private @org.eclipse.jdt.annotation.Nullable SyncPlayUserAccessType syncPlayAccess;

    public UserPolicy() {
    }

    public UserPolicy isAdministrator(@org.eclipse.jdt.annotation.Nullable Boolean isAdministrator) {
        this.isAdministrator = isAdministrator;
        return this;
    }

    /**
     * Gets or sets a value indicating whether this instance is administrator.
     * 
     * @return isAdministrator
     */
    @JsonProperty(value = JSON_PROPERTY_IS_ADMINISTRATOR)
    public @org.eclipse.jdt.annotation.Nullable Boolean getIsAdministrator() {
        return isAdministrator;
    }

    @JsonProperty(value = JSON_PROPERTY_IS_ADMINISTRATOR)
    public void setIsAdministrator(@org.eclipse.jdt.annotation.Nullable Boolean isAdministrator) {
        this.isAdministrator = isAdministrator;
    }

    public UserPolicy isHidden(@org.eclipse.jdt.annotation.Nullable Boolean isHidden) {
        this.isHidden = isHidden;
        return this;
    }

    /**
     * Gets or sets a value indicating whether this instance is hidden.
     * 
     * @return isHidden
     */
    @JsonProperty(value = JSON_PROPERTY_IS_HIDDEN)
    public @org.eclipse.jdt.annotation.Nullable Boolean getIsHidden() {
        return isHidden;
    }

    @JsonProperty(value = JSON_PROPERTY_IS_HIDDEN)
    public void setIsHidden(@org.eclipse.jdt.annotation.Nullable Boolean isHidden) {
        this.isHidden = isHidden;
    }

    public UserPolicy enableCollectionManagement(
            @org.eclipse.jdt.annotation.Nullable Boolean enableCollectionManagement) {
        this.enableCollectionManagement = enableCollectionManagement;
        return this;
    }

    /**
     * Gets or sets a value indicating whether this instance can manage collections.
     * 
     * @return enableCollectionManagement
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_COLLECTION_MANAGEMENT)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableCollectionManagement() {
        return enableCollectionManagement;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_COLLECTION_MANAGEMENT)
    public void setEnableCollectionManagement(@org.eclipse.jdt.annotation.Nullable Boolean enableCollectionManagement) {
        this.enableCollectionManagement = enableCollectionManagement;
    }

    public UserPolicy enableSubtitleManagement(@org.eclipse.jdt.annotation.Nullable Boolean enableSubtitleManagement) {
        this.enableSubtitleManagement = enableSubtitleManagement;
        return this;
    }

    /**
     * Gets or sets a value indicating whether this instance can manage subtitles.
     * 
     * @return enableSubtitleManagement
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_SUBTITLE_MANAGEMENT)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableSubtitleManagement() {
        return enableSubtitleManagement;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_SUBTITLE_MANAGEMENT)
    public void setEnableSubtitleManagement(@org.eclipse.jdt.annotation.Nullable Boolean enableSubtitleManagement) {
        this.enableSubtitleManagement = enableSubtitleManagement;
    }

    public UserPolicy enableLyricManagement(@org.eclipse.jdt.annotation.Nullable Boolean enableLyricManagement) {
        this.enableLyricManagement = enableLyricManagement;
        return this;
    }

    /**
     * Gets or sets a value indicating whether this user can manage lyrics.
     * 
     * @return enableLyricManagement
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_LYRIC_MANAGEMENT)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableLyricManagement() {
        return enableLyricManagement;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_LYRIC_MANAGEMENT)
    public void setEnableLyricManagement(@org.eclipse.jdt.annotation.Nullable Boolean enableLyricManagement) {
        this.enableLyricManagement = enableLyricManagement;
    }

    public UserPolicy isDisabled(@org.eclipse.jdt.annotation.Nullable Boolean isDisabled) {
        this.isDisabled = isDisabled;
        return this;
    }

    /**
     * Gets or sets a value indicating whether this instance is disabled.
     * 
     * @return isDisabled
     */
    @JsonProperty(value = JSON_PROPERTY_IS_DISABLED)
    public @org.eclipse.jdt.annotation.Nullable Boolean getIsDisabled() {
        return isDisabled;
    }

    @JsonProperty(value = JSON_PROPERTY_IS_DISABLED)
    public void setIsDisabled(@org.eclipse.jdt.annotation.Nullable Boolean isDisabled) {
        this.isDisabled = isDisabled;
    }

    public UserPolicy maxParentalRating(@org.eclipse.jdt.annotation.Nullable Integer maxParentalRating) {
        this.maxParentalRating = maxParentalRating;
        return this;
    }

    /**
     * Gets or sets the max parental rating.
     * 
     * @return maxParentalRating
     */
    @JsonProperty(value = JSON_PROPERTY_MAX_PARENTAL_RATING)
    public @org.eclipse.jdt.annotation.Nullable Integer getMaxParentalRating() {
        return maxParentalRating;
    }

    @JsonProperty(value = JSON_PROPERTY_MAX_PARENTAL_RATING)
    public void setMaxParentalRating(@org.eclipse.jdt.annotation.Nullable Integer maxParentalRating) {
        this.maxParentalRating = maxParentalRating;
    }

    public UserPolicy maxParentalSubRating(@org.eclipse.jdt.annotation.Nullable Integer maxParentalSubRating) {
        this.maxParentalSubRating = maxParentalSubRating;
        return this;
    }

    /**
     * Get maxParentalSubRating
     * 
     * @return maxParentalSubRating
     */
    @JsonProperty(value = JSON_PROPERTY_MAX_PARENTAL_SUB_RATING)
    public @org.eclipse.jdt.annotation.Nullable Integer getMaxParentalSubRating() {
        return maxParentalSubRating;
    }

    @JsonProperty(value = JSON_PROPERTY_MAX_PARENTAL_SUB_RATING)
    public void setMaxParentalSubRating(@org.eclipse.jdt.annotation.Nullable Integer maxParentalSubRating) {
        this.maxParentalSubRating = maxParentalSubRating;
    }

    public UserPolicy blockedTags(@org.eclipse.jdt.annotation.Nullable List<String> blockedTags) {
        this.blockedTags = blockedTags;
        return this;
    }

    public UserPolicy addBlockedTagsItem(String blockedTagsItem) {
        if (this.blockedTags == null) {
            this.blockedTags = new ArrayList<>();
        }
        this.blockedTags.add(blockedTagsItem);
        return this;
    }

    /**
     * Get blockedTags
     * 
     * @return blockedTags
     */
    @JsonProperty(value = JSON_PROPERTY_BLOCKED_TAGS)
    public @org.eclipse.jdt.annotation.Nullable List<String> getBlockedTags() {
        return blockedTags;
    }

    @JsonProperty(value = JSON_PROPERTY_BLOCKED_TAGS)
    public void setBlockedTags(@org.eclipse.jdt.annotation.Nullable List<String> blockedTags) {
        this.blockedTags = blockedTags;
    }

    public UserPolicy allowedTags(@org.eclipse.jdt.annotation.Nullable List<String> allowedTags) {
        this.allowedTags = allowedTags;
        return this;
    }

    public UserPolicy addAllowedTagsItem(String allowedTagsItem) {
        if (this.allowedTags == null) {
            this.allowedTags = new ArrayList<>();
        }
        this.allowedTags.add(allowedTagsItem);
        return this;
    }

    /**
     * Get allowedTags
     * 
     * @return allowedTags
     */
    @JsonProperty(value = JSON_PROPERTY_ALLOWED_TAGS)
    public @org.eclipse.jdt.annotation.Nullable List<String> getAllowedTags() {
        return allowedTags;
    }

    @JsonProperty(value = JSON_PROPERTY_ALLOWED_TAGS)
    public void setAllowedTags(@org.eclipse.jdt.annotation.Nullable List<String> allowedTags) {
        this.allowedTags = allowedTags;
    }

    public UserPolicy enableUserPreferenceAccess(
            @org.eclipse.jdt.annotation.Nullable Boolean enableUserPreferenceAccess) {
        this.enableUserPreferenceAccess = enableUserPreferenceAccess;
        return this;
    }

    /**
     * Get enableUserPreferenceAccess
     * 
     * @return enableUserPreferenceAccess
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_USER_PREFERENCE_ACCESS)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableUserPreferenceAccess() {
        return enableUserPreferenceAccess;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_USER_PREFERENCE_ACCESS)
    public void setEnableUserPreferenceAccess(@org.eclipse.jdt.annotation.Nullable Boolean enableUserPreferenceAccess) {
        this.enableUserPreferenceAccess = enableUserPreferenceAccess;
    }

    public UserPolicy accessSchedules(@org.eclipse.jdt.annotation.Nullable List<AccessSchedule> accessSchedules) {
        this.accessSchedules = accessSchedules;
        return this;
    }

    public UserPolicy addAccessSchedulesItem(AccessSchedule accessSchedulesItem) {
        if (this.accessSchedules == null) {
            this.accessSchedules = new ArrayList<>();
        }
        this.accessSchedules.add(accessSchedulesItem);
        return this;
    }

    /**
     * Get accessSchedules
     * 
     * @return accessSchedules
     */
    @JsonProperty(value = JSON_PROPERTY_ACCESS_SCHEDULES)
    public @org.eclipse.jdt.annotation.Nullable List<AccessSchedule> getAccessSchedules() {
        return accessSchedules;
    }

    @JsonProperty(value = JSON_PROPERTY_ACCESS_SCHEDULES)
    public void setAccessSchedules(@org.eclipse.jdt.annotation.Nullable List<AccessSchedule> accessSchedules) {
        this.accessSchedules = accessSchedules;
    }

    public UserPolicy blockUnratedItems(@org.eclipse.jdt.annotation.Nullable List<UnratedItem> blockUnratedItems) {
        this.blockUnratedItems = blockUnratedItems;
        return this;
    }

    public UserPolicy addBlockUnratedItemsItem(UnratedItem blockUnratedItemsItem) {
        if (this.blockUnratedItems == null) {
            this.blockUnratedItems = new ArrayList<>();
        }
        this.blockUnratedItems.add(blockUnratedItemsItem);
        return this;
    }

    /**
     * Get blockUnratedItems
     * 
     * @return blockUnratedItems
     */
    @JsonProperty(value = JSON_PROPERTY_BLOCK_UNRATED_ITEMS)
    public @org.eclipse.jdt.annotation.Nullable List<UnratedItem> getBlockUnratedItems() {
        return blockUnratedItems;
    }

    @JsonProperty(value = JSON_PROPERTY_BLOCK_UNRATED_ITEMS)
    public void setBlockUnratedItems(@org.eclipse.jdt.annotation.Nullable List<UnratedItem> blockUnratedItems) {
        this.blockUnratedItems = blockUnratedItems;
    }

    public UserPolicy enableRemoteControlOfOtherUsers(
            @org.eclipse.jdt.annotation.Nullable Boolean enableRemoteControlOfOtherUsers) {
        this.enableRemoteControlOfOtherUsers = enableRemoteControlOfOtherUsers;
        return this;
    }

    /**
     * Get enableRemoteControlOfOtherUsers
     * 
     * @return enableRemoteControlOfOtherUsers
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_REMOTE_CONTROL_OF_OTHER_USERS)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableRemoteControlOfOtherUsers() {
        return enableRemoteControlOfOtherUsers;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_REMOTE_CONTROL_OF_OTHER_USERS)
    public void setEnableRemoteControlOfOtherUsers(
            @org.eclipse.jdt.annotation.Nullable Boolean enableRemoteControlOfOtherUsers) {
        this.enableRemoteControlOfOtherUsers = enableRemoteControlOfOtherUsers;
    }

    public UserPolicy enableSharedDeviceControl(
            @org.eclipse.jdt.annotation.Nullable Boolean enableSharedDeviceControl) {
        this.enableSharedDeviceControl = enableSharedDeviceControl;
        return this;
    }

    /**
     * Get enableSharedDeviceControl
     * 
     * @return enableSharedDeviceControl
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_SHARED_DEVICE_CONTROL)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableSharedDeviceControl() {
        return enableSharedDeviceControl;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_SHARED_DEVICE_CONTROL)
    public void setEnableSharedDeviceControl(@org.eclipse.jdt.annotation.Nullable Boolean enableSharedDeviceControl) {
        this.enableSharedDeviceControl = enableSharedDeviceControl;
    }

    public UserPolicy enableRemoteAccess(@org.eclipse.jdt.annotation.Nullable Boolean enableRemoteAccess) {
        this.enableRemoteAccess = enableRemoteAccess;
        return this;
    }

    /**
     * Get enableRemoteAccess
     * 
     * @return enableRemoteAccess
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_REMOTE_ACCESS)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableRemoteAccess() {
        return enableRemoteAccess;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_REMOTE_ACCESS)
    public void setEnableRemoteAccess(@org.eclipse.jdt.annotation.Nullable Boolean enableRemoteAccess) {
        this.enableRemoteAccess = enableRemoteAccess;
    }

    public UserPolicy enableLiveTvManagement(@org.eclipse.jdt.annotation.Nullable Boolean enableLiveTvManagement) {
        this.enableLiveTvManagement = enableLiveTvManagement;
        return this;
    }

    /**
     * Get enableLiveTvManagement
     * 
     * @return enableLiveTvManagement
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_LIVE_TV_MANAGEMENT)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableLiveTvManagement() {
        return enableLiveTvManagement;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_LIVE_TV_MANAGEMENT)
    public void setEnableLiveTvManagement(@org.eclipse.jdt.annotation.Nullable Boolean enableLiveTvManagement) {
        this.enableLiveTvManagement = enableLiveTvManagement;
    }

    public UserPolicy enableLiveTvAccess(@org.eclipse.jdt.annotation.Nullable Boolean enableLiveTvAccess) {
        this.enableLiveTvAccess = enableLiveTvAccess;
        return this;
    }

    /**
     * Get enableLiveTvAccess
     * 
     * @return enableLiveTvAccess
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_LIVE_TV_ACCESS)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableLiveTvAccess() {
        return enableLiveTvAccess;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_LIVE_TV_ACCESS)
    public void setEnableLiveTvAccess(@org.eclipse.jdt.annotation.Nullable Boolean enableLiveTvAccess) {
        this.enableLiveTvAccess = enableLiveTvAccess;
    }

    public UserPolicy enableMediaPlayback(@org.eclipse.jdt.annotation.Nullable Boolean enableMediaPlayback) {
        this.enableMediaPlayback = enableMediaPlayback;
        return this;
    }

    /**
     * Get enableMediaPlayback
     * 
     * @return enableMediaPlayback
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_MEDIA_PLAYBACK)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableMediaPlayback() {
        return enableMediaPlayback;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_MEDIA_PLAYBACK)
    public void setEnableMediaPlayback(@org.eclipse.jdt.annotation.Nullable Boolean enableMediaPlayback) {
        this.enableMediaPlayback = enableMediaPlayback;
    }

    public UserPolicy enableAudioPlaybackTranscoding(
            @org.eclipse.jdt.annotation.Nullable Boolean enableAudioPlaybackTranscoding) {
        this.enableAudioPlaybackTranscoding = enableAudioPlaybackTranscoding;
        return this;
    }

    /**
     * Get enableAudioPlaybackTranscoding
     * 
     * @return enableAudioPlaybackTranscoding
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_AUDIO_PLAYBACK_TRANSCODING)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableAudioPlaybackTranscoding() {
        return enableAudioPlaybackTranscoding;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_AUDIO_PLAYBACK_TRANSCODING)
    public void setEnableAudioPlaybackTranscoding(
            @org.eclipse.jdt.annotation.Nullable Boolean enableAudioPlaybackTranscoding) {
        this.enableAudioPlaybackTranscoding = enableAudioPlaybackTranscoding;
    }

    public UserPolicy enableVideoPlaybackTranscoding(
            @org.eclipse.jdt.annotation.Nullable Boolean enableVideoPlaybackTranscoding) {
        this.enableVideoPlaybackTranscoding = enableVideoPlaybackTranscoding;
        return this;
    }

    /**
     * Get enableVideoPlaybackTranscoding
     * 
     * @return enableVideoPlaybackTranscoding
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_VIDEO_PLAYBACK_TRANSCODING)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableVideoPlaybackTranscoding() {
        return enableVideoPlaybackTranscoding;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_VIDEO_PLAYBACK_TRANSCODING)
    public void setEnableVideoPlaybackTranscoding(
            @org.eclipse.jdt.annotation.Nullable Boolean enableVideoPlaybackTranscoding) {
        this.enableVideoPlaybackTranscoding = enableVideoPlaybackTranscoding;
    }

    public UserPolicy enablePlaybackRemuxing(@org.eclipse.jdt.annotation.Nullable Boolean enablePlaybackRemuxing) {
        this.enablePlaybackRemuxing = enablePlaybackRemuxing;
        return this;
    }

    /**
     * Get enablePlaybackRemuxing
     * 
     * @return enablePlaybackRemuxing
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_PLAYBACK_REMUXING)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnablePlaybackRemuxing() {
        return enablePlaybackRemuxing;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_PLAYBACK_REMUXING)
    public void setEnablePlaybackRemuxing(@org.eclipse.jdt.annotation.Nullable Boolean enablePlaybackRemuxing) {
        this.enablePlaybackRemuxing = enablePlaybackRemuxing;
    }

    public UserPolicy forceRemoteSourceTranscoding(
            @org.eclipse.jdt.annotation.Nullable Boolean forceRemoteSourceTranscoding) {
        this.forceRemoteSourceTranscoding = forceRemoteSourceTranscoding;
        return this;
    }

    /**
     * Get forceRemoteSourceTranscoding
     * 
     * @return forceRemoteSourceTranscoding
     */
    @JsonProperty(value = JSON_PROPERTY_FORCE_REMOTE_SOURCE_TRANSCODING)
    public @org.eclipse.jdt.annotation.Nullable Boolean getForceRemoteSourceTranscoding() {
        return forceRemoteSourceTranscoding;
    }

    @JsonProperty(value = JSON_PROPERTY_FORCE_REMOTE_SOURCE_TRANSCODING)
    public void setForceRemoteSourceTranscoding(
            @org.eclipse.jdt.annotation.Nullable Boolean forceRemoteSourceTranscoding) {
        this.forceRemoteSourceTranscoding = forceRemoteSourceTranscoding;
    }

    public UserPolicy enableContentDeletion(@org.eclipse.jdt.annotation.Nullable Boolean enableContentDeletion) {
        this.enableContentDeletion = enableContentDeletion;
        return this;
    }

    /**
     * Get enableContentDeletion
     * 
     * @return enableContentDeletion
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_CONTENT_DELETION)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableContentDeletion() {
        return enableContentDeletion;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_CONTENT_DELETION)
    public void setEnableContentDeletion(@org.eclipse.jdt.annotation.Nullable Boolean enableContentDeletion) {
        this.enableContentDeletion = enableContentDeletion;
    }

    public UserPolicy enableContentDeletionFromFolders(
            @org.eclipse.jdt.annotation.Nullable List<String> enableContentDeletionFromFolders) {
        this.enableContentDeletionFromFolders = enableContentDeletionFromFolders;
        return this;
    }

    public UserPolicy addEnableContentDeletionFromFoldersItem(String enableContentDeletionFromFoldersItem) {
        if (this.enableContentDeletionFromFolders == null) {
            this.enableContentDeletionFromFolders = new ArrayList<>();
        }
        this.enableContentDeletionFromFolders.add(enableContentDeletionFromFoldersItem);
        return this;
    }

    /**
     * Get enableContentDeletionFromFolders
     * 
     * @return enableContentDeletionFromFolders
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_CONTENT_DELETION_FROM_FOLDERS)
    public @org.eclipse.jdt.annotation.Nullable List<String> getEnableContentDeletionFromFolders() {
        return enableContentDeletionFromFolders;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_CONTENT_DELETION_FROM_FOLDERS)
    public void setEnableContentDeletionFromFolders(
            @org.eclipse.jdt.annotation.Nullable List<String> enableContentDeletionFromFolders) {
        this.enableContentDeletionFromFolders = enableContentDeletionFromFolders;
    }

    public UserPolicy enableContentDownloading(@org.eclipse.jdt.annotation.Nullable Boolean enableContentDownloading) {
        this.enableContentDownloading = enableContentDownloading;
        return this;
    }

    /**
     * Get enableContentDownloading
     * 
     * @return enableContentDownloading
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_CONTENT_DOWNLOADING)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableContentDownloading() {
        return enableContentDownloading;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_CONTENT_DOWNLOADING)
    public void setEnableContentDownloading(@org.eclipse.jdt.annotation.Nullable Boolean enableContentDownloading) {
        this.enableContentDownloading = enableContentDownloading;
    }

    public UserPolicy enableSyncTranscoding(@org.eclipse.jdt.annotation.Nullable Boolean enableSyncTranscoding) {
        this.enableSyncTranscoding = enableSyncTranscoding;
        return this;
    }

    /**
     * Gets or sets a value indicating whether [enable synchronize].
     * 
     * @return enableSyncTranscoding
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_SYNC_TRANSCODING)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableSyncTranscoding() {
        return enableSyncTranscoding;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_SYNC_TRANSCODING)
    public void setEnableSyncTranscoding(@org.eclipse.jdt.annotation.Nullable Boolean enableSyncTranscoding) {
        this.enableSyncTranscoding = enableSyncTranscoding;
    }

    public UserPolicy enableMediaConversion(@org.eclipse.jdt.annotation.Nullable Boolean enableMediaConversion) {
        this.enableMediaConversion = enableMediaConversion;
        return this;
    }

    /**
     * Get enableMediaConversion
     * 
     * @return enableMediaConversion
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_MEDIA_CONVERSION)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableMediaConversion() {
        return enableMediaConversion;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_MEDIA_CONVERSION)
    public void setEnableMediaConversion(@org.eclipse.jdt.annotation.Nullable Boolean enableMediaConversion) {
        this.enableMediaConversion = enableMediaConversion;
    }

    public UserPolicy enabledDevices(@org.eclipse.jdt.annotation.Nullable List<String> enabledDevices) {
        this.enabledDevices = enabledDevices;
        return this;
    }

    public UserPolicy addEnabledDevicesItem(String enabledDevicesItem) {
        if (this.enabledDevices == null) {
            this.enabledDevices = new ArrayList<>();
        }
        this.enabledDevices.add(enabledDevicesItem);
        return this;
    }

    /**
     * Get enabledDevices
     * 
     * @return enabledDevices
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLED_DEVICES)
    public @org.eclipse.jdt.annotation.Nullable List<String> getEnabledDevices() {
        return enabledDevices;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLED_DEVICES)
    public void setEnabledDevices(@org.eclipse.jdt.annotation.Nullable List<String> enabledDevices) {
        this.enabledDevices = enabledDevices;
    }

    public UserPolicy enableAllDevices(@org.eclipse.jdt.annotation.Nullable Boolean enableAllDevices) {
        this.enableAllDevices = enableAllDevices;
        return this;
    }

    /**
     * Get enableAllDevices
     * 
     * @return enableAllDevices
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_ALL_DEVICES)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableAllDevices() {
        return enableAllDevices;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_ALL_DEVICES)
    public void setEnableAllDevices(@org.eclipse.jdt.annotation.Nullable Boolean enableAllDevices) {
        this.enableAllDevices = enableAllDevices;
    }

    public UserPolicy enabledChannels(@org.eclipse.jdt.annotation.Nullable List<UUID> enabledChannels) {
        this.enabledChannels = enabledChannels;
        return this;
    }

    public UserPolicy addEnabledChannelsItem(UUID enabledChannelsItem) {
        if (this.enabledChannels == null) {
            this.enabledChannels = new ArrayList<>();
        }
        this.enabledChannels.add(enabledChannelsItem);
        return this;
    }

    /**
     * Get enabledChannels
     * 
     * @return enabledChannels
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLED_CHANNELS)
    public @org.eclipse.jdt.annotation.Nullable List<UUID> getEnabledChannels() {
        return enabledChannels;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLED_CHANNELS)
    public void setEnabledChannels(@org.eclipse.jdt.annotation.Nullable List<UUID> enabledChannels) {
        this.enabledChannels = enabledChannels;
    }

    public UserPolicy enableAllChannels(@org.eclipse.jdt.annotation.Nullable Boolean enableAllChannels) {
        this.enableAllChannels = enableAllChannels;
        return this;
    }

    /**
     * Get enableAllChannels
     * 
     * @return enableAllChannels
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_ALL_CHANNELS)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableAllChannels() {
        return enableAllChannels;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_ALL_CHANNELS)
    public void setEnableAllChannels(@org.eclipse.jdt.annotation.Nullable Boolean enableAllChannels) {
        this.enableAllChannels = enableAllChannels;
    }

    public UserPolicy enabledFolders(@org.eclipse.jdt.annotation.Nullable List<UUID> enabledFolders) {
        this.enabledFolders = enabledFolders;
        return this;
    }

    public UserPolicy addEnabledFoldersItem(UUID enabledFoldersItem) {
        if (this.enabledFolders == null) {
            this.enabledFolders = new ArrayList<>();
        }
        this.enabledFolders.add(enabledFoldersItem);
        return this;
    }

    /**
     * Get enabledFolders
     * 
     * @return enabledFolders
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLED_FOLDERS)
    public @org.eclipse.jdt.annotation.Nullable List<UUID> getEnabledFolders() {
        return enabledFolders;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLED_FOLDERS)
    public void setEnabledFolders(@org.eclipse.jdt.annotation.Nullable List<UUID> enabledFolders) {
        this.enabledFolders = enabledFolders;
    }

    public UserPolicy enableAllFolders(@org.eclipse.jdt.annotation.Nullable Boolean enableAllFolders) {
        this.enableAllFolders = enableAllFolders;
        return this;
    }

    /**
     * Get enableAllFolders
     * 
     * @return enableAllFolders
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_ALL_FOLDERS)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnableAllFolders() {
        return enableAllFolders;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_ALL_FOLDERS)
    public void setEnableAllFolders(@org.eclipse.jdt.annotation.Nullable Boolean enableAllFolders) {
        this.enableAllFolders = enableAllFolders;
    }

    public UserPolicy invalidLoginAttemptCount(@org.eclipse.jdt.annotation.Nullable Integer invalidLoginAttemptCount) {
        this.invalidLoginAttemptCount = invalidLoginAttemptCount;
        return this;
    }

    /**
     * Get invalidLoginAttemptCount
     * 
     * @return invalidLoginAttemptCount
     */
    @JsonProperty(value = JSON_PROPERTY_INVALID_LOGIN_ATTEMPT_COUNT)
    public @org.eclipse.jdt.annotation.Nullable Integer getInvalidLoginAttemptCount() {
        return invalidLoginAttemptCount;
    }

    @JsonProperty(value = JSON_PROPERTY_INVALID_LOGIN_ATTEMPT_COUNT)
    public void setInvalidLoginAttemptCount(@org.eclipse.jdt.annotation.Nullable Integer invalidLoginAttemptCount) {
        this.invalidLoginAttemptCount = invalidLoginAttemptCount;
    }

    public UserPolicy loginAttemptsBeforeLockout(
            @org.eclipse.jdt.annotation.Nullable Integer loginAttemptsBeforeLockout) {
        this.loginAttemptsBeforeLockout = loginAttemptsBeforeLockout;
        return this;
    }

    /**
     * Get loginAttemptsBeforeLockout
     * 
     * @return loginAttemptsBeforeLockout
     */
    @JsonProperty(value = JSON_PROPERTY_LOGIN_ATTEMPTS_BEFORE_LOCKOUT)
    public @org.eclipse.jdt.annotation.Nullable Integer getLoginAttemptsBeforeLockout() {
        return loginAttemptsBeforeLockout;
    }

    @JsonProperty(value = JSON_PROPERTY_LOGIN_ATTEMPTS_BEFORE_LOCKOUT)
    public void setLoginAttemptsBeforeLockout(@org.eclipse.jdt.annotation.Nullable Integer loginAttemptsBeforeLockout) {
        this.loginAttemptsBeforeLockout = loginAttemptsBeforeLockout;
    }

    public UserPolicy maxActiveSessions(@org.eclipse.jdt.annotation.Nullable Integer maxActiveSessions) {
        this.maxActiveSessions = maxActiveSessions;
        return this;
    }

    /**
     * Get maxActiveSessions
     * 
     * @return maxActiveSessions
     */
    @JsonProperty(value = JSON_PROPERTY_MAX_ACTIVE_SESSIONS)
    public @org.eclipse.jdt.annotation.Nullable Integer getMaxActiveSessions() {
        return maxActiveSessions;
    }

    @JsonProperty(value = JSON_PROPERTY_MAX_ACTIVE_SESSIONS)
    public void setMaxActiveSessions(@org.eclipse.jdt.annotation.Nullable Integer maxActiveSessions) {
        this.maxActiveSessions = maxActiveSessions;
    }

    public UserPolicy enablePublicSharing(@org.eclipse.jdt.annotation.Nullable Boolean enablePublicSharing) {
        this.enablePublicSharing = enablePublicSharing;
        return this;
    }

    /**
     * Get enablePublicSharing
     * 
     * @return enablePublicSharing
     */
    @JsonProperty(value = JSON_PROPERTY_ENABLE_PUBLIC_SHARING)
    public @org.eclipse.jdt.annotation.Nullable Boolean getEnablePublicSharing() {
        return enablePublicSharing;
    }

    @JsonProperty(value = JSON_PROPERTY_ENABLE_PUBLIC_SHARING)
    public void setEnablePublicSharing(@org.eclipse.jdt.annotation.Nullable Boolean enablePublicSharing) {
        this.enablePublicSharing = enablePublicSharing;
    }

    public UserPolicy blockedMediaFolders(@org.eclipse.jdt.annotation.Nullable List<UUID> blockedMediaFolders) {
        this.blockedMediaFolders = blockedMediaFolders;
        return this;
    }

    public UserPolicy addBlockedMediaFoldersItem(UUID blockedMediaFoldersItem) {
        if (this.blockedMediaFolders == null) {
            this.blockedMediaFolders = new ArrayList<>();
        }
        this.blockedMediaFolders.add(blockedMediaFoldersItem);
        return this;
    }

    /**
     * Get blockedMediaFolders
     * 
     * @return blockedMediaFolders
     */
    @JsonProperty(value = JSON_PROPERTY_BLOCKED_MEDIA_FOLDERS)
    public @org.eclipse.jdt.annotation.Nullable List<UUID> getBlockedMediaFolders() {
        return blockedMediaFolders;
    }

    @JsonProperty(value = JSON_PROPERTY_BLOCKED_MEDIA_FOLDERS)
    public void setBlockedMediaFolders(@org.eclipse.jdt.annotation.Nullable List<UUID> blockedMediaFolders) {
        this.blockedMediaFolders = blockedMediaFolders;
    }

    public UserPolicy blockedChannels(@org.eclipse.jdt.annotation.Nullable List<UUID> blockedChannels) {
        this.blockedChannels = blockedChannels;
        return this;
    }

    public UserPolicy addBlockedChannelsItem(UUID blockedChannelsItem) {
        if (this.blockedChannels == null) {
            this.blockedChannels = new ArrayList<>();
        }
        this.blockedChannels.add(blockedChannelsItem);
        return this;
    }

    /**
     * Get blockedChannels
     * 
     * @return blockedChannels
     */
    @JsonProperty(value = JSON_PROPERTY_BLOCKED_CHANNELS)
    public @org.eclipse.jdt.annotation.Nullable List<UUID> getBlockedChannels() {
        return blockedChannels;
    }

    @JsonProperty(value = JSON_PROPERTY_BLOCKED_CHANNELS)
    public void setBlockedChannels(@org.eclipse.jdt.annotation.Nullable List<UUID> blockedChannels) {
        this.blockedChannels = blockedChannels;
    }

    public UserPolicy remoteClientBitrateLimit(@org.eclipse.jdt.annotation.Nullable Integer remoteClientBitrateLimit) {
        this.remoteClientBitrateLimit = remoteClientBitrateLimit;
        return this;
    }

    /**
     * Get remoteClientBitrateLimit
     * 
     * @return remoteClientBitrateLimit
     */
    @JsonProperty(value = JSON_PROPERTY_REMOTE_CLIENT_BITRATE_LIMIT)
    public @org.eclipse.jdt.annotation.Nullable Integer getRemoteClientBitrateLimit() {
        return remoteClientBitrateLimit;
    }

    @JsonProperty(value = JSON_PROPERTY_REMOTE_CLIENT_BITRATE_LIMIT)
    public void setRemoteClientBitrateLimit(@org.eclipse.jdt.annotation.Nullable Integer remoteClientBitrateLimit) {
        this.remoteClientBitrateLimit = remoteClientBitrateLimit;
    }

    public UserPolicy authenticationProviderId(@org.eclipse.jdt.annotation.NonNull String authenticationProviderId) {
        this.authenticationProviderId = authenticationProviderId;
        return this;
    }

    /**
     * Get authenticationProviderId
     * 
     * @return authenticationProviderId
     */
    @JsonProperty(value = JSON_PROPERTY_AUTHENTICATION_PROVIDER_ID, required = true)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public @org.eclipse.jdt.annotation.Nullable String getAuthenticationProviderId() {
        return authenticationProviderId;
    }

    @JsonProperty(value = JSON_PROPERTY_AUTHENTICATION_PROVIDER_ID, required = true)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public void setAuthenticationProviderId(@org.eclipse.jdt.annotation.NonNull String authenticationProviderId) {
        this.authenticationProviderId = authenticationProviderId;
    }

    public UserPolicy passwordResetProviderId(@org.eclipse.jdt.annotation.NonNull String passwordResetProviderId) {
        this.passwordResetProviderId = passwordResetProviderId;
        return this;
    }

    /**
     * Get passwordResetProviderId
     * 
     * @return passwordResetProviderId
     */
    @JsonProperty(value = JSON_PROPERTY_PASSWORD_RESET_PROVIDER_ID, required = true)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public @org.eclipse.jdt.annotation.Nullable String getPasswordResetProviderId() {
        return passwordResetProviderId;
    }

    @JsonProperty(value = JSON_PROPERTY_PASSWORD_RESET_PROVIDER_ID, required = true)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public void setPasswordResetProviderId(@org.eclipse.jdt.annotation.NonNull String passwordResetProviderId) {
        this.passwordResetProviderId = passwordResetProviderId;
    }

    public UserPolicy syncPlayAccess(@org.eclipse.jdt.annotation.Nullable SyncPlayUserAccessType syncPlayAccess) {
        this.syncPlayAccess = syncPlayAccess;
        return this;
    }

    /**
     * Gets or sets a value indicating what SyncPlay features the user can access.
     * 
     * @return syncPlayAccess
     */
    @JsonProperty(value = JSON_PROPERTY_SYNC_PLAY_ACCESS)
    public @org.eclipse.jdt.annotation.Nullable SyncPlayUserAccessType getSyncPlayAccess() {
        return syncPlayAccess;
    }

    @JsonProperty(value = JSON_PROPERTY_SYNC_PLAY_ACCESS)
    public void setSyncPlayAccess(@org.eclipse.jdt.annotation.Nullable SyncPlayUserAccessType syncPlayAccess) {
        this.syncPlayAccess = syncPlayAccess;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        UserPolicy userPolicy = (UserPolicy) o;
        return Objects.equals(this.isAdministrator, userPolicy.isAdministrator)
                && Objects.equals(this.isHidden, userPolicy.isHidden)
                && Objects.equals(this.enableCollectionManagement, userPolicy.enableCollectionManagement)
                && Objects.equals(this.enableSubtitleManagement, userPolicy.enableSubtitleManagement)
                && Objects.equals(this.enableLyricManagement, userPolicy.enableLyricManagement)
                && Objects.equals(this.isDisabled, userPolicy.isDisabled)
                && Objects.equals(this.maxParentalRating, userPolicy.maxParentalRating)
                && Objects.equals(this.maxParentalSubRating, userPolicy.maxParentalSubRating)
                && Objects.equals(this.blockedTags, userPolicy.blockedTags)
                && Objects.equals(this.allowedTags, userPolicy.allowedTags)
                && Objects.equals(this.enableUserPreferenceAccess, userPolicy.enableUserPreferenceAccess)
                && Objects.equals(this.accessSchedules, userPolicy.accessSchedules)
                && Objects.equals(this.blockUnratedItems, userPolicy.blockUnratedItems)
                && Objects.equals(this.enableRemoteControlOfOtherUsers, userPolicy.enableRemoteControlOfOtherUsers)
                && Objects.equals(this.enableSharedDeviceControl, userPolicy.enableSharedDeviceControl)
                && Objects.equals(this.enableRemoteAccess, userPolicy.enableRemoteAccess)
                && Objects.equals(this.enableLiveTvManagement, userPolicy.enableLiveTvManagement)
                && Objects.equals(this.enableLiveTvAccess, userPolicy.enableLiveTvAccess)
                && Objects.equals(this.enableMediaPlayback, userPolicy.enableMediaPlayback)
                && Objects.equals(this.enableAudioPlaybackTranscoding, userPolicy.enableAudioPlaybackTranscoding)
                && Objects.equals(this.enableVideoPlaybackTranscoding, userPolicy.enableVideoPlaybackTranscoding)
                && Objects.equals(this.enablePlaybackRemuxing, userPolicy.enablePlaybackRemuxing)
                && Objects.equals(this.forceRemoteSourceTranscoding, userPolicy.forceRemoteSourceTranscoding)
                && Objects.equals(this.enableContentDeletion, userPolicy.enableContentDeletion)
                && Objects.equals(this.enableContentDeletionFromFolders, userPolicy.enableContentDeletionFromFolders)
                && Objects.equals(this.enableContentDownloading, userPolicy.enableContentDownloading)
                && Objects.equals(this.enableSyncTranscoding, userPolicy.enableSyncTranscoding)
                && Objects.equals(this.enableMediaConversion, userPolicy.enableMediaConversion)
                && Objects.equals(this.enabledDevices, userPolicy.enabledDevices)
                && Objects.equals(this.enableAllDevices, userPolicy.enableAllDevices)
                && Objects.equals(this.enabledChannels, userPolicy.enabledChannels)
                && Objects.equals(this.enableAllChannels, userPolicy.enableAllChannels)
                && Objects.equals(this.enabledFolders, userPolicy.enabledFolders)
                && Objects.equals(this.enableAllFolders, userPolicy.enableAllFolders)
                && Objects.equals(this.invalidLoginAttemptCount, userPolicy.invalidLoginAttemptCount)
                && Objects.equals(this.loginAttemptsBeforeLockout, userPolicy.loginAttemptsBeforeLockout)
                && Objects.equals(this.maxActiveSessions, userPolicy.maxActiveSessions)
                && Objects.equals(this.enablePublicSharing, userPolicy.enablePublicSharing)
                && Objects.equals(this.blockedMediaFolders, userPolicy.blockedMediaFolders)
                && Objects.equals(this.blockedChannels, userPolicy.blockedChannels)
                && Objects.equals(this.remoteClientBitrateLimit, userPolicy.remoteClientBitrateLimit)
                && Objects.equals(this.authenticationProviderId, userPolicy.authenticationProviderId)
                && Objects.equals(this.passwordResetProviderId, userPolicy.passwordResetProviderId)
                && Objects.equals(this.syncPlayAccess, userPolicy.syncPlayAccess);
    }

    @Override
    public int hashCode() {
        return Objects.hash(isAdministrator, isHidden, enableCollectionManagement, enableSubtitleManagement,
                enableLyricManagement, isDisabled, maxParentalRating, maxParentalSubRating, blockedTags, allowedTags,
                enableUserPreferenceAccess, accessSchedules, blockUnratedItems, enableRemoteControlOfOtherUsers,
                enableSharedDeviceControl, enableRemoteAccess, enableLiveTvManagement, enableLiveTvAccess,
                enableMediaPlayback, enableAudioPlaybackTranscoding, enableVideoPlaybackTranscoding,
                enablePlaybackRemuxing, forceRemoteSourceTranscoding, enableContentDeletion,
                enableContentDeletionFromFolders, enableContentDownloading, enableSyncTranscoding,
                enableMediaConversion, enabledDevices, enableAllDevices, enabledChannels, enableAllChannels,
                enabledFolders, enableAllFolders, invalidLoginAttemptCount, loginAttemptsBeforeLockout,
                maxActiveSessions, enablePublicSharing, blockedMediaFolders, blockedChannels, remoteClientBitrateLimit,
                authenticationProviderId, passwordResetProviderId, syncPlayAccess);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class UserPolicy {\n");
        sb.append("    isAdministrator: ").append(toIndentedString(isAdministrator)).append("\n");
        sb.append("    isHidden: ").append(toIndentedString(isHidden)).append("\n");
        sb.append("    enableCollectionManagement: ").append(toIndentedString(enableCollectionManagement)).append("\n");
        sb.append("    enableSubtitleManagement: ").append(toIndentedString(enableSubtitleManagement)).append("\n");
        sb.append("    enableLyricManagement: ").append(toIndentedString(enableLyricManagement)).append("\n");
        sb.append("    isDisabled: ").append(toIndentedString(isDisabled)).append("\n");
        sb.append("    maxParentalRating: ").append(toIndentedString(maxParentalRating)).append("\n");
        sb.append("    maxParentalSubRating: ").append(toIndentedString(maxParentalSubRating)).append("\n");
        sb.append("    blockedTags: ").append(toIndentedString(blockedTags)).append("\n");
        sb.append("    allowedTags: ").append(toIndentedString(allowedTags)).append("\n");
        sb.append("    enableUserPreferenceAccess: ").append(toIndentedString(enableUserPreferenceAccess)).append("\n");
        sb.append("    accessSchedules: ").append(toIndentedString(accessSchedules)).append("\n");
        sb.append("    blockUnratedItems: ").append(toIndentedString(blockUnratedItems)).append("\n");
        sb.append("    enableRemoteControlOfOtherUsers: ").append(toIndentedString(enableRemoteControlOfOtherUsers))
                .append("\n");
        sb.append("    enableSharedDeviceControl: ").append(toIndentedString(enableSharedDeviceControl)).append("\n");
        sb.append("    enableRemoteAccess: ").append(toIndentedString(enableRemoteAccess)).append("\n");
        sb.append("    enableLiveTvManagement: ").append(toIndentedString(enableLiveTvManagement)).append("\n");
        sb.append("    enableLiveTvAccess: ").append(toIndentedString(enableLiveTvAccess)).append("\n");
        sb.append("    enableMediaPlayback: ").append(toIndentedString(enableMediaPlayback)).append("\n");
        sb.append("    enableAudioPlaybackTranscoding: ").append(toIndentedString(enableAudioPlaybackTranscoding))
                .append("\n");
        sb.append("    enableVideoPlaybackTranscoding: ").append(toIndentedString(enableVideoPlaybackTranscoding))
                .append("\n");
        sb.append("    enablePlaybackRemuxing: ").append(toIndentedString(enablePlaybackRemuxing)).append("\n");
        sb.append("    forceRemoteSourceTranscoding: ").append(toIndentedString(forceRemoteSourceTranscoding))
                .append("\n");
        sb.append("    enableContentDeletion: ").append(toIndentedString(enableContentDeletion)).append("\n");
        sb.append("    enableContentDeletionFromFolders: ").append(toIndentedString(enableContentDeletionFromFolders))
                .append("\n");
        sb.append("    enableContentDownloading: ").append(toIndentedString(enableContentDownloading)).append("\n");
        sb.append("    enableSyncTranscoding: ").append(toIndentedString(enableSyncTranscoding)).append("\n");
        sb.append("    enableMediaConversion: ").append(toIndentedString(enableMediaConversion)).append("\n");
        sb.append("    enabledDevices: ").append(toIndentedString(enabledDevices)).append("\n");
        sb.append("    enableAllDevices: ").append(toIndentedString(enableAllDevices)).append("\n");
        sb.append("    enabledChannels: ").append(toIndentedString(enabledChannels)).append("\n");
        sb.append("    enableAllChannels: ").append(toIndentedString(enableAllChannels)).append("\n");
        sb.append("    enabledFolders: ").append(toIndentedString(enabledFolders)).append("\n");
        sb.append("    enableAllFolders: ").append(toIndentedString(enableAllFolders)).append("\n");
        sb.append("    invalidLoginAttemptCount: ").append(toIndentedString(invalidLoginAttemptCount)).append("\n");
        sb.append("    loginAttemptsBeforeLockout: ").append(toIndentedString(loginAttemptsBeforeLockout)).append("\n");
        sb.append("    maxActiveSessions: ").append(toIndentedString(maxActiveSessions)).append("\n");
        sb.append("    enablePublicSharing: ").append(toIndentedString(enablePublicSharing)).append("\n");
        sb.append("    blockedMediaFolders: ").append(toIndentedString(blockedMediaFolders)).append("\n");
        sb.append("    blockedChannels: ").append(toIndentedString(blockedChannels)).append("\n");
        sb.append("    remoteClientBitrateLimit: ").append(toIndentedString(remoteClientBitrateLimit)).append("\n");
        sb.append("    authenticationProviderId: ").append(toIndentedString(authenticationProviderId)).append("\n");
        sb.append("    passwordResetProviderId: ").append(toIndentedString(passwordResetProviderId)).append("\n");
        sb.append("    syncPlayAccess: ").append(toIndentedString(syncPlayAccess)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(Object o) {
        return o == null ? "null" : o.toString().replace("\n", "\n    ");
    }

    /**
     * Convert the instance into URL query string.
     *
     * @return URL query string
     */
    public String toUrlQueryString() {
        return toUrlQueryString(null);
    }

    /**
     * Convert the instance into URL query string.
     *
     * @param prefix prefix of the query string
     * @return URL query string
     */
    public String toUrlQueryString(String prefix) {
        String suffix = "";
        String containerSuffix = "";
        String containerPrefix = "";
        if (prefix == null) {
            // style=form, explode=true, e.g. /pet?name=cat&type=manx
            prefix = "";
        } else {
            // deepObject style e.g. /pet?id[name]=cat&id[type]=manx
            prefix = prefix + "[";
            suffix = "]";
            containerSuffix = "]";
            containerPrefix = "[";
        }

        StringJoiner joiner = new StringJoiner("&");

        // add `IsAdministrator` to the URL query string
        if (getIsAdministrator() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sIsAdministrator%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getIsAdministrator()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `IsHidden` to the URL query string
        if (getIsHidden() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sIsHidden%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getIsHidden()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableCollectionManagement` to the URL query string
        if (getEnableCollectionManagement() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableCollectionManagement%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableCollectionManagement()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableSubtitleManagement` to the URL query string
        if (getEnableSubtitleManagement() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableSubtitleManagement%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableSubtitleManagement()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableLyricManagement` to the URL query string
        if (getEnableLyricManagement() != null) {
            try {
                joiner.add(
                        String.format(java.util.Locale.ROOT, "%sEnableLyricManagement%s=%s", prefix, suffix, URLEncoder
                                .encode(String.valueOf(getEnableLyricManagement()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `IsDisabled` to the URL query string
        if (getIsDisabled() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sIsDisabled%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getIsDisabled()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `MaxParentalRating` to the URL query string
        if (getMaxParentalRating() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sMaxParentalRating%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getMaxParentalRating()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `MaxParentalSubRating` to the URL query string
        if (getMaxParentalSubRating() != null) {
            try {
                joiner.add(
                        String.format(java.util.Locale.ROOT, "%sMaxParentalSubRating%s=%s", prefix, suffix, URLEncoder
                                .encode(String.valueOf(getMaxParentalSubRating()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `BlockedTags` to the URL query string
        if (getBlockedTags() != null) {
            for (int i = 0; i < getBlockedTags().size(); i++) {
                try {
                    joiner.add(String.format(java.util.Locale.ROOT, "%sBlockedTags%s%s=%s", prefix, suffix,
                            "".equals(suffix) ? ""
                                    : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i,
                                            containerSuffix),
                            URLEncoder.encode(String.valueOf(getBlockedTags().get(i)), "UTF-8").replaceAll("\\+",
                                    "%20")));
                } catch (UnsupportedEncodingException e) {
                    // Should never happen, UTF-8 is always supported
                    throw new RuntimeException(e);
                }
            }
        }

        // add `AllowedTags` to the URL query string
        if (getAllowedTags() != null) {
            for (int i = 0; i < getAllowedTags().size(); i++) {
                try {
                    joiner.add(String.format(java.util.Locale.ROOT, "%sAllowedTags%s%s=%s", prefix, suffix,
                            "".equals(suffix) ? ""
                                    : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i,
                                            containerSuffix),
                            URLEncoder.encode(String.valueOf(getAllowedTags().get(i)), "UTF-8").replaceAll("\\+",
                                    "%20")));
                } catch (UnsupportedEncodingException e) {
                    // Should never happen, UTF-8 is always supported
                    throw new RuntimeException(e);
                }
            }
        }

        // add `EnableUserPreferenceAccess` to the URL query string
        if (getEnableUserPreferenceAccess() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableUserPreferenceAccess%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableUserPreferenceAccess()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `AccessSchedules` to the URL query string
        if (getAccessSchedules() != null) {
            for (int i = 0; i < getAccessSchedules().size(); i++) {
                if (getAccessSchedules().get(i) != null) {
                    joiner.add(getAccessSchedules().get(i).toUrlQueryString(
                            String.format(java.util.Locale.ROOT, "%sAccessSchedules%s%s", prefix, suffix,
                                    "".equals(suffix) ? ""
                                            : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i,
                                                    containerSuffix))));
                }
            }
        }

        // add `BlockUnratedItems` to the URL query string
        if (getBlockUnratedItems() != null) {
            for (int i = 0; i < getBlockUnratedItems().size(); i++) {
                if (getBlockUnratedItems().get(i) != null) {
                    try {
                        joiner.add(String.format(java.util.Locale.ROOT, "%sBlockUnratedItems%s%s=%s", prefix, suffix,
                                "".equals(suffix) ? ""
                                        : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i,
                                                containerSuffix),
                                URLEncoder.encode(String.valueOf(getBlockUnratedItems().get(i)), "UTF-8")
                                        .replaceAll("\\+", "%20")));
                    } catch (UnsupportedEncodingException e) {
                        // Should never happen, UTF-8 is always supported
                        throw new RuntimeException(e);
                    }
                }
            }
        }

        // add `EnableRemoteControlOfOtherUsers` to the URL query string
        if (getEnableRemoteControlOfOtherUsers() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableRemoteControlOfOtherUsers%s=%s", prefix,
                        suffix, URLEncoder.encode(String.valueOf(getEnableRemoteControlOfOtherUsers()), "UTF-8")
                                .replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableSharedDeviceControl` to the URL query string
        if (getEnableSharedDeviceControl() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableSharedDeviceControl%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableSharedDeviceControl()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableRemoteAccess` to the URL query string
        if (getEnableRemoteAccess() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableRemoteAccess%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableRemoteAccess()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableLiveTvManagement` to the URL query string
        if (getEnableLiveTvManagement() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableLiveTvManagement%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableLiveTvManagement()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableLiveTvAccess` to the URL query string
        if (getEnableLiveTvAccess() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableLiveTvAccess%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableLiveTvAccess()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableMediaPlayback` to the URL query string
        if (getEnableMediaPlayback() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableMediaPlayback%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableMediaPlayback()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableAudioPlaybackTranscoding` to the URL query string
        if (getEnableAudioPlaybackTranscoding() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableAudioPlaybackTranscoding%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableAudioPlaybackTranscoding()), "UTF-8")
                                .replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableVideoPlaybackTranscoding` to the URL query string
        if (getEnableVideoPlaybackTranscoding() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableVideoPlaybackTranscoding%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableVideoPlaybackTranscoding()), "UTF-8")
                                .replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnablePlaybackRemuxing` to the URL query string
        if (getEnablePlaybackRemuxing() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnablePlaybackRemuxing%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnablePlaybackRemuxing()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `ForceRemoteSourceTranscoding` to the URL query string
        if (getForceRemoteSourceTranscoding() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sForceRemoteSourceTranscoding%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getForceRemoteSourceTranscoding()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableContentDeletion` to the URL query string
        if (getEnableContentDeletion() != null) {
            try {
                joiner.add(
                        String.format(java.util.Locale.ROOT, "%sEnableContentDeletion%s=%s", prefix, suffix, URLEncoder
                                .encode(String.valueOf(getEnableContentDeletion()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableContentDeletionFromFolders` to the URL query string
        if (getEnableContentDeletionFromFolders() != null) {
            for (int i = 0; i < getEnableContentDeletionFromFolders().size(); i++) {
                try {
                    joiner.add(String.format(java.util.Locale.ROOT, "%sEnableContentDeletionFromFolders%s%s=%s", prefix,
                            suffix,
                            "".equals(suffix) ? ""
                                    : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i,
                                            containerSuffix),
                            URLEncoder.encode(String.valueOf(getEnableContentDeletionFromFolders().get(i)), "UTF-8")
                                    .replaceAll("\\+", "%20")));
                } catch (UnsupportedEncodingException e) {
                    // Should never happen, UTF-8 is always supported
                    throw new RuntimeException(e);
                }
            }
        }

        // add `EnableContentDownloading` to the URL query string
        if (getEnableContentDownloading() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableContentDownloading%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableContentDownloading()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableSyncTranscoding` to the URL query string
        if (getEnableSyncTranscoding() != null) {
            try {
                joiner.add(
                        String.format(java.util.Locale.ROOT, "%sEnableSyncTranscoding%s=%s", prefix, suffix, URLEncoder
                                .encode(String.valueOf(getEnableSyncTranscoding()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnableMediaConversion` to the URL query string
        if (getEnableMediaConversion() != null) {
            try {
                joiner.add(
                        String.format(java.util.Locale.ROOT, "%sEnableMediaConversion%s=%s", prefix, suffix, URLEncoder
                                .encode(String.valueOf(getEnableMediaConversion()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnabledDevices` to the URL query string
        if (getEnabledDevices() != null) {
            for (int i = 0; i < getEnabledDevices().size(); i++) {
                try {
                    joiner.add(String.format(java.util.Locale.ROOT, "%sEnabledDevices%s%s=%s", prefix, suffix,
                            "".equals(suffix) ? ""
                                    : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i,
                                            containerSuffix),
                            URLEncoder.encode(String.valueOf(getEnabledDevices().get(i)), "UTF-8").replaceAll("\\+",
                                    "%20")));
                } catch (UnsupportedEncodingException e) {
                    // Should never happen, UTF-8 is always supported
                    throw new RuntimeException(e);
                }
            }
        }

        // add `EnableAllDevices` to the URL query string
        if (getEnableAllDevices() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableAllDevices%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableAllDevices()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnabledChannels` to the URL query string
        if (getEnabledChannels() != null) {
            for (int i = 0; i < getEnabledChannels().size(); i++) {
                if (getEnabledChannels().get(i) != null) {
                    try {
                        joiner.add(String.format(java.util.Locale.ROOT, "%sEnabledChannels%s%s=%s", prefix, suffix,
                                "".equals(suffix) ? ""
                                        : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i,
                                                containerSuffix),
                                URLEncoder.encode(String.valueOf(getEnabledChannels().get(i)), "UTF-8")
                                        .replaceAll("\\+", "%20")));
                    } catch (UnsupportedEncodingException e) {
                        // Should never happen, UTF-8 is always supported
                        throw new RuntimeException(e);
                    }
                }
            }
        }

        // add `EnableAllChannels` to the URL query string
        if (getEnableAllChannels() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableAllChannels%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableAllChannels()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnabledFolders` to the URL query string
        if (getEnabledFolders() != null) {
            for (int i = 0; i < getEnabledFolders().size(); i++) {
                if (getEnabledFolders().get(i) != null) {
                    try {
                        joiner.add(String.format(java.util.Locale.ROOT, "%sEnabledFolders%s%s=%s", prefix, suffix,
                                "".equals(suffix) ? ""
                                        : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i,
                                                containerSuffix),
                                URLEncoder.encode(String.valueOf(getEnabledFolders().get(i)), "UTF-8").replaceAll("\\+",
                                        "%20")));
                    } catch (UnsupportedEncodingException e) {
                        // Should never happen, UTF-8 is always supported
                        throw new RuntimeException(e);
                    }
                }
            }
        }

        // add `EnableAllFolders` to the URL query string
        if (getEnableAllFolders() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnableAllFolders%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnableAllFolders()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `InvalidLoginAttemptCount` to the URL query string
        if (getInvalidLoginAttemptCount() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sInvalidLoginAttemptCount%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getInvalidLoginAttemptCount()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `LoginAttemptsBeforeLockout` to the URL query string
        if (getLoginAttemptsBeforeLockout() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sLoginAttemptsBeforeLockout%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getLoginAttemptsBeforeLockout()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `MaxActiveSessions` to the URL query string
        if (getMaxActiveSessions() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sMaxActiveSessions%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getMaxActiveSessions()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `EnablePublicSharing` to the URL query string
        if (getEnablePublicSharing() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sEnablePublicSharing%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getEnablePublicSharing()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `BlockedMediaFolders` to the URL query string
        if (getBlockedMediaFolders() != null) {
            for (int i = 0; i < getBlockedMediaFolders().size(); i++) {
                if (getBlockedMediaFolders().get(i) != null) {
                    try {
                        joiner.add(String.format(java.util.Locale.ROOT, "%sBlockedMediaFolders%s%s=%s", prefix, suffix,
                                "".equals(suffix) ? ""
                                        : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i,
                                                containerSuffix),
                                URLEncoder.encode(String.valueOf(getBlockedMediaFolders().get(i)), "UTF-8")
                                        .replaceAll("\\+", "%20")));
                    } catch (UnsupportedEncodingException e) {
                        // Should never happen, UTF-8 is always supported
                        throw new RuntimeException(e);
                    }
                }
            }
        }

        // add `BlockedChannels` to the URL query string
        if (getBlockedChannels() != null) {
            for (int i = 0; i < getBlockedChannels().size(); i++) {
                if (getBlockedChannels().get(i) != null) {
                    try {
                        joiner.add(String.format(java.util.Locale.ROOT, "%sBlockedChannels%s%s=%s", prefix, suffix,
                                "".equals(suffix) ? ""
                                        : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i,
                                                containerSuffix),
                                URLEncoder.encode(String.valueOf(getBlockedChannels().get(i)), "UTF-8")
                                        .replaceAll("\\+", "%20")));
                    } catch (UnsupportedEncodingException e) {
                        // Should never happen, UTF-8 is always supported
                        throw new RuntimeException(e);
                    }
                }
            }
        }

        // add `RemoteClientBitrateLimit` to the URL query string
        if (getRemoteClientBitrateLimit() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sRemoteClientBitrateLimit%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getRemoteClientBitrateLimit()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `AuthenticationProviderId` to the URL query string
        if (getAuthenticationProviderId() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sAuthenticationProviderId%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getAuthenticationProviderId()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `PasswordResetProviderId` to the URL query string
        if (getPasswordResetProviderId() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sPasswordResetProviderId%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getPasswordResetProviderId()), "UTF-8").replaceAll("\\+",
                                "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        // add `SyncPlayAccess` to the URL query string
        if (getSyncPlayAccess() != null) {
            try {
                joiner.add(String.format(java.util.Locale.ROOT, "%sSyncPlayAccess%s=%s", prefix, suffix,
                        URLEncoder.encode(String.valueOf(getSyncPlayAccess()), "UTF-8").replaceAll("\\+", "%20")));
            } catch (UnsupportedEncodingException e) {
                // Should never happen, UTF-8 is always supported
                throw new RuntimeException(e);
            }
        }

        return joiner.toString();
    }

    public static class Builder {

        private UserPolicy instance;

        public Builder() {
            this(new UserPolicy());
        }

        protected Builder(UserPolicy instance) {
            this.instance = instance;
        }

        public UserPolicy.Builder isAdministrator(Boolean isAdministrator) {
            this.instance.isAdministrator = isAdministrator;
            return this;
        }

        public UserPolicy.Builder isHidden(Boolean isHidden) {
            this.instance.isHidden = isHidden;
            return this;
        }

        public UserPolicy.Builder enableCollectionManagement(Boolean enableCollectionManagement) {
            this.instance.enableCollectionManagement = enableCollectionManagement;
            return this;
        }

        public UserPolicy.Builder enableSubtitleManagement(Boolean enableSubtitleManagement) {
            this.instance.enableSubtitleManagement = enableSubtitleManagement;
            return this;
        }

        public UserPolicy.Builder enableLyricManagement(Boolean enableLyricManagement) {
            this.instance.enableLyricManagement = enableLyricManagement;
            return this;
        }

        public UserPolicy.Builder isDisabled(Boolean isDisabled) {
            this.instance.isDisabled = isDisabled;
            return this;
        }

        public UserPolicy.Builder maxParentalRating(Integer maxParentalRating) {
            this.instance.maxParentalRating = maxParentalRating;
            return this;
        }

        public UserPolicy.Builder maxParentalSubRating(Integer maxParentalSubRating) {
            this.instance.maxParentalSubRating = maxParentalSubRating;
            return this;
        }

        public UserPolicy.Builder blockedTags(List<String> blockedTags) {
            this.instance.blockedTags = blockedTags;
            return this;
        }

        public UserPolicy.Builder allowedTags(List<String> allowedTags) {
            this.instance.allowedTags = allowedTags;
            return this;
        }

        public UserPolicy.Builder enableUserPreferenceAccess(Boolean enableUserPreferenceAccess) {
            this.instance.enableUserPreferenceAccess = enableUserPreferenceAccess;
            return this;
        }

        public UserPolicy.Builder accessSchedules(List<AccessSchedule> accessSchedules) {
            this.instance.accessSchedules = accessSchedules;
            return this;
        }

        public UserPolicy.Builder blockUnratedItems(List<UnratedItem> blockUnratedItems) {
            this.instance.blockUnratedItems = blockUnratedItems;
            return this;
        }

        public UserPolicy.Builder enableRemoteControlOfOtherUsers(Boolean enableRemoteControlOfOtherUsers) {
            this.instance.enableRemoteControlOfOtherUsers = enableRemoteControlOfOtherUsers;
            return this;
        }

        public UserPolicy.Builder enableSharedDeviceControl(Boolean enableSharedDeviceControl) {
            this.instance.enableSharedDeviceControl = enableSharedDeviceControl;
            return this;
        }

        public UserPolicy.Builder enableRemoteAccess(Boolean enableRemoteAccess) {
            this.instance.enableRemoteAccess = enableRemoteAccess;
            return this;
        }

        public UserPolicy.Builder enableLiveTvManagement(Boolean enableLiveTvManagement) {
            this.instance.enableLiveTvManagement = enableLiveTvManagement;
            return this;
        }

        public UserPolicy.Builder enableLiveTvAccess(Boolean enableLiveTvAccess) {
            this.instance.enableLiveTvAccess = enableLiveTvAccess;
            return this;
        }

        public UserPolicy.Builder enableMediaPlayback(Boolean enableMediaPlayback) {
            this.instance.enableMediaPlayback = enableMediaPlayback;
            return this;
        }

        public UserPolicy.Builder enableAudioPlaybackTranscoding(Boolean enableAudioPlaybackTranscoding) {
            this.instance.enableAudioPlaybackTranscoding = enableAudioPlaybackTranscoding;
            return this;
        }

        public UserPolicy.Builder enableVideoPlaybackTranscoding(Boolean enableVideoPlaybackTranscoding) {
            this.instance.enableVideoPlaybackTranscoding = enableVideoPlaybackTranscoding;
            return this;
        }

        public UserPolicy.Builder enablePlaybackRemuxing(Boolean enablePlaybackRemuxing) {
            this.instance.enablePlaybackRemuxing = enablePlaybackRemuxing;
            return this;
        }

        public UserPolicy.Builder forceRemoteSourceTranscoding(Boolean forceRemoteSourceTranscoding) {
            this.instance.forceRemoteSourceTranscoding = forceRemoteSourceTranscoding;
            return this;
        }

        public UserPolicy.Builder enableContentDeletion(Boolean enableContentDeletion) {
            this.instance.enableContentDeletion = enableContentDeletion;
            return this;
        }

        public UserPolicy.Builder enableContentDeletionFromFolders(List<String> enableContentDeletionFromFolders) {
            this.instance.enableContentDeletionFromFolders = enableContentDeletionFromFolders;
            return this;
        }

        public UserPolicy.Builder enableContentDownloading(Boolean enableContentDownloading) {
            this.instance.enableContentDownloading = enableContentDownloading;
            return this;
        }

        public UserPolicy.Builder enableSyncTranscoding(Boolean enableSyncTranscoding) {
            this.instance.enableSyncTranscoding = enableSyncTranscoding;
            return this;
        }

        public UserPolicy.Builder enableMediaConversion(Boolean enableMediaConversion) {
            this.instance.enableMediaConversion = enableMediaConversion;
            return this;
        }

        public UserPolicy.Builder enabledDevices(List<String> enabledDevices) {
            this.instance.enabledDevices = enabledDevices;
            return this;
        }

        public UserPolicy.Builder enableAllDevices(Boolean enableAllDevices) {
            this.instance.enableAllDevices = enableAllDevices;
            return this;
        }

        public UserPolicy.Builder enabledChannels(List<UUID> enabledChannels) {
            this.instance.enabledChannels = enabledChannels;
            return this;
        }

        public UserPolicy.Builder enableAllChannels(Boolean enableAllChannels) {
            this.instance.enableAllChannels = enableAllChannels;
            return this;
        }

        public UserPolicy.Builder enabledFolders(List<UUID> enabledFolders) {
            this.instance.enabledFolders = enabledFolders;
            return this;
        }

        public UserPolicy.Builder enableAllFolders(Boolean enableAllFolders) {
            this.instance.enableAllFolders = enableAllFolders;
            return this;
        }

        public UserPolicy.Builder invalidLoginAttemptCount(Integer invalidLoginAttemptCount) {
            this.instance.invalidLoginAttemptCount = invalidLoginAttemptCount;
            return this;
        }

        public UserPolicy.Builder loginAttemptsBeforeLockout(Integer loginAttemptsBeforeLockout) {
            this.instance.loginAttemptsBeforeLockout = loginAttemptsBeforeLockout;
            return this;
        }

        public UserPolicy.Builder maxActiveSessions(Integer maxActiveSessions) {
            this.instance.maxActiveSessions = maxActiveSessions;
            return this;
        }

        public UserPolicy.Builder enablePublicSharing(Boolean enablePublicSharing) {
            this.instance.enablePublicSharing = enablePublicSharing;
            return this;
        }

        public UserPolicy.Builder blockedMediaFolders(List<UUID> blockedMediaFolders) {
            this.instance.blockedMediaFolders = blockedMediaFolders;
            return this;
        }

        public UserPolicy.Builder blockedChannels(List<UUID> blockedChannels) {
            this.instance.blockedChannels = blockedChannels;
            return this;
        }

        public UserPolicy.Builder remoteClientBitrateLimit(Integer remoteClientBitrateLimit) {
            this.instance.remoteClientBitrateLimit = remoteClientBitrateLimit;
            return this;
        }

        public UserPolicy.Builder authenticationProviderId(String authenticationProviderId) {
            this.instance.authenticationProviderId = authenticationProviderId;
            return this;
        }

        public UserPolicy.Builder passwordResetProviderId(String passwordResetProviderId) {
            this.instance.passwordResetProviderId = passwordResetProviderId;
            return this;
        }

        public UserPolicy.Builder syncPlayAccess(SyncPlayUserAccessType syncPlayAccess) {
            this.instance.syncPlayAccess = syncPlayAccess;
            return this;
        }

        /**
         * returns a built UserPolicy instance.
         *
         * The builder is not reusable.
         */
        public UserPolicy build() {
            try {
                return this.instance;
            } finally {
                // ensure that this.instance is not reused
                this.instance = null;
            }
        }

        @Override
        public String toString() {
            return getClass() + "=(" + instance + ")";
        }
    }

    /**
     * Create a builder with no initialized field.
     */
    public static UserPolicy.Builder builder() {
        return new UserPolicy.Builder();
    }

    /**
     * Create a builder with a shallow copy of this instance.
     */
    public UserPolicy.Builder toBuilder() {
        return new UserPolicy.Builder().isAdministrator(getIsAdministrator()).isHidden(getIsHidden())
                .enableCollectionManagement(getEnableCollectionManagement())
                .enableSubtitleManagement(getEnableSubtitleManagement())
                .enableLyricManagement(getEnableLyricManagement()).isDisabled(getIsDisabled())
                .maxParentalRating(getMaxParentalRating()).maxParentalSubRating(getMaxParentalSubRating())
                .blockedTags(getBlockedTags()).allowedTags(getAllowedTags())
                .enableUserPreferenceAccess(getEnableUserPreferenceAccess()).accessSchedules(getAccessSchedules())
                .blockUnratedItems(getBlockUnratedItems())
                .enableRemoteControlOfOtherUsers(getEnableRemoteControlOfOtherUsers())
                .enableSharedDeviceControl(getEnableSharedDeviceControl()).enableRemoteAccess(getEnableRemoteAccess())
                .enableLiveTvManagement(getEnableLiveTvManagement()).enableLiveTvAccess(getEnableLiveTvAccess())
                .enableMediaPlayback(getEnableMediaPlayback())
                .enableAudioPlaybackTranscoding(getEnableAudioPlaybackTranscoding())
                .enableVideoPlaybackTranscoding(getEnableVideoPlaybackTranscoding())
                .enablePlaybackRemuxing(getEnablePlaybackRemuxing())
                .forceRemoteSourceTranscoding(getForceRemoteSourceTranscoding())
                .enableContentDeletion(getEnableContentDeletion())
                .enableContentDeletionFromFolders(getEnableContentDeletionFromFolders())
                .enableContentDownloading(getEnableContentDownloading())
                .enableSyncTranscoding(getEnableSyncTranscoding()).enableMediaConversion(getEnableMediaConversion())
                .enabledDevices(getEnabledDevices()).enableAllDevices(getEnableAllDevices())
                .enabledChannels(getEnabledChannels()).enableAllChannels(getEnableAllChannels())
                .enabledFolders(getEnabledFolders()).enableAllFolders(getEnableAllFolders())
                .invalidLoginAttemptCount(getInvalidLoginAttemptCount())
                .loginAttemptsBeforeLockout(getLoginAttemptsBeforeLockout()).maxActiveSessions(getMaxActiveSessions())
                .enablePublicSharing(getEnablePublicSharing()).blockedMediaFolders(getBlockedMediaFolders())
                .blockedChannels(getBlockedChannels()).remoteClientBitrateLimit(getRemoteClientBitrateLimit())
                .authenticationProviderId(getAuthenticationProviderId())
                .passwordResetProviderId(getPasswordResetProviderId()).syncPlayAccess(getSyncPlayAccess());
    }
}
