"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GatewayTargetBase=exports.McpTargetType=exports.GatewayTargetProtocolType=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var iam=()=>{var tmp=require("../../../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../../core");return core_1=()=>tmp,tmp},GatewayTargetProtocolType;(function(GatewayTargetProtocolType2){GatewayTargetProtocolType2.MCP="MCP"})(GatewayTargetProtocolType||(exports.GatewayTargetProtocolType=GatewayTargetProtocolType={}));var McpTargetType;(function(McpTargetType2){McpTargetType2.OPENAPI_SCHEMA="OPENAPI_SCHEMA",McpTargetType2.SMITHY_MODEL="SMITHY_MODEL",McpTargetType2.LAMBDA="LAMBDA",McpTargetType2.MCP_SERVER="MCP_SERVER",McpTargetType2.API_GATEWAY="API_GATEWAY"})(McpTargetType||(exports.McpTargetType=McpTargetType={}));class GatewayTargetBase extends core_1().Resource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_bedrockagentcore.GatewayTargetBase",version:"2.256.1"};get gatewayTargetRef(){return{gatewayIdentifier:this.gateway.gatewayRef.gatewayIdentifier,targetId:this.targetId}}grant(grantee,...actions){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grant),error}return iam().Grant.addToPrincipal({grantee,resourceArns:[this.targetArn],actions})}grantRead(grantee){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grantRead),error}const resourceSpecificGrant=this.grant(grantee,"bedrock-agentcore:GetGatewayTarget"),allResourceGrant=iam().Grant.addToPrincipal({grantee,resourceArns:["*"],actions:["bedrock-agentcore:ListGatewayTargets"]});return resourceSpecificGrant.combine(allResourceGrant)}grantManage(grantee){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grantManage),error}return this.grant(grantee,"bedrock-agentcore:CreateGatewayTarget","bedrock-agentcore:UpdateGatewayTarget","bedrock-agentcore:DeleteGatewayTarget")}}exports.GatewayTargetBase=GatewayTargetBase;
