summaryrefslogtreecommitdiffstats
path: root/application-model/src/main/scala/com/yahoo/vespa/applicationmodel/TenantId.scala
blob: 17e9d1f1c7a59709c095797f2da5d5d126a652b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.applicationmodel

import com.fasterxml.jackson.annotation.JsonValue

/**
 * @author bakksjo
 */
 // TODO: Remove this and use TenantName instead (if you need it for the JSON stuff move it to that layer and don't let it leak)
case class TenantId(s: String) {
  // Jackson's StdKeySerializer uses toString() (and ignores annotations) for objects used as Map keys.
  // Therefore, we use toString() as the JSON-producing method, which is really sad.
  @JsonValue
  override def toString(): String = s
}