mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 08:48:46 +02:00
ef4c5eb65e
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
26 lines
599 B
Scala
26 lines
599 B
Scala
package com.twitter.visibility.models
|
|
|
|
import com.twitter.guano.commons.thriftscala.PolicyInViolation
|
|
import com.twitter.spam.rtf.{thriftscala => s}
|
|
|
|
case class SafetyLabelMetadata(
|
|
policyInViolation: Option[PolicyInViolation] = None,
|
|
policyUrl: Option[String] = None) {
|
|
|
|
def toThrift: s.SafetyLabelMetadata = {
|
|
s.SafetyLabelMetadata(
|
|
policyInViolation,
|
|
policyUrl
|
|
)
|
|
}
|
|
}
|
|
|
|
object SafetyLabelMetadata {
|
|
def fromThrift(metadata: s.SafetyLabelMetadata): SafetyLabelMetadata = {
|
|
SafetyLabelMetadata(
|
|
metadata.policyInViolation,
|
|
metadata.policyUrl
|
|
)
|
|
}
|
|
}
|