/* tslint:disable */
/* eslint-disable */
/**
 * HumanLayer Daemon REST API
 * REST API for HumanLayer daemon operations, providing session management, approval workflows, and real-time event streaming capabilities.
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { mapValues } from '../runtime';
/**
 *
 * @export
 * @interface UpdateSessionRequest
 */
export interface UpdateSessionRequest {
    /**
     * Enable/disable auto-accept for edit tools
     * @type {boolean}
     * @memberof UpdateSessionRequest
     */
    autoAcceptEdits?: boolean;
    /**
     * Enable or disable dangerously skip permissions mode
     * @type {boolean}
     * @memberof UpdateSessionRequest
     */
    dangerouslySkipPermissions?: boolean;
    /**
     * Optional timeout in milliseconds for dangerously skip permissions mode
     * @type {number}
     * @memberof UpdateSessionRequest
     */
    dangerouslySkipPermissionsTimeoutMs?: number;
    /**
     * Archive/unarchive the session
     * @type {boolean}
     * @memberof UpdateSessionRequest
     */
    archived?: boolean;
    /**
     * Update session title
     * @type {string}
     * @memberof UpdateSessionRequest
     */
    title?: string;
}

/**
 * Check if a given object implements the UpdateSessionRequest interface.
 */
export function instanceOfUpdateSessionRequest(value: object): value is UpdateSessionRequest {
    return true;
}

export function UpdateSessionRequestFromJSON(json: any): UpdateSessionRequest {
    return UpdateSessionRequestFromJSONTyped(json, false);
}

export function UpdateSessionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSessionRequest {
    if (json == null) {
        return json;
    }
    return {

        'autoAcceptEdits': json['auto_accept_edits'] == null ? undefined : json['auto_accept_edits'],
        'dangerouslySkipPermissions': json['dangerously_skip_permissions'] == null ? undefined : json['dangerously_skip_permissions'],
        'dangerouslySkipPermissionsTimeoutMs': json['dangerously_skip_permissions_timeout_ms'] == null ? undefined : json['dangerously_skip_permissions_timeout_ms'],
        'archived': json['archived'] == null ? undefined : json['archived'],
        'title': json['title'] == null ? undefined : json['title'],
    };
}

export function UpdateSessionRequestToJSON(json: any): UpdateSessionRequest {
    return UpdateSessionRequestToJSONTyped(json, false);
}

export function UpdateSessionRequestToJSONTyped(value?: UpdateSessionRequest | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {

        'auto_accept_edits': value['autoAcceptEdits'],
        'dangerously_skip_permissions': value['dangerouslySkipPermissions'],
        'dangerously_skip_permissions_timeout_ms': value['dangerouslySkipPermissionsTimeoutMs'],
        'archived': value['archived'],
        'title': value['title'],
    };
}
