diff --git a/README.md b/README.md index 4aed30e..bce1224 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,9 @@ DJANGOLANG_API_ROOT=/api DESTINATION_PATH=media ENABLE_PASSTHROUGH=1 CAMERA_NAME # shell 8 DJANGOLANG_API_ROOT=/api DESTINATION_PATH=media ENABLE_PASSTHROUGH=1 CAMERA_NAME='Side gate' NET_CAM_URL=rtsp://192.168.137.33:554/Streaming/Channels/101 POSTGRES_DB=camry POSTGRES_PASSWORD=NoNVR\!11 go run ./cmd segment_producer + +# shell 9 + ``` ### Scratch diff --git a/build.sh b/build.sh index dbe1ff6..5ef7513 100755 --- a/build.sh +++ b/build.sh @@ -20,6 +20,11 @@ if ! command -v npm >/dev/null 2>&1; then exit 1 fi +# we don't need natscli for tooling, but it's a handy debug tool +if ! command -v nats >/dev/null 2>&1; then + go install github.com/nats-io/natscli/nats@latest +fi + # ensure we've got a djangolang executable available (required for templating) if [[ "${FORCE_UPDATE_DJANGOLANG}" == "1" ]] || ! command -v djangolang >/dev/null 2>&1; then GOPRIVATE="${GOPRIVATE:-}" go install github.com/initialed85/djangolang@latest diff --git a/database/migrations/00001_initial.up.sql b/database/migrations/00001_initial.up.sql index de24b0b..01e8a6b 100644 --- a/database/migrations/00001_initial.up.sql +++ b/database/migrations/00001_initial.up.sql @@ -46,7 +46,13 @@ CREATE TABLE deleted_at timestamptz NULL DEFAULT NULL, name text NOT NULL CHECK (trim(name) != ''), stream_url text NOT NULL CHECK (trim(stream_url) != ''), - last_seen timestamptz NULL DEFAULT NULL + last_seen timestamptz NOT NULL DEFAULT to_timestamp(0), + -- claimed_at timestamptz NOT NULL DEFAULT to_timestamp(0) CHECK (claimed_at <= now()), + claimed_at timestamptz NOT NULL DEFAULT to_timestamp(0), + -- claim_duration interval NOT NULL DEFAULT interval '1 minute' CHECK (claim_duration > interval '0 seconds'), + claim_duration interval NOT NULL DEFAULT interval '1 minute', + -- claim_expires_at timestamptz NOT NULL DEFAULT to_timestamp(1) CHECK (claim_expires_at > claimed_at) + claim_expires_at timestamptz NOT NULL DEFAULT to_timestamp(1) ); ALTER TABLE public.camera OWNER TO postgres; diff --git a/docker-compose.yaml b/docker-compose.yaml index df6e012..5fa39e9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,5 @@ volumes: + postgres: media: services: @@ -12,6 +13,8 @@ services: timeout: 4s start_period: 10s test: ["CMD", "pg_isready", "-h", "localhost", "-U", "postgres"] + volumes: + - postgres:/home/postgres/pgdata/data environment: - "POSTGRES_DB=camry" - "POSTGRES_PASSWORD=NoNVR!11" @@ -23,7 +26,7 @@ services: postgres: condition: service_healthy image: migrate/migrate:v4.17.1 - restart: on-failure + restart: no stop_grace_period: 0s volumes: - ./database/migrations:/migrations @@ -38,7 +41,7 @@ services: condition: service_completed_successfully # this obscure image is chosen because it has x86_64 and arm64 support image: duvel/postgis:15-3.3 - restart: on-failure + restart: no stop_grace_period: 0s entrypoint: ["/bin/bash", "-c"] command: "PAGER=cat PGPASSWORD=NoNVR!11 psql -h postgres -p 5432 -U postgres -a camry -c 'VACUUM FULL; VACUUM ANALYZE;'" @@ -58,7 +61,15 @@ services: - "BASE_URL=/" - "SWAGGER_JSON_URL=http://host.docker.internal:7070/api/openapi.json" ports: - - "7071:8080" + - "7071:8080/tcp" + + nats: + restart: unless-stopped + stop_grace_period: 0s + image: nats:2.10.18 + ports: + - "4222:4222/tcp" + command: ["-js"] api: profiles: diff --git a/frontend/src/api.ts b/frontend/src/api.ts index 7b03559..a559d3a 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -1,8 +1,5 @@ import { createSyncStoragePersister } from "@tanstack/query-sync-storage-persister"; -import { - persistQueryClient, - removeOldestQuery, -} from "@tanstack/react-query-persist-client"; +import { persistQueryClient, removeOldestQuery } from "@tanstack/react-query-persist-client"; import { default as createFetchClient } from "openapi-fetch"; import createClientForReactQuery from "openapi-react-query"; @@ -34,9 +31,8 @@ persistQueryClient({ persister: localStoragePersister, }); -const clientForReactQuery = createFetchClient({ +export const clientForReactQuery = createFetchClient({ baseUrl: "/", }); -export const { useQuery, useMutation, useSuspenseQuery } = - createClientForReactQuery(clientForReactQuery); +export const { useQuery, useMutation, useSuspenseQuery } = createClientForReactQuery(clientForReactQuery); diff --git a/frontend/src/api/api.d.ts b/frontend/src/api/api.d.ts index b124991..11df8ef 100644 --- a/frontend/src/api/api.d.ts +++ b/frontend/src/api/api.d.ts @@ -105,6 +105,12 @@ export type webhooks = Record; export interface components { schemas: { Camera: { + /** Format: int64 */ + claim_duration?: number; + /** Format: date-time */ + claim_expires_at?: string; + /** Format: date-time */ + claimed_at?: string; /** Format: date-time */ created_at?: string; /** Format: date-time */ @@ -112,7 +118,7 @@ export interface components { /** Format: uuid */ id?: string; /** Format: date-time */ - last_seen?: string | null; + last_seen?: string; name?: string; referenced_by_detection_camera_id_objects?: components["schemas"]["NullableArrayOfDetection"]; referenced_by_video_camera_id_objects?: components["schemas"]["NullableArrayOfVideo"]; @@ -550,6 +556,150 @@ export interface operations { last_seen__desc?: string; /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ last_seen__asc?: string; + /** @description SQL = operator */ + claimed_at__eq?: string; + /** @description SQL != operator */ + claimed_at__ne?: string; + /** @description SQL > operator, may not work with all column types */ + claimed_at__gt?: string; + /** @description SQL >= operator, may not work with all column types */ + claimed_at__gte?: string; + /** @description SQL < operator, may not work with all column types */ + claimed_at__lt?: string; + /** @description SQL <= operator, may not work with all column types */ + claimed_at__lte?: string; + /** @description SQL IN operator, permits comma-separated values */ + claimed_at__in?: string; + /** @description SQL NOT IN operator, permits comma-separated values */ + claimed_at__nin?: string; + /** @description SQL NOT IN operator, permits comma-separated values */ + claimed_at__notin?: string; + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ + claimed_at__isnull?: string; + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ + claimed_at__nisnull?: string; + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ + claimed_at__isnotnull?: string; + /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ + claimed_at__l?: string; + /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ + claimed_at__like?: string; + /** @description SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % */ + claimed_at__nl?: string; + /** @description SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % */ + claimed_at__nlike?: string; + /** @description SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % */ + claimed_at__notlike?: string; + /** @description SQL ILIKE operator, value is implicitly prefixed and suffixed with % */ + claimed_at__il?: string; + /** @description SQL ILIKE operator, value is implicitly prefixed and suffixed with % */ + claimed_at__ilike?: string; + /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ + claimed_at__nil?: string; + /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ + claimed_at__nilike?: string; + /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ + claimed_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + claimed_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + claimed_at__asc?: string; + /** @description SQL = operator */ + claim_duration__eq?: number; + /** @description SQL != operator */ + claim_duration__ne?: number; + /** @description SQL > operator, may not work with all column types */ + claim_duration__gt?: number; + /** @description SQL >= operator, may not work with all column types */ + claim_duration__gte?: number; + /** @description SQL < operator, may not work with all column types */ + claim_duration__lt?: number; + /** @description SQL <= operator, may not work with all column types */ + claim_duration__lte?: number; + /** @description SQL IN operator, permits comma-separated values */ + claim_duration__in?: number; + /** @description SQL NOT IN operator, permits comma-separated values */ + claim_duration__nin?: number; + /** @description SQL NOT IN operator, permits comma-separated values */ + claim_duration__notin?: number; + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ + claim_duration__isnull?: string; + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ + claim_duration__nisnull?: string; + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ + claim_duration__isnotnull?: string; + /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ + claim_duration__l?: string; + /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ + claim_duration__like?: string; + /** @description SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % */ + claim_duration__nl?: string; + /** @description SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % */ + claim_duration__nlike?: string; + /** @description SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % */ + claim_duration__notlike?: string; + /** @description SQL ILIKE operator, value is implicitly prefixed and suffixed with % */ + claim_duration__il?: string; + /** @description SQL ILIKE operator, value is implicitly prefixed and suffixed with % */ + claim_duration__ilike?: string; + /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ + claim_duration__nil?: string; + /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ + claim_duration__nilike?: string; + /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ + claim_duration__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + claim_duration__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + claim_duration__asc?: string; + /** @description SQL = operator */ + claim_expires_at__eq?: string; + /** @description SQL != operator */ + claim_expires_at__ne?: string; + /** @description SQL > operator, may not work with all column types */ + claim_expires_at__gt?: string; + /** @description SQL >= operator, may not work with all column types */ + claim_expires_at__gte?: string; + /** @description SQL < operator, may not work with all column types */ + claim_expires_at__lt?: string; + /** @description SQL <= operator, may not work with all column types */ + claim_expires_at__lte?: string; + /** @description SQL IN operator, permits comma-separated values */ + claim_expires_at__in?: string; + /** @description SQL NOT IN operator, permits comma-separated values */ + claim_expires_at__nin?: string; + /** @description SQL NOT IN operator, permits comma-separated values */ + claim_expires_at__notin?: string; + /** @description SQL IS NULL operator, value is ignored (presence of key is sufficient) */ + claim_expires_at__isnull?: string; + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ + claim_expires_at__nisnull?: string; + /** @description SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) */ + claim_expires_at__isnotnull?: string; + /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ + claim_expires_at__l?: string; + /** @description SQL LIKE operator, value is implicitly prefixed and suffixed with % */ + claim_expires_at__like?: string; + /** @description SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % */ + claim_expires_at__nl?: string; + /** @description SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % */ + claim_expires_at__nlike?: string; + /** @description SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % */ + claim_expires_at__notlike?: string; + /** @description SQL ILIKE operator, value is implicitly prefixed and suffixed with % */ + claim_expires_at__il?: string; + /** @description SQL ILIKE operator, value is implicitly prefixed and suffixed with % */ + claim_expires_at__ilike?: string; + /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ + claim_expires_at__nil?: string; + /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ + claim_expires_at__nilike?: string; + /** @description SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % */ + claim_expires_at__notilike?: string; + /** @description SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) */ + claim_expires_at__desc?: string; + /** @description SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) */ + claim_expires_at__asc?: string; }; header?: never; path?: never; diff --git a/frontend/src/components/VideoTable.tsx b/frontend/src/components/VideoTable.tsx index 56315cc..dc6c03d 100644 --- a/frontend/src/components/VideoTable.tsx +++ b/frontend/src/components/VideoTable.tsx @@ -1,10 +1,12 @@ -import Text from "@carefully-coded/react-text-gradient"; import CloudDownloadOutlinedIcon from "@mui/icons-material/CloudDownloadOutlined"; import ErrorOutlineOutlinedIcon from "@mui/icons-material/ErrorOutlineOutlined"; +import HourglassEmptyOutlinedIcon from "@mui/icons-material/HourglassEmptyOutlined"; import CircularProgress from "@mui/joy/CircularProgress"; import Table from "@mui/joy/Table"; +import Tooltip from "@mui/joy/Tooltip"; import Typography from "@mui/joy/Typography"; import { useQuery } from "../api"; +import { components } from "../api/api"; export interface VideoTableProps { responsive: boolean; @@ -17,17 +19,34 @@ export function VideoTable(props: VideoTableProps) { params: { query: { camera_id__eq: props.cameraId || undefined, - started_at__gte: props.date - ? `${props.date}T00:00:00+08:00` - : undefined, - started_at__lte: props.date - ? `${props.date}T23:59:59+08:00` - : undefined, + started_at__gte: props.date ? `${props.date}T00:00:00+08:00` : undefined, + started_at__lte: props.date ? `${props.date}T23:59:59+08:00` : undefined, started_at__desc: "", }, }, }); + // useInfiniteQuery({ + // queryKey: ["videos"], + // queryFn: async ({ pageParam = 0 }) => { + // const res = await clientForReactQuery.GET("/api/cameras", { params: { query: {} } }); + // return res.data; + // }, + // initialPageParam: 0, + // getNextPageParam: (lastPage, pages) => 1, + // }); + + const { data: camerasData } = useQuery("get", "/api/cameras", {}); + + const cameraById = new Map(); + camerasData?.objects?.forEach((camera) => { + if (!camera?.id) { + return; + } + + cameraById.set(camera?.id, camera); + }); + // const { data: detectionsData } = useQuery("get", "/api/detections", { // params: { // query: { @@ -75,11 +94,10 @@ export function VideoTable(props: VideoTableProps) { > - {props.responsive ? "C" : "Camera"} - Details - Status + {props.responsive ? "T" : "Time"} + {props.responsive ? "S" : "Summary"} - Detections + {props.responsive ? "D" : "Detections"} {!props.responsive && ( <>
@@ -87,8 +105,15 @@ export function VideoTable(props: VideoTableProps) { )} - Preview - Media + + Preview + + {props.responsive ? "M" : "Media"} @@ -98,65 +123,25 @@ export function VideoTable(props: VideoTableProps) { return undefined; } + const camera = cameraById.get(video?.camera_id || ""); + const startedAt = new Date(video.started_at); const endedAt = video.ended_at && new Date(video.ended_at); const available = video?.status !== "recording"; - const minutes = Math.floor( - (video?.duration || 0) / (1_000_000_000 * 60), - ); - const seconds = Math.floor( - (video?.duration || 0) / 1_000_000_000 - minutes * 60, - ); + const minutes = Math.floor((video?.duration || 0) / (1_000_000_000 * 60)); + const seconds = Math.floor((video?.duration || 0) / 1_000_000_000 - minutes * 60); const fileSize = (video?.file_size || 0.0).toFixed(2); - var cameraName = - video?.camera_id_object && video?.camera_id_object?.name - ? video.camera_id_object.name - : "-"; - - if (props.responsive) { - cameraName = cameraName[0]; - } - - const statusText = ( - video?.status - ? video.status[0].toUpperCase() + video.status.slice(1) - : "-" - ).trim(); - - const status = - statusText === "Recording" ? ( - - - {statusText} - - - ) : ( - statusText - ); + var cameraName = camera?.name || "-"; var thumbnail; if (video?.thumbnail_name) { thumbnail = ( - + {`still ); - } else if (video?.status !== "failed") { - thumbnail = ; + } else if (video?.status === "failed") { + thumbnail = ( + + + + ); } else { - thumbnail = ; + thumbnail = ( + + + + ); } - const rawClassNames = - video.id && classNamesByVideoId.get(video.id)?.keys(); - const classNames = ( - rawClassNames ? Array.from(rawClassNames).sort() : [] - ).join(", "); + const rawClassNames = video.id && classNamesByVideoId.get(video.id)?.keys(); + + let classNames; + if (video?.status === "failed") { + classNames = ( + + + + ); + } else if (video?.status === "needs detection") { + classNames = ( + + + + ); + } else if (video?.status === "detecting") { + classNames = ( + + + + ); + } else { + classNames = (rawClassNames ? Array.from(rawClassNames).sort() : []).join(", "); + } return ( - {cameraName} {startedAt.toTimeString().split(" ")[0]}
- {endedAt ? endedAt.toTimeString().split(" ")[0] : "-"}{" "} -
+ + {endedAt ? endedAt.toTimeString().split(" ")[0] : "-"}
+
+ + + {cameraName} {minutes}m{seconds}s {fileSize} MB - {status} {classNames} {available ? ( - + ) : ( @@ -222,9 +232,7 @@ export function VideoTable(props: VideoTableProps) { ) : ( - - (No videos for the selected camera / date) - + (No videos for the selected camera / date) )} diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index 548c24e..c2c68a8 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -28,7 +28,7 @@ root.render( // If you want your app to work offline and load faster, you can change // unregister() to register() below. Note this comes with some pitfalls. // Learn more about service workers: https://cra.link/PWA -serviceWorkerRegistration.unregister(); +serviceWorkerRegistration.register(); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) diff --git a/go.mod b/go.mod index b589631..7acbe5c 100644 --- a/go.mod +++ b/go.mod @@ -7,19 +7,27 @@ require ( github.com/go-chi/chi/v5 v5.1.0 github.com/gomodule/redigo v1.9.2 github.com/google/uuid v1.6.0 - github.com/initialed85/djangolang v0.0.67 + github.com/initialed85/djangolang v0.0.71 github.com/jackc/pgx/v5 v5.6.0 + github.com/stretchr/testify v1.9.0 golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 gopkg.in/yaml.v2 v2.4.0 ) require ( + github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-test/deep v1.0.8 // indirect github.com/jackc/pgtype v1.14.3 // indirect github.com/jackc/puddle/v2 v2.2.1 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/kr/pretty v0.3.1 // indirect + github.com/nats-io/nkeys v0.4.7 // indirect + github.com/nats-io/nuid v1.0.1 // indirect github.com/paulmach/orb v0.11.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.23.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) require ( @@ -38,6 +46,7 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/nats-io/nats.go v1.37.0 github.com/twpayne/go-geom v1.5.7 // indirect go.mongodb.org/mongo-driver v1.16.1 // indirect golang.org/x/crypto v0.26.0 // indirect diff --git a/go.sum b/go.sum index edc48c8..c9ce97d 100644 --- a/go.sum +++ b/go.sum @@ -49,8 +49,8 @@ github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aN github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/initialed85/djangolang v0.0.67 h1:Y+IhKGvk7V6N5kmNZJTE/gO2UaVa4IzSeg+EvJDhdTU= -github.com/initialed85/djangolang v0.0.67/go.mod h1:EFbZ1Utc3A1woO6fSygSmD2XuBQIbJDTkqv79mCELrc= +github.com/initialed85/djangolang v0.0.71 h1:DBWEDHL+f2bZl8ORPERKUHIFaOu+4/rc19VXZkgzV50= +github.com/initialed85/djangolang v0.0.71/go.mod h1:EFbZ1Utc3A1woO6fSygSmD2XuBQIbJDTkqv79mCELrc= github.com/initialed85/structmeta v0.0.0-20240802152142-39f398ef1ab7 h1:G9Z1k4TyxQ/9Kk4ZSuw82WZCxJayZf12Aos2MorzKRg= github.com/initialed85/structmeta v0.0.0-20240802152142-39f398ef1ab7/go.mod h1:hTGWTsfgy6Um+L8e3Qcj8/pBkHGcIGxEpZAKziWhQfc= github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= @@ -135,6 +135,8 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -166,6 +168,12 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/nats-io/nats.go v1.37.0 h1:07rauXbVnnJvv1gfIyghFEo6lUcYRY0WXc3x7x0vUxE= +github.com/nats-io/nats.go v1.37.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= +github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= +github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/paulmach/orb v0.11.1 h1:3koVegMC4X/WeiXYz9iswopaTwMem53NzTJuTF20JzU= github.com/paulmach/orb v0.11.1/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY= @@ -294,6 +302,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= diff --git a/migrate.sh b/migrate.sh new file mode 100755 index 0000000..eaaf777 --- /dev/null +++ b/migrate.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -e + +# this block ensures we can invoke this script from anywhere and have it automatically change to this folder first +pushd "$(dirname -- "${BASH_SOURCE[0]}")" >/dev/null 2>&1 +function teardown() { + popd >/dev/null 2>&1 || true +} +trap teardown exit + +# we need migrate to run the migrations +if ! command -v migrate >/dev/null 2>&1; then + go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest +fi + +POSTGRES_USER="${POSTGRES_USER:-postgres}" +POSTGRES_PASSWORD="${POSTGRES_PASSWORD:-NoNVR!11}" +POSTGRES_HOST="${POSTGRES_HOST:-localhost}" +POSTGRES_PORT="${POSTGRES_PORT:-5432}" +POSTGRES_DB="${POSTGRES_DB:-camry}" + +migrate \ + --source file://./database/migrations \ + --database "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=disable" \ + up diff --git a/object_detector/api/docs/Camera.md b/object_detector/api/docs/Camera.md index 6584ef0..03f46b3 100644 --- a/object_detector/api/docs/Camera.md +++ b/object_detector/api/docs/Camera.md @@ -5,6 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**claim_duration** | **int** | | [optional] +**claim_expires_at** | **datetime** | | [optional] +**claimed_at** | **datetime** | | [optional] **created_at** | **datetime** | | [optional] **deleted_at** | **datetime** | | [optional] **id** | **str** | | [optional] diff --git a/object_detector/api/docs/CameraApi.md b/object_detector/api/docs/CameraApi.md index a437ad5..bde2321 100644 --- a/object_detector/api/docs/CameraApi.md +++ b/object_detector/api/docs/CameraApi.md @@ -146,7 +146,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_cameras** -> GetCameras200Response get_cameras(limit=limit, offset=offset, depth=depth, id__eq=id__eq, id__ne=id__ne, id__gt=id__gt, id__gte=id__gte, id__lt=id__lt, id__lte=id__lte, id__in=id__in, id__nin=id__nin, id__notin=id__notin, id__isnull=id__isnull, id__nisnull=id__nisnull, id__isnotnull=id__isnotnull, id__l=id__l, id__like=id__like, id__nl=id__nl, id__nlike=id__nlike, id__notlike=id__notlike, id__il=id__il, id__ilike=id__ilike, id__nil=id__nil, id__nilike=id__nilike, id__notilike=id__notilike, id__desc=id__desc, id__asc=id__asc, created_at__eq=created_at__eq, created_at__ne=created_at__ne, created_at__gt=created_at__gt, created_at__gte=created_at__gte, created_at__lt=created_at__lt, created_at__lte=created_at__lte, created_at__in=created_at__in, created_at__nin=created_at__nin, created_at__notin=created_at__notin, created_at__isnull=created_at__isnull, created_at__nisnull=created_at__nisnull, created_at__isnotnull=created_at__isnotnull, created_at__l=created_at__l, created_at__like=created_at__like, created_at__nl=created_at__nl, created_at__nlike=created_at__nlike, created_at__notlike=created_at__notlike, created_at__il=created_at__il, created_at__ilike=created_at__ilike, created_at__nil=created_at__nil, created_at__nilike=created_at__nilike, created_at__notilike=created_at__notilike, created_at__desc=created_at__desc, created_at__asc=created_at__asc, updated_at__eq=updated_at__eq, updated_at__ne=updated_at__ne, updated_at__gt=updated_at__gt, updated_at__gte=updated_at__gte, updated_at__lt=updated_at__lt, updated_at__lte=updated_at__lte, updated_at__in=updated_at__in, updated_at__nin=updated_at__nin, updated_at__notin=updated_at__notin, updated_at__isnull=updated_at__isnull, updated_at__nisnull=updated_at__nisnull, updated_at__isnotnull=updated_at__isnotnull, updated_at__l=updated_at__l, updated_at__like=updated_at__like, updated_at__nl=updated_at__nl, updated_at__nlike=updated_at__nlike, updated_at__notlike=updated_at__notlike, updated_at__il=updated_at__il, updated_at__ilike=updated_at__ilike, updated_at__nil=updated_at__nil, updated_at__nilike=updated_at__nilike, updated_at__notilike=updated_at__notilike, updated_at__desc=updated_at__desc, updated_at__asc=updated_at__asc, deleted_at__eq=deleted_at__eq, deleted_at__ne=deleted_at__ne, deleted_at__gt=deleted_at__gt, deleted_at__gte=deleted_at__gte, deleted_at__lt=deleted_at__lt, deleted_at__lte=deleted_at__lte, deleted_at__in=deleted_at__in, deleted_at__nin=deleted_at__nin, deleted_at__notin=deleted_at__notin, deleted_at__isnull=deleted_at__isnull, deleted_at__nisnull=deleted_at__nisnull, deleted_at__isnotnull=deleted_at__isnotnull, deleted_at__l=deleted_at__l, deleted_at__like=deleted_at__like, deleted_at__nl=deleted_at__nl, deleted_at__nlike=deleted_at__nlike, deleted_at__notlike=deleted_at__notlike, deleted_at__il=deleted_at__il, deleted_at__ilike=deleted_at__ilike, deleted_at__nil=deleted_at__nil, deleted_at__nilike=deleted_at__nilike, deleted_at__notilike=deleted_at__notilike, deleted_at__desc=deleted_at__desc, deleted_at__asc=deleted_at__asc, name__eq=name__eq, name__ne=name__ne, name__gt=name__gt, name__gte=name__gte, name__lt=name__lt, name__lte=name__lte, name__in=name__in, name__nin=name__nin, name__notin=name__notin, name__isnull=name__isnull, name__nisnull=name__nisnull, name__isnotnull=name__isnotnull, name__l=name__l, name__like=name__like, name__nl=name__nl, name__nlike=name__nlike, name__notlike=name__notlike, name__il=name__il, name__ilike=name__ilike, name__nil=name__nil, name__nilike=name__nilike, name__notilike=name__notilike, name__desc=name__desc, name__asc=name__asc, stream_url__eq=stream_url__eq, stream_url__ne=stream_url__ne, stream_url__gt=stream_url__gt, stream_url__gte=stream_url__gte, stream_url__lt=stream_url__lt, stream_url__lte=stream_url__lte, stream_url__in=stream_url__in, stream_url__nin=stream_url__nin, stream_url__notin=stream_url__notin, stream_url__isnull=stream_url__isnull, stream_url__nisnull=stream_url__nisnull, stream_url__isnotnull=stream_url__isnotnull, stream_url__l=stream_url__l, stream_url__like=stream_url__like, stream_url__nl=stream_url__nl, stream_url__nlike=stream_url__nlike, stream_url__notlike=stream_url__notlike, stream_url__il=stream_url__il, stream_url__ilike=stream_url__ilike, stream_url__nil=stream_url__nil, stream_url__nilike=stream_url__nilike, stream_url__notilike=stream_url__notilike, stream_url__desc=stream_url__desc, stream_url__asc=stream_url__asc, last_seen__eq=last_seen__eq, last_seen__ne=last_seen__ne, last_seen__gt=last_seen__gt, last_seen__gte=last_seen__gte, last_seen__lt=last_seen__lt, last_seen__lte=last_seen__lte, last_seen__in=last_seen__in, last_seen__nin=last_seen__nin, last_seen__notin=last_seen__notin, last_seen__isnull=last_seen__isnull, last_seen__nisnull=last_seen__nisnull, last_seen__isnotnull=last_seen__isnotnull, last_seen__l=last_seen__l, last_seen__like=last_seen__like, last_seen__nl=last_seen__nl, last_seen__nlike=last_seen__nlike, last_seen__notlike=last_seen__notlike, last_seen__il=last_seen__il, last_seen__ilike=last_seen__ilike, last_seen__nil=last_seen__nil, last_seen__nilike=last_seen__nilike, last_seen__notilike=last_seen__notilike, last_seen__desc=last_seen__desc, last_seen__asc=last_seen__asc) +> GetCameras200Response get_cameras(limit=limit, offset=offset, depth=depth, id__eq=id__eq, id__ne=id__ne, id__gt=id__gt, id__gte=id__gte, id__lt=id__lt, id__lte=id__lte, id__in=id__in, id__nin=id__nin, id__notin=id__notin, id__isnull=id__isnull, id__nisnull=id__nisnull, id__isnotnull=id__isnotnull, id__l=id__l, id__like=id__like, id__nl=id__nl, id__nlike=id__nlike, id__notlike=id__notlike, id__il=id__il, id__ilike=id__ilike, id__nil=id__nil, id__nilike=id__nilike, id__notilike=id__notilike, id__desc=id__desc, id__asc=id__asc, created_at__eq=created_at__eq, created_at__ne=created_at__ne, created_at__gt=created_at__gt, created_at__gte=created_at__gte, created_at__lt=created_at__lt, created_at__lte=created_at__lte, created_at__in=created_at__in, created_at__nin=created_at__nin, created_at__notin=created_at__notin, created_at__isnull=created_at__isnull, created_at__nisnull=created_at__nisnull, created_at__isnotnull=created_at__isnotnull, created_at__l=created_at__l, created_at__like=created_at__like, created_at__nl=created_at__nl, created_at__nlike=created_at__nlike, created_at__notlike=created_at__notlike, created_at__il=created_at__il, created_at__ilike=created_at__ilike, created_at__nil=created_at__nil, created_at__nilike=created_at__nilike, created_at__notilike=created_at__notilike, created_at__desc=created_at__desc, created_at__asc=created_at__asc, updated_at__eq=updated_at__eq, updated_at__ne=updated_at__ne, updated_at__gt=updated_at__gt, updated_at__gte=updated_at__gte, updated_at__lt=updated_at__lt, updated_at__lte=updated_at__lte, updated_at__in=updated_at__in, updated_at__nin=updated_at__nin, updated_at__notin=updated_at__notin, updated_at__isnull=updated_at__isnull, updated_at__nisnull=updated_at__nisnull, updated_at__isnotnull=updated_at__isnotnull, updated_at__l=updated_at__l, updated_at__like=updated_at__like, updated_at__nl=updated_at__nl, updated_at__nlike=updated_at__nlike, updated_at__notlike=updated_at__notlike, updated_at__il=updated_at__il, updated_at__ilike=updated_at__ilike, updated_at__nil=updated_at__nil, updated_at__nilike=updated_at__nilike, updated_at__notilike=updated_at__notilike, updated_at__desc=updated_at__desc, updated_at__asc=updated_at__asc, deleted_at__eq=deleted_at__eq, deleted_at__ne=deleted_at__ne, deleted_at__gt=deleted_at__gt, deleted_at__gte=deleted_at__gte, deleted_at__lt=deleted_at__lt, deleted_at__lte=deleted_at__lte, deleted_at__in=deleted_at__in, deleted_at__nin=deleted_at__nin, deleted_at__notin=deleted_at__notin, deleted_at__isnull=deleted_at__isnull, deleted_at__nisnull=deleted_at__nisnull, deleted_at__isnotnull=deleted_at__isnotnull, deleted_at__l=deleted_at__l, deleted_at__like=deleted_at__like, deleted_at__nl=deleted_at__nl, deleted_at__nlike=deleted_at__nlike, deleted_at__notlike=deleted_at__notlike, deleted_at__il=deleted_at__il, deleted_at__ilike=deleted_at__ilike, deleted_at__nil=deleted_at__nil, deleted_at__nilike=deleted_at__nilike, deleted_at__notilike=deleted_at__notilike, deleted_at__desc=deleted_at__desc, deleted_at__asc=deleted_at__asc, name__eq=name__eq, name__ne=name__ne, name__gt=name__gt, name__gte=name__gte, name__lt=name__lt, name__lte=name__lte, name__in=name__in, name__nin=name__nin, name__notin=name__notin, name__isnull=name__isnull, name__nisnull=name__nisnull, name__isnotnull=name__isnotnull, name__l=name__l, name__like=name__like, name__nl=name__nl, name__nlike=name__nlike, name__notlike=name__notlike, name__il=name__il, name__ilike=name__ilike, name__nil=name__nil, name__nilike=name__nilike, name__notilike=name__notilike, name__desc=name__desc, name__asc=name__asc, stream_url__eq=stream_url__eq, stream_url__ne=stream_url__ne, stream_url__gt=stream_url__gt, stream_url__gte=stream_url__gte, stream_url__lt=stream_url__lt, stream_url__lte=stream_url__lte, stream_url__in=stream_url__in, stream_url__nin=stream_url__nin, stream_url__notin=stream_url__notin, stream_url__isnull=stream_url__isnull, stream_url__nisnull=stream_url__nisnull, stream_url__isnotnull=stream_url__isnotnull, stream_url__l=stream_url__l, stream_url__like=stream_url__like, stream_url__nl=stream_url__nl, stream_url__nlike=stream_url__nlike, stream_url__notlike=stream_url__notlike, stream_url__il=stream_url__il, stream_url__ilike=stream_url__ilike, stream_url__nil=stream_url__nil, stream_url__nilike=stream_url__nilike, stream_url__notilike=stream_url__notilike, stream_url__desc=stream_url__desc, stream_url__asc=stream_url__asc, last_seen__eq=last_seen__eq, last_seen__ne=last_seen__ne, last_seen__gt=last_seen__gt, last_seen__gte=last_seen__gte, last_seen__lt=last_seen__lt, last_seen__lte=last_seen__lte, last_seen__in=last_seen__in, last_seen__nin=last_seen__nin, last_seen__notin=last_seen__notin, last_seen__isnull=last_seen__isnull, last_seen__nisnull=last_seen__nisnull, last_seen__isnotnull=last_seen__isnotnull, last_seen__l=last_seen__l, last_seen__like=last_seen__like, last_seen__nl=last_seen__nl, last_seen__nlike=last_seen__nlike, last_seen__notlike=last_seen__notlike, last_seen__il=last_seen__il, last_seen__ilike=last_seen__ilike, last_seen__nil=last_seen__nil, last_seen__nilike=last_seen__nilike, last_seen__notilike=last_seen__notilike, last_seen__desc=last_seen__desc, last_seen__asc=last_seen__asc, claimed_at__eq=claimed_at__eq, claimed_at__ne=claimed_at__ne, claimed_at__gt=claimed_at__gt, claimed_at__gte=claimed_at__gte, claimed_at__lt=claimed_at__lt, claimed_at__lte=claimed_at__lte, claimed_at__in=claimed_at__in, claimed_at__nin=claimed_at__nin, claimed_at__notin=claimed_at__notin, claimed_at__isnull=claimed_at__isnull, claimed_at__nisnull=claimed_at__nisnull, claimed_at__isnotnull=claimed_at__isnotnull, claimed_at__l=claimed_at__l, claimed_at__like=claimed_at__like, claimed_at__nl=claimed_at__nl, claimed_at__nlike=claimed_at__nlike, claimed_at__notlike=claimed_at__notlike, claimed_at__il=claimed_at__il, claimed_at__ilike=claimed_at__ilike, claimed_at__nil=claimed_at__nil, claimed_at__nilike=claimed_at__nilike, claimed_at__notilike=claimed_at__notilike, claimed_at__desc=claimed_at__desc, claimed_at__asc=claimed_at__asc, claim_duration__eq=claim_duration__eq, claim_duration__ne=claim_duration__ne, claim_duration__gt=claim_duration__gt, claim_duration__gte=claim_duration__gte, claim_duration__lt=claim_duration__lt, claim_duration__lte=claim_duration__lte, claim_duration__in=claim_duration__in, claim_duration__nin=claim_duration__nin, claim_duration__notin=claim_duration__notin, claim_duration__isnull=claim_duration__isnull, claim_duration__nisnull=claim_duration__nisnull, claim_duration__isnotnull=claim_duration__isnotnull, claim_duration__l=claim_duration__l, claim_duration__like=claim_duration__like, claim_duration__nl=claim_duration__nl, claim_duration__nlike=claim_duration__nlike, claim_duration__notlike=claim_duration__notlike, claim_duration__il=claim_duration__il, claim_duration__ilike=claim_duration__ilike, claim_duration__nil=claim_duration__nil, claim_duration__nilike=claim_duration__nilike, claim_duration__notilike=claim_duration__notilike, claim_duration__desc=claim_duration__desc, claim_duration__asc=claim_duration__asc, claim_expires_at__eq=claim_expires_at__eq, claim_expires_at__ne=claim_expires_at__ne, claim_expires_at__gt=claim_expires_at__gt, claim_expires_at__gte=claim_expires_at__gte, claim_expires_at__lt=claim_expires_at__lt, claim_expires_at__lte=claim_expires_at__lte, claim_expires_at__in=claim_expires_at__in, claim_expires_at__nin=claim_expires_at__nin, claim_expires_at__notin=claim_expires_at__notin, claim_expires_at__isnull=claim_expires_at__isnull, claim_expires_at__nisnull=claim_expires_at__nisnull, claim_expires_at__isnotnull=claim_expires_at__isnotnull, claim_expires_at__l=claim_expires_at__l, claim_expires_at__like=claim_expires_at__like, claim_expires_at__nl=claim_expires_at__nl, claim_expires_at__nlike=claim_expires_at__nlike, claim_expires_at__notlike=claim_expires_at__notlike, claim_expires_at__il=claim_expires_at__il, claim_expires_at__ilike=claim_expires_at__ilike, claim_expires_at__nil=claim_expires_at__nil, claim_expires_at__nilike=claim_expires_at__nilike, claim_expires_at__notilike=claim_expires_at__notilike, claim_expires_at__desc=claim_expires_at__desc, claim_expires_at__asc=claim_expires_at__asc) @@ -341,9 +341,81 @@ with openapi_client.ApiClient(configuration) as api_client: last_seen__notilike = 'last_seen__notilike_example' # str | SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % (optional) last_seen__desc = 'last_seen__desc_example' # str | SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) (optional) last_seen__asc = 'last_seen__asc_example' # str | SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) (optional) + claimed_at__eq = '2013-10-20T19:20:30+01:00' # datetime | SQL = operator (optional) + claimed_at__ne = '2013-10-20T19:20:30+01:00' # datetime | SQL != operator (optional) + claimed_at__gt = '2013-10-20T19:20:30+01:00' # datetime | SQL > operator, may not work with all column types (optional) + claimed_at__gte = '2013-10-20T19:20:30+01:00' # datetime | SQL >= operator, may not work with all column types (optional) + claimed_at__lt = '2013-10-20T19:20:30+01:00' # datetime | SQL < operator, may not work with all column types (optional) + claimed_at__lte = '2013-10-20T19:20:30+01:00' # datetime | SQL <= operator, may not work with all column types (optional) + claimed_at__in = '2013-10-20T19:20:30+01:00' # datetime | SQL IN operator, permits comma-separated values (optional) + claimed_at__nin = '2013-10-20T19:20:30+01:00' # datetime | SQL NOT IN operator, permits comma-separated values (optional) + claimed_at__notin = '2013-10-20T19:20:30+01:00' # datetime | SQL NOT IN operator, permits comma-separated values (optional) + claimed_at__isnull = 'claimed_at__isnull_example' # str | SQL IS NULL operator, value is ignored (presence of key is sufficient) (optional) + claimed_at__nisnull = 'claimed_at__nisnull_example' # str | SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) (optional) + claimed_at__isnotnull = 'claimed_at__isnotnull_example' # str | SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) (optional) + claimed_at__l = 'claimed_at__l_example' # str | SQL LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claimed_at__like = 'claimed_at__like_example' # str | SQL LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claimed_at__nl = 'claimed_at__nl_example' # str | SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claimed_at__nlike = 'claimed_at__nlike_example' # str | SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claimed_at__notlike = 'claimed_at__notlike_example' # str | SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claimed_at__il = 'claimed_at__il_example' # str | SQL ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claimed_at__ilike = 'claimed_at__ilike_example' # str | SQL ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claimed_at__nil = 'claimed_at__nil_example' # str | SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claimed_at__nilike = 'claimed_at__nilike_example' # str | SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claimed_at__notilike = 'claimed_at__notilike_example' # str | SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claimed_at__desc = 'claimed_at__desc_example' # str | SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) (optional) + claimed_at__asc = 'claimed_at__asc_example' # str | SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) (optional) + claim_duration__eq = 56 # int | SQL = operator (optional) + claim_duration__ne = 56 # int | SQL != operator (optional) + claim_duration__gt = 56 # int | SQL > operator, may not work with all column types (optional) + claim_duration__gte = 56 # int | SQL >= operator, may not work with all column types (optional) + claim_duration__lt = 56 # int | SQL < operator, may not work with all column types (optional) + claim_duration__lte = 56 # int | SQL <= operator, may not work with all column types (optional) + claim_duration__in = 56 # int | SQL IN operator, permits comma-separated values (optional) + claim_duration__nin = 56 # int | SQL NOT IN operator, permits comma-separated values (optional) + claim_duration__notin = 56 # int | SQL NOT IN operator, permits comma-separated values (optional) + claim_duration__isnull = 'claim_duration__isnull_example' # str | SQL IS NULL operator, value is ignored (presence of key is sufficient) (optional) + claim_duration__nisnull = 'claim_duration__nisnull_example' # str | SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) (optional) + claim_duration__isnotnull = 'claim_duration__isnotnull_example' # str | SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) (optional) + claim_duration__l = 'claim_duration__l_example' # str | SQL LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_duration__like = 'claim_duration__like_example' # str | SQL LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_duration__nl = 'claim_duration__nl_example' # str | SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_duration__nlike = 'claim_duration__nlike_example' # str | SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_duration__notlike = 'claim_duration__notlike_example' # str | SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_duration__il = 'claim_duration__il_example' # str | SQL ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_duration__ilike = 'claim_duration__ilike_example' # str | SQL ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_duration__nil = 'claim_duration__nil_example' # str | SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_duration__nilike = 'claim_duration__nilike_example' # str | SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_duration__notilike = 'claim_duration__notilike_example' # str | SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_duration__desc = 'claim_duration__desc_example' # str | SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) (optional) + claim_duration__asc = 'claim_duration__asc_example' # str | SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) (optional) + claim_expires_at__eq = '2013-10-20T19:20:30+01:00' # datetime | SQL = operator (optional) + claim_expires_at__ne = '2013-10-20T19:20:30+01:00' # datetime | SQL != operator (optional) + claim_expires_at__gt = '2013-10-20T19:20:30+01:00' # datetime | SQL > operator, may not work with all column types (optional) + claim_expires_at__gte = '2013-10-20T19:20:30+01:00' # datetime | SQL >= operator, may not work with all column types (optional) + claim_expires_at__lt = '2013-10-20T19:20:30+01:00' # datetime | SQL < operator, may not work with all column types (optional) + claim_expires_at__lte = '2013-10-20T19:20:30+01:00' # datetime | SQL <= operator, may not work with all column types (optional) + claim_expires_at__in = '2013-10-20T19:20:30+01:00' # datetime | SQL IN operator, permits comma-separated values (optional) + claim_expires_at__nin = '2013-10-20T19:20:30+01:00' # datetime | SQL NOT IN operator, permits comma-separated values (optional) + claim_expires_at__notin = '2013-10-20T19:20:30+01:00' # datetime | SQL NOT IN operator, permits comma-separated values (optional) + claim_expires_at__isnull = 'claim_expires_at__isnull_example' # str | SQL IS NULL operator, value is ignored (presence of key is sufficient) (optional) + claim_expires_at__nisnull = 'claim_expires_at__nisnull_example' # str | SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) (optional) + claim_expires_at__isnotnull = 'claim_expires_at__isnotnull_example' # str | SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) (optional) + claim_expires_at__l = 'claim_expires_at__l_example' # str | SQL LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_expires_at__like = 'claim_expires_at__like_example' # str | SQL LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_expires_at__nl = 'claim_expires_at__nl_example' # str | SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_expires_at__nlike = 'claim_expires_at__nlike_example' # str | SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_expires_at__notlike = 'claim_expires_at__notlike_example' # str | SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_expires_at__il = 'claim_expires_at__il_example' # str | SQL ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_expires_at__ilike = 'claim_expires_at__ilike_example' # str | SQL ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_expires_at__nil = 'claim_expires_at__nil_example' # str | SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_expires_at__nilike = 'claim_expires_at__nilike_example' # str | SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_expires_at__notilike = 'claim_expires_at__notilike_example' # str | SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % (optional) + claim_expires_at__desc = 'claim_expires_at__desc_example' # str | SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) (optional) + claim_expires_at__asc = 'claim_expires_at__asc_example' # str | SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) (optional) try: - api_response = api_instance.get_cameras(limit=limit, offset=offset, depth=depth, id__eq=id__eq, id__ne=id__ne, id__gt=id__gt, id__gte=id__gte, id__lt=id__lt, id__lte=id__lte, id__in=id__in, id__nin=id__nin, id__notin=id__notin, id__isnull=id__isnull, id__nisnull=id__nisnull, id__isnotnull=id__isnotnull, id__l=id__l, id__like=id__like, id__nl=id__nl, id__nlike=id__nlike, id__notlike=id__notlike, id__il=id__il, id__ilike=id__ilike, id__nil=id__nil, id__nilike=id__nilike, id__notilike=id__notilike, id__desc=id__desc, id__asc=id__asc, created_at__eq=created_at__eq, created_at__ne=created_at__ne, created_at__gt=created_at__gt, created_at__gte=created_at__gte, created_at__lt=created_at__lt, created_at__lte=created_at__lte, created_at__in=created_at__in, created_at__nin=created_at__nin, created_at__notin=created_at__notin, created_at__isnull=created_at__isnull, created_at__nisnull=created_at__nisnull, created_at__isnotnull=created_at__isnotnull, created_at__l=created_at__l, created_at__like=created_at__like, created_at__nl=created_at__nl, created_at__nlike=created_at__nlike, created_at__notlike=created_at__notlike, created_at__il=created_at__il, created_at__ilike=created_at__ilike, created_at__nil=created_at__nil, created_at__nilike=created_at__nilike, created_at__notilike=created_at__notilike, created_at__desc=created_at__desc, created_at__asc=created_at__asc, updated_at__eq=updated_at__eq, updated_at__ne=updated_at__ne, updated_at__gt=updated_at__gt, updated_at__gte=updated_at__gte, updated_at__lt=updated_at__lt, updated_at__lte=updated_at__lte, updated_at__in=updated_at__in, updated_at__nin=updated_at__nin, updated_at__notin=updated_at__notin, updated_at__isnull=updated_at__isnull, updated_at__nisnull=updated_at__nisnull, updated_at__isnotnull=updated_at__isnotnull, updated_at__l=updated_at__l, updated_at__like=updated_at__like, updated_at__nl=updated_at__nl, updated_at__nlike=updated_at__nlike, updated_at__notlike=updated_at__notlike, updated_at__il=updated_at__il, updated_at__ilike=updated_at__ilike, updated_at__nil=updated_at__nil, updated_at__nilike=updated_at__nilike, updated_at__notilike=updated_at__notilike, updated_at__desc=updated_at__desc, updated_at__asc=updated_at__asc, deleted_at__eq=deleted_at__eq, deleted_at__ne=deleted_at__ne, deleted_at__gt=deleted_at__gt, deleted_at__gte=deleted_at__gte, deleted_at__lt=deleted_at__lt, deleted_at__lte=deleted_at__lte, deleted_at__in=deleted_at__in, deleted_at__nin=deleted_at__nin, deleted_at__notin=deleted_at__notin, deleted_at__isnull=deleted_at__isnull, deleted_at__nisnull=deleted_at__nisnull, deleted_at__isnotnull=deleted_at__isnotnull, deleted_at__l=deleted_at__l, deleted_at__like=deleted_at__like, deleted_at__nl=deleted_at__nl, deleted_at__nlike=deleted_at__nlike, deleted_at__notlike=deleted_at__notlike, deleted_at__il=deleted_at__il, deleted_at__ilike=deleted_at__ilike, deleted_at__nil=deleted_at__nil, deleted_at__nilike=deleted_at__nilike, deleted_at__notilike=deleted_at__notilike, deleted_at__desc=deleted_at__desc, deleted_at__asc=deleted_at__asc, name__eq=name__eq, name__ne=name__ne, name__gt=name__gt, name__gte=name__gte, name__lt=name__lt, name__lte=name__lte, name__in=name__in, name__nin=name__nin, name__notin=name__notin, name__isnull=name__isnull, name__nisnull=name__nisnull, name__isnotnull=name__isnotnull, name__l=name__l, name__like=name__like, name__nl=name__nl, name__nlike=name__nlike, name__notlike=name__notlike, name__il=name__il, name__ilike=name__ilike, name__nil=name__nil, name__nilike=name__nilike, name__notilike=name__notilike, name__desc=name__desc, name__asc=name__asc, stream_url__eq=stream_url__eq, stream_url__ne=stream_url__ne, stream_url__gt=stream_url__gt, stream_url__gte=stream_url__gte, stream_url__lt=stream_url__lt, stream_url__lte=stream_url__lte, stream_url__in=stream_url__in, stream_url__nin=stream_url__nin, stream_url__notin=stream_url__notin, stream_url__isnull=stream_url__isnull, stream_url__nisnull=stream_url__nisnull, stream_url__isnotnull=stream_url__isnotnull, stream_url__l=stream_url__l, stream_url__like=stream_url__like, stream_url__nl=stream_url__nl, stream_url__nlike=stream_url__nlike, stream_url__notlike=stream_url__notlike, stream_url__il=stream_url__il, stream_url__ilike=stream_url__ilike, stream_url__nil=stream_url__nil, stream_url__nilike=stream_url__nilike, stream_url__notilike=stream_url__notilike, stream_url__desc=stream_url__desc, stream_url__asc=stream_url__asc, last_seen__eq=last_seen__eq, last_seen__ne=last_seen__ne, last_seen__gt=last_seen__gt, last_seen__gte=last_seen__gte, last_seen__lt=last_seen__lt, last_seen__lte=last_seen__lte, last_seen__in=last_seen__in, last_seen__nin=last_seen__nin, last_seen__notin=last_seen__notin, last_seen__isnull=last_seen__isnull, last_seen__nisnull=last_seen__nisnull, last_seen__isnotnull=last_seen__isnotnull, last_seen__l=last_seen__l, last_seen__like=last_seen__like, last_seen__nl=last_seen__nl, last_seen__nlike=last_seen__nlike, last_seen__notlike=last_seen__notlike, last_seen__il=last_seen__il, last_seen__ilike=last_seen__ilike, last_seen__nil=last_seen__nil, last_seen__nilike=last_seen__nilike, last_seen__notilike=last_seen__notilike, last_seen__desc=last_seen__desc, last_seen__asc=last_seen__asc) + api_response = api_instance.get_cameras(limit=limit, offset=offset, depth=depth, id__eq=id__eq, id__ne=id__ne, id__gt=id__gt, id__gte=id__gte, id__lt=id__lt, id__lte=id__lte, id__in=id__in, id__nin=id__nin, id__notin=id__notin, id__isnull=id__isnull, id__nisnull=id__nisnull, id__isnotnull=id__isnotnull, id__l=id__l, id__like=id__like, id__nl=id__nl, id__nlike=id__nlike, id__notlike=id__notlike, id__il=id__il, id__ilike=id__ilike, id__nil=id__nil, id__nilike=id__nilike, id__notilike=id__notilike, id__desc=id__desc, id__asc=id__asc, created_at__eq=created_at__eq, created_at__ne=created_at__ne, created_at__gt=created_at__gt, created_at__gte=created_at__gte, created_at__lt=created_at__lt, created_at__lte=created_at__lte, created_at__in=created_at__in, created_at__nin=created_at__nin, created_at__notin=created_at__notin, created_at__isnull=created_at__isnull, created_at__nisnull=created_at__nisnull, created_at__isnotnull=created_at__isnotnull, created_at__l=created_at__l, created_at__like=created_at__like, created_at__nl=created_at__nl, created_at__nlike=created_at__nlike, created_at__notlike=created_at__notlike, created_at__il=created_at__il, created_at__ilike=created_at__ilike, created_at__nil=created_at__nil, created_at__nilike=created_at__nilike, created_at__notilike=created_at__notilike, created_at__desc=created_at__desc, created_at__asc=created_at__asc, updated_at__eq=updated_at__eq, updated_at__ne=updated_at__ne, updated_at__gt=updated_at__gt, updated_at__gte=updated_at__gte, updated_at__lt=updated_at__lt, updated_at__lte=updated_at__lte, updated_at__in=updated_at__in, updated_at__nin=updated_at__nin, updated_at__notin=updated_at__notin, updated_at__isnull=updated_at__isnull, updated_at__nisnull=updated_at__nisnull, updated_at__isnotnull=updated_at__isnotnull, updated_at__l=updated_at__l, updated_at__like=updated_at__like, updated_at__nl=updated_at__nl, updated_at__nlike=updated_at__nlike, updated_at__notlike=updated_at__notlike, updated_at__il=updated_at__il, updated_at__ilike=updated_at__ilike, updated_at__nil=updated_at__nil, updated_at__nilike=updated_at__nilike, updated_at__notilike=updated_at__notilike, updated_at__desc=updated_at__desc, updated_at__asc=updated_at__asc, deleted_at__eq=deleted_at__eq, deleted_at__ne=deleted_at__ne, deleted_at__gt=deleted_at__gt, deleted_at__gte=deleted_at__gte, deleted_at__lt=deleted_at__lt, deleted_at__lte=deleted_at__lte, deleted_at__in=deleted_at__in, deleted_at__nin=deleted_at__nin, deleted_at__notin=deleted_at__notin, deleted_at__isnull=deleted_at__isnull, deleted_at__nisnull=deleted_at__nisnull, deleted_at__isnotnull=deleted_at__isnotnull, deleted_at__l=deleted_at__l, deleted_at__like=deleted_at__like, deleted_at__nl=deleted_at__nl, deleted_at__nlike=deleted_at__nlike, deleted_at__notlike=deleted_at__notlike, deleted_at__il=deleted_at__il, deleted_at__ilike=deleted_at__ilike, deleted_at__nil=deleted_at__nil, deleted_at__nilike=deleted_at__nilike, deleted_at__notilike=deleted_at__notilike, deleted_at__desc=deleted_at__desc, deleted_at__asc=deleted_at__asc, name__eq=name__eq, name__ne=name__ne, name__gt=name__gt, name__gte=name__gte, name__lt=name__lt, name__lte=name__lte, name__in=name__in, name__nin=name__nin, name__notin=name__notin, name__isnull=name__isnull, name__nisnull=name__nisnull, name__isnotnull=name__isnotnull, name__l=name__l, name__like=name__like, name__nl=name__nl, name__nlike=name__nlike, name__notlike=name__notlike, name__il=name__il, name__ilike=name__ilike, name__nil=name__nil, name__nilike=name__nilike, name__notilike=name__notilike, name__desc=name__desc, name__asc=name__asc, stream_url__eq=stream_url__eq, stream_url__ne=stream_url__ne, stream_url__gt=stream_url__gt, stream_url__gte=stream_url__gte, stream_url__lt=stream_url__lt, stream_url__lte=stream_url__lte, stream_url__in=stream_url__in, stream_url__nin=stream_url__nin, stream_url__notin=stream_url__notin, stream_url__isnull=stream_url__isnull, stream_url__nisnull=stream_url__nisnull, stream_url__isnotnull=stream_url__isnotnull, stream_url__l=stream_url__l, stream_url__like=stream_url__like, stream_url__nl=stream_url__nl, stream_url__nlike=stream_url__nlike, stream_url__notlike=stream_url__notlike, stream_url__il=stream_url__il, stream_url__ilike=stream_url__ilike, stream_url__nil=stream_url__nil, stream_url__nilike=stream_url__nilike, stream_url__notilike=stream_url__notilike, stream_url__desc=stream_url__desc, stream_url__asc=stream_url__asc, last_seen__eq=last_seen__eq, last_seen__ne=last_seen__ne, last_seen__gt=last_seen__gt, last_seen__gte=last_seen__gte, last_seen__lt=last_seen__lt, last_seen__lte=last_seen__lte, last_seen__in=last_seen__in, last_seen__nin=last_seen__nin, last_seen__notin=last_seen__notin, last_seen__isnull=last_seen__isnull, last_seen__nisnull=last_seen__nisnull, last_seen__isnotnull=last_seen__isnotnull, last_seen__l=last_seen__l, last_seen__like=last_seen__like, last_seen__nl=last_seen__nl, last_seen__nlike=last_seen__nlike, last_seen__notlike=last_seen__notlike, last_seen__il=last_seen__il, last_seen__ilike=last_seen__ilike, last_seen__nil=last_seen__nil, last_seen__nilike=last_seen__nilike, last_seen__notilike=last_seen__notilike, last_seen__desc=last_seen__desc, last_seen__asc=last_seen__asc, claimed_at__eq=claimed_at__eq, claimed_at__ne=claimed_at__ne, claimed_at__gt=claimed_at__gt, claimed_at__gte=claimed_at__gte, claimed_at__lt=claimed_at__lt, claimed_at__lte=claimed_at__lte, claimed_at__in=claimed_at__in, claimed_at__nin=claimed_at__nin, claimed_at__notin=claimed_at__notin, claimed_at__isnull=claimed_at__isnull, claimed_at__nisnull=claimed_at__nisnull, claimed_at__isnotnull=claimed_at__isnotnull, claimed_at__l=claimed_at__l, claimed_at__like=claimed_at__like, claimed_at__nl=claimed_at__nl, claimed_at__nlike=claimed_at__nlike, claimed_at__notlike=claimed_at__notlike, claimed_at__il=claimed_at__il, claimed_at__ilike=claimed_at__ilike, claimed_at__nil=claimed_at__nil, claimed_at__nilike=claimed_at__nilike, claimed_at__notilike=claimed_at__notilike, claimed_at__desc=claimed_at__desc, claimed_at__asc=claimed_at__asc, claim_duration__eq=claim_duration__eq, claim_duration__ne=claim_duration__ne, claim_duration__gt=claim_duration__gt, claim_duration__gte=claim_duration__gte, claim_duration__lt=claim_duration__lt, claim_duration__lte=claim_duration__lte, claim_duration__in=claim_duration__in, claim_duration__nin=claim_duration__nin, claim_duration__notin=claim_duration__notin, claim_duration__isnull=claim_duration__isnull, claim_duration__nisnull=claim_duration__nisnull, claim_duration__isnotnull=claim_duration__isnotnull, claim_duration__l=claim_duration__l, claim_duration__like=claim_duration__like, claim_duration__nl=claim_duration__nl, claim_duration__nlike=claim_duration__nlike, claim_duration__notlike=claim_duration__notlike, claim_duration__il=claim_duration__il, claim_duration__ilike=claim_duration__ilike, claim_duration__nil=claim_duration__nil, claim_duration__nilike=claim_duration__nilike, claim_duration__notilike=claim_duration__notilike, claim_duration__desc=claim_duration__desc, claim_duration__asc=claim_duration__asc, claim_expires_at__eq=claim_expires_at__eq, claim_expires_at__ne=claim_expires_at__ne, claim_expires_at__gt=claim_expires_at__gt, claim_expires_at__gte=claim_expires_at__gte, claim_expires_at__lt=claim_expires_at__lt, claim_expires_at__lte=claim_expires_at__lte, claim_expires_at__in=claim_expires_at__in, claim_expires_at__nin=claim_expires_at__nin, claim_expires_at__notin=claim_expires_at__notin, claim_expires_at__isnull=claim_expires_at__isnull, claim_expires_at__nisnull=claim_expires_at__nisnull, claim_expires_at__isnotnull=claim_expires_at__isnotnull, claim_expires_at__l=claim_expires_at__l, claim_expires_at__like=claim_expires_at__like, claim_expires_at__nl=claim_expires_at__nl, claim_expires_at__nlike=claim_expires_at__nlike, claim_expires_at__notlike=claim_expires_at__notlike, claim_expires_at__il=claim_expires_at__il, claim_expires_at__ilike=claim_expires_at__ilike, claim_expires_at__nil=claim_expires_at__nil, claim_expires_at__nilike=claim_expires_at__nilike, claim_expires_at__notilike=claim_expires_at__notilike, claim_expires_at__desc=claim_expires_at__desc, claim_expires_at__asc=claim_expires_at__asc) print("The response of CameraApi->get_cameras:\n") pprint(api_response) except Exception as e: @@ -528,6 +600,78 @@ Name | Type | Description | Notes **last_seen__notilike** | **str**| SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] **last_seen__desc** | **str**| SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) | [optional] **last_seen__asc** | **str**| SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) | [optional] + **claimed_at__eq** | **datetime**| SQL = operator | [optional] + **claimed_at__ne** | **datetime**| SQL != operator | [optional] + **claimed_at__gt** | **datetime**| SQL > operator, may not work with all column types | [optional] + **claimed_at__gte** | **datetime**| SQL >= operator, may not work with all column types | [optional] + **claimed_at__lt** | **datetime**| SQL < operator, may not work with all column types | [optional] + **claimed_at__lte** | **datetime**| SQL <= operator, may not work with all column types | [optional] + **claimed_at__in** | **datetime**| SQL IN operator, permits comma-separated values | [optional] + **claimed_at__nin** | **datetime**| SQL NOT IN operator, permits comma-separated values | [optional] + **claimed_at__notin** | **datetime**| SQL NOT IN operator, permits comma-separated values | [optional] + **claimed_at__isnull** | **str**| SQL IS NULL operator, value is ignored (presence of key is sufficient) | [optional] + **claimed_at__nisnull** | **str**| SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) | [optional] + **claimed_at__isnotnull** | **str**| SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) | [optional] + **claimed_at__l** | **str**| SQL LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claimed_at__like** | **str**| SQL LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claimed_at__nl** | **str**| SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claimed_at__nlike** | **str**| SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claimed_at__notlike** | **str**| SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claimed_at__il** | **str**| SQL ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claimed_at__ilike** | **str**| SQL ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claimed_at__nil** | **str**| SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claimed_at__nilike** | **str**| SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claimed_at__notilike** | **str**| SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claimed_at__desc** | **str**| SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) | [optional] + **claimed_at__asc** | **str**| SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) | [optional] + **claim_duration__eq** | **int**| SQL = operator | [optional] + **claim_duration__ne** | **int**| SQL != operator | [optional] + **claim_duration__gt** | **int**| SQL > operator, may not work with all column types | [optional] + **claim_duration__gte** | **int**| SQL >= operator, may not work with all column types | [optional] + **claim_duration__lt** | **int**| SQL < operator, may not work with all column types | [optional] + **claim_duration__lte** | **int**| SQL <= operator, may not work with all column types | [optional] + **claim_duration__in** | **int**| SQL IN operator, permits comma-separated values | [optional] + **claim_duration__nin** | **int**| SQL NOT IN operator, permits comma-separated values | [optional] + **claim_duration__notin** | **int**| SQL NOT IN operator, permits comma-separated values | [optional] + **claim_duration__isnull** | **str**| SQL IS NULL operator, value is ignored (presence of key is sufficient) | [optional] + **claim_duration__nisnull** | **str**| SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) | [optional] + **claim_duration__isnotnull** | **str**| SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) | [optional] + **claim_duration__l** | **str**| SQL LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_duration__like** | **str**| SQL LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_duration__nl** | **str**| SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_duration__nlike** | **str**| SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_duration__notlike** | **str**| SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_duration__il** | **str**| SQL ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_duration__ilike** | **str**| SQL ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_duration__nil** | **str**| SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_duration__nilike** | **str**| SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_duration__notilike** | **str**| SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_duration__desc** | **str**| SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) | [optional] + **claim_duration__asc** | **str**| SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) | [optional] + **claim_expires_at__eq** | **datetime**| SQL = operator | [optional] + **claim_expires_at__ne** | **datetime**| SQL != operator | [optional] + **claim_expires_at__gt** | **datetime**| SQL > operator, may not work with all column types | [optional] + **claim_expires_at__gte** | **datetime**| SQL >= operator, may not work with all column types | [optional] + **claim_expires_at__lt** | **datetime**| SQL < operator, may not work with all column types | [optional] + **claim_expires_at__lte** | **datetime**| SQL <= operator, may not work with all column types | [optional] + **claim_expires_at__in** | **datetime**| SQL IN operator, permits comma-separated values | [optional] + **claim_expires_at__nin** | **datetime**| SQL NOT IN operator, permits comma-separated values | [optional] + **claim_expires_at__notin** | **datetime**| SQL NOT IN operator, permits comma-separated values | [optional] + **claim_expires_at__isnull** | **str**| SQL IS NULL operator, value is ignored (presence of key is sufficient) | [optional] + **claim_expires_at__nisnull** | **str**| SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) | [optional] + **claim_expires_at__isnotnull** | **str**| SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) | [optional] + **claim_expires_at__l** | **str**| SQL LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_expires_at__like** | **str**| SQL LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_expires_at__nl** | **str**| SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_expires_at__nlike** | **str**| SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_expires_at__notlike** | **str**| SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_expires_at__il** | **str**| SQL ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_expires_at__ilike** | **str**| SQL ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_expires_at__nil** | **str**| SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_expires_at__nilike** | **str**| SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_expires_at__notilike** | **str**| SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % | [optional] + **claim_expires_at__desc** | **str**| SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) | [optional] + **claim_expires_at__asc** | **str**| SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) | [optional] ### Return type diff --git a/object_detector/api/openapi_client/api/camera_api.py b/object_detector/api/openapi_client/api/camera_api.py index 7ec31e6..d8a9523 100644 --- a/object_detector/api/openapi_client/api/camera_api.py +++ b/object_detector/api/openapi_client/api/camera_api.py @@ -759,6 +759,78 @@ def get_cameras( last_seen__notilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, last_seen__desc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)")] = None, last_seen__asc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__eq: Annotated[Optional[datetime], Field(description="SQL = operator")] = None, + claimed_at__ne: Annotated[Optional[datetime], Field(description="SQL != operator")] = None, + claimed_at__gt: Annotated[Optional[datetime], Field(description="SQL > operator, may not work with all column types")] = None, + claimed_at__gte: Annotated[Optional[datetime], Field(description="SQL >= operator, may not work with all column types")] = None, + claimed_at__lt: Annotated[Optional[datetime], Field(description="SQL < operator, may not work with all column types")] = None, + claimed_at__lte: Annotated[Optional[datetime], Field(description="SQL <= operator, may not work with all column types")] = None, + claimed_at__in: Annotated[Optional[datetime], Field(description="SQL IN operator, permits comma-separated values")] = None, + claimed_at__nin: Annotated[Optional[datetime], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claimed_at__notin: Annotated[Optional[datetime], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claimed_at__isnull: Annotated[Optional[StrictStr], Field(description="SQL IS NULL operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__nisnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__isnotnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__l: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__like: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__nl: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__nlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__notlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__il: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__ilike: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__nil: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__nilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__notilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__desc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__asc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__eq: Annotated[Optional[StrictInt], Field(description="SQL = operator")] = None, + claim_duration__ne: Annotated[Optional[StrictInt], Field(description="SQL != operator")] = None, + claim_duration__gt: Annotated[Optional[StrictInt], Field(description="SQL > operator, may not work with all column types")] = None, + claim_duration__gte: Annotated[Optional[StrictInt], Field(description="SQL >= operator, may not work with all column types")] = None, + claim_duration__lt: Annotated[Optional[StrictInt], Field(description="SQL < operator, may not work with all column types")] = None, + claim_duration__lte: Annotated[Optional[StrictInt], Field(description="SQL <= operator, may not work with all column types")] = None, + claim_duration__in: Annotated[Optional[StrictInt], Field(description="SQL IN operator, permits comma-separated values")] = None, + claim_duration__nin: Annotated[Optional[StrictInt], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claim_duration__notin: Annotated[Optional[StrictInt], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claim_duration__isnull: Annotated[Optional[StrictStr], Field(description="SQL IS NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__nisnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__isnotnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__l: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__like: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__nl: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__nlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__notlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__il: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__ilike: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__nil: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__nilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__notilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__desc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__asc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__eq: Annotated[Optional[datetime], Field(description="SQL = operator")] = None, + claim_expires_at__ne: Annotated[Optional[datetime], Field(description="SQL != operator")] = None, + claim_expires_at__gt: Annotated[Optional[datetime], Field(description="SQL > operator, may not work with all column types")] = None, + claim_expires_at__gte: Annotated[Optional[datetime], Field(description="SQL >= operator, may not work with all column types")] = None, + claim_expires_at__lt: Annotated[Optional[datetime], Field(description="SQL < operator, may not work with all column types")] = None, + claim_expires_at__lte: Annotated[Optional[datetime], Field(description="SQL <= operator, may not work with all column types")] = None, + claim_expires_at__in: Annotated[Optional[datetime], Field(description="SQL IN operator, permits comma-separated values")] = None, + claim_expires_at__nin: Annotated[Optional[datetime], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claim_expires_at__notin: Annotated[Optional[datetime], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claim_expires_at__isnull: Annotated[Optional[StrictStr], Field(description="SQL IS NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__nisnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__isnotnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__l: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__like: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__nl: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__nlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__notlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__il: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__ilike: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__nil: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__nilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__notilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__desc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__asc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1117,6 +1189,150 @@ def get_cameras( :type last_seen__desc: str :param last_seen__asc: SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) :type last_seen__asc: str + :param claimed_at__eq: SQL = operator + :type claimed_at__eq: datetime + :param claimed_at__ne: SQL != operator + :type claimed_at__ne: datetime + :param claimed_at__gt: SQL > operator, may not work with all column types + :type claimed_at__gt: datetime + :param claimed_at__gte: SQL >= operator, may not work with all column types + :type claimed_at__gte: datetime + :param claimed_at__lt: SQL < operator, may not work with all column types + :type claimed_at__lt: datetime + :param claimed_at__lte: SQL <= operator, may not work with all column types + :type claimed_at__lte: datetime + :param claimed_at__in: SQL IN operator, permits comma-separated values + :type claimed_at__in: datetime + :param claimed_at__nin: SQL NOT IN operator, permits comma-separated values + :type claimed_at__nin: datetime + :param claimed_at__notin: SQL NOT IN operator, permits comma-separated values + :type claimed_at__notin: datetime + :param claimed_at__isnull: SQL IS NULL operator, value is ignored (presence of key is sufficient) + :type claimed_at__isnull: str + :param claimed_at__nisnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claimed_at__nisnull: str + :param claimed_at__isnotnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claimed_at__isnotnull: str + :param claimed_at__l: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__l: str + :param claimed_at__like: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__like: str + :param claimed_at__nl: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__nl: str + :param claimed_at__nlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__nlike: str + :param claimed_at__notlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__notlike: str + :param claimed_at__il: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__il: str + :param claimed_at__ilike: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__ilike: str + :param claimed_at__nil: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__nil: str + :param claimed_at__nilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__nilike: str + :param claimed_at__notilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__notilike: str + :param claimed_at__desc: SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + :type claimed_at__desc: str + :param claimed_at__asc: SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + :type claimed_at__asc: str + :param claim_duration__eq: SQL = operator + :type claim_duration__eq: int + :param claim_duration__ne: SQL != operator + :type claim_duration__ne: int + :param claim_duration__gt: SQL > operator, may not work with all column types + :type claim_duration__gt: int + :param claim_duration__gte: SQL >= operator, may not work with all column types + :type claim_duration__gte: int + :param claim_duration__lt: SQL < operator, may not work with all column types + :type claim_duration__lt: int + :param claim_duration__lte: SQL <= operator, may not work with all column types + :type claim_duration__lte: int + :param claim_duration__in: SQL IN operator, permits comma-separated values + :type claim_duration__in: int + :param claim_duration__nin: SQL NOT IN operator, permits comma-separated values + :type claim_duration__nin: int + :param claim_duration__notin: SQL NOT IN operator, permits comma-separated values + :type claim_duration__notin: int + :param claim_duration__isnull: SQL IS NULL operator, value is ignored (presence of key is sufficient) + :type claim_duration__isnull: str + :param claim_duration__nisnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claim_duration__nisnull: str + :param claim_duration__isnotnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claim_duration__isnotnull: str + :param claim_duration__l: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__l: str + :param claim_duration__like: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__like: str + :param claim_duration__nl: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__nl: str + :param claim_duration__nlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__nlike: str + :param claim_duration__notlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__notlike: str + :param claim_duration__il: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__il: str + :param claim_duration__ilike: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__ilike: str + :param claim_duration__nil: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__nil: str + :param claim_duration__nilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__nilike: str + :param claim_duration__notilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__notilike: str + :param claim_duration__desc: SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + :type claim_duration__desc: str + :param claim_duration__asc: SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + :type claim_duration__asc: str + :param claim_expires_at__eq: SQL = operator + :type claim_expires_at__eq: datetime + :param claim_expires_at__ne: SQL != operator + :type claim_expires_at__ne: datetime + :param claim_expires_at__gt: SQL > operator, may not work with all column types + :type claim_expires_at__gt: datetime + :param claim_expires_at__gte: SQL >= operator, may not work with all column types + :type claim_expires_at__gte: datetime + :param claim_expires_at__lt: SQL < operator, may not work with all column types + :type claim_expires_at__lt: datetime + :param claim_expires_at__lte: SQL <= operator, may not work with all column types + :type claim_expires_at__lte: datetime + :param claim_expires_at__in: SQL IN operator, permits comma-separated values + :type claim_expires_at__in: datetime + :param claim_expires_at__nin: SQL NOT IN operator, permits comma-separated values + :type claim_expires_at__nin: datetime + :param claim_expires_at__notin: SQL NOT IN operator, permits comma-separated values + :type claim_expires_at__notin: datetime + :param claim_expires_at__isnull: SQL IS NULL operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__isnull: str + :param claim_expires_at__nisnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__nisnull: str + :param claim_expires_at__isnotnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__isnotnull: str + :param claim_expires_at__l: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__l: str + :param claim_expires_at__like: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__like: str + :param claim_expires_at__nl: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__nl: str + :param claim_expires_at__nlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__nlike: str + :param claim_expires_at__notlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__notlike: str + :param claim_expires_at__il: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__il: str + :param claim_expires_at__ilike: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__ilike: str + :param claim_expires_at__nil: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__nil: str + :param claim_expires_at__nilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__nilike: str + :param claim_expires_at__notilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__notilike: str + :param claim_expires_at__desc: SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__desc: str + :param claim_expires_at__asc: SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__asc: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1311,6 +1527,78 @@ def get_cameras( last_seen__notilike=last_seen__notilike, last_seen__desc=last_seen__desc, last_seen__asc=last_seen__asc, + claimed_at__eq=claimed_at__eq, + claimed_at__ne=claimed_at__ne, + claimed_at__gt=claimed_at__gt, + claimed_at__gte=claimed_at__gte, + claimed_at__lt=claimed_at__lt, + claimed_at__lte=claimed_at__lte, + claimed_at__in=claimed_at__in, + claimed_at__nin=claimed_at__nin, + claimed_at__notin=claimed_at__notin, + claimed_at__isnull=claimed_at__isnull, + claimed_at__nisnull=claimed_at__nisnull, + claimed_at__isnotnull=claimed_at__isnotnull, + claimed_at__l=claimed_at__l, + claimed_at__like=claimed_at__like, + claimed_at__nl=claimed_at__nl, + claimed_at__nlike=claimed_at__nlike, + claimed_at__notlike=claimed_at__notlike, + claimed_at__il=claimed_at__il, + claimed_at__ilike=claimed_at__ilike, + claimed_at__nil=claimed_at__nil, + claimed_at__nilike=claimed_at__nilike, + claimed_at__notilike=claimed_at__notilike, + claimed_at__desc=claimed_at__desc, + claimed_at__asc=claimed_at__asc, + claim_duration__eq=claim_duration__eq, + claim_duration__ne=claim_duration__ne, + claim_duration__gt=claim_duration__gt, + claim_duration__gte=claim_duration__gte, + claim_duration__lt=claim_duration__lt, + claim_duration__lte=claim_duration__lte, + claim_duration__in=claim_duration__in, + claim_duration__nin=claim_duration__nin, + claim_duration__notin=claim_duration__notin, + claim_duration__isnull=claim_duration__isnull, + claim_duration__nisnull=claim_duration__nisnull, + claim_duration__isnotnull=claim_duration__isnotnull, + claim_duration__l=claim_duration__l, + claim_duration__like=claim_duration__like, + claim_duration__nl=claim_duration__nl, + claim_duration__nlike=claim_duration__nlike, + claim_duration__notlike=claim_duration__notlike, + claim_duration__il=claim_duration__il, + claim_duration__ilike=claim_duration__ilike, + claim_duration__nil=claim_duration__nil, + claim_duration__nilike=claim_duration__nilike, + claim_duration__notilike=claim_duration__notilike, + claim_duration__desc=claim_duration__desc, + claim_duration__asc=claim_duration__asc, + claim_expires_at__eq=claim_expires_at__eq, + claim_expires_at__ne=claim_expires_at__ne, + claim_expires_at__gt=claim_expires_at__gt, + claim_expires_at__gte=claim_expires_at__gte, + claim_expires_at__lt=claim_expires_at__lt, + claim_expires_at__lte=claim_expires_at__lte, + claim_expires_at__in=claim_expires_at__in, + claim_expires_at__nin=claim_expires_at__nin, + claim_expires_at__notin=claim_expires_at__notin, + claim_expires_at__isnull=claim_expires_at__isnull, + claim_expires_at__nisnull=claim_expires_at__nisnull, + claim_expires_at__isnotnull=claim_expires_at__isnotnull, + claim_expires_at__l=claim_expires_at__l, + claim_expires_at__like=claim_expires_at__like, + claim_expires_at__nl=claim_expires_at__nl, + claim_expires_at__nlike=claim_expires_at__nlike, + claim_expires_at__notlike=claim_expires_at__notlike, + claim_expires_at__il=claim_expires_at__il, + claim_expires_at__ilike=claim_expires_at__ilike, + claim_expires_at__nil=claim_expires_at__nil, + claim_expires_at__nilike=claim_expires_at__nilike, + claim_expires_at__notilike=claim_expires_at__notilike, + claim_expires_at__desc=claim_expires_at__desc, + claim_expires_at__asc=claim_expires_at__asc, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1505,6 +1793,78 @@ def get_cameras_with_http_info( last_seen__notilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, last_seen__desc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)")] = None, last_seen__asc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__eq: Annotated[Optional[datetime], Field(description="SQL = operator")] = None, + claimed_at__ne: Annotated[Optional[datetime], Field(description="SQL != operator")] = None, + claimed_at__gt: Annotated[Optional[datetime], Field(description="SQL > operator, may not work with all column types")] = None, + claimed_at__gte: Annotated[Optional[datetime], Field(description="SQL >= operator, may not work with all column types")] = None, + claimed_at__lt: Annotated[Optional[datetime], Field(description="SQL < operator, may not work with all column types")] = None, + claimed_at__lte: Annotated[Optional[datetime], Field(description="SQL <= operator, may not work with all column types")] = None, + claimed_at__in: Annotated[Optional[datetime], Field(description="SQL IN operator, permits comma-separated values")] = None, + claimed_at__nin: Annotated[Optional[datetime], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claimed_at__notin: Annotated[Optional[datetime], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claimed_at__isnull: Annotated[Optional[StrictStr], Field(description="SQL IS NULL operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__nisnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__isnotnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__l: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__like: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__nl: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__nlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__notlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__il: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__ilike: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__nil: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__nilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__notilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__desc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__asc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__eq: Annotated[Optional[StrictInt], Field(description="SQL = operator")] = None, + claim_duration__ne: Annotated[Optional[StrictInt], Field(description="SQL != operator")] = None, + claim_duration__gt: Annotated[Optional[StrictInt], Field(description="SQL > operator, may not work with all column types")] = None, + claim_duration__gte: Annotated[Optional[StrictInt], Field(description="SQL >= operator, may not work with all column types")] = None, + claim_duration__lt: Annotated[Optional[StrictInt], Field(description="SQL < operator, may not work with all column types")] = None, + claim_duration__lte: Annotated[Optional[StrictInt], Field(description="SQL <= operator, may not work with all column types")] = None, + claim_duration__in: Annotated[Optional[StrictInt], Field(description="SQL IN operator, permits comma-separated values")] = None, + claim_duration__nin: Annotated[Optional[StrictInt], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claim_duration__notin: Annotated[Optional[StrictInt], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claim_duration__isnull: Annotated[Optional[StrictStr], Field(description="SQL IS NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__nisnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__isnotnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__l: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__like: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__nl: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__nlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__notlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__il: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__ilike: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__nil: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__nilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__notilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__desc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__asc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__eq: Annotated[Optional[datetime], Field(description="SQL = operator")] = None, + claim_expires_at__ne: Annotated[Optional[datetime], Field(description="SQL != operator")] = None, + claim_expires_at__gt: Annotated[Optional[datetime], Field(description="SQL > operator, may not work with all column types")] = None, + claim_expires_at__gte: Annotated[Optional[datetime], Field(description="SQL >= operator, may not work with all column types")] = None, + claim_expires_at__lt: Annotated[Optional[datetime], Field(description="SQL < operator, may not work with all column types")] = None, + claim_expires_at__lte: Annotated[Optional[datetime], Field(description="SQL <= operator, may not work with all column types")] = None, + claim_expires_at__in: Annotated[Optional[datetime], Field(description="SQL IN operator, permits comma-separated values")] = None, + claim_expires_at__nin: Annotated[Optional[datetime], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claim_expires_at__notin: Annotated[Optional[datetime], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claim_expires_at__isnull: Annotated[Optional[StrictStr], Field(description="SQL IS NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__nisnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__isnotnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__l: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__like: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__nl: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__nlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__notlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__il: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__ilike: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__nil: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__nilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__notilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__desc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__asc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1863,6 +2223,150 @@ def get_cameras_with_http_info( :type last_seen__desc: str :param last_seen__asc: SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) :type last_seen__asc: str + :param claimed_at__eq: SQL = operator + :type claimed_at__eq: datetime + :param claimed_at__ne: SQL != operator + :type claimed_at__ne: datetime + :param claimed_at__gt: SQL > operator, may not work with all column types + :type claimed_at__gt: datetime + :param claimed_at__gte: SQL >= operator, may not work with all column types + :type claimed_at__gte: datetime + :param claimed_at__lt: SQL < operator, may not work with all column types + :type claimed_at__lt: datetime + :param claimed_at__lte: SQL <= operator, may not work with all column types + :type claimed_at__lte: datetime + :param claimed_at__in: SQL IN operator, permits comma-separated values + :type claimed_at__in: datetime + :param claimed_at__nin: SQL NOT IN operator, permits comma-separated values + :type claimed_at__nin: datetime + :param claimed_at__notin: SQL NOT IN operator, permits comma-separated values + :type claimed_at__notin: datetime + :param claimed_at__isnull: SQL IS NULL operator, value is ignored (presence of key is sufficient) + :type claimed_at__isnull: str + :param claimed_at__nisnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claimed_at__nisnull: str + :param claimed_at__isnotnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claimed_at__isnotnull: str + :param claimed_at__l: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__l: str + :param claimed_at__like: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__like: str + :param claimed_at__nl: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__nl: str + :param claimed_at__nlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__nlike: str + :param claimed_at__notlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__notlike: str + :param claimed_at__il: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__il: str + :param claimed_at__ilike: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__ilike: str + :param claimed_at__nil: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__nil: str + :param claimed_at__nilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__nilike: str + :param claimed_at__notilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__notilike: str + :param claimed_at__desc: SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + :type claimed_at__desc: str + :param claimed_at__asc: SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + :type claimed_at__asc: str + :param claim_duration__eq: SQL = operator + :type claim_duration__eq: int + :param claim_duration__ne: SQL != operator + :type claim_duration__ne: int + :param claim_duration__gt: SQL > operator, may not work with all column types + :type claim_duration__gt: int + :param claim_duration__gte: SQL >= operator, may not work with all column types + :type claim_duration__gte: int + :param claim_duration__lt: SQL < operator, may not work with all column types + :type claim_duration__lt: int + :param claim_duration__lte: SQL <= operator, may not work with all column types + :type claim_duration__lte: int + :param claim_duration__in: SQL IN operator, permits comma-separated values + :type claim_duration__in: int + :param claim_duration__nin: SQL NOT IN operator, permits comma-separated values + :type claim_duration__nin: int + :param claim_duration__notin: SQL NOT IN operator, permits comma-separated values + :type claim_duration__notin: int + :param claim_duration__isnull: SQL IS NULL operator, value is ignored (presence of key is sufficient) + :type claim_duration__isnull: str + :param claim_duration__nisnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claim_duration__nisnull: str + :param claim_duration__isnotnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claim_duration__isnotnull: str + :param claim_duration__l: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__l: str + :param claim_duration__like: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__like: str + :param claim_duration__nl: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__nl: str + :param claim_duration__nlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__nlike: str + :param claim_duration__notlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__notlike: str + :param claim_duration__il: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__il: str + :param claim_duration__ilike: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__ilike: str + :param claim_duration__nil: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__nil: str + :param claim_duration__nilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__nilike: str + :param claim_duration__notilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__notilike: str + :param claim_duration__desc: SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + :type claim_duration__desc: str + :param claim_duration__asc: SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + :type claim_duration__asc: str + :param claim_expires_at__eq: SQL = operator + :type claim_expires_at__eq: datetime + :param claim_expires_at__ne: SQL != operator + :type claim_expires_at__ne: datetime + :param claim_expires_at__gt: SQL > operator, may not work with all column types + :type claim_expires_at__gt: datetime + :param claim_expires_at__gte: SQL >= operator, may not work with all column types + :type claim_expires_at__gte: datetime + :param claim_expires_at__lt: SQL < operator, may not work with all column types + :type claim_expires_at__lt: datetime + :param claim_expires_at__lte: SQL <= operator, may not work with all column types + :type claim_expires_at__lte: datetime + :param claim_expires_at__in: SQL IN operator, permits comma-separated values + :type claim_expires_at__in: datetime + :param claim_expires_at__nin: SQL NOT IN operator, permits comma-separated values + :type claim_expires_at__nin: datetime + :param claim_expires_at__notin: SQL NOT IN operator, permits comma-separated values + :type claim_expires_at__notin: datetime + :param claim_expires_at__isnull: SQL IS NULL operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__isnull: str + :param claim_expires_at__nisnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__nisnull: str + :param claim_expires_at__isnotnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__isnotnull: str + :param claim_expires_at__l: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__l: str + :param claim_expires_at__like: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__like: str + :param claim_expires_at__nl: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__nl: str + :param claim_expires_at__nlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__nlike: str + :param claim_expires_at__notlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__notlike: str + :param claim_expires_at__il: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__il: str + :param claim_expires_at__ilike: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__ilike: str + :param claim_expires_at__nil: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__nil: str + :param claim_expires_at__nilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__nilike: str + :param claim_expires_at__notilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__notilike: str + :param claim_expires_at__desc: SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__desc: str + :param claim_expires_at__asc: SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__asc: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2057,6 +2561,78 @@ def get_cameras_with_http_info( last_seen__notilike=last_seen__notilike, last_seen__desc=last_seen__desc, last_seen__asc=last_seen__asc, + claimed_at__eq=claimed_at__eq, + claimed_at__ne=claimed_at__ne, + claimed_at__gt=claimed_at__gt, + claimed_at__gte=claimed_at__gte, + claimed_at__lt=claimed_at__lt, + claimed_at__lte=claimed_at__lte, + claimed_at__in=claimed_at__in, + claimed_at__nin=claimed_at__nin, + claimed_at__notin=claimed_at__notin, + claimed_at__isnull=claimed_at__isnull, + claimed_at__nisnull=claimed_at__nisnull, + claimed_at__isnotnull=claimed_at__isnotnull, + claimed_at__l=claimed_at__l, + claimed_at__like=claimed_at__like, + claimed_at__nl=claimed_at__nl, + claimed_at__nlike=claimed_at__nlike, + claimed_at__notlike=claimed_at__notlike, + claimed_at__il=claimed_at__il, + claimed_at__ilike=claimed_at__ilike, + claimed_at__nil=claimed_at__nil, + claimed_at__nilike=claimed_at__nilike, + claimed_at__notilike=claimed_at__notilike, + claimed_at__desc=claimed_at__desc, + claimed_at__asc=claimed_at__asc, + claim_duration__eq=claim_duration__eq, + claim_duration__ne=claim_duration__ne, + claim_duration__gt=claim_duration__gt, + claim_duration__gte=claim_duration__gte, + claim_duration__lt=claim_duration__lt, + claim_duration__lte=claim_duration__lte, + claim_duration__in=claim_duration__in, + claim_duration__nin=claim_duration__nin, + claim_duration__notin=claim_duration__notin, + claim_duration__isnull=claim_duration__isnull, + claim_duration__nisnull=claim_duration__nisnull, + claim_duration__isnotnull=claim_duration__isnotnull, + claim_duration__l=claim_duration__l, + claim_duration__like=claim_duration__like, + claim_duration__nl=claim_duration__nl, + claim_duration__nlike=claim_duration__nlike, + claim_duration__notlike=claim_duration__notlike, + claim_duration__il=claim_duration__il, + claim_duration__ilike=claim_duration__ilike, + claim_duration__nil=claim_duration__nil, + claim_duration__nilike=claim_duration__nilike, + claim_duration__notilike=claim_duration__notilike, + claim_duration__desc=claim_duration__desc, + claim_duration__asc=claim_duration__asc, + claim_expires_at__eq=claim_expires_at__eq, + claim_expires_at__ne=claim_expires_at__ne, + claim_expires_at__gt=claim_expires_at__gt, + claim_expires_at__gte=claim_expires_at__gte, + claim_expires_at__lt=claim_expires_at__lt, + claim_expires_at__lte=claim_expires_at__lte, + claim_expires_at__in=claim_expires_at__in, + claim_expires_at__nin=claim_expires_at__nin, + claim_expires_at__notin=claim_expires_at__notin, + claim_expires_at__isnull=claim_expires_at__isnull, + claim_expires_at__nisnull=claim_expires_at__nisnull, + claim_expires_at__isnotnull=claim_expires_at__isnotnull, + claim_expires_at__l=claim_expires_at__l, + claim_expires_at__like=claim_expires_at__like, + claim_expires_at__nl=claim_expires_at__nl, + claim_expires_at__nlike=claim_expires_at__nlike, + claim_expires_at__notlike=claim_expires_at__notlike, + claim_expires_at__il=claim_expires_at__il, + claim_expires_at__ilike=claim_expires_at__ilike, + claim_expires_at__nil=claim_expires_at__nil, + claim_expires_at__nilike=claim_expires_at__nilike, + claim_expires_at__notilike=claim_expires_at__notilike, + claim_expires_at__desc=claim_expires_at__desc, + claim_expires_at__asc=claim_expires_at__asc, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2251,6 +2827,78 @@ def get_cameras_without_preload_content( last_seen__notilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, last_seen__desc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)")] = None, last_seen__asc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__eq: Annotated[Optional[datetime], Field(description="SQL = operator")] = None, + claimed_at__ne: Annotated[Optional[datetime], Field(description="SQL != operator")] = None, + claimed_at__gt: Annotated[Optional[datetime], Field(description="SQL > operator, may not work with all column types")] = None, + claimed_at__gte: Annotated[Optional[datetime], Field(description="SQL >= operator, may not work with all column types")] = None, + claimed_at__lt: Annotated[Optional[datetime], Field(description="SQL < operator, may not work with all column types")] = None, + claimed_at__lte: Annotated[Optional[datetime], Field(description="SQL <= operator, may not work with all column types")] = None, + claimed_at__in: Annotated[Optional[datetime], Field(description="SQL IN operator, permits comma-separated values")] = None, + claimed_at__nin: Annotated[Optional[datetime], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claimed_at__notin: Annotated[Optional[datetime], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claimed_at__isnull: Annotated[Optional[StrictStr], Field(description="SQL IS NULL operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__nisnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__isnotnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__l: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__like: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__nl: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__nlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__notlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__il: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__ilike: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__nil: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__nilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__notilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claimed_at__desc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)")] = None, + claimed_at__asc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__eq: Annotated[Optional[StrictInt], Field(description="SQL = operator")] = None, + claim_duration__ne: Annotated[Optional[StrictInt], Field(description="SQL != operator")] = None, + claim_duration__gt: Annotated[Optional[StrictInt], Field(description="SQL > operator, may not work with all column types")] = None, + claim_duration__gte: Annotated[Optional[StrictInt], Field(description="SQL >= operator, may not work with all column types")] = None, + claim_duration__lt: Annotated[Optional[StrictInt], Field(description="SQL < operator, may not work with all column types")] = None, + claim_duration__lte: Annotated[Optional[StrictInt], Field(description="SQL <= operator, may not work with all column types")] = None, + claim_duration__in: Annotated[Optional[StrictInt], Field(description="SQL IN operator, permits comma-separated values")] = None, + claim_duration__nin: Annotated[Optional[StrictInt], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claim_duration__notin: Annotated[Optional[StrictInt], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claim_duration__isnull: Annotated[Optional[StrictStr], Field(description="SQL IS NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__nisnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__isnotnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__l: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__like: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__nl: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__nlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__notlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__il: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__ilike: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__nil: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__nilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__notilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_duration__desc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)")] = None, + claim_duration__asc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__eq: Annotated[Optional[datetime], Field(description="SQL = operator")] = None, + claim_expires_at__ne: Annotated[Optional[datetime], Field(description="SQL != operator")] = None, + claim_expires_at__gt: Annotated[Optional[datetime], Field(description="SQL > operator, may not work with all column types")] = None, + claim_expires_at__gte: Annotated[Optional[datetime], Field(description="SQL >= operator, may not work with all column types")] = None, + claim_expires_at__lt: Annotated[Optional[datetime], Field(description="SQL < operator, may not work with all column types")] = None, + claim_expires_at__lte: Annotated[Optional[datetime], Field(description="SQL <= operator, may not work with all column types")] = None, + claim_expires_at__in: Annotated[Optional[datetime], Field(description="SQL IN operator, permits comma-separated values")] = None, + claim_expires_at__nin: Annotated[Optional[datetime], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claim_expires_at__notin: Annotated[Optional[datetime], Field(description="SQL NOT IN operator, permits comma-separated values")] = None, + claim_expires_at__isnull: Annotated[Optional[StrictStr], Field(description="SQL IS NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__nisnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__isnotnull: Annotated[Optional[StrictStr], Field(description="SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__l: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__like: Annotated[Optional[StrictStr], Field(description="SQL LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__nl: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__nlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__notlike: Annotated[Optional[StrictStr], Field(description="SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__il: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__ilike: Annotated[Optional[StrictStr], Field(description="SQL ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__nil: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__nilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__notilike: Annotated[Optional[StrictStr], Field(description="SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %")] = None, + claim_expires_at__desc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)")] = None, + claim_expires_at__asc: Annotated[Optional[StrictStr], Field(description="SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2609,6 +3257,150 @@ def get_cameras_without_preload_content( :type last_seen__desc: str :param last_seen__asc: SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) :type last_seen__asc: str + :param claimed_at__eq: SQL = operator + :type claimed_at__eq: datetime + :param claimed_at__ne: SQL != operator + :type claimed_at__ne: datetime + :param claimed_at__gt: SQL > operator, may not work with all column types + :type claimed_at__gt: datetime + :param claimed_at__gte: SQL >= operator, may not work with all column types + :type claimed_at__gte: datetime + :param claimed_at__lt: SQL < operator, may not work with all column types + :type claimed_at__lt: datetime + :param claimed_at__lte: SQL <= operator, may not work with all column types + :type claimed_at__lte: datetime + :param claimed_at__in: SQL IN operator, permits comma-separated values + :type claimed_at__in: datetime + :param claimed_at__nin: SQL NOT IN operator, permits comma-separated values + :type claimed_at__nin: datetime + :param claimed_at__notin: SQL NOT IN operator, permits comma-separated values + :type claimed_at__notin: datetime + :param claimed_at__isnull: SQL IS NULL operator, value is ignored (presence of key is sufficient) + :type claimed_at__isnull: str + :param claimed_at__nisnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claimed_at__nisnull: str + :param claimed_at__isnotnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claimed_at__isnotnull: str + :param claimed_at__l: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__l: str + :param claimed_at__like: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__like: str + :param claimed_at__nl: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__nl: str + :param claimed_at__nlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__nlike: str + :param claimed_at__notlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__notlike: str + :param claimed_at__il: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__il: str + :param claimed_at__ilike: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__ilike: str + :param claimed_at__nil: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__nil: str + :param claimed_at__nilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__nilike: str + :param claimed_at__notilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claimed_at__notilike: str + :param claimed_at__desc: SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + :type claimed_at__desc: str + :param claimed_at__asc: SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + :type claimed_at__asc: str + :param claim_duration__eq: SQL = operator + :type claim_duration__eq: int + :param claim_duration__ne: SQL != operator + :type claim_duration__ne: int + :param claim_duration__gt: SQL > operator, may not work with all column types + :type claim_duration__gt: int + :param claim_duration__gte: SQL >= operator, may not work with all column types + :type claim_duration__gte: int + :param claim_duration__lt: SQL < operator, may not work with all column types + :type claim_duration__lt: int + :param claim_duration__lte: SQL <= operator, may not work with all column types + :type claim_duration__lte: int + :param claim_duration__in: SQL IN operator, permits comma-separated values + :type claim_duration__in: int + :param claim_duration__nin: SQL NOT IN operator, permits comma-separated values + :type claim_duration__nin: int + :param claim_duration__notin: SQL NOT IN operator, permits comma-separated values + :type claim_duration__notin: int + :param claim_duration__isnull: SQL IS NULL operator, value is ignored (presence of key is sufficient) + :type claim_duration__isnull: str + :param claim_duration__nisnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claim_duration__nisnull: str + :param claim_duration__isnotnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claim_duration__isnotnull: str + :param claim_duration__l: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__l: str + :param claim_duration__like: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__like: str + :param claim_duration__nl: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__nl: str + :param claim_duration__nlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__nlike: str + :param claim_duration__notlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__notlike: str + :param claim_duration__il: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__il: str + :param claim_duration__ilike: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__ilike: str + :param claim_duration__nil: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__nil: str + :param claim_duration__nilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__nilike: str + :param claim_duration__notilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_duration__notilike: str + :param claim_duration__desc: SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + :type claim_duration__desc: str + :param claim_duration__asc: SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + :type claim_duration__asc: str + :param claim_expires_at__eq: SQL = operator + :type claim_expires_at__eq: datetime + :param claim_expires_at__ne: SQL != operator + :type claim_expires_at__ne: datetime + :param claim_expires_at__gt: SQL > operator, may not work with all column types + :type claim_expires_at__gt: datetime + :param claim_expires_at__gte: SQL >= operator, may not work with all column types + :type claim_expires_at__gte: datetime + :param claim_expires_at__lt: SQL < operator, may not work with all column types + :type claim_expires_at__lt: datetime + :param claim_expires_at__lte: SQL <= operator, may not work with all column types + :type claim_expires_at__lte: datetime + :param claim_expires_at__in: SQL IN operator, permits comma-separated values + :type claim_expires_at__in: datetime + :param claim_expires_at__nin: SQL NOT IN operator, permits comma-separated values + :type claim_expires_at__nin: datetime + :param claim_expires_at__notin: SQL NOT IN operator, permits comma-separated values + :type claim_expires_at__notin: datetime + :param claim_expires_at__isnull: SQL IS NULL operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__isnull: str + :param claim_expires_at__nisnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__nisnull: str + :param claim_expires_at__isnotnull: SQL IS NOT NULL operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__isnotnull: str + :param claim_expires_at__l: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__l: str + :param claim_expires_at__like: SQL LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__like: str + :param claim_expires_at__nl: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__nl: str + :param claim_expires_at__nlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__nlike: str + :param claim_expires_at__notlike: SQL NOT LIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__notlike: str + :param claim_expires_at__il: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__il: str + :param claim_expires_at__ilike: SQL ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__ilike: str + :param claim_expires_at__nil: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__nil: str + :param claim_expires_at__nilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__nilike: str + :param claim_expires_at__notilike: SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with % + :type claim_expires_at__notilike: str + :param claim_expires_at__desc: SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__desc: str + :param claim_expires_at__asc: SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient) + :type claim_expires_at__asc: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2803,6 +3595,78 @@ def get_cameras_without_preload_content( last_seen__notilike=last_seen__notilike, last_seen__desc=last_seen__desc, last_seen__asc=last_seen__asc, + claimed_at__eq=claimed_at__eq, + claimed_at__ne=claimed_at__ne, + claimed_at__gt=claimed_at__gt, + claimed_at__gte=claimed_at__gte, + claimed_at__lt=claimed_at__lt, + claimed_at__lte=claimed_at__lte, + claimed_at__in=claimed_at__in, + claimed_at__nin=claimed_at__nin, + claimed_at__notin=claimed_at__notin, + claimed_at__isnull=claimed_at__isnull, + claimed_at__nisnull=claimed_at__nisnull, + claimed_at__isnotnull=claimed_at__isnotnull, + claimed_at__l=claimed_at__l, + claimed_at__like=claimed_at__like, + claimed_at__nl=claimed_at__nl, + claimed_at__nlike=claimed_at__nlike, + claimed_at__notlike=claimed_at__notlike, + claimed_at__il=claimed_at__il, + claimed_at__ilike=claimed_at__ilike, + claimed_at__nil=claimed_at__nil, + claimed_at__nilike=claimed_at__nilike, + claimed_at__notilike=claimed_at__notilike, + claimed_at__desc=claimed_at__desc, + claimed_at__asc=claimed_at__asc, + claim_duration__eq=claim_duration__eq, + claim_duration__ne=claim_duration__ne, + claim_duration__gt=claim_duration__gt, + claim_duration__gte=claim_duration__gte, + claim_duration__lt=claim_duration__lt, + claim_duration__lte=claim_duration__lte, + claim_duration__in=claim_duration__in, + claim_duration__nin=claim_duration__nin, + claim_duration__notin=claim_duration__notin, + claim_duration__isnull=claim_duration__isnull, + claim_duration__nisnull=claim_duration__nisnull, + claim_duration__isnotnull=claim_duration__isnotnull, + claim_duration__l=claim_duration__l, + claim_duration__like=claim_duration__like, + claim_duration__nl=claim_duration__nl, + claim_duration__nlike=claim_duration__nlike, + claim_duration__notlike=claim_duration__notlike, + claim_duration__il=claim_duration__il, + claim_duration__ilike=claim_duration__ilike, + claim_duration__nil=claim_duration__nil, + claim_duration__nilike=claim_duration__nilike, + claim_duration__notilike=claim_duration__notilike, + claim_duration__desc=claim_duration__desc, + claim_duration__asc=claim_duration__asc, + claim_expires_at__eq=claim_expires_at__eq, + claim_expires_at__ne=claim_expires_at__ne, + claim_expires_at__gt=claim_expires_at__gt, + claim_expires_at__gte=claim_expires_at__gte, + claim_expires_at__lt=claim_expires_at__lt, + claim_expires_at__lte=claim_expires_at__lte, + claim_expires_at__in=claim_expires_at__in, + claim_expires_at__nin=claim_expires_at__nin, + claim_expires_at__notin=claim_expires_at__notin, + claim_expires_at__isnull=claim_expires_at__isnull, + claim_expires_at__nisnull=claim_expires_at__nisnull, + claim_expires_at__isnotnull=claim_expires_at__isnotnull, + claim_expires_at__l=claim_expires_at__l, + claim_expires_at__like=claim_expires_at__like, + claim_expires_at__nl=claim_expires_at__nl, + claim_expires_at__nlike=claim_expires_at__nlike, + claim_expires_at__notlike=claim_expires_at__notlike, + claim_expires_at__il=claim_expires_at__il, + claim_expires_at__ilike=claim_expires_at__ilike, + claim_expires_at__nil=claim_expires_at__nil, + claim_expires_at__nilike=claim_expires_at__nilike, + claim_expires_at__notilike=claim_expires_at__notilike, + claim_expires_at__desc=claim_expires_at__desc, + claim_expires_at__asc=claim_expires_at__asc, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2992,6 +3856,78 @@ def _get_cameras_serialize( last_seen__notilike, last_seen__desc, last_seen__asc, + claimed_at__eq, + claimed_at__ne, + claimed_at__gt, + claimed_at__gte, + claimed_at__lt, + claimed_at__lte, + claimed_at__in, + claimed_at__nin, + claimed_at__notin, + claimed_at__isnull, + claimed_at__nisnull, + claimed_at__isnotnull, + claimed_at__l, + claimed_at__like, + claimed_at__nl, + claimed_at__nlike, + claimed_at__notlike, + claimed_at__il, + claimed_at__ilike, + claimed_at__nil, + claimed_at__nilike, + claimed_at__notilike, + claimed_at__desc, + claimed_at__asc, + claim_duration__eq, + claim_duration__ne, + claim_duration__gt, + claim_duration__gte, + claim_duration__lt, + claim_duration__lte, + claim_duration__in, + claim_duration__nin, + claim_duration__notin, + claim_duration__isnull, + claim_duration__nisnull, + claim_duration__isnotnull, + claim_duration__l, + claim_duration__like, + claim_duration__nl, + claim_duration__nlike, + claim_duration__notlike, + claim_duration__il, + claim_duration__ilike, + claim_duration__nil, + claim_duration__nilike, + claim_duration__notilike, + claim_duration__desc, + claim_duration__asc, + claim_expires_at__eq, + claim_expires_at__ne, + claim_expires_at__gt, + claim_expires_at__gte, + claim_expires_at__lt, + claim_expires_at__lte, + claim_expires_at__in, + claim_expires_at__nin, + claim_expires_at__notin, + claim_expires_at__isnull, + claim_expires_at__nisnull, + claim_expires_at__isnotnull, + claim_expires_at__l, + claim_expires_at__like, + claim_expires_at__nl, + claim_expires_at__nlike, + claim_expires_at__notlike, + claim_expires_at__il, + claim_expires_at__ilike, + claim_expires_at__nil, + claim_expires_at__nilike, + claim_expires_at__notilike, + claim_expires_at__desc, + claim_expires_at__asc, _request_auth, _content_type, _headers, @@ -4020,6 +4956,456 @@ def _get_cameras_serialize( _query_params.append(('last_seen__asc', last_seen__asc)) + if claimed_at__eq is not None: + if isinstance(claimed_at__eq, datetime): + _query_params.append( + ( + 'claimed_at__eq', + claimed_at__eq.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claimed_at__eq', claimed_at__eq)) + + if claimed_at__ne is not None: + if isinstance(claimed_at__ne, datetime): + _query_params.append( + ( + 'claimed_at__ne', + claimed_at__ne.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claimed_at__ne', claimed_at__ne)) + + if claimed_at__gt is not None: + if isinstance(claimed_at__gt, datetime): + _query_params.append( + ( + 'claimed_at__gt', + claimed_at__gt.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claimed_at__gt', claimed_at__gt)) + + if claimed_at__gte is not None: + if isinstance(claimed_at__gte, datetime): + _query_params.append( + ( + 'claimed_at__gte', + claimed_at__gte.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claimed_at__gte', claimed_at__gte)) + + if claimed_at__lt is not None: + if isinstance(claimed_at__lt, datetime): + _query_params.append( + ( + 'claimed_at__lt', + claimed_at__lt.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claimed_at__lt', claimed_at__lt)) + + if claimed_at__lte is not None: + if isinstance(claimed_at__lte, datetime): + _query_params.append( + ( + 'claimed_at__lte', + claimed_at__lte.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claimed_at__lte', claimed_at__lte)) + + if claimed_at__in is not None: + if isinstance(claimed_at__in, datetime): + _query_params.append( + ( + 'claimed_at__in', + claimed_at__in.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claimed_at__in', claimed_at__in)) + + if claimed_at__nin is not None: + if isinstance(claimed_at__nin, datetime): + _query_params.append( + ( + 'claimed_at__nin', + claimed_at__nin.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claimed_at__nin', claimed_at__nin)) + + if claimed_at__notin is not None: + if isinstance(claimed_at__notin, datetime): + _query_params.append( + ( + 'claimed_at__notin', + claimed_at__notin.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claimed_at__notin', claimed_at__notin)) + + if claimed_at__isnull is not None: + + _query_params.append(('claimed_at__isnull', claimed_at__isnull)) + + if claimed_at__nisnull is not None: + + _query_params.append(('claimed_at__nisnull', claimed_at__nisnull)) + + if claimed_at__isnotnull is not None: + + _query_params.append(('claimed_at__isnotnull', claimed_at__isnotnull)) + + if claimed_at__l is not None: + + _query_params.append(('claimed_at__l', claimed_at__l)) + + if claimed_at__like is not None: + + _query_params.append(('claimed_at__like', claimed_at__like)) + + if claimed_at__nl is not None: + + _query_params.append(('claimed_at__nl', claimed_at__nl)) + + if claimed_at__nlike is not None: + + _query_params.append(('claimed_at__nlike', claimed_at__nlike)) + + if claimed_at__notlike is not None: + + _query_params.append(('claimed_at__notlike', claimed_at__notlike)) + + if claimed_at__il is not None: + + _query_params.append(('claimed_at__il', claimed_at__il)) + + if claimed_at__ilike is not None: + + _query_params.append(('claimed_at__ilike', claimed_at__ilike)) + + if claimed_at__nil is not None: + + _query_params.append(('claimed_at__nil', claimed_at__nil)) + + if claimed_at__nilike is not None: + + _query_params.append(('claimed_at__nilike', claimed_at__nilike)) + + if claimed_at__notilike is not None: + + _query_params.append(('claimed_at__notilike', claimed_at__notilike)) + + if claimed_at__desc is not None: + + _query_params.append(('claimed_at__desc', claimed_at__desc)) + + if claimed_at__asc is not None: + + _query_params.append(('claimed_at__asc', claimed_at__asc)) + + if claim_duration__eq is not None: + + _query_params.append(('claim_duration__eq', claim_duration__eq)) + + if claim_duration__ne is not None: + + _query_params.append(('claim_duration__ne', claim_duration__ne)) + + if claim_duration__gt is not None: + + _query_params.append(('claim_duration__gt', claim_duration__gt)) + + if claim_duration__gte is not None: + + _query_params.append(('claim_duration__gte', claim_duration__gte)) + + if claim_duration__lt is not None: + + _query_params.append(('claim_duration__lt', claim_duration__lt)) + + if claim_duration__lte is not None: + + _query_params.append(('claim_duration__lte', claim_duration__lte)) + + if claim_duration__in is not None: + + _query_params.append(('claim_duration__in', claim_duration__in)) + + if claim_duration__nin is not None: + + _query_params.append(('claim_duration__nin', claim_duration__nin)) + + if claim_duration__notin is not None: + + _query_params.append(('claim_duration__notin', claim_duration__notin)) + + if claim_duration__isnull is not None: + + _query_params.append(('claim_duration__isnull', claim_duration__isnull)) + + if claim_duration__nisnull is not None: + + _query_params.append(('claim_duration__nisnull', claim_duration__nisnull)) + + if claim_duration__isnotnull is not None: + + _query_params.append(('claim_duration__isnotnull', claim_duration__isnotnull)) + + if claim_duration__l is not None: + + _query_params.append(('claim_duration__l', claim_duration__l)) + + if claim_duration__like is not None: + + _query_params.append(('claim_duration__like', claim_duration__like)) + + if claim_duration__nl is not None: + + _query_params.append(('claim_duration__nl', claim_duration__nl)) + + if claim_duration__nlike is not None: + + _query_params.append(('claim_duration__nlike', claim_duration__nlike)) + + if claim_duration__notlike is not None: + + _query_params.append(('claim_duration__notlike', claim_duration__notlike)) + + if claim_duration__il is not None: + + _query_params.append(('claim_duration__il', claim_duration__il)) + + if claim_duration__ilike is not None: + + _query_params.append(('claim_duration__ilike', claim_duration__ilike)) + + if claim_duration__nil is not None: + + _query_params.append(('claim_duration__nil', claim_duration__nil)) + + if claim_duration__nilike is not None: + + _query_params.append(('claim_duration__nilike', claim_duration__nilike)) + + if claim_duration__notilike is not None: + + _query_params.append(('claim_duration__notilike', claim_duration__notilike)) + + if claim_duration__desc is not None: + + _query_params.append(('claim_duration__desc', claim_duration__desc)) + + if claim_duration__asc is not None: + + _query_params.append(('claim_duration__asc', claim_duration__asc)) + + if claim_expires_at__eq is not None: + if isinstance(claim_expires_at__eq, datetime): + _query_params.append( + ( + 'claim_expires_at__eq', + claim_expires_at__eq.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claim_expires_at__eq', claim_expires_at__eq)) + + if claim_expires_at__ne is not None: + if isinstance(claim_expires_at__ne, datetime): + _query_params.append( + ( + 'claim_expires_at__ne', + claim_expires_at__ne.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claim_expires_at__ne', claim_expires_at__ne)) + + if claim_expires_at__gt is not None: + if isinstance(claim_expires_at__gt, datetime): + _query_params.append( + ( + 'claim_expires_at__gt', + claim_expires_at__gt.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claim_expires_at__gt', claim_expires_at__gt)) + + if claim_expires_at__gte is not None: + if isinstance(claim_expires_at__gte, datetime): + _query_params.append( + ( + 'claim_expires_at__gte', + claim_expires_at__gte.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claim_expires_at__gte', claim_expires_at__gte)) + + if claim_expires_at__lt is not None: + if isinstance(claim_expires_at__lt, datetime): + _query_params.append( + ( + 'claim_expires_at__lt', + claim_expires_at__lt.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claim_expires_at__lt', claim_expires_at__lt)) + + if claim_expires_at__lte is not None: + if isinstance(claim_expires_at__lte, datetime): + _query_params.append( + ( + 'claim_expires_at__lte', + claim_expires_at__lte.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claim_expires_at__lte', claim_expires_at__lte)) + + if claim_expires_at__in is not None: + if isinstance(claim_expires_at__in, datetime): + _query_params.append( + ( + 'claim_expires_at__in', + claim_expires_at__in.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claim_expires_at__in', claim_expires_at__in)) + + if claim_expires_at__nin is not None: + if isinstance(claim_expires_at__nin, datetime): + _query_params.append( + ( + 'claim_expires_at__nin', + claim_expires_at__nin.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claim_expires_at__nin', claim_expires_at__nin)) + + if claim_expires_at__notin is not None: + if isinstance(claim_expires_at__notin, datetime): + _query_params.append( + ( + 'claim_expires_at__notin', + claim_expires_at__notin.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('claim_expires_at__notin', claim_expires_at__notin)) + + if claim_expires_at__isnull is not None: + + _query_params.append(('claim_expires_at__isnull', claim_expires_at__isnull)) + + if claim_expires_at__nisnull is not None: + + _query_params.append(('claim_expires_at__nisnull', claim_expires_at__nisnull)) + + if claim_expires_at__isnotnull is not None: + + _query_params.append(('claim_expires_at__isnotnull', claim_expires_at__isnotnull)) + + if claim_expires_at__l is not None: + + _query_params.append(('claim_expires_at__l', claim_expires_at__l)) + + if claim_expires_at__like is not None: + + _query_params.append(('claim_expires_at__like', claim_expires_at__like)) + + if claim_expires_at__nl is not None: + + _query_params.append(('claim_expires_at__nl', claim_expires_at__nl)) + + if claim_expires_at__nlike is not None: + + _query_params.append(('claim_expires_at__nlike', claim_expires_at__nlike)) + + if claim_expires_at__notlike is not None: + + _query_params.append(('claim_expires_at__notlike', claim_expires_at__notlike)) + + if claim_expires_at__il is not None: + + _query_params.append(('claim_expires_at__il', claim_expires_at__il)) + + if claim_expires_at__ilike is not None: + + _query_params.append(('claim_expires_at__ilike', claim_expires_at__ilike)) + + if claim_expires_at__nil is not None: + + _query_params.append(('claim_expires_at__nil', claim_expires_at__nil)) + + if claim_expires_at__nilike is not None: + + _query_params.append(('claim_expires_at__nilike', claim_expires_at__nilike)) + + if claim_expires_at__notilike is not None: + + _query_params.append(('claim_expires_at__notilike', claim_expires_at__notilike)) + + if claim_expires_at__desc is not None: + + _query_params.append(('claim_expires_at__desc', claim_expires_at__desc)) + + if claim_expires_at__asc is not None: + + _query_params.append(('claim_expires_at__asc', claim_expires_at__asc)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/object_detector/api/openapi_client/models/camera.py b/object_detector/api/openapi_client/models/camera.py index d1a2973..7063482 100644 --- a/object_detector/api/openapi_client/models/camera.py +++ b/object_detector/api/openapi_client/models/camera.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,6 +27,9 @@ class Camera(BaseModel): """ Camera """ # noqa: E501 + claim_duration: Optional[StrictInt] = None + claim_expires_at: Optional[datetime] = None + claimed_at: Optional[datetime] = None created_at: Optional[datetime] = None deleted_at: Optional[datetime] = None id: Optional[StrictStr] = None @@ -36,7 +39,7 @@ class Camera(BaseModel): referenced_by_video_camera_id_objects: Optional[List[Video]] = None stream_url: Optional[StrictStr] = None updated_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = ["created_at", "deleted_at", "id", "last_seen", "name", "referenced_by_detection_camera_id_objects", "referenced_by_video_camera_id_objects", "stream_url", "updated_at"] + __properties: ClassVar[List[str]] = ["claim_duration", "claim_expires_at", "claimed_at", "created_at", "deleted_at", "id", "last_seen", "name", "referenced_by_detection_camera_id_objects", "referenced_by_video_camera_id_objects", "stream_url", "updated_at"] model_config = ConfigDict( populate_by_name=True, @@ -96,11 +99,6 @@ def to_dict(self) -> Dict[str, Any]: if self.deleted_at is None and "deleted_at" in self.model_fields_set: _dict['deleted_at'] = None - # set to None if last_seen (nullable) is None - # and model_fields_set contains the field - if self.last_seen is None and "last_seen" in self.model_fields_set: - _dict['last_seen'] = None - # set to None if referenced_by_detection_camera_id_objects (nullable) is None # and model_fields_set contains the field if self.referenced_by_detection_camera_id_objects is None and "referenced_by_detection_camera_id_objects" in self.model_fields_set: @@ -123,6 +121,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "claim_duration": obj.get("claim_duration"), + "claim_expires_at": obj.get("claim_expires_at"), + "claimed_at": obj.get("claimed_at"), "created_at": obj.get("created_at"), "deleted_at": obj.get("deleted_at"), "id": obj.get("id"), diff --git a/object_detector/api/test/test_camera.py b/object_detector/api/test/test_camera.py index a7fd4ef..c4ab47f 100644 --- a/object_detector/api/test/test_camera.py +++ b/object_detector/api/test/test_camera.py @@ -35,6 +35,9 @@ def make_instance(self, include_optional) -> Camera: model = Camera() if include_optional: return Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', @@ -49,6 +52,9 @@ def make_instance(self, include_optional) -> Camera: ], camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', @@ -119,6 +125,9 @@ def make_instance(self, include_optional) -> Camera: openapi_client.models.video.Video( camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', diff --git a/object_detector/api/test/test_detection.py b/object_detector/api/test/test_detection.py index bbd12be..123d71f 100644 --- a/object_detector/api/test/test_detection.py +++ b/object_detector/api/test/test_detection.py @@ -42,6 +42,9 @@ def make_instance(self, include_optional) -> Detection: ], camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', @@ -56,6 +59,9 @@ def make_instance(self, include_optional) -> Detection: ], camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', @@ -140,6 +146,9 @@ def make_instance(self, include_optional) -> Detection: video_id_object = openapi_client.models.video.Video( camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', diff --git a/object_detector/api/test/test_get_cameras200_response.py b/object_detector/api/test/test_get_cameras200_response.py index 6402fd9..2a6d868 100644 --- a/object_detector/api/test/test_get_cameras200_response.py +++ b/object_detector/api/test/test_get_cameras200_response.py @@ -38,6 +38,9 @@ def make_instance(self, include_optional) -> GetCameras200Response: error = '', objects = [ openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', @@ -52,6 +55,9 @@ def make_instance(self, include_optional) -> GetCameras200Response: ], camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', diff --git a/object_detector/api/test/test_get_detections200_response.py b/object_detector/api/test/test_get_detections200_response.py index e79090c..82a82a1 100644 --- a/object_detector/api/test/test_get_detections200_response.py +++ b/object_detector/api/test/test_get_detections200_response.py @@ -45,6 +45,9 @@ def make_instance(self, include_optional) -> GetDetections200Response: ], camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', @@ -54,6 +57,9 @@ def make_instance(self, include_optional) -> GetDetections200Response: openapi_client.models.detection.Detection( camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', diff --git a/object_detector/api/test/test_get_videos200_response.py b/object_detector/api/test/test_get_videos200_response.py index a4e9695..6690c3f 100644 --- a/object_detector/api/test/test_get_videos200_response.py +++ b/object_detector/api/test/test_get_videos200_response.py @@ -40,6 +40,9 @@ def make_instance(self, include_optional) -> GetVideos200Response: openapi_client.models.video.Video( camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', @@ -54,6 +57,9 @@ def make_instance(self, include_optional) -> GetVideos200Response: ], camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', diff --git a/object_detector/api/test/test_video.py b/object_detector/api/test/test_video.py index 51fc038..026a7d2 100644 --- a/object_detector/api/test/test_video.py +++ b/object_detector/api/test/test_video.py @@ -37,6 +37,9 @@ def make_instance(self, include_optional) -> Video: return Video( camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', @@ -51,6 +54,9 @@ def make_instance(self, include_optional) -> Video: ], camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', @@ -136,6 +142,9 @@ def make_instance(self, include_optional) -> Video: ], camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', @@ -145,6 +154,9 @@ def make_instance(self, include_optional) -> Video: openapi_client.models.video.Video( camera_id = '', camera_id_object = openapi_client.models.camera.Camera( + claim_duration = 56, + claim_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + claimed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), id = '', diff --git a/pkg/api/bin/api b/pkg/api/bin/api index e6c6d4a..0e99fa3 100755 Binary files a/pkg/api/bin/api and b/pkg/api/bin/api differ diff --git a/pkg/api/camera.go b/pkg/api/camera.go index 41b3ebc..52fe508 100755 --- a/pkg/api/camera.go +++ b/pkg/api/camera.go @@ -32,37 +32,46 @@ import ( ) type Camera struct { - ID uuid.UUID `json:"id"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` - DeletedAt *time.Time `json:"deleted_at"` - Name string `json:"name"` - StreamURL string `json:"stream_url"` - LastSeen *time.Time `json:"last_seen"` - ReferencedByVideoCameraIDObjects []*Video `json:"referenced_by_video_camera_id_objects"` - ReferencedByDetectionCameraIDObjects []*Detection `json:"referenced_by_detection_camera_id_objects"` + ID uuid.UUID `json:"id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + DeletedAt *time.Time `json:"deleted_at"` + Name string `json:"name"` + StreamURL string `json:"stream_url"` + LastSeen time.Time `json:"last_seen"` + ClaimedAt time.Time `json:"claimed_at"` + ClaimDuration time.Duration `json:"claim_duration"` + ClaimExpiresAt time.Time `json:"claim_expires_at"` + ReferencedByDetectionCameraIDObjects []*Detection `json:"referenced_by_detection_camera_id_objects"` + ReferencedByVideoCameraIDObjects []*Video `json:"referenced_by_video_camera_id_objects"` } var CameraTable = "camera" var ( - CameraTableIDColumn = "id" - CameraTableCreatedAtColumn = "created_at" - CameraTableUpdatedAtColumn = "updated_at" - CameraTableDeletedAtColumn = "deleted_at" - CameraTableNameColumn = "name" - CameraTableStreamURLColumn = "stream_url" - CameraTableLastSeenColumn = "last_seen" + CameraTableIDColumn = "id" + CameraTableCreatedAtColumn = "created_at" + CameraTableUpdatedAtColumn = "updated_at" + CameraTableDeletedAtColumn = "deleted_at" + CameraTableNameColumn = "name" + CameraTableStreamURLColumn = "stream_url" + CameraTableLastSeenColumn = "last_seen" + CameraTableClaimedAtColumn = "claimed_at" + CameraTableClaimDurationColumn = "claim_duration" + CameraTableClaimExpiresAtColumn = "claim_expires_at" ) var ( - CameraTableIDColumnWithTypeCast = `"id" AS id` - CameraTableCreatedAtColumnWithTypeCast = `"created_at" AS created_at` - CameraTableUpdatedAtColumnWithTypeCast = `"updated_at" AS updated_at` - CameraTableDeletedAtColumnWithTypeCast = `"deleted_at" AS deleted_at` - CameraTableNameColumnWithTypeCast = `"name" AS name` - CameraTableStreamURLColumnWithTypeCast = `"stream_url" AS stream_url` - CameraTableLastSeenColumnWithTypeCast = `"last_seen" AS last_seen` + CameraTableIDColumnWithTypeCast = `"id" AS id` + CameraTableCreatedAtColumnWithTypeCast = `"created_at" AS created_at` + CameraTableUpdatedAtColumnWithTypeCast = `"updated_at" AS updated_at` + CameraTableDeletedAtColumnWithTypeCast = `"deleted_at" AS deleted_at` + CameraTableNameColumnWithTypeCast = `"name" AS name` + CameraTableStreamURLColumnWithTypeCast = `"stream_url" AS stream_url` + CameraTableLastSeenColumnWithTypeCast = `"last_seen" AS last_seen` + CameraTableClaimedAtColumnWithTypeCast = `"claimed_at" AS claimed_at` + CameraTableClaimDurationColumnWithTypeCast = `"claim_duration" AS claim_duration` + CameraTableClaimExpiresAtColumnWithTypeCast = `"claim_expires_at" AS claim_expires_at` ) var CameraTableColumns = []string{ @@ -73,6 +82,9 @@ var CameraTableColumns = []string{ CameraTableNameColumn, CameraTableStreamURLColumn, CameraTableLastSeenColumn, + CameraTableClaimedAtColumn, + CameraTableClaimDurationColumn, + CameraTableClaimExpiresAtColumn, } var CameraTableColumnsWithTypeCasts = []string{ @@ -83,16 +95,22 @@ var CameraTableColumnsWithTypeCasts = []string{ CameraTableNameColumnWithTypeCast, CameraTableStreamURLColumnWithTypeCast, CameraTableLastSeenColumnWithTypeCast, + CameraTableClaimedAtColumnWithTypeCast, + CameraTableClaimDurationColumnWithTypeCast, + CameraTableClaimExpiresAtColumnWithTypeCast, } var CameraTableColumnLookup = map[string]*introspect.Column{ - CameraTableIDColumn: {Name: CameraTableIDColumn, NotNull: true, HasDefault: true}, - CameraTableCreatedAtColumn: {Name: CameraTableCreatedAtColumn, NotNull: true, HasDefault: true}, - CameraTableUpdatedAtColumn: {Name: CameraTableUpdatedAtColumn, NotNull: true, HasDefault: true}, - CameraTableDeletedAtColumn: {Name: CameraTableDeletedAtColumn, NotNull: false, HasDefault: false}, - CameraTableNameColumn: {Name: CameraTableNameColumn, NotNull: true, HasDefault: false}, - CameraTableStreamURLColumn: {Name: CameraTableStreamURLColumn, NotNull: true, HasDefault: false}, - CameraTableLastSeenColumn: {Name: CameraTableLastSeenColumn, NotNull: false, HasDefault: false}, + CameraTableIDColumn: {Name: CameraTableIDColumn, NotNull: true, HasDefault: true}, + CameraTableCreatedAtColumn: {Name: CameraTableCreatedAtColumn, NotNull: true, HasDefault: true}, + CameraTableUpdatedAtColumn: {Name: CameraTableUpdatedAtColumn, NotNull: true, HasDefault: true}, + CameraTableDeletedAtColumn: {Name: CameraTableDeletedAtColumn, NotNull: false, HasDefault: false}, + CameraTableNameColumn: {Name: CameraTableNameColumn, NotNull: true, HasDefault: false}, + CameraTableStreamURLColumn: {Name: CameraTableStreamURLColumn, NotNull: true, HasDefault: false}, + CameraTableLastSeenColumn: {Name: CameraTableLastSeenColumn, NotNull: true, HasDefault: true}, + CameraTableClaimedAtColumn: {Name: CameraTableClaimedAtColumn, NotNull: true, HasDefault: true}, + CameraTableClaimDurationColumn: {Name: CameraTableClaimDurationColumn, NotNull: true, HasDefault: true}, + CameraTableClaimExpiresAtColumn: {Name: CameraTableClaimExpiresAtColumn, NotNull: true, HasDefault: true}, } var ( @@ -277,7 +295,64 @@ func (m *Camera) FromItem(item map[string]any) error { } } - m.LastSeen = &temp2 + m.LastSeen = temp2 + + case "claimed_at": + if v == nil { + continue + } + + temp1, err := types.ParseTime(v) + if err != nil { + return wrapError(k, v, err) + } + + temp2, ok := temp1.(time.Time) + if !ok { + if temp1 != nil { + return wrapError(k, v, fmt.Errorf("failed to cast %#+v to uuclaimed_at.UUID", temp1)) + } + } + + m.ClaimedAt = temp2 + + case "claim_duration": + if v == nil { + continue + } + + temp1, err := types.ParseDuration(v) + if err != nil { + return wrapError(k, v, err) + } + + temp2, ok := temp1.(time.Duration) + if !ok { + if temp1 != nil { + return wrapError(k, v, fmt.Errorf("failed to cast %#+v to uuclaim_duration.UUID", temp1)) + } + } + + m.ClaimDuration = temp2 + + case "claim_expires_at": + if v == nil { + continue + } + + temp1, err := types.ParseTime(v) + if err != nil { + return wrapError(k, v, err) + } + + temp2, ok := temp1.(time.Time) + if !ok { + if temp1 != nil { + return wrapError(k, v, fmt.Errorf("failed to cast %#+v to uuclaim_expires_at.UUID", temp1)) + } + } + + m.ClaimExpiresAt = temp2 } } @@ -313,8 +388,11 @@ func (m *Camera) Reload(ctx context.Context, tx pgx.Tx, includeDeleteds ...bool) m.Name = t.Name m.StreamURL = t.StreamURL m.LastSeen = t.LastSeen - m.ReferencedByVideoCameraIDObjects = t.ReferencedByVideoCameraIDObjects + m.ClaimedAt = t.ClaimedAt + m.ClaimDuration = t.ClaimDuration + m.ClaimExpiresAt = t.ClaimExpiresAt m.ReferencedByDetectionCameraIDObjects = t.ReferencedByDetectionCameraIDObjects + m.ReferencedByVideoCameraIDObjects = t.ReferencedByVideoCameraIDObjects return nil } @@ -400,6 +478,39 @@ func (m *Camera) Insert(ctx context.Context, tx pgx.Tx, setPrimaryKey bool, setZ values = append(values, v) } + if setZeroValues || !types.IsZeroTime(m.ClaimedAt) || slices.Contains(forceSetValuesForFields, CameraTableClaimedAtColumn) || isRequired(CameraTableColumnLookup, CameraTableClaimedAtColumn) { + columns = append(columns, CameraTableClaimedAtColumn) + + v, err := types.FormatTime(m.ClaimedAt) + if err != nil { + return fmt.Errorf("failed to handle m.ClaimedAt: %v", err) + } + + values = append(values, v) + } + + if setZeroValues || !types.IsZeroDuration(m.ClaimDuration) || slices.Contains(forceSetValuesForFields, CameraTableClaimDurationColumn) || isRequired(CameraTableColumnLookup, CameraTableClaimDurationColumn) { + columns = append(columns, CameraTableClaimDurationColumn) + + v, err := types.FormatDuration(m.ClaimDuration) + if err != nil { + return fmt.Errorf("failed to handle m.ClaimDuration: %v", err) + } + + values = append(values, v) + } + + if setZeroValues || !types.IsZeroTime(m.ClaimExpiresAt) || slices.Contains(forceSetValuesForFields, CameraTableClaimExpiresAtColumn) || isRequired(CameraTableColumnLookup, CameraTableClaimExpiresAtColumn) { + columns = append(columns, CameraTableClaimExpiresAtColumn) + + v, err := types.FormatTime(m.ClaimExpiresAt) + if err != nil { + return fmt.Errorf("failed to handle m.ClaimExpiresAt: %v", err) + } + + values = append(values, v) + } + ctx, cleanup := query.WithQueryID(ctx) defer cleanup() @@ -522,6 +633,39 @@ func (m *Camera) Update(ctx context.Context, tx pgx.Tx, setZeroValues bool, forc values = append(values, v) } + if setZeroValues || !types.IsZeroTime(m.ClaimedAt) || slices.Contains(forceSetValuesForFields, CameraTableClaimedAtColumn) { + columns = append(columns, CameraTableClaimedAtColumn) + + v, err := types.FormatTime(m.ClaimedAt) + if err != nil { + return fmt.Errorf("failed to handle m.ClaimedAt: %v", err) + } + + values = append(values, v) + } + + if setZeroValues || !types.IsZeroDuration(m.ClaimDuration) || slices.Contains(forceSetValuesForFields, CameraTableClaimDurationColumn) { + columns = append(columns, CameraTableClaimDurationColumn) + + v, err := types.FormatDuration(m.ClaimDuration) + if err != nil { + return fmt.Errorf("failed to handle m.ClaimDuration: %v", err) + } + + values = append(values, v) + } + + if setZeroValues || !types.IsZeroTime(m.ClaimExpiresAt) || slices.Contains(forceSetValuesForFields, CameraTableClaimExpiresAtColumn) { + columns = append(columns, CameraTableClaimExpiresAtColumn) + + v, err := types.FormatTime(m.ClaimExpiresAt) + if err != nil { + return fmt.Errorf("failed to handle m.ClaimExpiresAt: %v", err) + } + + values = append(values, v) + } + v, err := types.FormatUUID(m.ID) if err != nil { return fmt.Errorf("failed to handle m.ID: %v", err) @@ -594,6 +738,10 @@ func (m *Camera) Delete(ctx context.Context, tx pgx.Tx, hardDeletes ...bool) err return nil } +func (m *Camera) LockTable(ctx context.Context, tx pgx.Tx, noWait bool) error { + return query.LockTable(ctx, tx, CameraTable, noWait) +} + func SelectCameras(ctx context.Context, tx pgx.Tx, where string, orderBy *string, limit *int, offset *int, values ...any) ([]*Camera, error) { if slices.Contains(CameraTableColumns, "deleted_at") { if !strings.Contains(where, "deleted_at") { @@ -649,10 +797,10 @@ func SelectCameras(ctx context.Context, tx pgx.Tx, where string, orderBy *string thisCtx, ok2 := query.HandleQueryPathGraphCycles(thisCtx, fmt.Sprintf("__ReferencedBy__%s{%v}", CameraTable, object.GetPrimaryKeyValue())) if ok1 && ok2 { - object.ReferencedByVideoCameraIDObjects, err = SelectVideos( + object.ReferencedByDetectionCameraIDObjects, err = SelectDetections( thisCtx, tx, - fmt.Sprintf("%v = $1", VideoTableCameraIDColumn), + fmt.Sprintf("%v = $1", DetectionTableCameraIDColumn), nil, nil, nil, @@ -677,10 +825,10 @@ func SelectCameras(ctx context.Context, tx pgx.Tx, where string, orderBy *string thisCtx, ok2 := query.HandleQueryPathGraphCycles(thisCtx, fmt.Sprintf("__ReferencedBy__%s{%v}", CameraTable, object.GetPrimaryKeyValue())) if ok1 && ok2 { - object.ReferencedByDetectionCameraIDObjects, err = SelectDetections( + object.ReferencedByVideoCameraIDObjects, err = SelectVideos( thisCtx, tx, - fmt.Sprintf("%v = $1", DetectionTableCameraIDColumn), + fmt.Sprintf("%v = $1", VideoTableCameraIDColumn), nil, nil, nil, @@ -945,7 +1093,7 @@ func handleGetCameras(w http.ResponseWriter, r *http.Request, db *pgxpool.Pool, return } - limit := 2000 + limit := 50 rawLimit := r.URL.Query().Get("limit") if rawLimit != "" { possibleLimit, err := strconv.ParseInt(rawLimit, 10, 64) diff --git a/pkg/api/detection.go b/pkg/api/detection.go index e826baa..9042381 100755 --- a/pkg/api/detection.go +++ b/pkg/api/detection.go @@ -834,6 +834,10 @@ func (m *Detection) Delete(ctx context.Context, tx pgx.Tx, hardDeletes ...bool) return nil } +func (m *Detection) LockTable(ctx context.Context, tx pgx.Tx, noWait bool) error { + return query.LockTable(ctx, tx, DetectionTable, noWait) +} + func SelectDetections(ctx context.Context, tx pgx.Tx, where string, orderBy *string, limit *int, offset *int, values ...any) ([]*Detection, error) { if slices.Contains(DetectionTableColumns, "deleted_at") { if !strings.Contains(where, "deleted_at") { @@ -1167,7 +1171,7 @@ func handleGetDetections(w http.ResponseWriter, r *http.Request, db *pgxpool.Poo return } - limit := 2000 + limit := 50 rawLimit := r.URL.Query().Get("limit") if rawLimit != "" { possibleLimit, err := strconv.ParseInt(rawLimit, 10, 64) diff --git a/pkg/api/video.go b/pkg/api/video.go index 227d572..0474799 100755 --- a/pkg/api/video.go +++ b/pkg/api/video.go @@ -834,6 +834,10 @@ func (m *Video) Delete(ctx context.Context, tx pgx.Tx, hardDeletes ...bool) erro return nil } +func (m *Video) LockTable(ctx context.Context, tx pgx.Tx, noWait bool) error { + return query.LockTable(ctx, tx, VideoTable, noWait) +} + func SelectVideos(ctx context.Context, tx pgx.Tx, where string, orderBy *string, limit *int, offset *int, values ...any) ([]*Video, error) { if slices.Contains(VideoTableColumns, "deleted_at") { if !strings.Contains(where, "deleted_at") { @@ -1176,7 +1180,7 @@ func handleGetVideos(w http.ResponseWriter, r *http.Request, db *pgxpool.Pool, r return } - limit := 2000 + limit := 50 rawLimit := r.URL.Query().Get("limit") if rawLimit != "" { possibleLimit, err := strconv.ParseInt(rawLimit, 10, 64) diff --git a/pkg/scratch/scratch_test.go b/pkg/scratch/scratch_test.go new file mode 100644 index 0000000..ddfe1a4 --- /dev/null +++ b/pkg/scratch/scratch_test.go @@ -0,0 +1,88 @@ +package scratch + +import ( + "context" + "log" + "sync" + "testing" + + "github.com/initialed85/camry/internal" + "github.com/initialed85/djangolang/pkg/helpers" + "github.com/nats-io/nats.go" + "github.com/nats-io/nats.go/jetstream" + "github.com/stretchr/testify/require" +) + +func TestScratch(t *testing.T) { + desiredCount := 1000 + + startWg := new(sync.WaitGroup) + startWg.Add(2) + + stopWg := new(sync.WaitGroup) + stopWg.Add(2) + + consume := func(i int, cons jetstream.Consumer) { + startWg.Done() + defer stopWg.Done() + + actualCount := 0 + for actualCount < desiredCount/2 { + msg, err := cons.Next() + require.NoError(t, err) + + actualCount++ + + log.Printf("cons%d msg: %#+v", i, string(msg.Data())) + } + + log.Printf("cons%d done", i) + } + + natsUrl, err := internal.GetEnvironment("NATS_URL", false, helpers.Ptr(nats.DefaultURL), false) + require.NoError(t, err) + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + nc, err := nats.Connect(natsUrl) + require.NoError(t, err) + + defer func() { + _ = nc.Drain() + nc.Close() + }() + + js, err := jetstream.New(nc) + require.NoError(t, err) + + cfg := jetstream.StreamConfig{ + Name: "EVENTS", + Retention: jetstream.WorkQueuePolicy, + Subjects: []string{"events.>"}, + } + + stream, err := js.CreateStream(ctx, cfg) + require.NoError(t, err) + + cons1, err := stream.CreateOrUpdateConsumer(ctx, jetstream.ConsumerConfig{ + Name: "event-consumer", + }) + require.NoError(t, err) + go consume(1, cons1) + + cons2, err := stream.CreateOrUpdateConsumer(ctx, jetstream.ConsumerConfig{ + Name: "event-consumer", + }) + require.NoError(t, err) + go consume(2, cons2) + + startWg.Wait() + + for i := 0; i < 1024; i++ { + _, err = js.Publish(ctx, "events.ping", []byte("Hello, world.")) + require.NoError(t, err) + } + + stopWg.Wait() +} diff --git a/pkg/segment_producer/segment_producer.go b/pkg/segment_producer/segment_producer.go index 03b1c35..e19ae46 100644 --- a/pkg/segment_producer/segment_producer.go +++ b/pkg/segment_producer/segment_producer.go @@ -358,10 +358,7 @@ func Run() error { return err } - netCamURL, err := internal.GetEnvironment[string]("NET_CAM_URL", true, nil) - if err != nil { - return err - } + netCamURL, err := internal.GetEnvironment[string]("NET_CAM_URL", false, internal.Ptr("")) durationSeconds, err := internal.GetEnvironment("DURATION_SECONDS", false, internal.Ptr(60)) if err != nil { @@ -373,23 +370,20 @@ func Run() error { return err } - cameraName, err := internal.GetEnvironment[string]("CAMERA_NAME", true, nil) - if err != nil { - return err - } + cameraName, err := internal.GetEnvironment[string]("CAMERA_NAME", false, internal.Ptr("")) ctx, cancel := context.WithCancel(context.Background()) defer cancel() db, err := helpers.GetDBFromEnvironment(ctx) if err != nil { - log.Fatalf("err: %v", err) + return err } defer func() { db.Close() }() - var camera *api.Camera + camera := &api.Camera{} err = func() error { tx, err := db.Begin(ctx) @@ -401,21 +395,140 @@ func Run() error { _ = tx.Rollback(ctx) }() - camera, err = api.SelectCamera( + log.Printf("waiting to lock camera table for claiming a camera...") + + err = camera.LockTable(ctx, tx, false) + if err != nil { + return err + } + + if netCamURL != "" || cameraName != "" { + if netCamURL == "" { + return fmt.Errorf("NET_CAM_URL env var empty or unset; if CAMERA_NAME is set, NET_CAM_URL must also be set") + } + + if cameraName == "" { + return fmt.Errorf("CAMERA_NAME env var empty or unset; if NET_CAM_URL is set, CAMERA_NAME must also be set") + } + + camera, err = api.SelectCamera( + ctx, + tx, + fmt.Sprintf( + "%v = $$?? AND %v = $$??", + api.CameraTableNameColumn, + api.CameraTableStreamURLColumn, + ), + cameraName, + netCamURL, + ) + if err != nil { + return err + } + + log.Printf("found user-selected camera %s | %s | %s", camera.ID, camera.StreamURL, camera.Name) + } else { + cameras, err := api.SelectCameras( + ctx, + tx, + fmt.Sprintf( + "%v < now()", + api.CameraTableClaimExpiresAtColumn, + ), + internal.Ptr(fmt.Sprintf( + "%v DESC", + api.CameraTableClaimExpiresAtColumn, + )), + internal.Ptr(1), + nil, + ) + if err != nil { + return err + } + + if len(cameras) != 1 { + return fmt.Errorf("wanted exactly 1 unclaimed camera, got %d", len(cameras)) + } + + camera = cameras[0] + + log.Printf("found most recently unclaimed camera %s | %s | %s", camera.ID, camera.StreamURL, camera.Name) + } + + now := time.Now().UTC() + camera.LastSeen = now + camera.ClaimedAt = now + camera.ClaimExpiresAt = now.Add(time.Second * time.Duration(durationSeconds) * 2) + + err = camera.Update(ctx, tx, false) + if err != nil { + return err + } + + log.Printf("acquired claim on camera %s | %s | %s", camera.ID, camera.StreamURL, camera.Name) + + err = tx.Commit(ctx) + if err != nil { + return err + } + + return nil + }() + if err != nil { + return err + } + + err = func() error { + tx, err := db.Begin(ctx) + if err != nil { + return err + } + + defer func() { + _ = tx.Rollback(ctx) + }() + + orphanedVideos, err := api.SelectVideos( ctx, tx, fmt.Sprintf( "%v = $$?? AND %v = $$??", - api.CameraTableNameColumn, - api.CameraTableStreamURLColumn, + api.VideoTableCameraIDColumn, + api.VideoTableStatusColumn, ), - cameraName, - netCamURL, + nil, + nil, + nil, + camera.ID, + "recording", ) if err != nil { return err } + for _, video := range orphanedVideos { + log.Printf("marking orphaned video %s as failed", video.ID) + + filePath := filepath.Join(destinationPath, video.FileName) + + _, fileName := filepath.Split(filePath) + video.FileName = fileName + + ext := filepath.Ext(fileName) + thumbnailPath := fmt.Sprintf("%v.jpg", filePath[:len(filePath)-len(ext)]) + err = GenerateThumbnail(filePath, thumbnailPath) + if err == nil { + _, thumbnailName := filepath.Split(thumbnailPath) + video.ThumbnailName = &thumbnailName + } + + video.Status = helpers.Ptr("failed") + err = video.Update(ctx, tx, false) + if err != nil { + return err + } + } + err = tx.Commit(ctx) if err != nil { return err @@ -424,74 +537,9 @@ func Run() error { return nil }() if err != nil { - return err + return fmt.Errorf("failed to handle orphaned videos: %v", err) } - // TODO: I think this is too memory hungry, at least until I work out what's going on - // err = func() error { - // tx, err := db.Begin(ctx) - // if err != nil { - // return err - // } - - // defer func() { - // _ = tx.Rollback(ctx) - // }() - - // orphanedVideos, err := api.SelectVideos( - // ctx, - // tx, - // fmt.Sprintf( - // "%v = $$?? AND %v = $$??", - // api.VideoTableCameraIDColumn, - // api.VideoTableStatusColumn, - // ), - // nil, - // nil, - // nil, - // camera.ID, - // "recording", - // ) - // if err != nil { - // return err - // } - - // for _, video := range orphanedVideos { - // log.Printf("marking orphaned video %s as failed", video.ID) - - // filePath := filepath.Join(destinationPath, video.FileName) - - // _, fileName := filepath.Split(filePath) - // video.FileName = fileName - - // ext := filepath.Ext(fileName) - // thumbnailPath := fmt.Sprintf("%v.jpg", filePath[:len(filePath)-len(ext)]) - // err = GenerateThumbnail(filePath, thumbnailPath) - // if err == nil { - // _, thumbnailName := filepath.Split(thumbnailPath) - // video.ThumbnailName = &thumbnailName - // } - - // video.Status = helpers.Ptr("failed") - // err = video.Update(ctx, tx, false) - // if err != nil { - // return err - // } - // } - - // err = tx.Commit(ctx) - // if err != nil { - // return err - // } - - // return nil - // }() - // if err != nil { - // return fmt.Errorf("failed to handle orphaned videos: %v", err) - // } - - log.Printf("api confirmed camera %s | %s | %s", camera.ID, camera.StreamURL, camera.Name) - mu := new(sync.Mutex) var video *api.Video @@ -547,7 +595,10 @@ func Run() error { return err } - camera.LastSeen = helpers.Ptr(timestamp) + camera.LastSeen = timestamp + camera.ClaimedAt = timestamp + camera.ClaimExpiresAt = timestamp.Add(time.Second * time.Duration(durationSeconds) * 2) + err = camera.Update(ctx, tx, false) if err != nil { return err @@ -588,7 +639,10 @@ func Run() error { return err } - camera.LastSeen = helpers.Ptr(timestamp) + camera.LastSeen = timestamp + camera.ClaimedAt = timestamp + camera.ClaimExpiresAt = timestamp.Add(time.Second * time.Duration(durationSeconds) * 2) + err = camera.Update(ctx, tx, false) if err != nil { return err @@ -647,7 +701,10 @@ func Run() error { return err } - camera.LastSeen = helpers.Ptr(timestamp) + camera.LastSeen = timestamp + camera.ClaimedAt = timestamp + camera.ClaimExpiresAt = timestamp.Add(time.Second * time.Duration(durationSeconds) * 2) + err = camera.Update(ctx, tx, false) if err != nil { return err @@ -663,15 +720,59 @@ func Run() error { return nil } + defer func() { + ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + defer cancel() + + err := func() error { + tx, err := db.Begin(ctx) + if err != nil { + return err + } + + defer func() { + _ = tx.Rollback(ctx) + }() + + if video != nil && video.Status != nil && *video.Status != "needs detection" { + video.Status = internal.Ptr("failed") + err = video.Update(ctx, tx, false) + if err != nil { + return err + } + } + + if camera != nil { + camera.ClaimExpiresAt = time.Now().UTC().Add(time.Second * 1) + err = camera.Update(ctx, tx, false) + if err != nil { + return err + } + + log.Printf("released claim on camera %s | %s | %s", camera.ID, camera.StreamURL, camera.Name) + } + + err = tx.Commit(ctx) + if err != nil { + return err + } + + return nil + }() + if err != nil { + log.Printf("warning: had %v on shutdown cleanup", err) + } + }() + err = run( ctx, cancel, enablePassthrough, enableNvidia, - netCamURL, + camera.StreamURL, durationSeconds, destinationPath, - cameraName, + camera.Name, onOpen, onUpdate, onSave, diff --git a/run-env.sh b/run-env.sh index 8d0d293..67510c2 100755 --- a/run-env.sh +++ b/run-env.sh @@ -22,7 +22,7 @@ docker compose ${profile} build if ! docker compose up -d; then # shellcheck disable=SC2086 - docker compose ${profile} logs -t + docker compose ${profile} logs -t migrate echo "error: docker compose up failed; scroll up for logs" exit 1 fi diff --git a/schema/openapi.json b/schema/openapi.json index a1e9674..b65572e 100644 --- a/schema/openapi.json +++ b/schema/openapi.json @@ -1597,6 +1597,681 @@ "type": "string" }, "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claimed_at__eq", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL = operator" + }, + { + "name": "claimed_at__ne", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL != operator" + }, + { + "name": "claimed_at__gt", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL \u003e operator, may not work with all column types" + }, + { + "name": "claimed_at__gte", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL \u003e= operator, may not work with all column types" + }, + { + "name": "claimed_at__lt", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL \u003c operator, may not work with all column types" + }, + { + "name": "claimed_at__lte", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL \u003c= operator, may not work with all column types" + }, + { + "name": "claimed_at__in", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL IN operator, permits comma-separated values" + }, + { + "name": "claimed_at__nin", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL NOT IN operator, permits comma-separated values" + }, + { + "name": "claimed_at__notin", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL NOT IN operator, permits comma-separated values" + }, + { + "name": "claimed_at__isnull", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claimed_at__nisnull", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claimed_at__isnotnull", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claimed_at__l", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claimed_at__like", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claimed_at__nl", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claimed_at__nlike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claimed_at__notlike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claimed_at__il", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claimed_at__ilike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claimed_at__nil", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claimed_at__nilike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claimed_at__notilike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claimed_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claimed_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claim_duration__eq", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL = operator" + }, + { + "name": "claim_duration__ne", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL != operator" + }, + { + "name": "claim_duration__gt", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL \u003e operator, may not work with all column types" + }, + { + "name": "claim_duration__gte", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL \u003e= operator, may not work with all column types" + }, + { + "name": "claim_duration__lt", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL \u003c operator, may not work with all column types" + }, + { + "name": "claim_duration__lte", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL \u003c= operator, may not work with all column types" + }, + { + "name": "claim_duration__in", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL IN operator, permits comma-separated values" + }, + { + "name": "claim_duration__nin", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL NOT IN operator, permits comma-separated values" + }, + { + "name": "claim_duration__notin", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "SQL NOT IN operator, permits comma-separated values" + }, + { + "name": "claim_duration__isnull", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claim_duration__nisnull", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claim_duration__isnotnull", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claim_duration__l", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_duration__like", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_duration__nl", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_duration__nlike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_duration__notlike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_duration__il", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_duration__ilike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_duration__nil", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_duration__nilike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_duration__notilike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_duration__desc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claim_duration__asc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claim_expires_at__eq", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL = operator" + }, + { + "name": "claim_expires_at__ne", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL != operator" + }, + { + "name": "claim_expires_at__gt", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL \u003e operator, may not work with all column types" + }, + { + "name": "claim_expires_at__gte", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL \u003e= operator, may not work with all column types" + }, + { + "name": "claim_expires_at__lt", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL \u003c operator, may not work with all column types" + }, + { + "name": "claim_expires_at__lte", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL \u003c= operator, may not work with all column types" + }, + { + "name": "claim_expires_at__in", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL IN operator, permits comma-separated values" + }, + { + "name": "claim_expires_at__nin", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL NOT IN operator, permits comma-separated values" + }, + { + "name": "claim_expires_at__notin", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "SQL NOT IN operator, permits comma-separated values" + }, + { + "name": "claim_expires_at__isnull", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL IS NULL operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claim_expires_at__nisnull", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claim_expires_at__isnotnull", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL IS NOT NULL operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claim_expires_at__l", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_expires_at__like", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_expires_at__nl", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_expires_at__nlike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_expires_at__notlike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT LIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_expires_at__il", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_expires_at__ilike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_expires_at__nil", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_expires_at__nilike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_expires_at__notilike", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL NOT ILIKE operator, value is implicitly prefixed and suffixed with %" + }, + { + "name": "claim_expires_at__desc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ DESC operator, value is ignored (presence of key is sufficient)" + }, + { + "name": "claim_expires_at__asc", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "SQL ORDER BY _ ASC operator, value is ignored (presence of key is sufficient)" } ], "responses": { @@ -8036,6 +8711,18 @@ "Camera": { "type": "object", "properties": { + "claim_duration": { + "type": "integer", + "format": "int64" + }, + "claim_expires_at": { + "type": "string", + "format": "date-time" + }, + "claimed_at": { + "type": "string", + "format": "date-time" + }, "created_at": { "type": "string", "format": "date-time" @@ -8051,8 +8738,7 @@ }, "last_seen": { "type": "string", - "format": "date-time", - "nullable": true + "format": "date-time" }, "name": { "type": "string"