package Ġcom . kr ill sson . sys api . graphql . domain Ċ Ċ import Ġcom . kr ill sson . sys api . core . domain . monitor . Mon itored Value Ċ import Ġcom . kr ill sson . sys api . core . monitoring . monitor s .* Ċ import Ġjava . time . Offset DateTime Ċ import Ġjava . util .* Ċ Ċ interface ĠMon itored Value Ċ Ċ data Ġclass ĠNum erical Value ( val Ġnumber : ĠLong ) Ġ: Ġcom . kr ill sson . sys api . graphql . domain . Mon itored Value Ċ data Ġclass ĠFraction al Value ( val Ġfraction : ĠFloat ) Ġ: Ġcom . kr ill sson . sys api . graphql . domain . Mon itored Value Ċ data Ġclass ĠConditional Value ( val Ġcondition : ĠBoolean ) Ġ: Ġcom . kr ill sson . sys api . graphql . domain . Mon itored Value Ċ Ċ data Ġclass ĠMon itored Value History Entry ( ĊĠĠĠ Ġval Ġdate : ĠOffset DateTime , ĊĠĠĠ Ġval Ġvalue : Ġcom . kr ill sson . sys api . graphql . domain . Mon itored Value Ċ ) Ċ Ċ data Ġclass ĠMonitor ( ĊĠĠĠ Ġval Ġid : ĠUUID , ĊĠĠĠ Ġval Ġin ertia InSeconds : ĠInt , ĊĠĠĠ Ġval Ġmon itored ItemId : ĠString ?, ĊĠĠĠ Ġval Ġthreshold : Ġcom . kr ill sson . sys api . graphql . domain . Mon itored Value , ĊĠĠĠ Ġval Ġtype : Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type Ċ ) Ċ Ċ fun Ġcom . kr ill sson . sys api . core . monitoring . Monitor < Mon itored Value >. as Monitor (): ĠMonitor Ġ{ ĊĠĠĠ Ġreturn ĠMonitor ( ĊĠĠĠĠĠĠĠ Ġid , ĊĠĠĠĠĠĠĠ Ġconfig . in ertia . seconds . toInt (), ĊĠĠĠĠĠĠĠ Ġconfig . mon itored ItemId , ĊĠĠĠĠĠĠĠ Ġconfig . threshold . as Mon itored Value (), ĊĠĠĠĠĠĠĠ Ġtype ĊĠĠĠ Ġ) Ċ } Ċ Ċ fun ĠMon itored Value . as Mon itored Value (): Ġcom . kr ill sson . sys api . graphql . domain . Mon itored Value Ġ{ ĊĠĠĠ Ġreturn Ġwhen ( this ) Ġ{ ĊĠĠĠĠĠĠĠ Ġis ĠMon itored Value . Conditional Value Ġ-> ĠConditional Value ( value ) ĊĠĠĠĠĠĠĠ Ġis ĠMon itored Value . Fraction al Value Ġ-> ĠFraction al Value ( value ) ĊĠĠĠĠĠĠĠ Ġis ĠMon itored Value . Num erical Value Ġ-> ĠNum erical Value ( value ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ object ĠSelect ors Ġ{ ĊĊĊĠĠĠ Ġfun Ġfor Conditional Monitor Type ( type : Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type ): ĠConditional Value Selector Ġ= Ġwhen Ġ( type ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . NETWORK _ UP Ġ-> ĠNetwork Up Monitor . selector ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . PROCESS _ EXISTS Ġ-> ĠProcess Exists Monitor . selector ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . CONNECT IVITY Ġ-> ĠConnect ivity Monitor . selector ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . EXTERNAL _ IP _ CHANGED Ġ-> ĠExternal Ip Changed Monitor . selector ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . CONTAINER _ RUNNING Ġ-> Ġthrow ĠIllegalArgumentException (" Use Ġfor Container Conditional Monitor () Ġmethod ") ĊĠĠĠĠĠĠĠ Ġelse Ġ-> Ġthrow ĠIllegalArgumentException ("$ type Ġis Ġa Ġ${ type . valueType } Ġtype ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġfor Num erical Monitor Type ( type : Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type ): ĠNum erical Value Selector Ġ= Ġwhen Ġ( type ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . CPU _ TEMP Ġ-> ĠC pu Temperature Monitor . selector ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . DRIVE _ SPACE Ġ-> ĠDrive Space Monitor . selector ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . DRIVE _ READ _ RATE Ġ-> ĠDrive Read Rate Monitor . selector ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . DRIVE _ WRITE _ RATE Ġ-> ĠDrive Write Rate Monitor . selector ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . MEMORY _ SPACE Ġ-> ĠMemory Space Monitor . selector ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . NETWORK _ UPLOAD _ RATE Ġ-> ĠNetwork Upload Rate Monitor . selector ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . NETWORK _ DOWNLOAD _ RATE Ġ-> ĠNetwork Download Rate Monitor . selector ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . PROCESS _ MEMORY _ SPACE Ġ-> ĠProcess Memory Monitor . selector ĊĠĠĠĠĠĠĠ Ġelse Ġ-> Ġthrow ĠIllegalArgumentException ("$ type Ġis Ġa Ġ${ type . valueType } Ġtype ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġfor Fraction al Monitor Type ( type : Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type ): ĠFraction al Value Selector Ġ= Ġwhen Ġ( type ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . CPU _ LOAD Ġ-> ĠC pu Monitor . selector ĊĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . PROCESS _ CPU _ LOAD Ġ-> ĠProcess Cpu Monitor . selector ĊĠĠĠĠĠĠĠ Ġelse Ġ-> Ġthrow ĠIllegalArgumentException ("$ type Ġis Ġa Ġ${ type . valueType } Ġtype ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġfor Container Conditional Monitor ( type : Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type ): ĠContainer Conditional Value Selector Ġ= ĊĠĠĠĠĠĠĠ Ġwhen Ġ( type ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcom . kr ill sson . sys api . core . monitoring . Monitor . Type . CONTAINER _ RUNNING Ġ-> ĠDocker Container Running Monitor . selector ĊĠĠĠĠĠĠĠĠĠĠĠ Ġelse Ġ-> Ġthrow ĠIllegalArgumentException (" Use Ġfor Conditional Monitor Type () Ġmethod ") ĊĠĠĠĠĠĠĠ Ġ} Ċ } ĊĊ