import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, } from '../query-builder';
import { connectionFieldsMap } from '../input-types';
export class PlatformResourcesResolvedRequirementModel {
    client;
    constructor(client) {
        this.client = client;
    }
    findMany(args) {
        const { document, variables } = buildFindManyDocument('PlatformResourcesResolvedRequirement', 'platformResourcesResolvedRequirements', args.select, {
            where: args?.where,
            orderBy: args?.orderBy,
            first: args?.first,
            last: args?.last,
            after: args?.after,
            before: args?.before,
            offset: args?.offset,
        }, 'PlatformResourcesResolvedRequirementFilter', 'PlatformResourcesResolvedRequirementOrderBy', connectionFieldsMap);
        return new QueryBuilder({
            client: this.client,
            operation: 'query',
            operationName: 'PlatformResourcesResolvedRequirement',
            fieldName: 'platformResourcesResolvedRequirements',
            document,
            variables,
        });
    }
    findFirst(args) {
        const { document, variables } = buildFindFirstDocument('PlatformResourcesResolvedRequirement', 'platformResourcesResolvedRequirements', args.select, {
            where: args?.where,
            orderBy: args?.orderBy,
        }, 'PlatformResourcesResolvedRequirementFilter', 'PlatformResourcesResolvedRequirementOrderBy', connectionFieldsMap);
        return new QueryBuilder({
            client: this.client,
            operation: 'query',
            operationName: 'PlatformResourcesResolvedRequirement',
            fieldName: 'platformResourcesResolvedRequirement',
            document,
            variables,
            transform: (data) => ({
                platformResourcesResolvedRequirement: data.platformResourcesResolvedRequirements?.nodes?.[0] ?? null,
            }),
        });
    }
    create(args) {
        const { document, variables } = buildCreateDocument('PlatformResourcesResolvedRequirement', 'createPlatformResourcesResolvedRequirement', 'platformResourcesResolvedRequirement', args.select, args.data, 'CreatePlatformResourcesResolvedRequirementInput', connectionFieldsMap);
        return new QueryBuilder({
            client: this.client,
            operation: 'mutation',
            operationName: 'PlatformResourcesResolvedRequirement',
            fieldName: 'createPlatformResourcesResolvedRequirement',
            document,
            variables,
        });
    }
}
