export default class ConnectionCode {
	readonly modelId: string;
	readonly sessionId: string;

	constructor(sessionId: string, modelId: string) {
		if (sessionId === null || sessionId === undefined) {
			throw new Error('cannot create connection without sessionId')
		}
		this.sessionId = sessionId;

		if (modelId === null || modelId === undefined) {
			throw new Error('cannot create connection without modelId')
		}
		this.modelId = modelId;
	}

	get code(): string {
		return this.sessionId + "$" + this.modelId;
	}
}
