mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 59384b90b0 |
@@ -28,10 +28,6 @@ export const errorDto = {
|
|||||||
badRequest: (message: any = null) => ({
|
badRequest: (message: any = null) => ({
|
||||||
message: message ?? expect.anything(),
|
message: message ?? expect.anything(),
|
||||||
}),
|
}),
|
||||||
validationError: (errors?: ReadonlyArray<{ path: ReadonlyArray<string | number>; message: string }>) => ({
|
|
||||||
message: 'Validation failed',
|
|
||||||
errors: errors ? expect.arrayContaining(errors.map((e) => expect.objectContaining(e))) : expect.any(Array),
|
|
||||||
}),
|
|
||||||
noPermission: {
|
noPermission: {
|
||||||
message: expect.stringContaining('Not found or no'),
|
message: expect.stringContaining('Not found or no'),
|
||||||
},
|
},
|
||||||
@@ -41,6 +37,9 @@ export const errorDto = {
|
|||||||
alreadyHasAdmin: {
|
alreadyHasAdmin: {
|
||||||
message: 'The server already has an admin',
|
message: 'The server already has an admin',
|
||||||
},
|
},
|
||||||
|
invalidEmail: {
|
||||||
|
message: ['email must be an email'],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const signupResponseDto = {
|
export const signupResponseDto = {
|
||||||
|
|||||||
@@ -110,9 +110,7 @@ describe('/libraries', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[importPaths] Array must have unique items']));
|
||||||
errorDto.validationError([{ path: ['importPaths'], message: 'Array must have unique items' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not create an external library with duplicate exclusion patterns', async () => {
|
it('should not create an external library with duplicate exclusion patterns', async () => {
|
||||||
@@ -127,9 +125,7 @@ describe('/libraries', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[exclusionPatterns] Array must have unique items']));
|
||||||
errorDto.validationError([{ path: ['exclusionPatterns'], message: 'Array must have unique items' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -161,9 +157,7 @@ describe('/libraries', () => {
|
|||||||
.send({ name: '' });
|
.send({ name: '' });
|
||||||
|
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[name] Too small: expected string to have >=1 characters']));
|
||||||
errorDto.validationError([{ path: ['name'], message: 'Too small: expected string to have >=1 characters' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should change the import paths', async () => {
|
it('should change the import paths', async () => {
|
||||||
@@ -187,9 +181,7 @@ describe('/libraries', () => {
|
|||||||
.send({ importPaths: [''] });
|
.send({ importPaths: [''] });
|
||||||
|
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[importPaths] Array items must not be empty']));
|
||||||
errorDto.validationError([{ path: ['importPaths'], message: 'Array items must not be empty' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should reject duplicate import paths', async () => {
|
it('should reject duplicate import paths', async () => {
|
||||||
@@ -199,9 +191,7 @@ describe('/libraries', () => {
|
|||||||
.send({ importPaths: ['/path', '/path'] });
|
.send({ importPaths: ['/path', '/path'] });
|
||||||
|
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[importPaths] Array must have unique items']));
|
||||||
errorDto.validationError([{ path: ['importPaths'], message: 'Array must have unique items' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should change the exclusion pattern', async () => {
|
it('should change the exclusion pattern', async () => {
|
||||||
@@ -225,9 +215,7 @@ describe('/libraries', () => {
|
|||||||
.send({ exclusionPatterns: ['**/*.jpg', '**/*.jpg'] });
|
.send({ exclusionPatterns: ['**/*.jpg', '**/*.jpg'] });
|
||||||
|
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[exclusionPatterns] Array must have unique items']));
|
||||||
errorDto.validationError([{ path: ['exclusionPatterns'], message: 'Array must have unique items' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should reject an empty exclusion pattern', async () => {
|
it('should reject an empty exclusion pattern', async () => {
|
||||||
@@ -237,9 +225,7 @@ describe('/libraries', () => {
|
|||||||
.send({ exclusionPatterns: [''] });
|
.send({ exclusionPatterns: [''] });
|
||||||
|
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[exclusionPatterns] Array items must not be empty']));
|
||||||
errorDto.validationError([{ path: ['exclusionPatterns'], message: 'Array items must not be empty' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -109,9 +109,7 @@ describe('/map', () => {
|
|||||||
.get('/map/reverse-geocode?lon=123')
|
.get('/map/reverse-geocode?lon=123')
|
||||||
.set('Authorization', `Bearer ${admin.accessToken}`);
|
.set('Authorization', `Bearer ${admin.accessToken}`);
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[lat] Invalid input: expected number, received NaN']));
|
||||||
errorDto.validationError([{ path: ['lat'], message: 'Invalid input: expected number, received NaN' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if a lat is not a number', async () => {
|
it('should throw an error if a lat is not a number', async () => {
|
||||||
@@ -119,9 +117,7 @@ describe('/map', () => {
|
|||||||
.get('/map/reverse-geocode?lat=abc&lon=123.456')
|
.get('/map/reverse-geocode?lat=abc&lon=123.456')
|
||||||
.set('Authorization', `Bearer ${admin.accessToken}`);
|
.set('Authorization', `Bearer ${admin.accessToken}`);
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[lat] Invalid input: expected number, received NaN']));
|
||||||
errorDto.validationError([{ path: ['lat'], message: 'Invalid input: expected number, received NaN' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if a lat is out of range', async () => {
|
it('should throw an error if a lat is out of range', async () => {
|
||||||
@@ -129,9 +125,7 @@ describe('/map', () => {
|
|||||||
.get('/map/reverse-geocode?lat=91&lon=123.456')
|
.get('/map/reverse-geocode?lat=91&lon=123.456')
|
||||||
.set('Authorization', `Bearer ${admin.accessToken}`);
|
.set('Authorization', `Bearer ${admin.accessToken}`);
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[lat] Too big: expected number to be <=90']));
|
||||||
errorDto.validationError([{ path: ['lat'], message: 'Too big: expected number to be <=90' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if a lon is not provided', async () => {
|
it('should throw an error if a lon is not provided', async () => {
|
||||||
@@ -139,9 +133,7 @@ describe('/map', () => {
|
|||||||
.get('/map/reverse-geocode?lat=75')
|
.get('/map/reverse-geocode?lat=75')
|
||||||
.set('Authorization', `Bearer ${admin.accessToken}`);
|
.set('Authorization', `Bearer ${admin.accessToken}`);
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[lon] Invalid input: expected number, received NaN']));
|
||||||
errorDto.validationError([{ path: ['lon'], message: 'Invalid input: expected number, received NaN' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const reverseGeocodeTestCases = [
|
const reverseGeocodeTestCases = [
|
||||||
|
|||||||
@@ -105,11 +105,7 @@ describe(`/oauth`, () => {
|
|||||||
it(`should throw an error if a redirect uri is not provided`, async () => {
|
it(`should throw an error if a redirect uri is not provided`, async () => {
|
||||||
const { status, body } = await request(app).post('/oauth/authorize').send({});
|
const { status, body } = await request(app).post('/oauth/authorize').send({});
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[redirectUri] Invalid input: expected string, received undefined']));
|
||||||
errorDto.validationError([
|
|
||||||
{ path: ['redirectUri'], message: 'Invalid input: expected string, received undefined' },
|
|
||||||
]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a redirect uri', async () => {
|
it('should return a redirect uri', async () => {
|
||||||
@@ -168,17 +164,13 @@ describe(`/oauth`, () => {
|
|||||||
it(`should throw an error if a url is not provided`, async () => {
|
it(`should throw an error if a url is not provided`, async () => {
|
||||||
const { status, body } = await request(app).post('/oauth/callback').send({});
|
const { status, body } = await request(app).post('/oauth/callback').send({});
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[url] Invalid input: expected string, received undefined']));
|
||||||
errorDto.validationError([{ path: ['url'], message: 'Invalid input: expected string, received undefined' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should throw an error if the url is empty`, async () => {
|
it(`should throw an error if the url is empty`, async () => {
|
||||||
const { status, body } = await request(app).post('/oauth/callback').send({ url: '' });
|
const { status, body } = await request(app).post('/oauth/callback').send({ url: '' });
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[url] Too small: expected string to have >=1 characters']));
|
||||||
errorDto.validationError([{ path: ['url'], message: 'Too small: expected string to have >=1 characters' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should throw an error if the state is not provided`, async () => {
|
it(`should throw an error if the state is not provided`, async () => {
|
||||||
@@ -383,11 +375,7 @@ describe(`/oauth`, () => {
|
|||||||
it(`should throw an error if the logout_token is not provided`, async () => {
|
it(`should throw an error if the logout_token is not provided`, async () => {
|
||||||
const { status, body } = await request(app).post('/oauth/backchannel-logout').send({});
|
const { status, body } = await request(app).post('/oauth/backchannel-logout').send({});
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest(['[logout_token] Invalid input: expected string, received undefined']));
|
||||||
errorDto.validationError([
|
|
||||||
{ path: ['logout_token'], message: 'Invalid input: expected string, received undefined' },
|
|
||||||
]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should throw an error if an invalid logout token is provided`, async () => {
|
it(`should throw an error if an invalid logout token is provided`, async () => {
|
||||||
|
|||||||
@@ -341,9 +341,7 @@ describe('/shared-links', () => {
|
|||||||
.set('Authorization', `Bearer ${user1.accessToken}`);
|
.set('Authorization', `Bearer ${user1.accessToken}`);
|
||||||
|
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest());
|
||||||
errorDto.validationError([{ path: [], message: 'Invalid input: expected object, received undefined' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should require an asset/album id', async () => {
|
it('should require an asset/album id', async () => {
|
||||||
|
|||||||
@@ -41,9 +41,7 @@ describe('/stacks', () => {
|
|||||||
.send({ assetIds: [asset.id] });
|
.send({ assetIds: [asset.id] });
|
||||||
|
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest());
|
||||||
errorDto.validationError([{ path: ['assetIds'], message: 'Too small: expected array to have >=2 items' }]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should require a valid id', async () => {
|
it('should require a valid id', async () => {
|
||||||
@@ -53,12 +51,7 @@ describe('/stacks', () => {
|
|||||||
.send({ assetIds: [uuidDto.invalid, uuidDto.invalid] });
|
.send({ assetIds: [uuidDto.invalid, uuidDto.invalid] });
|
||||||
|
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(errorDto.badRequest());
|
||||||
errorDto.validationError([
|
|
||||||
{ path: ['assetIds', 0], message: 'Invalid UUID' },
|
|
||||||
{ path: ['assetIds', 1], message: 'Invalid UUID' },
|
|
||||||
]),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should require access', async () => {
|
it('should require access', async () => {
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ describe('/tags', () => {
|
|||||||
.get(`/tags/${uuidDto.invalid}`)
|
.get(`/tags/${uuidDto.invalid}`)
|
||||||
.set('Authorization', `Bearer ${admin.accessToken}`);
|
.set('Authorization', `Bearer ${admin.accessToken}`);
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(errorDto.validationError([{ path: ['id'], message: 'Invalid UUID' }]));
|
expect(body).toEqual(errorDto.badRequest(['[id] Invalid UUID']));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should get tag details', async () => {
|
it('should get tag details', async () => {
|
||||||
@@ -427,7 +427,7 @@ describe('/tags', () => {
|
|||||||
.delete(`/tags/${uuidDto.invalid}`)
|
.delete(`/tags/${uuidDto.invalid}`)
|
||||||
.set('Authorization', `Bearer ${admin.accessToken}`);
|
.set('Authorization', `Bearer ${admin.accessToken}`);
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(errorDto.validationError([{ path: ['id'], message: 'Invalid UUID' }]));
|
expect(body).toEqual(errorDto.badRequest(['[id] Invalid UUID']));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should delete a tag', async () => {
|
it('should delete a tag', async () => {
|
||||||
|
|||||||
@@ -108,20 +108,14 @@ describe('/admin/users', () => {
|
|||||||
expect(body).toEqual(errorDto.forbidden);
|
expect(body).toEqual(errorDto.forbidden);
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const [key, message] of [
|
for (const key of ['password', 'email', 'name', 'quotaSizeInBytes', 'shouldChangePassword', 'notify']) {
|
||||||
['password', 'Invalid input: expected string, received null'],
|
|
||||||
['email', 'Invalid input: expected email, received object'],
|
|
||||||
['name', 'Invalid input: expected string, received null'],
|
|
||||||
['shouldChangePassword', 'Invalid input: expected boolean, received null'],
|
|
||||||
['notify', 'Invalid input: expected boolean, received null'],
|
|
||||||
] as const) {
|
|
||||||
it(`should not allow null ${key}`, async () => {
|
it(`should not allow null ${key}`, async () => {
|
||||||
const { status, body } = await request(app)
|
const { status, body } = await request(app)
|
||||||
.post(`/admin/users`)
|
.post(`/admin/users`)
|
||||||
.set('Authorization', `Bearer ${admin.accessToken}`)
|
.set('Authorization', `Bearer ${admin.accessToken}`)
|
||||||
.send({ ...createUserDto.user1, [key]: null });
|
.send({ ...createUserDto.user1, [key]: null });
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(errorDto.validationError([{ path: [key], message }]));
|
expect(body).toEqual(errorDto.badRequest());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,19 +153,14 @@ describe('/admin/users', () => {
|
|||||||
expect(body).toEqual(errorDto.forbidden);
|
expect(body).toEqual(errorDto.forbidden);
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const [key, message] of [
|
for (const key of ['password', 'email', 'name', 'shouldChangePassword']) {
|
||||||
['password', 'Invalid input: expected string, received null'],
|
|
||||||
['email', 'Invalid input: expected email, received object'],
|
|
||||||
['name', 'Invalid input: expected string, received null'],
|
|
||||||
['shouldChangePassword', 'Invalid input: expected boolean, received null'],
|
|
||||||
] as const) {
|
|
||||||
it(`should not allow null ${key}`, async () => {
|
it(`should not allow null ${key}`, async () => {
|
||||||
const { status, body } = await request(app)
|
const { status, body } = await request(app)
|
||||||
.put(`/admin/users/${uuidDto.notFound}`)
|
.put(`/admin/users/${uuidDto.notFound}`)
|
||||||
.set('Authorization', `Bearer ${admin.accessToken}`)
|
.set('Authorization', `Bearer ${admin.accessToken}`)
|
||||||
.send({ [key]: null });
|
.send({ [key]: null });
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(errorDto.validationError([{ path: [key], message }]));
|
expect(body).toEqual(errorDto.badRequest());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -179,9 +179,7 @@ describe('/users', () => {
|
|||||||
|
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(
|
||||||
errorDto.validationError([
|
errorDto.badRequest(['[download.archiveSize] Invalid input: expected int, received number']),
|
||||||
{ path: ['download', 'archiveSize'], message: 'Invalid input: expected int, received number' },
|
|
||||||
]),
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -209,9 +207,7 @@ describe('/users', () => {
|
|||||||
|
|
||||||
expect(status).toBe(400);
|
expect(status).toBe(400);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(
|
||||||
errorDto.validationError([
|
errorDto.badRequest(['[download.includeEmbeddedVideos] Invalid input: expected boolean, received number']),
|
||||||
{ path: ['download', 'includeEmbeddedVideos'], message: 'Invalid input: expected boolean, received number' },
|
|
||||||
]),
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ ENV LD_PRELOAD=/usr/lib/libmimalloc.so.2 \
|
|||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
# Pascal support was dropped in 9.11
|
# Pascal support was dropped in 9.11
|
||||||
apt-get install --no-install-recommends -yqq libcudnn9-cuda-12=9.10.2.21-1 tzdata && \
|
apt-get install --no-install-recommends -yqq libcudnn9-cuda-12=9.10.2.21-1 && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ ARG RKNN_TOOLKIT_VERSION="v2.3.0"
|
|||||||
ENV LD_PRELOAD=/usr/lib/libmimalloc.so.2 \
|
ENV LD_PRELOAD=/usr/lib/libmimalloc.so.2 \
|
||||||
MACHINE_LEARNING_MODEL_ARENA=false
|
MACHINE_LEARNING_MODEL_ARENA=false
|
||||||
|
|
||||||
ADD --chmod=644 --checksum=sha256:73993ed4b440460825f21611731564503cc1d5a0c123746477da6cd574f34885 "https://github.com/airockchip/rknn-toolkit2/raw/refs/tags/${RKNN_TOOLKIT_VERSION}/rknpu2/runtime/Linux/librknn_api/aarch64/librknnrt.so" /usr/lib/
|
ADD --checksum=sha256:73993ed4b440460825f21611731564503cc1d5a0c123746477da6cd574f34885 "https://github.com/airockchip/rknn-toolkit2/raw/refs/tags/${RKNN_TOOLKIT_VERSION}/rknpu2/runtime/Linux/librknn_api/aarch64/librknnrt.so" /usr/lib/
|
||||||
|
|
||||||
FROM prod-${DEVICE} AS prod
|
FROM prod-${DEVICE} AS prod
|
||||||
|
|
||||||
|
|||||||
@@ -73,13 +73,11 @@ class DriftAlbumApiRepository extends ApiRepository {
|
|||||||
_api.updateAlbumInfo(
|
_api.updateAlbumInfo(
|
||||||
albumId,
|
albumId,
|
||||||
UpdateAlbumDto(
|
UpdateAlbumDto(
|
||||||
albumName: name == null ? const Optional.absent() : Optional.present(name),
|
albumName: name,
|
||||||
description: description == null ? const Optional.absent() : Optional.present(description),
|
description: description,
|
||||||
albumThumbnailAssetId: thumbnailAssetId == null
|
albumThumbnailAssetId: thumbnailAssetId,
|
||||||
? const Optional.absent()
|
isActivityEnabled: isActivityEnabled,
|
||||||
: Optional.present(thumbnailAssetId),
|
order: apiOrder,
|
||||||
isActivityEnabled: isActivityEnabled == null ? const Optional.absent() : Optional.present(isActivityEnabled),
|
|
||||||
order: apiOrder == null ? const Optional.absent() : Optional.present(apiOrder),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -101,9 +99,7 @@ class DriftAlbumApiRepository extends ApiRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> setActivityStatus(String albumId, bool isEnabled) async {
|
Future<bool> setActivityStatus(String albumId, bool isEnabled) async {
|
||||||
final response = await checkNull(
|
final response = await checkNull(_api.updateAlbumInfo(albumId, UpdateAlbumDto(isActivityEnabled: isEnabled)));
|
||||||
_api.updateAlbumInfo(albumId, UpdateAlbumDto(isActivityEnabled: Optional.present(isEnabled))),
|
|
||||||
);
|
|
||||||
return response.isActivityEnabled;
|
return response.isActivityEnabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class PartnerApiRepository extends ApiRepository {
|
|||||||
|
|
||||||
Future<List<UserDto>> getAll(Direction direction) async {
|
Future<List<UserDto>> getAll(Direction direction) async {
|
||||||
final response = await checkNull(
|
final response = await checkNull(
|
||||||
_api.getPartners(direction == Direction.sharedByMe ? PartnerDirection.sharedBy : PartnerDirection.sharedWith),
|
_api.getPartners(direction == Direction.sharedByMe ? PartnerDirection.by : PartnerDirection.with_),
|
||||||
);
|
);
|
||||||
return response.map(UserConverter.fromPartnerDto).toList();
|
return response.map(UserConverter.fromPartnerDto).toList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,14 +98,14 @@ class SharedLinkService {
|
|||||||
final responseDto = await _apiService.sharedLinksApi.updateSharedLink(
|
final responseDto = await _apiService.sharedLinksApi.updateSharedLink(
|
||||||
id,
|
id,
|
||||||
SharedLinkEditDto(
|
SharedLinkEditDto(
|
||||||
showMetadata: showMeta == null ? const Optional.absent() : Optional.present(showMeta),
|
showMetadata: showMeta,
|
||||||
allowDownload: allowDownload == null ? const Optional.absent() : Optional.present(allowDownload),
|
allowDownload: allowDownload,
|
||||||
allowUpload: allowUpload == null ? const Optional.absent() : Optional.present(allowUpload),
|
allowUpload: allowUpload,
|
||||||
expiresAt: expiresAt == null ? const Optional.absent() : Optional.present(expiresAt),
|
expiresAt: expiresAt,
|
||||||
description: description == null ? const Optional.absent() : Optional.present(description),
|
description: description,
|
||||||
password: password == null ? const Optional.absent() : Optional.present(password),
|
password: password,
|
||||||
slug: slug == null ? const Optional.absent() : Optional.present(slug),
|
slug: slug,
|
||||||
changeExpiryTime: changeExpiry == null ? const Optional.absent() : Optional.present(changeExpiry),
|
changeExpiryTime: changeExpiry,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (responseDto != null) {
|
if (responseDto != null) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
7.22.0
|
7.8.0
|
||||||
|
|||||||
Generated
+2
-2
@@ -4,7 +4,7 @@ Immich API
|
|||||||
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 2.7.5
|
- API version: 2.7.5
|
||||||
- Generator version: 7.22.0
|
- Generator version: 7.8.0
|
||||||
- Build package: org.openapitools.codegen.languages.DartClientCodegen
|
- Build package: org.openapitools.codegen.languages.DartClientCodegen
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
@@ -146,7 +146,7 @@ Class | Method | HTTP request | Description
|
|||||||
*DeprecatedApi* | [**runQueueCommandLegacy**](doc//DeprecatedApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | Run jobs
|
*DeprecatedApi* | [**runQueueCommandLegacy**](doc//DeprecatedApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | Run jobs
|
||||||
*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive | Download asset archive
|
*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive | Download asset archive
|
||||||
*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info | Retrieve download information
|
*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info | Retrieve download information
|
||||||
*DuplicatesApi* | [**deleteDuplicate**](doc//DuplicatesApi.md#deleteduplicate) | **DELETE** /duplicates/{id} | Dismiss a duplicate group
|
*DuplicatesApi* | [**deleteDuplicate**](doc//DuplicatesApi.md#deleteduplicate) | **DELETE** /duplicates/{id} | Delete a duplicate
|
||||||
*DuplicatesApi* | [**deleteDuplicates**](doc//DuplicatesApi.md#deleteduplicates) | **DELETE** /duplicates | Delete duplicates
|
*DuplicatesApi* | [**deleteDuplicates**](doc//DuplicatesApi.md#deleteduplicates) | **DELETE** /duplicates | Delete duplicates
|
||||||
*DuplicatesApi* | [**getAssetDuplicates**](doc//DuplicatesApi.md#getassetduplicates) | **GET** /duplicates | Retrieve duplicates
|
*DuplicatesApi* | [**getAssetDuplicates**](doc//DuplicatesApi.md#getassetduplicates) | **GET** /duplicates | Retrieve duplicates
|
||||||
*DuplicatesApi* | [**resolveDuplicates**](doc//DuplicatesApi.md#resolveduplicates) | **POST** /duplicates/resolve | Resolve duplicate groups
|
*DuplicatesApi* | [**resolveDuplicates**](doc//DuplicatesApi.md#resolveduplicates) | **POST** /duplicates/resolve | Resolve duplicate groups
|
||||||
|
|||||||
Generated
+2
-1
@@ -15,6 +15,8 @@ import 'dart:convert';
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:immich_mobile/utils/openapi_patching.dart';
|
||||||
import 'package:http/http.dart';
|
import 'package:http/http.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
@@ -27,7 +29,6 @@ part 'auth/api_key_auth.dart';
|
|||||||
part 'auth/oauth.dart';
|
part 'auth/oauth.dart';
|
||||||
part 'auth/http_basic_auth.dart';
|
part 'auth/http_basic_auth.dart';
|
||||||
part 'auth/http_bearer_auth.dart';
|
part 'auth/http_bearer_auth.dart';
|
||||||
part 'optional.dart';
|
|
||||||
|
|
||||||
part 'api/api_keys_api.dart';
|
part 'api/api_keys_api.dart';
|
||||||
part 'api/activities_api.dart';
|
part 'api/activities_api.dart';
|
||||||
|
|||||||
+4
-4
@@ -16,9 +16,9 @@ class DuplicatesApi {
|
|||||||
|
|
||||||
final ApiClient apiClient;
|
final ApiClient apiClient;
|
||||||
|
|
||||||
/// Dismiss a duplicate group
|
/// Delete a duplicate
|
||||||
///
|
///
|
||||||
/// Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them.
|
/// Delete a single duplicate asset specified by its ID.
|
||||||
///
|
///
|
||||||
/// Note: This method returns the HTTP [Response].
|
/// Note: This method returns the HTTP [Response].
|
||||||
///
|
///
|
||||||
@@ -51,9 +51,9 @@ class DuplicatesApi {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Dismiss a duplicate group
|
/// Delete a duplicate
|
||||||
///
|
///
|
||||||
/// Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them.
|
/// Delete a single duplicate asset specified by its ID.
|
||||||
///
|
///
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
|
|||||||
Generated
+3
-3
@@ -143,19 +143,19 @@ class ApiClient {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> deserializeAsync(String value, String targetType, {bool growable = false,}) async =>
|
Future<dynamic> deserializeAsync(String value, String targetType, {bool growable = false,}) =>
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
deserialize(value, targetType, growable: growable);
|
deserialize(value, targetType, growable: growable);
|
||||||
|
|
||||||
@Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.')
|
@Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.')
|
||||||
dynamic deserialize(String value, String targetType, {bool growable = false,}) {
|
Future<dynamic> deserialize(String value, String targetType, {bool growable = false,}) async {
|
||||||
// Remove all spaces. Necessary for regular expressions as well.
|
// Remove all spaces. Necessary for regular expressions as well.
|
||||||
targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments
|
targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments
|
||||||
|
|
||||||
// If the expected target type is String, nothing to do...
|
// If the expected target type is String, nothing to do...
|
||||||
return targetType == 'String'
|
return targetType == 'String'
|
||||||
? value
|
? value
|
||||||
: fromJson(json.decode(value), targetType, growable: growable);
|
: fromJson(await compute((String j) => json.decode(j), value), targetType, growable: growable);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
|||||||
Generated
-3
@@ -220,9 +220,6 @@ Future<String> _decodeBodyBytes(Response response) async {
|
|||||||
/// Returns a valid [T] value found at the specified Map [key], null otherwise.
|
/// Returns a valid [T] value found at the specified Map [key], null otherwise.
|
||||||
T? mapValueOfType<T>(dynamic map, String key) {
|
T? mapValueOfType<T>(dynamic map, String key) {
|
||||||
final dynamic value = map is Map ? map[key] : null;
|
final dynamic value = map is Map ? map[key] : null;
|
||||||
if (T == double && value is int) {
|
|
||||||
return value.toDouble() as T;
|
|
||||||
}
|
|
||||||
return value is T ? value : null;
|
return value is T ? value : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-13
@@ -66,12 +66,12 @@ class ActivityCreateDto {
|
|||||||
if (this.assetId != null) {
|
if (this.assetId != null) {
|
||||||
json[r'assetId'] = this.assetId;
|
json[r'assetId'] = this.assetId;
|
||||||
} else {
|
} else {
|
||||||
json[r'assetId'] = null;
|
// json[r'assetId'] = null;
|
||||||
}
|
}
|
||||||
if (this.comment != null) {
|
if (this.comment != null) {
|
||||||
json[r'comment'] = this.comment;
|
json[r'comment'] = this.comment;
|
||||||
} else {
|
} else {
|
||||||
json[r'comment'] = null;
|
// json[r'comment'] = null;
|
||||||
}
|
}
|
||||||
json[r'type'] = this.type;
|
json[r'type'] = this.type;
|
||||||
return json;
|
return json;
|
||||||
@@ -81,20 +81,10 @@ class ActivityCreateDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static ActivityCreateDto? fromJson(dynamic value) {
|
static ActivityCreateDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "ActivityCreateDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'albumId'), 'Required key "ActivityCreateDto[albumId]" is missing from JSON.');
|
|
||||||
assert(json[r'albumId'] != null, 'Required key "ActivityCreateDto[albumId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'type'), 'Required key "ActivityCreateDto[type]" is missing from JSON.');
|
|
||||||
assert(json[r'type'] != null, 'Required key "ActivityCreateDto[type]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ActivityCreateDto(
|
return ActivityCreateDto(
|
||||||
albumId: mapValueOfType<String>(json, r'albumId')!,
|
albumId: mapValueOfType<String>(json, r'albumId')!,
|
||||||
assetId: mapValueOfType<String>(json, r'assetId'),
|
assetId: mapValueOfType<String>(json, r'assetId'),
|
||||||
|
|||||||
+3
-18
@@ -64,12 +64,12 @@ class ActivityResponseDto {
|
|||||||
if (this.assetId != null) {
|
if (this.assetId != null) {
|
||||||
json[r'assetId'] = this.assetId;
|
json[r'assetId'] = this.assetId;
|
||||||
} else {
|
} else {
|
||||||
json[r'assetId'] = null;
|
// json[r'assetId'] = null;
|
||||||
}
|
}
|
||||||
if (this.comment != null) {
|
if (this.comment != null) {
|
||||||
json[r'comment'] = this.comment;
|
json[r'comment'] = this.comment;
|
||||||
} else {
|
} else {
|
||||||
json[r'comment'] = null;
|
// json[r'comment'] = null;
|
||||||
}
|
}
|
||||||
json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')
|
json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')
|
||||||
? this.createdAt.millisecondsSinceEpoch
|
? this.createdAt.millisecondsSinceEpoch
|
||||||
@@ -84,25 +84,10 @@ class ActivityResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static ActivityResponseDto? fromJson(dynamic value) {
|
static ActivityResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "ActivityResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetId'), 'Required key "ActivityResponseDto[assetId]" is missing from JSON.');
|
|
||||||
assert(json.containsKey(r'createdAt'), 'Required key "ActivityResponseDto[createdAt]" is missing from JSON.');
|
|
||||||
assert(json[r'createdAt'] != null, 'Required key "ActivityResponseDto[createdAt]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "ActivityResponseDto[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "ActivityResponseDto[id]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'type'), 'Required key "ActivityResponseDto[type]" is missing from JSON.');
|
|
||||||
assert(json[r'type'] != null, 'Required key "ActivityResponseDto[type]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'user'), 'Required key "ActivityResponseDto[user]" is missing from JSON.');
|
|
||||||
assert(json[r'user'] != null, 'Required key "ActivityResponseDto[user]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ActivityResponseDto(
|
return ActivityResponseDto(
|
||||||
assetId: mapValueOfType<String>(json, r'assetId'),
|
assetId: mapValueOfType<String>(json, r'assetId'),
|
||||||
comment: mapValueOfType<String>(json, r'comment'),
|
comment: mapValueOfType<String>(json, r'comment'),
|
||||||
|
|||||||
+1
-11
@@ -54,20 +54,10 @@ class ActivityStatisticsResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static ActivityStatisticsResponseDto? fromJson(dynamic value) {
|
static ActivityStatisticsResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "ActivityStatisticsResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'comments'), 'Required key "ActivityStatisticsResponseDto[comments]" is missing from JSON.');
|
|
||||||
assert(json[r'comments'] != null, 'Required key "ActivityStatisticsResponseDto[comments]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'likes'), 'Required key "ActivityStatisticsResponseDto[likes]" is missing from JSON.');
|
|
||||||
assert(json[r'likes'] != null, 'Required key "ActivityStatisticsResponseDto[likes]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ActivityStatisticsResponseDto(
|
return ActivityStatisticsResponseDto(
|
||||||
comments: mapValueOfType<int>(json, r'comments')!,
|
comments: mapValueOfType<int>(json, r'comments')!,
|
||||||
likes: mapValueOfType<int>(json, r'likes')!,
|
likes: mapValueOfType<int>(json, r'likes')!,
|
||||||
|
|||||||
+1
-9
@@ -41,18 +41,10 @@ class AddUsersDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AddUsersDto? fromJson(dynamic value) {
|
static AddUsersDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AddUsersDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'albumUsers'), 'Required key "AddUsersDto[albumUsers]" is missing from JSON.');
|
|
||||||
assert(json[r'albumUsers'] != null, 'Required key "AddUsersDto[albumUsers]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AddUsersDto(
|
return AddUsersDto(
|
||||||
albumUsers: AlbumUserAddDto.listFromJson(json[r'albumUsers']),
|
albumUsers: AlbumUserAddDto.listFromJson(json[r'albumUsers']),
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-9
@@ -41,18 +41,10 @@ class AdminOnboardingUpdateDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AdminOnboardingUpdateDto? fromJson(dynamic value) {
|
static AdminOnboardingUpdateDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AdminOnboardingUpdateDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'isOnboarded'), 'Required key "AdminOnboardingUpdateDto[isOnboarded]" is missing from JSON.');
|
|
||||||
assert(json[r'isOnboarded'] != null, 'Required key "AdminOnboardingUpdateDto[isOnboarded]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AdminOnboardingUpdateDto(
|
return AdminOnboardingUpdateDto(
|
||||||
isOnboarded: mapValueOfType<bool>(json, r'isOnboarded')!,
|
isOnboarded: mapValueOfType<bool>(json, r'isOnboarded')!,
|
||||||
);
|
);
|
||||||
|
|||||||
+6
-33
@@ -152,7 +152,7 @@ class AlbumResponseDto {
|
|||||||
if (this.albumThumbnailAssetId != null) {
|
if (this.albumThumbnailAssetId != null) {
|
||||||
json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId;
|
json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId;
|
||||||
} else {
|
} else {
|
||||||
json[r'albumThumbnailAssetId'] = null;
|
// json[r'albumThumbnailAssetId'] = null;
|
||||||
}
|
}
|
||||||
json[r'albumUsers'] = this.albumUsers;
|
json[r'albumUsers'] = this.albumUsers;
|
||||||
json[r'assetCount'] = this.assetCount;
|
json[r'assetCount'] = this.assetCount;
|
||||||
@@ -162,7 +162,7 @@ class AlbumResponseDto {
|
|||||||
if (this.endDate != null) {
|
if (this.endDate != null) {
|
||||||
json[r'endDate'] = this.endDate!.toUtc().toIso8601String();
|
json[r'endDate'] = this.endDate!.toUtc().toIso8601String();
|
||||||
} else {
|
} else {
|
||||||
json[r'endDate'] = null;
|
// json[r'endDate'] = null;
|
||||||
}
|
}
|
||||||
json[r'hasSharedLink'] = this.hasSharedLink;
|
json[r'hasSharedLink'] = this.hasSharedLink;
|
||||||
json[r'id'] = this.id;
|
json[r'id'] = this.id;
|
||||||
@@ -170,18 +170,18 @@ class AlbumResponseDto {
|
|||||||
if (this.lastModifiedAssetTimestamp != null) {
|
if (this.lastModifiedAssetTimestamp != null) {
|
||||||
json[r'lastModifiedAssetTimestamp'] = this.lastModifiedAssetTimestamp!.toUtc().toIso8601String();
|
json[r'lastModifiedAssetTimestamp'] = this.lastModifiedAssetTimestamp!.toUtc().toIso8601String();
|
||||||
} else {
|
} else {
|
||||||
json[r'lastModifiedAssetTimestamp'] = null;
|
// json[r'lastModifiedAssetTimestamp'] = null;
|
||||||
}
|
}
|
||||||
if (this.order != null) {
|
if (this.order != null) {
|
||||||
json[r'order'] = this.order;
|
json[r'order'] = this.order;
|
||||||
} else {
|
} else {
|
||||||
json[r'order'] = null;
|
// json[r'order'] = null;
|
||||||
}
|
}
|
||||||
json[r'shared'] = this.shared;
|
json[r'shared'] = this.shared;
|
||||||
if (this.startDate != null) {
|
if (this.startDate != null) {
|
||||||
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
|
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
|
||||||
} else {
|
} else {
|
||||||
json[r'startDate'] = null;
|
// json[r'startDate'] = null;
|
||||||
}
|
}
|
||||||
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
|
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
|
||||||
return json;
|
return json;
|
||||||
@@ -191,37 +191,10 @@ class AlbumResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AlbumResponseDto? fromJson(dynamic value) {
|
static AlbumResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AlbumResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'albumName'), 'Required key "AlbumResponseDto[albumName]" is missing from JSON.');
|
|
||||||
assert(json[r'albumName'] != null, 'Required key "AlbumResponseDto[albumName]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'albumThumbnailAssetId'), 'Required key "AlbumResponseDto[albumThumbnailAssetId]" is missing from JSON.');
|
|
||||||
assert(json.containsKey(r'albumUsers'), 'Required key "AlbumResponseDto[albumUsers]" is missing from JSON.');
|
|
||||||
assert(json[r'albumUsers'] != null, 'Required key "AlbumResponseDto[albumUsers]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'assetCount'), 'Required key "AlbumResponseDto[assetCount]" is missing from JSON.');
|
|
||||||
assert(json[r'assetCount'] != null, 'Required key "AlbumResponseDto[assetCount]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'createdAt'), 'Required key "AlbumResponseDto[createdAt]" is missing from JSON.');
|
|
||||||
assert(json[r'createdAt'] != null, 'Required key "AlbumResponseDto[createdAt]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'description'), 'Required key "AlbumResponseDto[description]" is missing from JSON.');
|
|
||||||
assert(json[r'description'] != null, 'Required key "AlbumResponseDto[description]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'hasSharedLink'), 'Required key "AlbumResponseDto[hasSharedLink]" is missing from JSON.');
|
|
||||||
assert(json[r'hasSharedLink'] != null, 'Required key "AlbumResponseDto[hasSharedLink]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "AlbumResponseDto[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "AlbumResponseDto[id]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'isActivityEnabled'), 'Required key "AlbumResponseDto[isActivityEnabled]" is missing from JSON.');
|
|
||||||
assert(json[r'isActivityEnabled'] != null, 'Required key "AlbumResponseDto[isActivityEnabled]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'shared'), 'Required key "AlbumResponseDto[shared]" is missing from JSON.');
|
|
||||||
assert(json[r'shared'] != null, 'Required key "AlbumResponseDto[shared]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'updatedAt'), 'Required key "AlbumResponseDto[updatedAt]" is missing from JSON.');
|
|
||||||
assert(json[r'updatedAt'] != null, 'Required key "AlbumResponseDto[updatedAt]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AlbumResponseDto(
|
return AlbumResponseDto(
|
||||||
albumName: mapValueOfType<String>(json, r'albumName')!,
|
albumName: mapValueOfType<String>(json, r'albumName')!,
|
||||||
albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'),
|
albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'),
|
||||||
|
|||||||
+1
-13
@@ -64,22 +64,10 @@ class AlbumStatisticsResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AlbumStatisticsResponseDto? fromJson(dynamic value) {
|
static AlbumStatisticsResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AlbumStatisticsResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'notShared'), 'Required key "AlbumStatisticsResponseDto[notShared]" is missing from JSON.');
|
|
||||||
assert(json[r'notShared'] != null, 'Required key "AlbumStatisticsResponseDto[notShared]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'owned'), 'Required key "AlbumStatisticsResponseDto[owned]" is missing from JSON.');
|
|
||||||
assert(json[r'owned'] != null, 'Required key "AlbumStatisticsResponseDto[owned]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'shared'), 'Required key "AlbumStatisticsResponseDto[shared]" is missing from JSON.');
|
|
||||||
assert(json[r'shared'] != null, 'Required key "AlbumStatisticsResponseDto[shared]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AlbumStatisticsResponseDto(
|
return AlbumStatisticsResponseDto(
|
||||||
notShared: mapValueOfType<int>(json, r'notShared')!,
|
notShared: mapValueOfType<int>(json, r'notShared')!,
|
||||||
owned: mapValueOfType<int>(json, r'owned')!,
|
owned: mapValueOfType<int>(json, r'owned')!,
|
||||||
|
|||||||
+2
-10
@@ -47,7 +47,7 @@ class AlbumUserAddDto {
|
|||||||
if (this.role != null) {
|
if (this.role != null) {
|
||||||
json[r'role'] = this.role;
|
json[r'role'] = this.role;
|
||||||
} else {
|
} else {
|
||||||
json[r'role'] = null;
|
// json[r'role'] = null;
|
||||||
}
|
}
|
||||||
json[r'userId'] = this.userId;
|
json[r'userId'] = this.userId;
|
||||||
return json;
|
return json;
|
||||||
@@ -57,18 +57,10 @@ class AlbumUserAddDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AlbumUserAddDto? fromJson(dynamic value) {
|
static AlbumUserAddDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AlbumUserAddDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'userId'), 'Required key "AlbumUserAddDto[userId]" is missing from JSON.');
|
|
||||||
assert(json[r'userId'] != null, 'Required key "AlbumUserAddDto[userId]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AlbumUserAddDto(
|
return AlbumUserAddDto(
|
||||||
role: AlbumUserRole.fromJson(json[r'role']),
|
role: AlbumUserRole.fromJson(json[r'role']),
|
||||||
userId: mapValueOfType<String>(json, r'userId')!,
|
userId: mapValueOfType<String>(json, r'userId')!,
|
||||||
|
|||||||
+1
-11
@@ -47,20 +47,10 @@ class AlbumUserCreateDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AlbumUserCreateDto? fromJson(dynamic value) {
|
static AlbumUserCreateDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AlbumUserCreateDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'role'), 'Required key "AlbumUserCreateDto[role]" is missing from JSON.');
|
|
||||||
assert(json[r'role'] != null, 'Required key "AlbumUserCreateDto[role]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'userId'), 'Required key "AlbumUserCreateDto[userId]" is missing from JSON.');
|
|
||||||
assert(json[r'userId'] != null, 'Required key "AlbumUserCreateDto[userId]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AlbumUserCreateDto(
|
return AlbumUserCreateDto(
|
||||||
role: AlbumUserRole.fromJson(json[r'role'])!,
|
role: AlbumUserRole.fromJson(json[r'role'])!,
|
||||||
userId: mapValueOfType<String>(json, r'userId')!,
|
userId: mapValueOfType<String>(json, r'userId')!,
|
||||||
|
|||||||
+1
-11
@@ -46,20 +46,10 @@ class AlbumUserResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AlbumUserResponseDto? fromJson(dynamic value) {
|
static AlbumUserResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AlbumUserResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'role'), 'Required key "AlbumUserResponseDto[role]" is missing from JSON.');
|
|
||||||
assert(json[r'role'] != null, 'Required key "AlbumUserResponseDto[role]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'user'), 'Required key "AlbumUserResponseDto[user]" is missing from JSON.');
|
|
||||||
assert(json[r'user'] != null, 'Required key "AlbumUserResponseDto[user]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AlbumUserResponseDto(
|
return AlbumUserResponseDto(
|
||||||
role: AlbumUserRole.fromJson(json[r'role'])!,
|
role: AlbumUserRole.fromJson(json[r'role'])!,
|
||||||
user: UserResponseDto.fromJson(json[r'user'])!,
|
user: UserResponseDto.fromJson(json[r'user'])!,
|
||||||
|
|||||||
+1
-11
@@ -48,20 +48,10 @@ class AlbumsAddAssetsDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AlbumsAddAssetsDto? fromJson(dynamic value) {
|
static AlbumsAddAssetsDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AlbumsAddAssetsDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'albumIds'), 'Required key "AlbumsAddAssetsDto[albumIds]" is missing from JSON.');
|
|
||||||
assert(json[r'albumIds'] != null, 'Required key "AlbumsAddAssetsDto[albumIds]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'assetIds'), 'Required key "AlbumsAddAssetsDto[assetIds]" is missing from JSON.');
|
|
||||||
assert(json[r'assetIds'] != null, 'Required key "AlbumsAddAssetsDto[assetIds]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AlbumsAddAssetsDto(
|
return AlbumsAddAssetsDto(
|
||||||
albumIds: json[r'albumIds'] is Iterable
|
albumIds: json[r'albumIds'] is Iterable
|
||||||
? (json[r'albumIds'] as Iterable).cast<String>().toList(growable: false)
|
? (json[r'albumIds'] as Iterable).cast<String>().toList(growable: false)
|
||||||
|
|||||||
+2
-10
@@ -47,7 +47,7 @@ class AlbumsAddAssetsResponseDto {
|
|||||||
if (this.error != null) {
|
if (this.error != null) {
|
||||||
json[r'error'] = this.error;
|
json[r'error'] = this.error;
|
||||||
} else {
|
} else {
|
||||||
json[r'error'] = null;
|
// json[r'error'] = null;
|
||||||
}
|
}
|
||||||
json[r'success'] = this.success;
|
json[r'success'] = this.success;
|
||||||
return json;
|
return json;
|
||||||
@@ -57,18 +57,10 @@ class AlbumsAddAssetsResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AlbumsAddAssetsResponseDto? fromJson(dynamic value) {
|
static AlbumsAddAssetsResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AlbumsAddAssetsResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'success'), 'Required key "AlbumsAddAssetsResponseDto[success]" is missing from JSON.');
|
|
||||||
assert(json[r'success'] != null, 'Required key "AlbumsAddAssetsResponseDto[success]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AlbumsAddAssetsResponseDto(
|
return AlbumsAddAssetsResponseDto(
|
||||||
error: BulkIdErrorReason.fromJson(json[r'error']),
|
error: BulkIdErrorReason.fromJson(json[r'error']),
|
||||||
success: mapValueOfType<bool>(json, r'success')!,
|
success: mapValueOfType<bool>(json, r'success')!,
|
||||||
|
|||||||
+1
-9
@@ -40,18 +40,10 @@ class AlbumsResponse {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AlbumsResponse? fromJson(dynamic value) {
|
static AlbumsResponse? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AlbumsResponse");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'defaultAssetOrder'), 'Required key "AlbumsResponse[defaultAssetOrder]" is missing from JSON.');
|
|
||||||
assert(json[r'defaultAssetOrder'] != null, 'Required key "AlbumsResponse[defaultAssetOrder]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AlbumsResponse(
|
return AlbumsResponse(
|
||||||
defaultAssetOrder: AssetOrder.fromJson(json[r'defaultAssetOrder'])!,
|
defaultAssetOrder: AssetOrder.fromJson(json[r'defaultAssetOrder'])!,
|
||||||
);
|
);
|
||||||
|
|||||||
+2
-8
@@ -41,7 +41,7 @@ class AlbumsUpdate {
|
|||||||
if (this.defaultAssetOrder != null) {
|
if (this.defaultAssetOrder != null) {
|
||||||
json[r'defaultAssetOrder'] = this.defaultAssetOrder;
|
json[r'defaultAssetOrder'] = this.defaultAssetOrder;
|
||||||
} else {
|
} else {
|
||||||
json[r'defaultAssetOrder'] = null;
|
// json[r'defaultAssetOrder'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -50,16 +50,10 @@ class AlbumsUpdate {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AlbumsUpdate? fromJson(dynamic value) {
|
static AlbumsUpdate? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AlbumsUpdate");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AlbumsUpdate(
|
return AlbumsUpdate(
|
||||||
defaultAssetOrder: AssetOrder.fromJson(json[r'defaultAssetOrder']),
|
defaultAssetOrder: AssetOrder.fromJson(json[r'defaultAssetOrder']),
|
||||||
);
|
);
|
||||||
|
|||||||
+2
-10
@@ -48,7 +48,7 @@ class ApiKeyCreateDto {
|
|||||||
if (this.name != null) {
|
if (this.name != null) {
|
||||||
json[r'name'] = this.name;
|
json[r'name'] = this.name;
|
||||||
} else {
|
} else {
|
||||||
json[r'name'] = null;
|
// json[r'name'] = null;
|
||||||
}
|
}
|
||||||
json[r'permissions'] = this.permissions;
|
json[r'permissions'] = this.permissions;
|
||||||
return json;
|
return json;
|
||||||
@@ -58,18 +58,10 @@ class ApiKeyCreateDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static ApiKeyCreateDto? fromJson(dynamic value) {
|
static ApiKeyCreateDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "ApiKeyCreateDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'permissions'), 'Required key "ApiKeyCreateDto[permissions]" is missing from JSON.');
|
|
||||||
assert(json[r'permissions'] != null, 'Required key "ApiKeyCreateDto[permissions]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ApiKeyCreateDto(
|
return ApiKeyCreateDto(
|
||||||
name: mapValueOfType<String>(json, r'name'),
|
name: mapValueOfType<String>(json, r'name'),
|
||||||
permissions: Permission.listFromJson(json[r'permissions']),
|
permissions: Permission.listFromJson(json[r'permissions']),
|
||||||
|
|||||||
+1
-11
@@ -47,20 +47,10 @@ class ApiKeyCreateResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static ApiKeyCreateResponseDto? fromJson(dynamic value) {
|
static ApiKeyCreateResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "ApiKeyCreateResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'apiKey'), 'Required key "ApiKeyCreateResponseDto[apiKey]" is missing from JSON.');
|
|
||||||
assert(json[r'apiKey'] != null, 'Required key "ApiKeyCreateResponseDto[apiKey]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'secret'), 'Required key "ApiKeyCreateResponseDto[secret]" is missing from JSON.');
|
|
||||||
assert(json[r'secret'] != null, 'Required key "ApiKeyCreateResponseDto[secret]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ApiKeyCreateResponseDto(
|
return ApiKeyCreateResponseDto(
|
||||||
apiKey: ApiKeyResponseDto.fromJson(json[r'apiKey'])!,
|
apiKey: ApiKeyResponseDto.fromJson(json[r'apiKey'])!,
|
||||||
secret: mapValueOfType<String>(json, r'secret')!,
|
secret: mapValueOfType<String>(json, r'secret')!,
|
||||||
|
|||||||
+1
-17
@@ -73,26 +73,10 @@ class ApiKeyResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static ApiKeyResponseDto? fromJson(dynamic value) {
|
static ApiKeyResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "ApiKeyResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'createdAt'), 'Required key "ApiKeyResponseDto[createdAt]" is missing from JSON.');
|
|
||||||
assert(json[r'createdAt'] != null, 'Required key "ApiKeyResponseDto[createdAt]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "ApiKeyResponseDto[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "ApiKeyResponseDto[id]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'name'), 'Required key "ApiKeyResponseDto[name]" is missing from JSON.');
|
|
||||||
assert(json[r'name'] != null, 'Required key "ApiKeyResponseDto[name]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'permissions'), 'Required key "ApiKeyResponseDto[permissions]" is missing from JSON.');
|
|
||||||
assert(json[r'permissions'] != null, 'Required key "ApiKeyResponseDto[permissions]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'updatedAt'), 'Required key "ApiKeyResponseDto[updatedAt]" is missing from JSON.');
|
|
||||||
assert(json[r'updatedAt'] != null, 'Required key "ApiKeyResponseDto[updatedAt]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ApiKeyResponseDto(
|
return ApiKeyResponseDto(
|
||||||
createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')!,
|
createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')!,
|
||||||
id: mapValueOfType<String>(json, r'id')!,
|
id: mapValueOfType<String>(json, r'id')!,
|
||||||
|
|||||||
+2
-8
@@ -48,7 +48,7 @@ class ApiKeyUpdateDto {
|
|||||||
if (this.name != null) {
|
if (this.name != null) {
|
||||||
json[r'name'] = this.name;
|
json[r'name'] = this.name;
|
||||||
} else {
|
} else {
|
||||||
json[r'name'] = null;
|
// json[r'name'] = null;
|
||||||
}
|
}
|
||||||
json[r'permissions'] = this.permissions;
|
json[r'permissions'] = this.permissions;
|
||||||
return json;
|
return json;
|
||||||
@@ -58,16 +58,10 @@ class ApiKeyUpdateDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static ApiKeyUpdateDto? fromJson(dynamic value) {
|
static ApiKeyUpdateDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "ApiKeyUpdateDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ApiKeyUpdateDto(
|
return ApiKeyUpdateDto(
|
||||||
name: mapValueOfType<String>(json, r'name'),
|
name: mapValueOfType<String>(json, r'name'),
|
||||||
permissions: Permission.listFromJson(json[r'permissions']),
|
permissions: Permission.listFromJson(json[r'permissions']),
|
||||||
|
|||||||
+2
-10
@@ -48,7 +48,7 @@ class AssetBulkDeleteDto {
|
|||||||
if (this.force != null) {
|
if (this.force != null) {
|
||||||
json[r'force'] = this.force;
|
json[r'force'] = this.force;
|
||||||
} else {
|
} else {
|
||||||
json[r'force'] = null;
|
// json[r'force'] = null;
|
||||||
}
|
}
|
||||||
json[r'ids'] = this.ids;
|
json[r'ids'] = this.ids;
|
||||||
return json;
|
return json;
|
||||||
@@ -58,18 +58,10 @@ class AssetBulkDeleteDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetBulkDeleteDto? fromJson(dynamic value) {
|
static AssetBulkDeleteDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetBulkDeleteDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'ids'), 'Required key "AssetBulkDeleteDto[ids]" is missing from JSON.');
|
|
||||||
assert(json[r'ids'] != null, 'Required key "AssetBulkDeleteDto[ids]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetBulkDeleteDto(
|
return AssetBulkDeleteDto(
|
||||||
force: mapValueOfType<bool>(json, r'force'),
|
force: mapValueOfType<bool>(json, r'force'),
|
||||||
ids: json[r'ids'] is Iterable
|
ids: json[r'ids'] is Iterable
|
||||||
|
|||||||
+11
-19
@@ -155,53 +155,53 @@ class AssetBulkUpdateDto {
|
|||||||
if (this.dateTimeOriginal != null) {
|
if (this.dateTimeOriginal != null) {
|
||||||
json[r'dateTimeOriginal'] = this.dateTimeOriginal;
|
json[r'dateTimeOriginal'] = this.dateTimeOriginal;
|
||||||
} else {
|
} else {
|
||||||
json[r'dateTimeOriginal'] = null;
|
// json[r'dateTimeOriginal'] = null;
|
||||||
}
|
}
|
||||||
if (this.dateTimeRelative != null) {
|
if (this.dateTimeRelative != null) {
|
||||||
json[r'dateTimeRelative'] = this.dateTimeRelative;
|
json[r'dateTimeRelative'] = this.dateTimeRelative;
|
||||||
} else {
|
} else {
|
||||||
json[r'dateTimeRelative'] = null;
|
// json[r'dateTimeRelative'] = null;
|
||||||
}
|
}
|
||||||
if (this.description != null) {
|
if (this.description != null) {
|
||||||
json[r'description'] = this.description;
|
json[r'description'] = this.description;
|
||||||
} else {
|
} else {
|
||||||
json[r'description'] = null;
|
// json[r'description'] = null;
|
||||||
}
|
}
|
||||||
if (this.duplicateId != null) {
|
if (this.duplicateId != null) {
|
||||||
json[r'duplicateId'] = this.duplicateId;
|
json[r'duplicateId'] = this.duplicateId;
|
||||||
} else {
|
} else {
|
||||||
json[r'duplicateId'] = null;
|
// json[r'duplicateId'] = null;
|
||||||
}
|
}
|
||||||
json[r'ids'] = this.ids;
|
json[r'ids'] = this.ids;
|
||||||
if (this.isFavorite != null) {
|
if (this.isFavorite != null) {
|
||||||
json[r'isFavorite'] = this.isFavorite;
|
json[r'isFavorite'] = this.isFavorite;
|
||||||
} else {
|
} else {
|
||||||
json[r'isFavorite'] = null;
|
// json[r'isFavorite'] = null;
|
||||||
}
|
}
|
||||||
if (this.latitude != null) {
|
if (this.latitude != null) {
|
||||||
json[r'latitude'] = this.latitude;
|
json[r'latitude'] = this.latitude;
|
||||||
} else {
|
} else {
|
||||||
json[r'latitude'] = null;
|
// json[r'latitude'] = null;
|
||||||
}
|
}
|
||||||
if (this.longitude != null) {
|
if (this.longitude != null) {
|
||||||
json[r'longitude'] = this.longitude;
|
json[r'longitude'] = this.longitude;
|
||||||
} else {
|
} else {
|
||||||
json[r'longitude'] = null;
|
// json[r'longitude'] = null;
|
||||||
}
|
}
|
||||||
if (this.rating != null) {
|
if (this.rating != null) {
|
||||||
json[r'rating'] = this.rating;
|
json[r'rating'] = this.rating;
|
||||||
} else {
|
} else {
|
||||||
json[r'rating'] = null;
|
// json[r'rating'] = null;
|
||||||
}
|
}
|
||||||
if (this.timeZone != null) {
|
if (this.timeZone != null) {
|
||||||
json[r'timeZone'] = this.timeZone;
|
json[r'timeZone'] = this.timeZone;
|
||||||
} else {
|
} else {
|
||||||
json[r'timeZone'] = null;
|
// json[r'timeZone'] = null;
|
||||||
}
|
}
|
||||||
if (this.visibility != null) {
|
if (this.visibility != null) {
|
||||||
json[r'visibility'] = this.visibility;
|
json[r'visibility'] = this.visibility;
|
||||||
} else {
|
} else {
|
||||||
json[r'visibility'] = null;
|
// json[r'visibility'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -210,18 +210,10 @@ class AssetBulkUpdateDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetBulkUpdateDto? fromJson(dynamic value) {
|
static AssetBulkUpdateDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetBulkUpdateDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'ids'), 'Required key "AssetBulkUpdateDto[ids]" is missing from JSON.');
|
|
||||||
assert(json[r'ids'] != null, 'Required key "AssetBulkUpdateDto[ids]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetBulkUpdateDto(
|
return AssetBulkUpdateDto(
|
||||||
dateTimeOriginal: mapValueOfType<String>(json, r'dateTimeOriginal'),
|
dateTimeOriginal: mapValueOfType<String>(json, r'dateTimeOriginal'),
|
||||||
dateTimeRelative: mapValueOfType<int>(json, r'dateTimeRelative'),
|
dateTimeRelative: mapValueOfType<int>(json, r'dateTimeRelative'),
|
||||||
|
|||||||
+1
-9
@@ -41,18 +41,10 @@ class AssetBulkUploadCheckDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetBulkUploadCheckDto? fromJson(dynamic value) {
|
static AssetBulkUploadCheckDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetBulkUploadCheckDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assets'), 'Required key "AssetBulkUploadCheckDto[assets]" is missing from JSON.');
|
|
||||||
assert(json[r'assets'] != null, 'Required key "AssetBulkUploadCheckDto[assets]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetBulkUploadCheckDto(
|
return AssetBulkUploadCheckDto(
|
||||||
assets: AssetBulkUploadCheckItem.listFromJson(json[r'assets']),
|
assets: AssetBulkUploadCheckItem.listFromJson(json[r'assets']),
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-11
@@ -48,20 +48,10 @@ class AssetBulkUploadCheckItem {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetBulkUploadCheckItem? fromJson(dynamic value) {
|
static AssetBulkUploadCheckItem? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetBulkUploadCheckItem");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'checksum'), 'Required key "AssetBulkUploadCheckItem[checksum]" is missing from JSON.');
|
|
||||||
assert(json[r'checksum'] != null, 'Required key "AssetBulkUploadCheckItem[checksum]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "AssetBulkUploadCheckItem[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "AssetBulkUploadCheckItem[id]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetBulkUploadCheckItem(
|
return AssetBulkUploadCheckItem(
|
||||||
checksum: mapValueOfType<String>(json, r'checksum')!,
|
checksum: mapValueOfType<String>(json, r'checksum')!,
|
||||||
id: mapValueOfType<String>(json, r'id')!,
|
id: mapValueOfType<String>(json, r'id')!,
|
||||||
|
|||||||
@@ -41,18 +41,10 @@ class AssetBulkUploadCheckResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetBulkUploadCheckResponseDto? fromJson(dynamic value) {
|
static AssetBulkUploadCheckResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetBulkUploadCheckResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'results'), 'Required key "AssetBulkUploadCheckResponseDto[results]" is missing from JSON.');
|
|
||||||
assert(json[r'results'] != null, 'Required key "AssetBulkUploadCheckResponseDto[results]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetBulkUploadCheckResponseDto(
|
return AssetBulkUploadCheckResponseDto(
|
||||||
results: AssetBulkUploadCheckResult.listFromJson(json[r'results']),
|
results: AssetBulkUploadCheckResult.listFromJson(json[r'results']),
|
||||||
);
|
);
|
||||||
|
|||||||
+4
-14
@@ -77,18 +77,18 @@ class AssetBulkUploadCheckResult {
|
|||||||
if (this.assetId != null) {
|
if (this.assetId != null) {
|
||||||
json[r'assetId'] = this.assetId;
|
json[r'assetId'] = this.assetId;
|
||||||
} else {
|
} else {
|
||||||
json[r'assetId'] = null;
|
// json[r'assetId'] = null;
|
||||||
}
|
}
|
||||||
json[r'id'] = this.id;
|
json[r'id'] = this.id;
|
||||||
if (this.isTrashed != null) {
|
if (this.isTrashed != null) {
|
||||||
json[r'isTrashed'] = this.isTrashed;
|
json[r'isTrashed'] = this.isTrashed;
|
||||||
} else {
|
} else {
|
||||||
json[r'isTrashed'] = null;
|
// json[r'isTrashed'] = null;
|
||||||
}
|
}
|
||||||
if (this.reason != null) {
|
if (this.reason != null) {
|
||||||
json[r'reason'] = this.reason;
|
json[r'reason'] = this.reason;
|
||||||
} else {
|
} else {
|
||||||
json[r'reason'] = null;
|
// json[r'reason'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -97,20 +97,10 @@ class AssetBulkUploadCheckResult {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetBulkUploadCheckResult? fromJson(dynamic value) {
|
static AssetBulkUploadCheckResult? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetBulkUploadCheckResult");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'action'), 'Required key "AssetBulkUploadCheckResult[action]" is missing from JSON.');
|
|
||||||
assert(json[r'action'] != null, 'Required key "AssetBulkUploadCheckResult[action]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "AssetBulkUploadCheckResult[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "AssetBulkUploadCheckResult[id]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetBulkUploadCheckResult(
|
return AssetBulkUploadCheckResult(
|
||||||
action: AssetUploadAction.fromJson(json[r'action'])!,
|
action: AssetUploadAction.fromJson(json[r'action'])!,
|
||||||
assetId: mapValueOfType<String>(json, r'assetId'),
|
assetId: mapValueOfType<String>(json, r'assetId'),
|
||||||
|
|||||||
+1
-11
@@ -83,20 +83,10 @@ class AssetCopyDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetCopyDto? fromJson(dynamic value) {
|
static AssetCopyDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetCopyDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'sourceId'), 'Required key "AssetCopyDto[sourceId]" is missing from JSON.');
|
|
||||||
assert(json[r'sourceId'] != null, 'Required key "AssetCopyDto[sourceId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'targetId'), 'Required key "AssetCopyDto[targetId]" is missing from JSON.');
|
|
||||||
assert(json[r'targetId'] != null, 'Required key "AssetCopyDto[targetId]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetCopyDto(
|
return AssetCopyDto(
|
||||||
albums: mapValueOfType<bool>(json, r'albums') ?? true,
|
albums: mapValueOfType<bool>(json, r'albums') ?? true,
|
||||||
favorite: mapValueOfType<bool>(json, r'favorite') ?? true,
|
favorite: mapValueOfType<bool>(json, r'favorite') ?? true,
|
||||||
|
|||||||
+1
-11
@@ -46,20 +46,10 @@ class AssetEditActionItemDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetEditActionItemDto? fromJson(dynamic value) {
|
static AssetEditActionItemDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetEditActionItemDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'action'), 'Required key "AssetEditActionItemDto[action]" is missing from JSON.');
|
|
||||||
assert(json[r'action'] != null, 'Required key "AssetEditActionItemDto[action]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'parameters'), 'Required key "AssetEditActionItemDto[parameters]" is missing from JSON.');
|
|
||||||
assert(json[r'parameters'] != null, 'Required key "AssetEditActionItemDto[parameters]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetEditActionItemDto(
|
return AssetEditActionItemDto(
|
||||||
action: AssetEditAction.fromJson(json[r'action'])!,
|
action: AssetEditAction.fromJson(json[r'action'])!,
|
||||||
parameters: json[r'parameters'],
|
parameters: json[r'parameters'],
|
||||||
|
|||||||
@@ -87,28 +87,10 @@ class AssetEditActionItemDtoParameters {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetEditActionItemDtoParameters? fromJson(dynamic value) {
|
static AssetEditActionItemDtoParameters? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetEditActionItemDtoParameters");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'height'), 'Required key "AssetEditActionItemDtoParameters[height]" is missing from JSON.');
|
|
||||||
assert(json[r'height'] != null, 'Required key "AssetEditActionItemDtoParameters[height]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'width'), 'Required key "AssetEditActionItemDtoParameters[width]" is missing from JSON.');
|
|
||||||
assert(json[r'width'] != null, 'Required key "AssetEditActionItemDtoParameters[width]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'x'), 'Required key "AssetEditActionItemDtoParameters[x]" is missing from JSON.');
|
|
||||||
assert(json[r'x'] != null, 'Required key "AssetEditActionItemDtoParameters[x]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'y'), 'Required key "AssetEditActionItemDtoParameters[y]" is missing from JSON.');
|
|
||||||
assert(json[r'y'] != null, 'Required key "AssetEditActionItemDtoParameters[y]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'angle'), 'Required key "AssetEditActionItemDtoParameters[angle]" is missing from JSON.');
|
|
||||||
assert(json[r'angle'] != null, 'Required key "AssetEditActionItemDtoParameters[angle]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'axis'), 'Required key "AssetEditActionItemDtoParameters[axis]" is missing from JSON.');
|
|
||||||
assert(json[r'axis'] != null, 'Required key "AssetEditActionItemDtoParameters[axis]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetEditActionItemDtoParameters(
|
return AssetEditActionItemDtoParameters(
|
||||||
height: mapValueOfType<int>(json, r'height')!,
|
height: mapValueOfType<int>(json, r'height')!,
|
||||||
width: mapValueOfType<int>(json, r'width')!,
|
width: mapValueOfType<int>(json, r'width')!,
|
||||||
|
|||||||
@@ -53,22 +53,10 @@ class AssetEditActionItemResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetEditActionItemResponseDto? fromJson(dynamic value) {
|
static AssetEditActionItemResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetEditActionItemResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'action'), 'Required key "AssetEditActionItemResponseDto[action]" is missing from JSON.');
|
|
||||||
assert(json[r'action'] != null, 'Required key "AssetEditActionItemResponseDto[action]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "AssetEditActionItemResponseDto[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "AssetEditActionItemResponseDto[id]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'parameters'), 'Required key "AssetEditActionItemResponseDto[parameters]" is missing from JSON.');
|
|
||||||
assert(json[r'parameters'] != null, 'Required key "AssetEditActionItemResponseDto[parameters]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetEditActionItemResponseDto(
|
return AssetEditActionItemResponseDto(
|
||||||
action: AssetEditAction.fromJson(json[r'action'])!,
|
action: AssetEditAction.fromJson(json[r'action'])!,
|
||||||
id: mapValueOfType<String>(json, r'id')!,
|
id: mapValueOfType<String>(json, r'id')!,
|
||||||
|
|||||||
+1
-9
@@ -41,18 +41,10 @@ class AssetEditsCreateDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetEditsCreateDto? fromJson(dynamic value) {
|
static AssetEditsCreateDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetEditsCreateDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'edits'), 'Required key "AssetEditsCreateDto[edits]" is missing from JSON.');
|
|
||||||
assert(json[r'edits'] != null, 'Required key "AssetEditsCreateDto[edits]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetEditsCreateDto(
|
return AssetEditsCreateDto(
|
||||||
edits: AssetEditActionItemDto.listFromJson(json[r'edits']),
|
edits: AssetEditActionItemDto.listFromJson(json[r'edits']),
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-11
@@ -48,20 +48,10 @@ class AssetEditsResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetEditsResponseDto? fromJson(dynamic value) {
|
static AssetEditsResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetEditsResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetId'), 'Required key "AssetEditsResponseDto[assetId]" is missing from JSON.');
|
|
||||||
assert(json[r'assetId'] != null, 'Required key "AssetEditsResponseDto[assetId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'edits'), 'Required key "AssetEditsResponseDto[edits]" is missing from JSON.');
|
|
||||||
assert(json[r'edits'] != null, 'Required key "AssetEditsResponseDto[edits]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetEditsResponseDto(
|
return AssetEditsResponseDto(
|
||||||
assetId: mapValueOfType<String>(json, r'assetId')!,
|
assetId: mapValueOfType<String>(json, r'assetId')!,
|
||||||
edits: AssetEditActionItemResponseDto.listFromJson(json[r'edits']),
|
edits: AssetEditActionItemResponseDto.listFromJson(json[r'edits']),
|
||||||
|
|||||||
+1
-23
@@ -108,32 +108,10 @@ class AssetFaceCreateDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetFaceCreateDto? fromJson(dynamic value) {
|
static AssetFaceCreateDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetFaceCreateDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetId'), 'Required key "AssetFaceCreateDto[assetId]" is missing from JSON.');
|
|
||||||
assert(json[r'assetId'] != null, 'Required key "AssetFaceCreateDto[assetId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'height'), 'Required key "AssetFaceCreateDto[height]" is missing from JSON.');
|
|
||||||
assert(json[r'height'] != null, 'Required key "AssetFaceCreateDto[height]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'imageHeight'), 'Required key "AssetFaceCreateDto[imageHeight]" is missing from JSON.');
|
|
||||||
assert(json[r'imageHeight'] != null, 'Required key "AssetFaceCreateDto[imageHeight]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'imageWidth'), 'Required key "AssetFaceCreateDto[imageWidth]" is missing from JSON.');
|
|
||||||
assert(json[r'imageWidth'] != null, 'Required key "AssetFaceCreateDto[imageWidth]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'personId'), 'Required key "AssetFaceCreateDto[personId]" is missing from JSON.');
|
|
||||||
assert(json[r'personId'] != null, 'Required key "AssetFaceCreateDto[personId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'width'), 'Required key "AssetFaceCreateDto[width]" is missing from JSON.');
|
|
||||||
assert(json[r'width'] != null, 'Required key "AssetFaceCreateDto[width]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'x'), 'Required key "AssetFaceCreateDto[x]" is missing from JSON.');
|
|
||||||
assert(json[r'x'] != null, 'Required key "AssetFaceCreateDto[x]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'y'), 'Required key "AssetFaceCreateDto[y]" is missing from JSON.');
|
|
||||||
assert(json[r'y'] != null, 'Required key "AssetFaceCreateDto[y]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetFaceCreateDto(
|
return AssetFaceCreateDto(
|
||||||
assetId: mapValueOfType<String>(json, r'assetId')!,
|
assetId: mapValueOfType<String>(json, r'assetId')!,
|
||||||
height: mapValueOfType<int>(json, r'height')!,
|
height: mapValueOfType<int>(json, r'height')!,
|
||||||
|
|||||||
+1
-9
@@ -41,18 +41,10 @@ class AssetFaceDeleteDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetFaceDeleteDto? fromJson(dynamic value) {
|
static AssetFaceDeleteDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetFaceDeleteDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'force'), 'Required key "AssetFaceDeleteDto[force]" is missing from JSON.');
|
|
||||||
assert(json[r'force'] != null, 'Required key "AssetFaceDeleteDto[force]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetFaceDeleteDto(
|
return AssetFaceDeleteDto(
|
||||||
force: mapValueOfType<bool>(json, r'force')!,
|
force: mapValueOfType<bool>(json, r'force')!,
|
||||||
);
|
);
|
||||||
|
|||||||
+3
-24
@@ -113,12 +113,12 @@ class AssetFaceResponseDto {
|
|||||||
if (this.person != null) {
|
if (this.person != null) {
|
||||||
json[r'person'] = this.person;
|
json[r'person'] = this.person;
|
||||||
} else {
|
} else {
|
||||||
json[r'person'] = null;
|
// json[r'person'] = null;
|
||||||
}
|
}
|
||||||
if (this.sourceType != null) {
|
if (this.sourceType != null) {
|
||||||
json[r'sourceType'] = this.sourceType;
|
json[r'sourceType'] = this.sourceType;
|
||||||
} else {
|
} else {
|
||||||
json[r'sourceType'] = null;
|
// json[r'sourceType'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -127,31 +127,10 @@ class AssetFaceResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetFaceResponseDto? fromJson(dynamic value) {
|
static AssetFaceResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetFaceResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'boundingBoxX1'), 'Required key "AssetFaceResponseDto[boundingBoxX1]" is missing from JSON.');
|
|
||||||
assert(json[r'boundingBoxX1'] != null, 'Required key "AssetFaceResponseDto[boundingBoxX1]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'boundingBoxX2'), 'Required key "AssetFaceResponseDto[boundingBoxX2]" is missing from JSON.');
|
|
||||||
assert(json[r'boundingBoxX2'] != null, 'Required key "AssetFaceResponseDto[boundingBoxX2]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'boundingBoxY1'), 'Required key "AssetFaceResponseDto[boundingBoxY1]" is missing from JSON.');
|
|
||||||
assert(json[r'boundingBoxY1'] != null, 'Required key "AssetFaceResponseDto[boundingBoxY1]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'boundingBoxY2'), 'Required key "AssetFaceResponseDto[boundingBoxY2]" is missing from JSON.');
|
|
||||||
assert(json[r'boundingBoxY2'] != null, 'Required key "AssetFaceResponseDto[boundingBoxY2]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "AssetFaceResponseDto[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "AssetFaceResponseDto[id]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'imageHeight'), 'Required key "AssetFaceResponseDto[imageHeight]" is missing from JSON.');
|
|
||||||
assert(json[r'imageHeight'] != null, 'Required key "AssetFaceResponseDto[imageHeight]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'imageWidth'), 'Required key "AssetFaceResponseDto[imageWidth]" is missing from JSON.');
|
|
||||||
assert(json[r'imageWidth'] != null, 'Required key "AssetFaceResponseDto[imageWidth]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'person'), 'Required key "AssetFaceResponseDto[person]" is missing from JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetFaceResponseDto(
|
return AssetFaceResponseDto(
|
||||||
boundingBoxX1: mapValueOfType<int>(json, r'boundingBoxX1')!,
|
boundingBoxX1: mapValueOfType<int>(json, r'boundingBoxX1')!,
|
||||||
boundingBoxX2: mapValueOfType<int>(json, r'boundingBoxX2')!,
|
boundingBoxX2: mapValueOfType<int>(json, r'boundingBoxX2')!,
|
||||||
|
|||||||
+1
-9
@@ -41,18 +41,10 @@ class AssetFaceUpdateDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetFaceUpdateDto? fromJson(dynamic value) {
|
static AssetFaceUpdateDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetFaceUpdateDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'data'), 'Required key "AssetFaceUpdateDto[data]" is missing from JSON.');
|
|
||||||
assert(json[r'data'] != null, 'Required key "AssetFaceUpdateDto[data]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetFaceUpdateDto(
|
return AssetFaceUpdateDto(
|
||||||
data: AssetFaceUpdateItem.listFromJson(json[r'data']),
|
data: AssetFaceUpdateItem.listFromJson(json[r'data']),
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-11
@@ -48,20 +48,10 @@ class AssetFaceUpdateItem {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetFaceUpdateItem? fromJson(dynamic value) {
|
static AssetFaceUpdateItem? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetFaceUpdateItem");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetId'), 'Required key "AssetFaceUpdateItem[assetId]" is missing from JSON.');
|
|
||||||
assert(json[r'assetId'] != null, 'Required key "AssetFaceUpdateItem[assetId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'personId'), 'Required key "AssetFaceUpdateItem[personId]" is missing from JSON.');
|
|
||||||
assert(json[r'personId'] != null, 'Required key "AssetFaceUpdateItem[personId]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetFaceUpdateItem(
|
return AssetFaceUpdateItem(
|
||||||
assetId: mapValueOfType<String>(json, r'assetId')!,
|
assetId: mapValueOfType<String>(json, r'assetId')!,
|
||||||
personId: mapValueOfType<String>(json, r'personId')!,
|
personId: mapValueOfType<String>(json, r'personId')!,
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class AssetFaceWithoutPersonResponseDto {
|
|||||||
if (this.sourceType != null) {
|
if (this.sourceType != null) {
|
||||||
json[r'sourceType'] = this.sourceType;
|
json[r'sourceType'] = this.sourceType;
|
||||||
} else {
|
} else {
|
||||||
json[r'sourceType'] = null;
|
// json[r'sourceType'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -117,30 +117,10 @@ class AssetFaceWithoutPersonResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetFaceWithoutPersonResponseDto? fromJson(dynamic value) {
|
static AssetFaceWithoutPersonResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetFaceWithoutPersonResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'boundingBoxX1'), 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxX1]" is missing from JSON.');
|
|
||||||
assert(json[r'boundingBoxX1'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxX1]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'boundingBoxX2'), 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxX2]" is missing from JSON.');
|
|
||||||
assert(json[r'boundingBoxX2'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxX2]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'boundingBoxY1'), 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxY1]" is missing from JSON.');
|
|
||||||
assert(json[r'boundingBoxY1'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxY1]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'boundingBoxY2'), 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxY2]" is missing from JSON.');
|
|
||||||
assert(json[r'boundingBoxY2'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxY2]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "AssetFaceWithoutPersonResponseDto[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[id]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'imageHeight'), 'Required key "AssetFaceWithoutPersonResponseDto[imageHeight]" is missing from JSON.');
|
|
||||||
assert(json[r'imageHeight'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[imageHeight]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'imageWidth'), 'Required key "AssetFaceWithoutPersonResponseDto[imageWidth]" is missing from JSON.');
|
|
||||||
assert(json[r'imageWidth'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[imageWidth]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetFaceWithoutPersonResponseDto(
|
return AssetFaceWithoutPersonResponseDto(
|
||||||
boundingBoxX1: mapValueOfType<int>(json, r'boundingBoxX1')!,
|
boundingBoxX1: mapValueOfType<int>(json, r'boundingBoxX1')!,
|
||||||
boundingBoxX2: mapValueOfType<int>(json, r'boundingBoxX2')!,
|
boundingBoxX2: mapValueOfType<int>(json, r'boundingBoxX2')!,
|
||||||
|
|||||||
+1
-9
@@ -41,18 +41,10 @@ class AssetIdsDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetIdsDto? fromJson(dynamic value) {
|
static AssetIdsDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetIdsDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetIds'), 'Required key "AssetIdsDto[assetIds]" is missing from JSON.');
|
|
||||||
assert(json[r'assetIds'] != null, 'Required key "AssetIdsDto[assetIds]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetIdsDto(
|
return AssetIdsDto(
|
||||||
assetIds: json[r'assetIds'] is Iterable
|
assetIds: json[r'assetIds'] is Iterable
|
||||||
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
||||||
|
|||||||
+2
-12
@@ -54,7 +54,7 @@ class AssetIdsResponseDto {
|
|||||||
if (this.error != null) {
|
if (this.error != null) {
|
||||||
json[r'error'] = this.error;
|
json[r'error'] = this.error;
|
||||||
} else {
|
} else {
|
||||||
json[r'error'] = null;
|
// json[r'error'] = null;
|
||||||
}
|
}
|
||||||
json[r'success'] = this.success;
|
json[r'success'] = this.success;
|
||||||
return json;
|
return json;
|
||||||
@@ -64,20 +64,10 @@ class AssetIdsResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetIdsResponseDto? fromJson(dynamic value) {
|
static AssetIdsResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetIdsResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetId'), 'Required key "AssetIdsResponseDto[assetId]" is missing from JSON.');
|
|
||||||
assert(json[r'assetId'] != null, 'Required key "AssetIdsResponseDto[assetId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'success'), 'Required key "AssetIdsResponseDto[success]" is missing from JSON.');
|
|
||||||
assert(json[r'success'] != null, 'Required key "AssetIdsResponseDto[success]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetIdsResponseDto(
|
return AssetIdsResponseDto(
|
||||||
assetId: mapValueOfType<String>(json, r'assetId')!,
|
assetId: mapValueOfType<String>(json, r'assetId')!,
|
||||||
error: AssetIdErrorReason.fromJson(json[r'error']),
|
error: AssetIdErrorReason.fromJson(json[r'error']),
|
||||||
|
|||||||
+1
-11
@@ -47,20 +47,10 @@ class AssetJobsDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetJobsDto? fromJson(dynamic value) {
|
static AssetJobsDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetJobsDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetIds'), 'Required key "AssetJobsDto[assetIds]" is missing from JSON.');
|
|
||||||
assert(json[r'assetIds'] != null, 'Required key "AssetJobsDto[assetIds]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'name'), 'Required key "AssetJobsDto[name]" is missing from JSON.');
|
|
||||||
assert(json[r'name'] != null, 'Required key "AssetJobsDto[name]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetJobsDto(
|
return AssetJobsDto(
|
||||||
assetIds: json[r'assetIds'] is Iterable
|
assetIds: json[r'assetIds'] is Iterable
|
||||||
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
||||||
|
|||||||
+1
-11
@@ -47,20 +47,10 @@ class AssetMediaResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetMediaResponseDto? fromJson(dynamic value) {
|
static AssetMediaResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetMediaResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "AssetMediaResponseDto[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "AssetMediaResponseDto[id]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'status'), 'Required key "AssetMediaResponseDto[status]" is missing from JSON.');
|
|
||||||
assert(json[r'status'] != null, 'Required key "AssetMediaResponseDto[status]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetMediaResponseDto(
|
return AssetMediaResponseDto(
|
||||||
id: mapValueOfType<String>(json, r'id')!,
|
id: mapValueOfType<String>(json, r'id')!,
|
||||||
status: AssetMediaStatus.fromJson(json[r'status'])!,
|
status: AssetMediaStatus.fromJson(json[r'status'])!,
|
||||||
|
|||||||
@@ -41,18 +41,10 @@ class AssetMetadataBulkDeleteDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetMetadataBulkDeleteDto? fromJson(dynamic value) {
|
static AssetMetadataBulkDeleteDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetMetadataBulkDeleteDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'items'), 'Required key "AssetMetadataBulkDeleteDto[items]" is missing from JSON.');
|
|
||||||
assert(json[r'items'] != null, 'Required key "AssetMetadataBulkDeleteDto[items]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetMetadataBulkDeleteDto(
|
return AssetMetadataBulkDeleteDto(
|
||||||
items: AssetMetadataBulkDeleteItemDto.listFromJson(json[r'items']),
|
items: AssetMetadataBulkDeleteItemDto.listFromJson(json[r'items']),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -48,20 +48,10 @@ class AssetMetadataBulkDeleteItemDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetMetadataBulkDeleteItemDto? fromJson(dynamic value) {
|
static AssetMetadataBulkDeleteItemDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetMetadataBulkDeleteItemDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetId'), 'Required key "AssetMetadataBulkDeleteItemDto[assetId]" is missing from JSON.');
|
|
||||||
assert(json[r'assetId'] != null, 'Required key "AssetMetadataBulkDeleteItemDto[assetId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'key'), 'Required key "AssetMetadataBulkDeleteItemDto[key]" is missing from JSON.');
|
|
||||||
assert(json[r'key'] != null, 'Required key "AssetMetadataBulkDeleteItemDto[key]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetMetadataBulkDeleteItemDto(
|
return AssetMetadataBulkDeleteItemDto(
|
||||||
assetId: mapValueOfType<String>(json, r'assetId')!,
|
assetId: mapValueOfType<String>(json, r'assetId')!,
|
||||||
key: mapValueOfType<String>(json, r'key')!,
|
key: mapValueOfType<String>(json, r'key')!,
|
||||||
|
|||||||
+1
-15
@@ -64,24 +64,10 @@ class AssetMetadataBulkResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetMetadataBulkResponseDto? fromJson(dynamic value) {
|
static AssetMetadataBulkResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetMetadataBulkResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetId'), 'Required key "AssetMetadataBulkResponseDto[assetId]" is missing from JSON.');
|
|
||||||
assert(json[r'assetId'] != null, 'Required key "AssetMetadataBulkResponseDto[assetId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'key'), 'Required key "AssetMetadataBulkResponseDto[key]" is missing from JSON.');
|
|
||||||
assert(json[r'key'] != null, 'Required key "AssetMetadataBulkResponseDto[key]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'updatedAt'), 'Required key "AssetMetadataBulkResponseDto[updatedAt]" is missing from JSON.');
|
|
||||||
assert(json[r'updatedAt'] != null, 'Required key "AssetMetadataBulkResponseDto[updatedAt]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'value'), 'Required key "AssetMetadataBulkResponseDto[value]" is missing from JSON.');
|
|
||||||
assert(json[r'value'] != null, 'Required key "AssetMetadataBulkResponseDto[value]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetMetadataBulkResponseDto(
|
return AssetMetadataBulkResponseDto(
|
||||||
assetId: mapValueOfType<String>(json, r'assetId')!,
|
assetId: mapValueOfType<String>(json, r'assetId')!,
|
||||||
key: mapValueOfType<String>(json, r'key')!,
|
key: mapValueOfType<String>(json, r'key')!,
|
||||||
|
|||||||
@@ -41,18 +41,10 @@ class AssetMetadataBulkUpsertDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetMetadataBulkUpsertDto? fromJson(dynamic value) {
|
static AssetMetadataBulkUpsertDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetMetadataBulkUpsertDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'items'), 'Required key "AssetMetadataBulkUpsertDto[items]" is missing from JSON.');
|
|
||||||
assert(json[r'items'] != null, 'Required key "AssetMetadataBulkUpsertDto[items]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetMetadataBulkUpsertDto(
|
return AssetMetadataBulkUpsertDto(
|
||||||
items: AssetMetadataBulkUpsertItemDto.listFromJson(json[r'items']),
|
items: AssetMetadataBulkUpsertItemDto.listFromJson(json[r'items']),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -55,22 +55,10 @@ class AssetMetadataBulkUpsertItemDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetMetadataBulkUpsertItemDto? fromJson(dynamic value) {
|
static AssetMetadataBulkUpsertItemDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetMetadataBulkUpsertItemDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetId'), 'Required key "AssetMetadataBulkUpsertItemDto[assetId]" is missing from JSON.');
|
|
||||||
assert(json[r'assetId'] != null, 'Required key "AssetMetadataBulkUpsertItemDto[assetId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'key'), 'Required key "AssetMetadataBulkUpsertItemDto[key]" is missing from JSON.');
|
|
||||||
assert(json[r'key'] != null, 'Required key "AssetMetadataBulkUpsertItemDto[key]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'value'), 'Required key "AssetMetadataBulkUpsertItemDto[value]" is missing from JSON.');
|
|
||||||
assert(json[r'value'] != null, 'Required key "AssetMetadataBulkUpsertItemDto[value]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetMetadataBulkUpsertItemDto(
|
return AssetMetadataBulkUpsertItemDto(
|
||||||
assetId: mapValueOfType<String>(json, r'assetId')!,
|
assetId: mapValueOfType<String>(json, r'assetId')!,
|
||||||
key: mapValueOfType<String>(json, r'key')!,
|
key: mapValueOfType<String>(json, r'key')!,
|
||||||
|
|||||||
+1
-13
@@ -57,22 +57,10 @@ class AssetMetadataResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetMetadataResponseDto? fromJson(dynamic value) {
|
static AssetMetadataResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetMetadataResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'key'), 'Required key "AssetMetadataResponseDto[key]" is missing from JSON.');
|
|
||||||
assert(json[r'key'] != null, 'Required key "AssetMetadataResponseDto[key]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'updatedAt'), 'Required key "AssetMetadataResponseDto[updatedAt]" is missing from JSON.');
|
|
||||||
assert(json[r'updatedAt'] != null, 'Required key "AssetMetadataResponseDto[updatedAt]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'value'), 'Required key "AssetMetadataResponseDto[value]" is missing from JSON.');
|
|
||||||
assert(json[r'value'] != null, 'Required key "AssetMetadataResponseDto[value]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetMetadataResponseDto(
|
return AssetMetadataResponseDto(
|
||||||
key: mapValueOfType<String>(json, r'key')!,
|
key: mapValueOfType<String>(json, r'key')!,
|
||||||
updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')!,
|
updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')!,
|
||||||
|
|||||||
+1
-9
@@ -41,18 +41,10 @@ class AssetMetadataUpsertDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetMetadataUpsertDto? fromJson(dynamic value) {
|
static AssetMetadataUpsertDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetMetadataUpsertDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'items'), 'Required key "AssetMetadataUpsertDto[items]" is missing from JSON.');
|
|
||||||
assert(json[r'items'] != null, 'Required key "AssetMetadataUpsertDto[items]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetMetadataUpsertDto(
|
return AssetMetadataUpsertDto(
|
||||||
items: AssetMetadataUpsertItemDto.listFromJson(json[r'items']),
|
items: AssetMetadataUpsertItemDto.listFromJson(json[r'items']),
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-11
@@ -48,20 +48,10 @@ class AssetMetadataUpsertItemDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetMetadataUpsertItemDto? fromJson(dynamic value) {
|
static AssetMetadataUpsertItemDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetMetadataUpsertItemDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'key'), 'Required key "AssetMetadataUpsertItemDto[key]" is missing from JSON.');
|
|
||||||
assert(json[r'key'] != null, 'Required key "AssetMetadataUpsertItemDto[key]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'value'), 'Required key "AssetMetadataUpsertItemDto[value]" is missing from JSON.');
|
|
||||||
assert(json[r'value'] != null, 'Required key "AssetMetadataUpsertItemDto[value]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetMetadataUpsertItemDto(
|
return AssetMetadataUpsertItemDto(
|
||||||
key: mapValueOfType<String>(json, r'key')!,
|
key: mapValueOfType<String>(json, r'key')!,
|
||||||
value: mapCastOfType<String, Object>(json, r'value')!,
|
value: mapCastOfType<String, Object>(json, r'value')!,
|
||||||
|
|||||||
+11
-43
@@ -123,56 +123,24 @@ class AssetOcrResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetOcrResponseDto? fromJson(dynamic value) {
|
static AssetOcrResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetOcrResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetId'), 'Required key "AssetOcrResponseDto[assetId]" is missing from JSON.');
|
|
||||||
assert(json[r'assetId'] != null, 'Required key "AssetOcrResponseDto[assetId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'boxScore'), 'Required key "AssetOcrResponseDto[boxScore]" is missing from JSON.');
|
|
||||||
assert(json[r'boxScore'] != null, 'Required key "AssetOcrResponseDto[boxScore]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "AssetOcrResponseDto[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "AssetOcrResponseDto[id]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'text'), 'Required key "AssetOcrResponseDto[text]" is missing from JSON.');
|
|
||||||
assert(json[r'text'] != null, 'Required key "AssetOcrResponseDto[text]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'textScore'), 'Required key "AssetOcrResponseDto[textScore]" is missing from JSON.');
|
|
||||||
assert(json[r'textScore'] != null, 'Required key "AssetOcrResponseDto[textScore]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'x1'), 'Required key "AssetOcrResponseDto[x1]" is missing from JSON.');
|
|
||||||
assert(json[r'x1'] != null, 'Required key "AssetOcrResponseDto[x1]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'x2'), 'Required key "AssetOcrResponseDto[x2]" is missing from JSON.');
|
|
||||||
assert(json[r'x2'] != null, 'Required key "AssetOcrResponseDto[x2]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'x3'), 'Required key "AssetOcrResponseDto[x3]" is missing from JSON.');
|
|
||||||
assert(json[r'x3'] != null, 'Required key "AssetOcrResponseDto[x3]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'x4'), 'Required key "AssetOcrResponseDto[x4]" is missing from JSON.');
|
|
||||||
assert(json[r'x4'] != null, 'Required key "AssetOcrResponseDto[x4]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'y1'), 'Required key "AssetOcrResponseDto[y1]" is missing from JSON.');
|
|
||||||
assert(json[r'y1'] != null, 'Required key "AssetOcrResponseDto[y1]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'y2'), 'Required key "AssetOcrResponseDto[y2]" is missing from JSON.');
|
|
||||||
assert(json[r'y2'] != null, 'Required key "AssetOcrResponseDto[y2]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'y3'), 'Required key "AssetOcrResponseDto[y3]" is missing from JSON.');
|
|
||||||
assert(json[r'y3'] != null, 'Required key "AssetOcrResponseDto[y3]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'y4'), 'Required key "AssetOcrResponseDto[y4]" is missing from JSON.');
|
|
||||||
assert(json[r'y4'] != null, 'Required key "AssetOcrResponseDto[y4]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetOcrResponseDto(
|
return AssetOcrResponseDto(
|
||||||
assetId: mapValueOfType<String>(json, r'assetId')!,
|
assetId: mapValueOfType<String>(json, r'assetId')!,
|
||||||
boxScore: mapValueOfType<double>(json, r'boxScore')!,
|
boxScore: (mapValueOfType<num>(json, r'boxScore')!).toDouble(),
|
||||||
id: mapValueOfType<String>(json, r'id')!,
|
id: mapValueOfType<String>(json, r'id')!,
|
||||||
text: mapValueOfType<String>(json, r'text')!,
|
text: mapValueOfType<String>(json, r'text')!,
|
||||||
textScore: mapValueOfType<double>(json, r'textScore')!,
|
textScore: (mapValueOfType<num>(json, r'textScore')!).toDouble(),
|
||||||
x1: mapValueOfType<double>(json, r'x1')!,
|
x1: (mapValueOfType<num>(json, r'x1')!).toDouble(),
|
||||||
x2: mapValueOfType<double>(json, r'x2')!,
|
x2: (mapValueOfType<num>(json, r'x2')!).toDouble(),
|
||||||
x3: mapValueOfType<double>(json, r'x3')!,
|
x3: (mapValueOfType<num>(json, r'x3')!).toDouble(),
|
||||||
x4: mapValueOfType<double>(json, r'x4')!,
|
x4: (mapValueOfType<num>(json, r'x4')!).toDouble(),
|
||||||
y1: mapValueOfType<double>(json, r'y1')!,
|
y1: (mapValueOfType<num>(json, r'y1')!).toDouble(),
|
||||||
y2: mapValueOfType<double>(json, r'y2')!,
|
y2: (mapValueOfType<num>(json, r'y2')!).toDouble(),
|
||||||
y3: mapValueOfType<double>(json, r'y3')!,
|
y3: (mapValueOfType<num>(json, r'y3')!).toDouble(),
|
||||||
y4: mapValueOfType<double>(json, r'y4')!,
|
y4: (mapValueOfType<num>(json, r'y4')!).toDouble(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
+13
-59
@@ -255,17 +255,17 @@ class AssetResponseDto {
|
|||||||
if (this.duplicateId != null) {
|
if (this.duplicateId != null) {
|
||||||
json[r'duplicateId'] = this.duplicateId;
|
json[r'duplicateId'] = this.duplicateId;
|
||||||
} else {
|
} else {
|
||||||
json[r'duplicateId'] = null;
|
// json[r'duplicateId'] = null;
|
||||||
}
|
}
|
||||||
if (this.duration != null) {
|
if (this.duration != null) {
|
||||||
json[r'duration'] = this.duration;
|
json[r'duration'] = this.duration;
|
||||||
} else {
|
} else {
|
||||||
json[r'duration'] = null;
|
// json[r'duration'] = null;
|
||||||
}
|
}
|
||||||
if (this.exifInfo != null) {
|
if (this.exifInfo != null) {
|
||||||
json[r'exifInfo'] = this.exifInfo;
|
json[r'exifInfo'] = this.exifInfo;
|
||||||
} else {
|
} else {
|
||||||
json[r'exifInfo'] = null;
|
// json[r'exifInfo'] = null;
|
||||||
}
|
}
|
||||||
json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String();
|
json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String();
|
||||||
json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String();
|
json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String();
|
||||||
@@ -273,7 +273,7 @@ class AssetResponseDto {
|
|||||||
if (this.height != null) {
|
if (this.height != null) {
|
||||||
json[r'height'] = this.height;
|
json[r'height'] = this.height;
|
||||||
} else {
|
} else {
|
||||||
json[r'height'] = null;
|
// json[r'height'] = null;
|
||||||
}
|
}
|
||||||
json[r'id'] = this.id;
|
json[r'id'] = this.id;
|
||||||
json[r'isArchived'] = this.isArchived;
|
json[r'isArchived'] = this.isArchived;
|
||||||
@@ -284,43 +284,43 @@ class AssetResponseDto {
|
|||||||
if (this.libraryId != null) {
|
if (this.libraryId != null) {
|
||||||
json[r'libraryId'] = this.libraryId;
|
json[r'libraryId'] = this.libraryId;
|
||||||
} else {
|
} else {
|
||||||
json[r'libraryId'] = null;
|
// json[r'libraryId'] = null;
|
||||||
}
|
}
|
||||||
if (this.livePhotoVideoId != null) {
|
if (this.livePhotoVideoId != null) {
|
||||||
json[r'livePhotoVideoId'] = this.livePhotoVideoId;
|
json[r'livePhotoVideoId'] = this.livePhotoVideoId;
|
||||||
} else {
|
} else {
|
||||||
json[r'livePhotoVideoId'] = null;
|
// json[r'livePhotoVideoId'] = null;
|
||||||
}
|
}
|
||||||
json[r'localDateTime'] = this.localDateTime.toUtc().toIso8601String();
|
json[r'localDateTime'] = this.localDateTime.toUtc().toIso8601String();
|
||||||
json[r'originalFileName'] = this.originalFileName;
|
json[r'originalFileName'] = this.originalFileName;
|
||||||
if (this.originalMimeType != null) {
|
if (this.originalMimeType != null) {
|
||||||
json[r'originalMimeType'] = this.originalMimeType;
|
json[r'originalMimeType'] = this.originalMimeType;
|
||||||
} else {
|
} else {
|
||||||
json[r'originalMimeType'] = null;
|
// json[r'originalMimeType'] = null;
|
||||||
}
|
}
|
||||||
json[r'originalPath'] = this.originalPath;
|
json[r'originalPath'] = this.originalPath;
|
||||||
if (this.owner != null) {
|
if (this.owner != null) {
|
||||||
json[r'owner'] = this.owner;
|
json[r'owner'] = this.owner;
|
||||||
} else {
|
} else {
|
||||||
json[r'owner'] = null;
|
// json[r'owner'] = null;
|
||||||
}
|
}
|
||||||
json[r'ownerId'] = this.ownerId;
|
json[r'ownerId'] = this.ownerId;
|
||||||
json[r'people'] = this.people;
|
json[r'people'] = this.people;
|
||||||
if (this.resized != null) {
|
if (this.resized != null) {
|
||||||
json[r'resized'] = this.resized;
|
json[r'resized'] = this.resized;
|
||||||
} else {
|
} else {
|
||||||
json[r'resized'] = null;
|
// json[r'resized'] = null;
|
||||||
}
|
}
|
||||||
if (this.stack != null) {
|
if (this.stack != null) {
|
||||||
json[r'stack'] = this.stack;
|
json[r'stack'] = this.stack;
|
||||||
} else {
|
} else {
|
||||||
json[r'stack'] = null;
|
// json[r'stack'] = null;
|
||||||
}
|
}
|
||||||
json[r'tags'] = this.tags;
|
json[r'tags'] = this.tags;
|
||||||
if (this.thumbhash != null) {
|
if (this.thumbhash != null) {
|
||||||
json[r'thumbhash'] = this.thumbhash;
|
json[r'thumbhash'] = this.thumbhash;
|
||||||
} else {
|
} else {
|
||||||
json[r'thumbhash'] = null;
|
// json[r'thumbhash'] = null;
|
||||||
}
|
}
|
||||||
json[r'type'] = this.type;
|
json[r'type'] = this.type;
|
||||||
json[r'unassignedFaces'] = this.unassignedFaces;
|
json[r'unassignedFaces'] = this.unassignedFaces;
|
||||||
@@ -329,7 +329,7 @@ class AssetResponseDto {
|
|||||||
if (this.width != null) {
|
if (this.width != null) {
|
||||||
json[r'width'] = this.width;
|
json[r'width'] = this.width;
|
||||||
} else {
|
} else {
|
||||||
json[r'width'] = null;
|
// json[r'width'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -338,56 +338,10 @@ class AssetResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetResponseDto? fromJson(dynamic value) {
|
static AssetResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'checksum'), 'Required key "AssetResponseDto[checksum]" is missing from JSON.');
|
|
||||||
assert(json[r'checksum'] != null, 'Required key "AssetResponseDto[checksum]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'createdAt'), 'Required key "AssetResponseDto[createdAt]" is missing from JSON.');
|
|
||||||
assert(json[r'createdAt'] != null, 'Required key "AssetResponseDto[createdAt]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'duration'), 'Required key "AssetResponseDto[duration]" is missing from JSON.');
|
|
||||||
assert(json.containsKey(r'fileCreatedAt'), 'Required key "AssetResponseDto[fileCreatedAt]" is missing from JSON.');
|
|
||||||
assert(json[r'fileCreatedAt'] != null, 'Required key "AssetResponseDto[fileCreatedAt]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'fileModifiedAt'), 'Required key "AssetResponseDto[fileModifiedAt]" is missing from JSON.');
|
|
||||||
assert(json[r'fileModifiedAt'] != null, 'Required key "AssetResponseDto[fileModifiedAt]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'hasMetadata'), 'Required key "AssetResponseDto[hasMetadata]" is missing from JSON.');
|
|
||||||
assert(json[r'hasMetadata'] != null, 'Required key "AssetResponseDto[hasMetadata]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'height'), 'Required key "AssetResponseDto[height]" is missing from JSON.');
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "AssetResponseDto[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "AssetResponseDto[id]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'isArchived'), 'Required key "AssetResponseDto[isArchived]" is missing from JSON.');
|
|
||||||
assert(json[r'isArchived'] != null, 'Required key "AssetResponseDto[isArchived]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'isEdited'), 'Required key "AssetResponseDto[isEdited]" is missing from JSON.');
|
|
||||||
assert(json[r'isEdited'] != null, 'Required key "AssetResponseDto[isEdited]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'isFavorite'), 'Required key "AssetResponseDto[isFavorite]" is missing from JSON.');
|
|
||||||
assert(json[r'isFavorite'] != null, 'Required key "AssetResponseDto[isFavorite]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'isOffline'), 'Required key "AssetResponseDto[isOffline]" is missing from JSON.');
|
|
||||||
assert(json[r'isOffline'] != null, 'Required key "AssetResponseDto[isOffline]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'isTrashed'), 'Required key "AssetResponseDto[isTrashed]" is missing from JSON.');
|
|
||||||
assert(json[r'isTrashed'] != null, 'Required key "AssetResponseDto[isTrashed]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'localDateTime'), 'Required key "AssetResponseDto[localDateTime]" is missing from JSON.');
|
|
||||||
assert(json[r'localDateTime'] != null, 'Required key "AssetResponseDto[localDateTime]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'originalFileName'), 'Required key "AssetResponseDto[originalFileName]" is missing from JSON.');
|
|
||||||
assert(json[r'originalFileName'] != null, 'Required key "AssetResponseDto[originalFileName]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'originalPath'), 'Required key "AssetResponseDto[originalPath]" is missing from JSON.');
|
|
||||||
assert(json[r'originalPath'] != null, 'Required key "AssetResponseDto[originalPath]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'ownerId'), 'Required key "AssetResponseDto[ownerId]" is missing from JSON.');
|
|
||||||
assert(json[r'ownerId'] != null, 'Required key "AssetResponseDto[ownerId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'thumbhash'), 'Required key "AssetResponseDto[thumbhash]" is missing from JSON.');
|
|
||||||
assert(json.containsKey(r'type'), 'Required key "AssetResponseDto[type]" is missing from JSON.');
|
|
||||||
assert(json[r'type'] != null, 'Required key "AssetResponseDto[type]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'updatedAt'), 'Required key "AssetResponseDto[updatedAt]" is missing from JSON.');
|
|
||||||
assert(json[r'updatedAt'] != null, 'Required key "AssetResponseDto[updatedAt]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'visibility'), 'Required key "AssetResponseDto[visibility]" is missing from JSON.');
|
|
||||||
assert(json[r'visibility'] != null, 'Required key "AssetResponseDto[visibility]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'width'), 'Required key "AssetResponseDto[width]" is missing from JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetResponseDto(
|
return AssetResponseDto(
|
||||||
checksum: mapValueOfType<String>(json, r'checksum')!,
|
checksum: mapValueOfType<String>(json, r'checksum')!,
|
||||||
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
||||||
|
|||||||
+1
-13
@@ -58,22 +58,10 @@ class AssetStackResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetStackResponseDto? fromJson(dynamic value) {
|
static AssetStackResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetStackResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetCount'), 'Required key "AssetStackResponseDto[assetCount]" is missing from JSON.');
|
|
||||||
assert(json[r'assetCount'] != null, 'Required key "AssetStackResponseDto[assetCount]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "AssetStackResponseDto[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "AssetStackResponseDto[id]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'primaryAssetId'), 'Required key "AssetStackResponseDto[primaryAssetId]" is missing from JSON.');
|
|
||||||
assert(json[r'primaryAssetId'] != null, 'Required key "AssetStackResponseDto[primaryAssetId]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetStackResponseDto(
|
return AssetStackResponseDto(
|
||||||
assetCount: mapValueOfType<int>(json, r'assetCount')!,
|
assetCount: mapValueOfType<int>(json, r'assetCount')!,
|
||||||
id: mapValueOfType<String>(json, r'id')!,
|
id: mapValueOfType<String>(json, r'id')!,
|
||||||
|
|||||||
+1
-13
@@ -64,22 +64,10 @@ class AssetStatsResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AssetStatsResponseDto? fromJson(dynamic value) {
|
static AssetStatsResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AssetStatsResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'images'), 'Required key "AssetStatsResponseDto[images]" is missing from JSON.');
|
|
||||||
assert(json[r'images'] != null, 'Required key "AssetStatsResponseDto[images]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'total'), 'Required key "AssetStatsResponseDto[total]" is missing from JSON.');
|
|
||||||
assert(json[r'total'] != null, 'Required key "AssetStatsResponseDto[total]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'videos'), 'Required key "AssetStatsResponseDto[videos]" is missing from JSON.');
|
|
||||||
assert(json[r'videos'] != null, 'Required key "AssetStatsResponseDto[videos]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AssetStatsResponseDto(
|
return AssetStatsResponseDto(
|
||||||
images: mapValueOfType<int>(json, r'images')!,
|
images: mapValueOfType<int>(json, r'images')!,
|
||||||
total: mapValueOfType<int>(json, r'total')!,
|
total: mapValueOfType<int>(json, r'total')!,
|
||||||
|
|||||||
+3
-15
@@ -72,7 +72,7 @@ class AuthStatusResponseDto {
|
|||||||
if (this.expiresAt != null) {
|
if (this.expiresAt != null) {
|
||||||
json[r'expiresAt'] = this.expiresAt;
|
json[r'expiresAt'] = this.expiresAt;
|
||||||
} else {
|
} else {
|
||||||
json[r'expiresAt'] = null;
|
// json[r'expiresAt'] = null;
|
||||||
}
|
}
|
||||||
json[r'isElevated'] = this.isElevated;
|
json[r'isElevated'] = this.isElevated;
|
||||||
json[r'password'] = this.password;
|
json[r'password'] = this.password;
|
||||||
@@ -80,7 +80,7 @@ class AuthStatusResponseDto {
|
|||||||
if (this.pinExpiresAt != null) {
|
if (this.pinExpiresAt != null) {
|
||||||
json[r'pinExpiresAt'] = this.pinExpiresAt;
|
json[r'pinExpiresAt'] = this.pinExpiresAt;
|
||||||
} else {
|
} else {
|
||||||
json[r'pinExpiresAt'] = null;
|
// json[r'pinExpiresAt'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -89,22 +89,10 @@ class AuthStatusResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AuthStatusResponseDto? fromJson(dynamic value) {
|
static AuthStatusResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AuthStatusResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'isElevated'), 'Required key "AuthStatusResponseDto[isElevated]" is missing from JSON.');
|
|
||||||
assert(json[r'isElevated'] != null, 'Required key "AuthStatusResponseDto[isElevated]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'password'), 'Required key "AuthStatusResponseDto[password]" is missing from JSON.');
|
|
||||||
assert(json[r'password'] != null, 'Required key "AuthStatusResponseDto[password]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'pinCode'), 'Required key "AuthStatusResponseDto[pinCode]" is missing from JSON.');
|
|
||||||
assert(json[r'pinCode'] != null, 'Required key "AuthStatusResponseDto[pinCode]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AuthStatusResponseDto(
|
return AuthStatusResponseDto(
|
||||||
expiresAt: mapValueOfType<String>(json, r'expiresAt'),
|
expiresAt: mapValueOfType<String>(json, r'expiresAt'),
|
||||||
isElevated: mapValueOfType<bool>(json, r'isElevated')!,
|
isElevated: mapValueOfType<bool>(json, r'isElevated')!,
|
||||||
|
|||||||
+2
-8
@@ -41,7 +41,7 @@ class AvatarUpdate {
|
|||||||
if (this.color != null) {
|
if (this.color != null) {
|
||||||
json[r'color'] = this.color;
|
json[r'color'] = this.color;
|
||||||
} else {
|
} else {
|
||||||
json[r'color'] = null;
|
// json[r'color'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -50,16 +50,10 @@ class AvatarUpdate {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static AvatarUpdate? fromJson(dynamic value) {
|
static AvatarUpdate? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "AvatarUpdate");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return AvatarUpdate(
|
return AvatarUpdate(
|
||||||
color: UserAvatarColor.fromJson(json[r'color']),
|
color: UserAvatarColor.fromJson(json[r'color']),
|
||||||
);
|
);
|
||||||
|
|||||||
+3
-13
@@ -64,12 +64,12 @@ class BulkIdResponseDto {
|
|||||||
if (this.error != null) {
|
if (this.error != null) {
|
||||||
json[r'error'] = this.error;
|
json[r'error'] = this.error;
|
||||||
} else {
|
} else {
|
||||||
json[r'error'] = null;
|
// json[r'error'] = null;
|
||||||
}
|
}
|
||||||
if (this.errorMessage != null) {
|
if (this.errorMessage != null) {
|
||||||
json[r'errorMessage'] = this.errorMessage;
|
json[r'errorMessage'] = this.errorMessage;
|
||||||
} else {
|
} else {
|
||||||
json[r'errorMessage'] = null;
|
// json[r'errorMessage'] = null;
|
||||||
}
|
}
|
||||||
json[r'id'] = this.id;
|
json[r'id'] = this.id;
|
||||||
json[r'success'] = this.success;
|
json[r'success'] = this.success;
|
||||||
@@ -80,20 +80,10 @@ class BulkIdResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static BulkIdResponseDto? fromJson(dynamic value) {
|
static BulkIdResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "BulkIdResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'id'), 'Required key "BulkIdResponseDto[id]" is missing from JSON.');
|
|
||||||
assert(json[r'id'] != null, 'Required key "BulkIdResponseDto[id]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'success'), 'Required key "BulkIdResponseDto[success]" is missing from JSON.');
|
|
||||||
assert(json[r'success'] != null, 'Required key "BulkIdResponseDto[success]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return BulkIdResponseDto(
|
return BulkIdResponseDto(
|
||||||
error: BulkIdErrorReason.fromJson(json[r'error']),
|
error: BulkIdErrorReason.fromJson(json[r'error']),
|
||||||
errorMessage: mapValueOfType<String>(json, r'errorMessage'),
|
errorMessage: mapValueOfType<String>(json, r'errorMessage'),
|
||||||
|
|||||||
+1
-9
@@ -41,18 +41,10 @@ class BulkIdsDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static BulkIdsDto? fromJson(dynamic value) {
|
static BulkIdsDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "BulkIdsDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'ids'), 'Required key "BulkIdsDto[ids]" is missing from JSON.');
|
|
||||||
assert(json[r'ids'] != null, 'Required key "BulkIdsDto[ids]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return BulkIdsDto(
|
return BulkIdsDto(
|
||||||
ids: json[r'ids'] is Iterable
|
ids: json[r'ids'] is Iterable
|
||||||
? (json[r'ids'] as Iterable).cast<String>().toList(growable: false)
|
? (json[r'ids'] as Iterable).cast<String>().toList(growable: false)
|
||||||
|
|||||||
+1
-9
@@ -41,18 +41,10 @@ class CastResponse {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static CastResponse? fromJson(dynamic value) {
|
static CastResponse? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "CastResponse");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'gCastEnabled'), 'Required key "CastResponse[gCastEnabled]" is missing from JSON.');
|
|
||||||
assert(json[r'gCastEnabled'] != null, 'Required key "CastResponse[gCastEnabled]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return CastResponse(
|
return CastResponse(
|
||||||
gCastEnabled: mapValueOfType<bool>(json, r'gCastEnabled')!,
|
gCastEnabled: mapValueOfType<bool>(json, r'gCastEnabled')!,
|
||||||
);
|
);
|
||||||
|
|||||||
+2
-8
@@ -42,7 +42,7 @@ class CastUpdate {
|
|||||||
if (this.gCastEnabled != null) {
|
if (this.gCastEnabled != null) {
|
||||||
json[r'gCastEnabled'] = this.gCastEnabled;
|
json[r'gCastEnabled'] = this.gCastEnabled;
|
||||||
} else {
|
} else {
|
||||||
json[r'gCastEnabled'] = null;
|
// json[r'gCastEnabled'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -51,16 +51,10 @@ class CastUpdate {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static CastUpdate? fromJson(dynamic value) {
|
static CastUpdate? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "CastUpdate");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return CastUpdate(
|
return CastUpdate(
|
||||||
gCastEnabled: mapValueOfType<bool>(json, r'gCastEnabled'),
|
gCastEnabled: mapValueOfType<bool>(json, r'gCastEnabled'),
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-11
@@ -55,20 +55,10 @@ class ChangePasswordDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static ChangePasswordDto? fromJson(dynamic value) {
|
static ChangePasswordDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "ChangePasswordDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'newPassword'), 'Required key "ChangePasswordDto[newPassword]" is missing from JSON.');
|
|
||||||
assert(json[r'newPassword'] != null, 'Required key "ChangePasswordDto[newPassword]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'password'), 'Required key "ChangePasswordDto[password]" is missing from JSON.');
|
|
||||||
assert(json[r'password'] != null, 'Required key "ChangePasswordDto[password]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ChangePasswordDto(
|
return ChangePasswordDto(
|
||||||
invalidateSessions: mapValueOfType<bool>(json, r'invalidateSessions') ?? false,
|
invalidateSessions: mapValueOfType<bool>(json, r'invalidateSessions') ?? false,
|
||||||
newPassword: mapValueOfType<String>(json, r'newPassword')!,
|
newPassword: mapValueOfType<String>(json, r'newPassword')!,
|
||||||
|
|||||||
+1
-11
@@ -48,20 +48,10 @@ class CLIPConfig {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static CLIPConfig? fromJson(dynamic value) {
|
static CLIPConfig? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "CLIPConfig");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'enabled'), 'Required key "CLIPConfig[enabled]" is missing from JSON.');
|
|
||||||
assert(json[r'enabled'] != null, 'Required key "CLIPConfig[enabled]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'modelName'), 'Required key "CLIPConfig[modelName]" is missing from JSON.');
|
|
||||||
assert(json[r'modelName'] != null, 'Required key "CLIPConfig[modelName]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return CLIPConfig(
|
return CLIPConfig(
|
||||||
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
||||||
modelName: mapValueOfType<String>(json, r'modelName')!,
|
modelName: mapValueOfType<String>(json, r'modelName')!,
|
||||||
|
|||||||
+1
-11
@@ -51,20 +51,10 @@ class ContributorCountResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static ContributorCountResponseDto? fromJson(dynamic value) {
|
static ContributorCountResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "ContributorCountResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetCount'), 'Required key "ContributorCountResponseDto[assetCount]" is missing from JSON.');
|
|
||||||
assert(json[r'assetCount'] != null, 'Required key "ContributorCountResponseDto[assetCount]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'userId'), 'Required key "ContributorCountResponseDto[userId]" is missing from JSON.');
|
|
||||||
assert(json[r'userId'] != null, 'Required key "ContributorCountResponseDto[userId]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ContributorCountResponseDto(
|
return ContributorCountResponseDto(
|
||||||
assetCount: mapValueOfType<int>(json, r'assetCount')!,
|
assetCount: mapValueOfType<int>(json, r'assetCount')!,
|
||||||
userId: mapValueOfType<String>(json, r'userId')!,
|
userId: mapValueOfType<String>(json, r'userId')!,
|
||||||
|
|||||||
+2
-10
@@ -63,7 +63,7 @@ class CreateAlbumDto {
|
|||||||
if (this.description != null) {
|
if (this.description != null) {
|
||||||
json[r'description'] = this.description;
|
json[r'description'] = this.description;
|
||||||
} else {
|
} else {
|
||||||
json[r'description'] = null;
|
// json[r'description'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -72,18 +72,10 @@ class CreateAlbumDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static CreateAlbumDto? fromJson(dynamic value) {
|
static CreateAlbumDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "CreateAlbumDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'albumName'), 'Required key "CreateAlbumDto[albumName]" is missing from JSON.');
|
|
||||||
assert(json[r'albumName'] != null, 'Required key "CreateAlbumDto[albumName]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return CreateAlbumDto(
|
return CreateAlbumDto(
|
||||||
albumName: mapValueOfType<String>(json, r'albumName')!,
|
albumName: mapValueOfType<String>(json, r'albumName')!,
|
||||||
albumUsers: AlbumUserCreateDto.listFromJson(json[r'albumUsers']),
|
albumUsers: AlbumUserCreateDto.listFromJson(json[r'albumUsers']),
|
||||||
|
|||||||
+2
-10
@@ -62,7 +62,7 @@ class CreateLibraryDto {
|
|||||||
if (this.name != null) {
|
if (this.name != null) {
|
||||||
json[r'name'] = this.name;
|
json[r'name'] = this.name;
|
||||||
} else {
|
} else {
|
||||||
json[r'name'] = null;
|
// json[r'name'] = null;
|
||||||
}
|
}
|
||||||
json[r'ownerId'] = this.ownerId;
|
json[r'ownerId'] = this.ownerId;
|
||||||
return json;
|
return json;
|
||||||
@@ -72,18 +72,10 @@ class CreateLibraryDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static CreateLibraryDto? fromJson(dynamic value) {
|
static CreateLibraryDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "CreateLibraryDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'ownerId'), 'Required key "CreateLibraryDto[ownerId]" is missing from JSON.');
|
|
||||||
assert(json[r'ownerId'] != null, 'Required key "CreateLibraryDto[ownerId]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return CreateLibraryDto(
|
return CreateLibraryDto(
|
||||||
exclusionPatterns: json[r'exclusionPatterns'] is Iterable
|
exclusionPatterns: json[r'exclusionPatterns'] is Iterable
|
||||||
? (json[r'exclusionPatterns'] as Iterable).cast<String>().toList(growable: false)
|
? (json[r'exclusionPatterns'] as Iterable).cast<String>().toList(growable: false)
|
||||||
|
|||||||
+1
-13
@@ -57,22 +57,10 @@ class CreateProfileImageResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static CreateProfileImageResponseDto? fromJson(dynamic value) {
|
static CreateProfileImageResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "CreateProfileImageResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'profileChangedAt'), 'Required key "CreateProfileImageResponseDto[profileChangedAt]" is missing from JSON.');
|
|
||||||
assert(json[r'profileChangedAt'] != null, 'Required key "CreateProfileImageResponseDto[profileChangedAt]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'profileImagePath'), 'Required key "CreateProfileImageResponseDto[profileImagePath]" is missing from JSON.');
|
|
||||||
assert(json[r'profileImagePath'] != null, 'Required key "CreateProfileImageResponseDto[profileImagePath]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'userId'), 'Required key "CreateProfileImageResponseDto[userId]" is missing from JSON.');
|
|
||||||
assert(json[r'userId'] != null, 'Required key "CreateProfileImageResponseDto[userId]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return CreateProfileImageResponseDto(
|
return CreateProfileImageResponseDto(
|
||||||
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')!,
|
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')!,
|
||||||
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
|
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
|
||||||
|
|||||||
+1
-15
@@ -74,24 +74,10 @@ class CropParameters {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static CropParameters? fromJson(dynamic value) {
|
static CropParameters? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "CropParameters");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'height'), 'Required key "CropParameters[height]" is missing from JSON.');
|
|
||||||
assert(json[r'height'] != null, 'Required key "CropParameters[height]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'width'), 'Required key "CropParameters[width]" is missing from JSON.');
|
|
||||||
assert(json[r'width'] != null, 'Required key "CropParameters[width]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'x'), 'Required key "CropParameters[x]" is missing from JSON.');
|
|
||||||
assert(json[r'x'] != null, 'Required key "CropParameters[x]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'y'), 'Required key "CropParameters[y]" is missing from JSON.');
|
|
||||||
assert(json[r'y'] != null, 'Required key "CropParameters[y]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return CropParameters(
|
return CropParameters(
|
||||||
height: mapValueOfType<int>(json, r'height')!,
|
height: mapValueOfType<int>(json, r'height')!,
|
||||||
width: mapValueOfType<int>(json, r'width')!,
|
width: mapValueOfType<int>(json, r'width')!,
|
||||||
|
|||||||
+1
-13
@@ -58,22 +58,10 @@ class DatabaseBackupConfig {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DatabaseBackupConfig? fromJson(dynamic value) {
|
static DatabaseBackupConfig? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DatabaseBackupConfig");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'cronExpression'), 'Required key "DatabaseBackupConfig[cronExpression]" is missing from JSON.');
|
|
||||||
assert(json[r'cronExpression'] != null, 'Required key "DatabaseBackupConfig[cronExpression]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'enabled'), 'Required key "DatabaseBackupConfig[enabled]" is missing from JSON.');
|
|
||||||
assert(json[r'enabled'] != null, 'Required key "DatabaseBackupConfig[enabled]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'keepLastAmount'), 'Required key "DatabaseBackupConfig[keepLastAmount]" is missing from JSON.');
|
|
||||||
assert(json[r'keepLastAmount'] != null, 'Required key "DatabaseBackupConfig[keepLastAmount]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DatabaseBackupConfig(
|
return DatabaseBackupConfig(
|
||||||
cronExpression: mapValueOfType<String>(json, r'cronExpression')!,
|
cronExpression: mapValueOfType<String>(json, r'cronExpression')!,
|
||||||
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
||||||
|
|||||||
+1
-9
@@ -41,18 +41,10 @@ class DatabaseBackupDeleteDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DatabaseBackupDeleteDto? fromJson(dynamic value) {
|
static DatabaseBackupDeleteDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DatabaseBackupDeleteDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'backups'), 'Required key "DatabaseBackupDeleteDto[backups]" is missing from JSON.');
|
|
||||||
assert(json[r'backups'] != null, 'Required key "DatabaseBackupDeleteDto[backups]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DatabaseBackupDeleteDto(
|
return DatabaseBackupDeleteDto(
|
||||||
backups: json[r'backups'] is Iterable
|
backups: json[r'backups'] is Iterable
|
||||||
? (json[r'backups'] as Iterable).cast<String>().toList(growable: false)
|
? (json[r'backups'] as Iterable).cast<String>().toList(growable: false)
|
||||||
|
|||||||
+1
-13
@@ -58,22 +58,10 @@ class DatabaseBackupDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DatabaseBackupDto? fromJson(dynamic value) {
|
static DatabaseBackupDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DatabaseBackupDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'filename'), 'Required key "DatabaseBackupDto[filename]" is missing from JSON.');
|
|
||||||
assert(json[r'filename'] != null, 'Required key "DatabaseBackupDto[filename]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'filesize'), 'Required key "DatabaseBackupDto[filesize]" is missing from JSON.');
|
|
||||||
assert(json[r'filesize'] != null, 'Required key "DatabaseBackupDto[filesize]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'timezone'), 'Required key "DatabaseBackupDto[timezone]" is missing from JSON.');
|
|
||||||
assert(json[r'timezone'] != null, 'Required key "DatabaseBackupDto[timezone]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DatabaseBackupDto(
|
return DatabaseBackupDto(
|
||||||
filename: mapValueOfType<String>(json, r'filename')!,
|
filename: mapValueOfType<String>(json, r'filename')!,
|
||||||
filesize: mapValueOfType<int>(json, r'filesize')!,
|
filesize: mapValueOfType<int>(json, r'filesize')!,
|
||||||
|
|||||||
@@ -41,18 +41,10 @@ class DatabaseBackupListResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DatabaseBackupListResponseDto? fromJson(dynamic value) {
|
static DatabaseBackupListResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DatabaseBackupListResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'backups'), 'Required key "DatabaseBackupListResponseDto[backups]" is missing from JSON.');
|
|
||||||
assert(json[r'backups'] != null, 'Required key "DatabaseBackupListResponseDto[backups]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DatabaseBackupListResponseDto(
|
return DatabaseBackupListResponseDto(
|
||||||
backups: DatabaseBackupDto.listFromJson(json[r'backups']),
|
backups: DatabaseBackupDto.listFromJson(json[r'backups']),
|
||||||
);
|
);
|
||||||
|
|||||||
+2
-10
@@ -49,7 +49,7 @@ class DownloadArchiveDto {
|
|||||||
if (this.edited != null) {
|
if (this.edited != null) {
|
||||||
json[r'edited'] = this.edited;
|
json[r'edited'] = this.edited;
|
||||||
} else {
|
} else {
|
||||||
json[r'edited'] = null;
|
// json[r'edited'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -58,18 +58,10 @@ class DownloadArchiveDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DownloadArchiveDto? fromJson(dynamic value) {
|
static DownloadArchiveDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DownloadArchiveDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetIds'), 'Required key "DownloadArchiveDto[assetIds]" is missing from JSON.');
|
|
||||||
assert(json[r'assetIds'] != null, 'Required key "DownloadArchiveDto[assetIds]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DownloadArchiveDto(
|
return DownloadArchiveDto(
|
||||||
assetIds: json[r'assetIds'] is Iterable
|
assetIds: json[r'assetIds'] is Iterable
|
||||||
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
||||||
|
|||||||
+1
-11
@@ -51,20 +51,10 @@ class DownloadArchiveInfo {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DownloadArchiveInfo? fromJson(dynamic value) {
|
static DownloadArchiveInfo? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DownloadArchiveInfo");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assetIds'), 'Required key "DownloadArchiveInfo[assetIds]" is missing from JSON.');
|
|
||||||
assert(json[r'assetIds'] != null, 'Required key "DownloadArchiveInfo[assetIds]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'size'), 'Required key "DownloadArchiveInfo[size]" is missing from JSON.');
|
|
||||||
assert(json[r'size'] != null, 'Required key "DownloadArchiveInfo[size]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DownloadArchiveInfo(
|
return DownloadArchiveInfo(
|
||||||
assetIds: json[r'assetIds'] is Iterable
|
assetIds: json[r'assetIds'] is Iterable
|
||||||
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
||||||
|
|||||||
+4
-10
@@ -75,18 +75,18 @@ class DownloadInfoDto {
|
|||||||
if (this.albumId != null) {
|
if (this.albumId != null) {
|
||||||
json[r'albumId'] = this.albumId;
|
json[r'albumId'] = this.albumId;
|
||||||
} else {
|
} else {
|
||||||
json[r'albumId'] = null;
|
// json[r'albumId'] = null;
|
||||||
}
|
}
|
||||||
if (this.archiveSize != null) {
|
if (this.archiveSize != null) {
|
||||||
json[r'archiveSize'] = this.archiveSize;
|
json[r'archiveSize'] = this.archiveSize;
|
||||||
} else {
|
} else {
|
||||||
json[r'archiveSize'] = null;
|
// json[r'archiveSize'] = null;
|
||||||
}
|
}
|
||||||
json[r'assetIds'] = this.assetIds;
|
json[r'assetIds'] = this.assetIds;
|
||||||
if (this.userId != null) {
|
if (this.userId != null) {
|
||||||
json[r'userId'] = this.userId;
|
json[r'userId'] = this.userId;
|
||||||
} else {
|
} else {
|
||||||
json[r'userId'] = null;
|
// json[r'userId'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -95,16 +95,10 @@ class DownloadInfoDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DownloadInfoDto? fromJson(dynamic value) {
|
static DownloadInfoDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DownloadInfoDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DownloadInfoDto(
|
return DownloadInfoDto(
|
||||||
albumId: mapValueOfType<String>(json, r'albumId'),
|
albumId: mapValueOfType<String>(json, r'albumId'),
|
||||||
archiveSize: mapValueOfType<int>(json, r'archiveSize'),
|
archiveSize: mapValueOfType<int>(json, r'archiveSize'),
|
||||||
|
|||||||
+1
-11
@@ -51,20 +51,10 @@ class DownloadResponse {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DownloadResponse? fromJson(dynamic value) {
|
static DownloadResponse? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DownloadResponse");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'archiveSize'), 'Required key "DownloadResponse[archiveSize]" is missing from JSON.');
|
|
||||||
assert(json[r'archiveSize'] != null, 'Required key "DownloadResponse[archiveSize]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'includeEmbeddedVideos'), 'Required key "DownloadResponse[includeEmbeddedVideos]" is missing from JSON.');
|
|
||||||
assert(json[r'includeEmbeddedVideos'] != null, 'Required key "DownloadResponse[includeEmbeddedVideos]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DownloadResponse(
|
return DownloadResponse(
|
||||||
archiveSize: mapValueOfType<int>(json, r'archiveSize')!,
|
archiveSize: mapValueOfType<int>(json, r'archiveSize')!,
|
||||||
includeEmbeddedVideos: mapValueOfType<bool>(json, r'includeEmbeddedVideos')!,
|
includeEmbeddedVideos: mapValueOfType<bool>(json, r'includeEmbeddedVideos')!,
|
||||||
|
|||||||
+1
-11
@@ -51,20 +51,10 @@ class DownloadResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DownloadResponseDto? fromJson(dynamic value) {
|
static DownloadResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DownloadResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'archives'), 'Required key "DownloadResponseDto[archives]" is missing from JSON.');
|
|
||||||
assert(json[r'archives'] != null, 'Required key "DownloadResponseDto[archives]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'totalSize'), 'Required key "DownloadResponseDto[totalSize]" is missing from JSON.');
|
|
||||||
assert(json[r'totalSize'] != null, 'Required key "DownloadResponseDto[totalSize]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DownloadResponseDto(
|
return DownloadResponseDto(
|
||||||
archives: DownloadArchiveInfo.listFromJson(json[r'archives']),
|
archives: DownloadArchiveInfo.listFromJson(json[r'archives']),
|
||||||
totalSize: mapValueOfType<int>(json, r'totalSize')!,
|
totalSize: mapValueOfType<int>(json, r'totalSize')!,
|
||||||
|
|||||||
+3
-9
@@ -57,12 +57,12 @@ class DownloadUpdate {
|
|||||||
if (this.archiveSize != null) {
|
if (this.archiveSize != null) {
|
||||||
json[r'archiveSize'] = this.archiveSize;
|
json[r'archiveSize'] = this.archiveSize;
|
||||||
} else {
|
} else {
|
||||||
json[r'archiveSize'] = null;
|
// json[r'archiveSize'] = null;
|
||||||
}
|
}
|
||||||
if (this.includeEmbeddedVideos != null) {
|
if (this.includeEmbeddedVideos != null) {
|
||||||
json[r'includeEmbeddedVideos'] = this.includeEmbeddedVideos;
|
json[r'includeEmbeddedVideos'] = this.includeEmbeddedVideos;
|
||||||
} else {
|
} else {
|
||||||
json[r'includeEmbeddedVideos'] = null;
|
// json[r'includeEmbeddedVideos'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -71,16 +71,10 @@ class DownloadUpdate {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DownloadUpdate? fromJson(dynamic value) {
|
static DownloadUpdate? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DownloadUpdate");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DownloadUpdate(
|
return DownloadUpdate(
|
||||||
archiveSize: mapValueOfType<int>(json, r'archiveSize'),
|
archiveSize: mapValueOfType<int>(json, r'archiveSize'),
|
||||||
includeEmbeddedVideos: mapValueOfType<bool>(json, r'includeEmbeddedVideos'),
|
includeEmbeddedVideos: mapValueOfType<bool>(json, r'includeEmbeddedVideos'),
|
||||||
|
|||||||
+2
-12
@@ -51,23 +51,13 @@ class DuplicateDetectionConfig {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DuplicateDetectionConfig? fromJson(dynamic value) {
|
static DuplicateDetectionConfig? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DuplicateDetectionConfig");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'enabled'), 'Required key "DuplicateDetectionConfig[enabled]" is missing from JSON.');
|
|
||||||
assert(json[r'enabled'] != null, 'Required key "DuplicateDetectionConfig[enabled]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'maxDistance'), 'Required key "DuplicateDetectionConfig[maxDistance]" is missing from JSON.');
|
|
||||||
assert(json[r'maxDistance'] != null, 'Required key "DuplicateDetectionConfig[maxDistance]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DuplicateDetectionConfig(
|
return DuplicateDetectionConfig(
|
||||||
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
||||||
maxDistance: mapValueOfType<double>(json, r'maxDistance')!,
|
maxDistance: (mapValueOfType<num>(json, r'maxDistance')!).toDouble(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
+1
-9
@@ -41,18 +41,10 @@ class DuplicateResolveDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DuplicateResolveDto? fromJson(dynamic value) {
|
static DuplicateResolveDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DuplicateResolveDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'groups'), 'Required key "DuplicateResolveDto[groups]" is missing from JSON.');
|
|
||||||
assert(json[r'groups'] != null, 'Required key "DuplicateResolveDto[groups]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DuplicateResolveDto(
|
return DuplicateResolveDto(
|
||||||
groups: DuplicateResolveGroupDto.listFromJson(json[r'groups']),
|
groups: DuplicateResolveGroupDto.listFromJson(json[r'groups']),
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-13
@@ -54,22 +54,10 @@ class DuplicateResolveGroupDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DuplicateResolveGroupDto? fromJson(dynamic value) {
|
static DuplicateResolveGroupDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DuplicateResolveGroupDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'duplicateId'), 'Required key "DuplicateResolveGroupDto[duplicateId]" is missing from JSON.');
|
|
||||||
assert(json[r'duplicateId'] != null, 'Required key "DuplicateResolveGroupDto[duplicateId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'keepAssetIds'), 'Required key "DuplicateResolveGroupDto[keepAssetIds]" is missing from JSON.');
|
|
||||||
assert(json[r'keepAssetIds'] != null, 'Required key "DuplicateResolveGroupDto[keepAssetIds]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'trashAssetIds'), 'Required key "DuplicateResolveGroupDto[trashAssetIds]" is missing from JSON.');
|
|
||||||
assert(json[r'trashAssetIds'] != null, 'Required key "DuplicateResolveGroupDto[trashAssetIds]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DuplicateResolveGroupDto(
|
return DuplicateResolveGroupDto(
|
||||||
duplicateId: mapValueOfType<String>(json, r'duplicateId')!,
|
duplicateId: mapValueOfType<String>(json, r'duplicateId')!,
|
||||||
keepAssetIds: json[r'keepAssetIds'] is Iterable
|
keepAssetIds: json[r'keepAssetIds'] is Iterable
|
||||||
|
|||||||
+1
-13
@@ -55,22 +55,10 @@ class DuplicateResponseDto {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static DuplicateResponseDto? fromJson(dynamic value) {
|
static DuplicateResponseDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "DuplicateResponseDto");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'assets'), 'Required key "DuplicateResponseDto[assets]" is missing from JSON.');
|
|
||||||
assert(json[r'assets'] != null, 'Required key "DuplicateResponseDto[assets]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'duplicateId'), 'Required key "DuplicateResponseDto[duplicateId]" is missing from JSON.');
|
|
||||||
assert(json[r'duplicateId'] != null, 'Required key "DuplicateResponseDto[duplicateId]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'suggestedKeepAssetIds'), 'Required key "DuplicateResponseDto[suggestedKeepAssetIds]" is missing from JSON.');
|
|
||||||
assert(json[r'suggestedKeepAssetIds'] != null, 'Required key "DuplicateResponseDto[suggestedKeepAssetIds]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DuplicateResponseDto(
|
return DuplicateResponseDto(
|
||||||
assets: AssetResponseDto.listFromJson(json[r'assets']),
|
assets: AssetResponseDto.listFromJson(json[r'assets']),
|
||||||
duplicateId: mapValueOfType<String>(json, r'duplicateId')!,
|
duplicateId: mapValueOfType<String>(json, r'duplicateId')!,
|
||||||
|
|||||||
+1
-13
@@ -55,22 +55,10 @@ class EmailNotificationsResponse {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static EmailNotificationsResponse? fromJson(dynamic value) {
|
static EmailNotificationsResponse? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "EmailNotificationsResponse");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
assert(json.containsKey(r'albumInvite'), 'Required key "EmailNotificationsResponse[albumInvite]" is missing from JSON.');
|
|
||||||
assert(json[r'albumInvite'] != null, 'Required key "EmailNotificationsResponse[albumInvite]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'albumUpdate'), 'Required key "EmailNotificationsResponse[albumUpdate]" is missing from JSON.');
|
|
||||||
assert(json[r'albumUpdate'] != null, 'Required key "EmailNotificationsResponse[albumUpdate]" has a null value in JSON.');
|
|
||||||
assert(json.containsKey(r'enabled'), 'Required key "EmailNotificationsResponse[enabled]" is missing from JSON.');
|
|
||||||
assert(json[r'enabled'] != null, 'Required key "EmailNotificationsResponse[enabled]" has a null value in JSON.');
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return EmailNotificationsResponse(
|
return EmailNotificationsResponse(
|
||||||
albumInvite: mapValueOfType<bool>(json, r'albumInvite')!,
|
albumInvite: mapValueOfType<bool>(json, r'albumInvite')!,
|
||||||
albumUpdate: mapValueOfType<bool>(json, r'albumUpdate')!,
|
albumUpdate: mapValueOfType<bool>(json, r'albumUpdate')!,
|
||||||
|
|||||||
+4
-10
@@ -66,17 +66,17 @@ class EmailNotificationsUpdate {
|
|||||||
if (this.albumInvite != null) {
|
if (this.albumInvite != null) {
|
||||||
json[r'albumInvite'] = this.albumInvite;
|
json[r'albumInvite'] = this.albumInvite;
|
||||||
} else {
|
} else {
|
||||||
json[r'albumInvite'] = null;
|
// json[r'albumInvite'] = null;
|
||||||
}
|
}
|
||||||
if (this.albumUpdate != null) {
|
if (this.albumUpdate != null) {
|
||||||
json[r'albumUpdate'] = this.albumUpdate;
|
json[r'albumUpdate'] = this.albumUpdate;
|
||||||
} else {
|
} else {
|
||||||
json[r'albumUpdate'] = null;
|
// json[r'albumUpdate'] = null;
|
||||||
}
|
}
|
||||||
if (this.enabled != null) {
|
if (this.enabled != null) {
|
||||||
json[r'enabled'] = this.enabled;
|
json[r'enabled'] = this.enabled;
|
||||||
} else {
|
} else {
|
||||||
json[r'enabled'] = null;
|
// json[r'enabled'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -85,16 +85,10 @@ class EmailNotificationsUpdate {
|
|||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static EmailNotificationsUpdate? fromJson(dynamic value) {
|
static EmailNotificationsUpdate? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "EmailNotificationsUpdate");
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
// Ensure that the map contains the required keys.
|
|
||||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
||||||
// Note 2: this code is stripped in release mode!
|
|
||||||
assert(() {
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return EmailNotificationsUpdate(
|
return EmailNotificationsUpdate(
|
||||||
albumInvite: mapValueOfType<bool>(json, r'albumInvite'),
|
albumInvite: mapValueOfType<bool>(json, r'albumInvite'),
|
||||||
albumUpdate: mapValueOfType<bool>(json, r'albumUpdate'),
|
albumUpdate: mapValueOfType<bool>(json, r'albumUpdate'),
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user