{"version":3,"file":"generateGenerationsProperty.mjs","sources":["../../../../../../src/runtime/internals/utils/clientProperties/generateGenerationsProperty.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { customOpFactory } from '../../operations/custom';\nimport { AiAction, getCustomUserAgentDetails, } from '../../ai/getCustomUserAgentDetails';\nexport function generateGenerationsProperty(client, apiGraphQLConfig, getInternals) {\n    const modelIntrospection = apiGraphQLConfig?.modelIntrospection;\n    // generations will be absent from model intro schema if no generation routes\n    // are present on the source schema.\n    if (!modelIntrospection?.generations) {\n        return {};\n    }\n    const generations = {};\n    for (const generation of Object.values(modelIntrospection.generations)) {\n        generations[generation.name] = customOpFactory(client, modelIntrospection, 'query', generation, false, getInternals, getCustomUserAgentDetails(AiAction.Generation));\n    }\n    return generations;\n}\n"],"names":[],"mappings":";;;AAAA;AACA;AAGO,SAAS,2BAA2B,CAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE;AACpF,IAAI,MAAM,kBAAkB,GAAG,gBAAgB,EAAE,kBAAkB;AACnE;AACA;AACA,IAAI,IAAI,CAAC,kBAAkB,EAAE,WAAW,EAAE;AAC1C,QAAQ,OAAO,EAAE;AACjB,IAAI;AACJ,IAAI,MAAM,WAAW,GAAG,EAAE;AAC1B,IAAI,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE;AAC5E,QAAQ,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,yBAAyB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC5K,IAAI;AACJ,IAAI,OAAO,WAAW;AACtB;;;;"}