
scala.googleapis.bigquery.JobListJob.scala Maven / Gradle / Ivy
package googleapis.bigquery
import io.circe._
import io.circe.syntax._
final case class JobListJob(
/** Running state of the job. When the state is DONE, errorResult can be checked to determine whether the job succeeded or failed.
*/
state: Option[String] = None,
/** Output only. Information about the job, including starting time and ending time of the job.
*/
statistics: Option[JobStatistics] = None,
/** [Full-projection-only] Email address of the user who ran the job.
*/
user_email: Option[String] = None,
/** A result object that will be present only if the job has failed.
*/
errorResult: Option[ErrorProto] = None,
/** [Full-projection-only] String representation of identity of requesting party. Populated for both first- and third-party identities. Only present for APIs that support third-party identities.
*/
principal_subject: Option[String] = None,
/** Unique opaque ID of the job.
*/
id: Option[String] = None,
/** [Full-projection-only] Describes the status of this job.
*/
status: Option[JobStatus] = None,
/** Required. Describes the job configuration.
*/
configuration: Option[JobConfiguration] = None,
/** The resource type.
*/
kind: Option[String] = None,
/** Unique opaque ID of the job.
*/
jobReference: Option[JobReference] = None,
)
object JobListJob {
implicit val encoder: Encoder[JobListJob] = Encoder.instance { x =>
Json.obj(
"state" := x.state,
"statistics" := x.statistics,
"user_email" := x.user_email,
"errorResult" := x.errorResult,
"principal_subject" := x.principal_subject,
"id" := x.id,
"status" := x.status,
"configuration" :=
x.configuration,
"kind" := x.kind,
"jobReference" := x.jobReference,
)
}
implicit val decoder: Decoder[JobListJob] = Decoder.instance { c =>
for {
v0 <- c.get[Option[String]]("state")
v1 <- c.get[Option[JobStatistics]]("statistics")
v2 <- c.get[Option[String]]("user_email")
v3 <- c.get[Option[ErrorProto]]("errorResult")
v4 <- c.get[Option[String]]("principal_subject")
v5 <- c.get[Option[String]]("id")
v6 <- c.get[Option[JobStatus]]("status")
v7 <- c.get[Option[JobConfiguration]]("configuration")
v8 <- c.get[Option[String]]("kind")
v9 <- c.get[Option[JobReference]]("jobReference")
} yield JobListJob(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy