import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, } from '../query-builder';
import { connectionFieldsMap } from '../input-types';
export class PlatformResourceUtilizationDailyModel {
    client;
    constructor(client) {
        this.client = client;
    }
    findMany(args) {
        const { document, variables } = buildFindManyDocument('PlatformResourceUtilizationDaily', 'platformResourceUtilizationDailies', args.select, {
            where: args?.where,
            orderBy: args?.orderBy,
            first: args?.first,
            last: args?.last,
            after: args?.after,
            before: args?.before,
            offset: args?.offset,
        }, 'PlatformResourceUtilizationDailyFilter', 'PlatformResourceUtilizationDailyOrderBy', connectionFieldsMap);
        return new QueryBuilder({
            client: this.client,
            operation: 'query',
            operationName: 'PlatformResourceUtilizationDaily',
            fieldName: 'platformResourceUtilizationDailies',
            document,
            variables,
        });
    }
    findFirst(args) {
        const { document, variables } = buildFindFirstDocument('PlatformResourceUtilizationDaily', 'platformResourceUtilizationDailies', args.select, {
            where: args?.where,
            orderBy: args?.orderBy,
        }, 'PlatformResourceUtilizationDailyFilter', 'PlatformResourceUtilizationDailyOrderBy', connectionFieldsMap);
        return new QueryBuilder({
            client: this.client,
            operation: 'query',
            operationName: 'PlatformResourceUtilizationDaily',
            fieldName: 'platformResourceUtilizationDaily',
            document,
            variables,
            transform: (data) => ({
                platformResourceUtilizationDaily: data.platformResourceUtilizationDailies?.nodes?.[0] ?? null,
            }),
        });
    }
    create(args) {
        const { document, variables } = buildCreateDocument('PlatformResourceUtilizationDaily', 'createPlatformResourceUtilizationDaily', 'platformResourceUtilizationDaily', args.select, args.data, 'CreatePlatformResourceUtilizationDailyInput', connectionFieldsMap);
        return new QueryBuilder({
            client: this.client,
            operation: 'mutation',
            operationName: 'PlatformResourceUtilizationDaily',
            fieldName: 'createPlatformResourceUtilizationDaily',
            document,
            variables,
        });
    }
}
