import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, } from '../query-builder';
import { connectionFieldsMap } from '../input-types';
export class ResourceUtilizationDailyModel {
    client;
    constructor(client) {
        this.client = client;
    }
    findMany(args) {
        const { document, variables } = buildFindManyDocument('ResourceUtilizationDaily', 'resourceUtilizationDailies', args.select, {
            where: args?.where,
            orderBy: args?.orderBy,
            first: args?.first,
            last: args?.last,
            after: args?.after,
            before: args?.before,
            offset: args?.offset,
        }, 'ResourceUtilizationDailyFilter', 'ResourceUtilizationDailyOrderBy', connectionFieldsMap);
        return new QueryBuilder({
            client: this.client,
            operation: 'query',
            operationName: 'ResourceUtilizationDaily',
            fieldName: 'resourceUtilizationDailies',
            document,
            variables,
        });
    }
    findFirst(args) {
        const { document, variables } = buildFindFirstDocument('ResourceUtilizationDaily', 'resourceUtilizationDailies', args.select, {
            where: args?.where,
            orderBy: args?.orderBy,
        }, 'ResourceUtilizationDailyFilter', 'ResourceUtilizationDailyOrderBy', connectionFieldsMap);
        return new QueryBuilder({
            client: this.client,
            operation: 'query',
            operationName: 'ResourceUtilizationDaily',
            fieldName: 'resourceUtilizationDaily',
            document,
            variables,
            transform: (data) => ({
                resourceUtilizationDaily: data.resourceUtilizationDailies?.nodes?.[0] ?? null,
            }),
        });
    }
    create(args) {
        const { document, variables } = buildCreateDocument('ResourceUtilizationDaily', 'createResourceUtilizationDaily', 'resourceUtilizationDaily', args.select, args.data, 'CreateResourceUtilizationDailyInput', connectionFieldsMap);
        return new QueryBuilder({
            client: this.client,
            operation: 'mutation',
            operationName: 'ResourceUtilizationDaily',
            fieldName: 'createResourceUtilizationDaily',
            document,
            variables,
        });
    }
}
