C#: Add autogenerated stubs for Aws.Lambda.Core and Aws.Lambda.APIGatewayEvents.

This commit is contained in:
Michael Nebel
2023-11-27 14:09:12 +01:00
parent f336ff0063
commit fa4f91988f
7 changed files with 387 additions and 140 deletions

View File

@@ -0,0 +1,282 @@
// This file contains auto-generated code.
// Generated from `Amazon.Lambda.APIGatewayEvents, Version=1.0.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604`.
namespace Amazon
{
namespace Lambda
{
namespace APIGatewayEvents
{
public class APIGatewayCustomAuthorizerContext : System.Collections.Generic.Dictionary<string, object>
{
public bool? BoolKey { get => throw null; set { } }
public System.Collections.Generic.Dictionary<string, string> Claims { get => throw null; set { } }
public APIGatewayCustomAuthorizerContext() => throw null;
public int? NumKey { get => throw null; set { } }
public string PrincipalId { get => throw null; set { } }
public string StringKey { get => throw null; set { } }
}
public class APIGatewayCustomAuthorizerContextOutput : System.Collections.Generic.Dictionary<string, object>
{
public bool? BoolKey { get => throw null; set { } }
public APIGatewayCustomAuthorizerContextOutput() => throw null;
public int? NumKey { get => throw null; set { } }
public string StringKey { get => throw null; set { } }
}
public class APIGatewayCustomAuthorizerPolicy
{
public APIGatewayCustomAuthorizerPolicy() => throw null;
public class IAMPolicyStatement
{
public System.Collections.Generic.HashSet<string> Action { get => throw null; set { } }
public IAMPolicyStatement() => throw null;
public string Effect { get => throw null; set { } }
public System.Collections.Generic.HashSet<string> Resource { get => throw null; set { } }
}
public System.Collections.Generic.List<Amazon.Lambda.APIGatewayEvents.APIGatewayCustomAuthorizerPolicy.IAMPolicyStatement> Statement { get => throw null; set { } }
public string Version { get => throw null; set { } }
}
public class APIGatewayCustomAuthorizerRequest
{
public string AuthorizationToken { get => throw null; set { } }
public APIGatewayCustomAuthorizerRequest() => throw null;
public System.Collections.Generic.IDictionary<string, string> Headers { get => throw null; set { } }
public string HttpMethod { get => throw null; set { } }
public string MethodArn { get => throw null; set { } }
public string Path { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, string> PathParameters { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, string> QueryStringParameters { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayProxyRequest.ProxyRequestContext RequestContext { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, string> StageVariables { get => throw null; set { } }
public string Type { get => throw null; set { } }
}
public class APIGatewayCustomAuthorizerResponse
{
public Amazon.Lambda.APIGatewayEvents.APIGatewayCustomAuthorizerContextOutput Context { get => throw null; set { } }
public APIGatewayCustomAuthorizerResponse() => throw null;
public Amazon.Lambda.APIGatewayEvents.APIGatewayCustomAuthorizerPolicy PolicyDocument { get => throw null; set { } }
public string PrincipalID { get => throw null; set { } }
public string UsageIdentifierKey { get => throw null; set { } }
}
public class APIGatewayCustomAuthorizerV2IamResponse
{
public System.Collections.Generic.Dictionary<string, object> Context { get => throw null; set { } }
public APIGatewayCustomAuthorizerV2IamResponse() => throw null;
public Amazon.Lambda.APIGatewayEvents.APIGatewayCustomAuthorizerPolicy PolicyDocument { get => throw null; set { } }
public string PrincipalID { get => throw null; set { } }
}
public class APIGatewayCustomAuthorizerV2Request
{
public System.Collections.Generic.List<string> Cookies { get => throw null; set { } }
public APIGatewayCustomAuthorizerV2Request() => throw null;
public System.Collections.Generic.Dictionary<string, string> Headers { get => throw null; set { } }
public System.Collections.Generic.List<string> IdentitySource { get => throw null; set { } }
public System.Collections.Generic.Dictionary<string, string> PathParameters { get => throw null; set { } }
public System.Collections.Generic.Dictionary<string, string> QueryStringParameters { get => throw null; set { } }
public string RawPath { get => throw null; set { } }
public string RawQueryString { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyRequest.ProxyRequestContext RequestContext { get => throw null; set { } }
public string RouteArn { get => throw null; set { } }
public string RouteKey { get => throw null; set { } }
public System.Collections.Generic.Dictionary<string, string> StageVariables { get => throw null; set { } }
public string Type { get => throw null; set { } }
}
public class APIGatewayCustomAuthorizerV2SimpleResponse
{
public System.Collections.Generic.Dictionary<string, object> Context { get => throw null; set { } }
public APIGatewayCustomAuthorizerV2SimpleResponse() => throw null;
public bool IsAuthorized { get => throw null; set { } }
}
public class APIGatewayHttpApiV2ProxyRequest
{
public class AuthorizerDescription
{
public class CognitoIdentityDescription
{
public System.Collections.Generic.IList<string> AMR { get => throw null; set { } }
public CognitoIdentityDescription() => throw null;
public string IdentityId { get => throw null; set { } }
public string IdentityPoolId { get => throw null; set { } }
}
public AuthorizerDescription() => throw null;
public Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyRequest.AuthorizerDescription.IAMDescription IAM { get => throw null; set { } }
public class IAMDescription
{
public string AccessKey { get => throw null; set { } }
public string AccountId { get => throw null; set { } }
public string CallerId { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyRequest.AuthorizerDescription.CognitoIdentityDescription CognitoIdentity { get => throw null; set { } }
public IAMDescription() => throw null;
public string PrincipalOrgId { get => throw null; set { } }
public string UserARN { get => throw null; set { } }
public string UserId { get => throw null; set { } }
}
public Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyRequest.AuthorizerDescription.JwtDescription Jwt { get => throw null; set { } }
public class JwtDescription
{
public System.Collections.Generic.IDictionary<string, string> Claims { get => throw null; set { } }
public JwtDescription() => throw null;
public string[] Scopes { get => throw null; set { } }
}
public System.Collections.Generic.IDictionary<string, object> Lambda { get => throw null; set { } }
}
public string Body { get => throw null; set { } }
public class ClientCertValidity
{
public ClientCertValidity() => throw null;
public string NotAfter { get => throw null; set { } }
public string NotBefore { get => throw null; set { } }
}
public string[] Cookies { get => throw null; set { } }
public APIGatewayHttpApiV2ProxyRequest() => throw null;
public System.Collections.Generic.IDictionary<string, string> Headers { get => throw null; set { } }
public class HttpDescription
{
public HttpDescription() => throw null;
public string Method { get => throw null; set { } }
public string Path { get => throw null; set { } }
public string Protocol { get => throw null; set { } }
public string SourceIp { get => throw null; set { } }
public string UserAgent { get => throw null; set { } }
}
public bool IsBase64Encoded { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, string> PathParameters { get => throw null; set { } }
public class ProxyRequestAuthentication
{
public Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyRequest.ProxyRequestClientCert ClientCert { get => throw null; set { } }
public ProxyRequestAuthentication() => throw null;
}
public class ProxyRequestClientCert
{
public string ClientCertPem { get => throw null; set { } }
public ProxyRequestClientCert() => throw null;
public string IssuerDN { get => throw null; set { } }
public string SerialNumber { get => throw null; set { } }
public string SubjectDN { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyRequest.ClientCertValidity Validity { get => throw null; set { } }
}
public class ProxyRequestContext
{
public string AccountId { get => throw null; set { } }
public string ApiId { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyRequest.ProxyRequestAuthentication Authentication { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyRequest.AuthorizerDescription Authorizer { get => throw null; set { } }
public ProxyRequestContext() => throw null;
public string DomainName { get => throw null; set { } }
public string DomainPrefix { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyRequest.HttpDescription Http { get => throw null; set { } }
public string RequestId { get => throw null; set { } }
public string RouteId { get => throw null; set { } }
public string RouteKey { get => throw null; set { } }
public string Stage { get => throw null; set { } }
public string Time { get => throw null; set { } }
public long TimeEpoch { get => throw null; set { } }
}
public System.Collections.Generic.IDictionary<string, string> QueryStringParameters { get => throw null; set { } }
public string RawPath { get => throw null; set { } }
public string RawQueryString { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyRequest.ProxyRequestContext RequestContext { get => throw null; set { } }
public string RouteKey { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, string> StageVariables { get => throw null; set { } }
public string Version { get => throw null; set { } }
}
public class APIGatewayHttpApiV2ProxyResponse
{
public string Body { get => throw null; set { } }
public string[] Cookies { get => throw null; set { } }
public APIGatewayHttpApiV2ProxyResponse() => throw null;
public System.Collections.Generic.IDictionary<string, string> Headers { get => throw null; set { } }
public bool IsBase64Encoded { get => throw null; set { } }
public void SetHeaderValues(string headerName, string value, bool append) => throw null;
public void SetHeaderValues(string headerName, System.Collections.Generic.IEnumerable<string> values, bool append) => throw null;
public int StatusCode { get => throw null; set { } }
}
public class APIGatewayProxyRequest
{
public string Body { get => throw null; set { } }
public class ClientCertValidity
{
public ClientCertValidity() => throw null;
public string NotAfter { get => throw null; set { } }
public string NotBefore { get => throw null; set { } }
}
public APIGatewayProxyRequest() => throw null;
public System.Collections.Generic.IDictionary<string, string> Headers { get => throw null; set { } }
public string HttpMethod { get => throw null; set { } }
public bool IsBase64Encoded { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, System.Collections.Generic.IList<string>> MultiValueHeaders { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, System.Collections.Generic.IList<string>> MultiValueQueryStringParameters { get => throw null; set { } }
public string Path { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, string> PathParameters { get => throw null; set { } }
public class ProxyRequestClientCert
{
public string ClientCertPem { get => throw null; set { } }
public ProxyRequestClientCert() => throw null;
public string IssuerDN { get => throw null; set { } }
public string SerialNumber { get => throw null; set { } }
public string SubjectDN { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayProxyRequest.ClientCertValidity Validity { get => throw null; set { } }
}
public class ProxyRequestContext
{
public string AccountId { get => throw null; set { } }
public string ApiId { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayCustomAuthorizerContext Authorizer { get => throw null; set { } }
public long ConnectedAt { get => throw null; set { } }
public string ConnectionId { get => throw null; set { } }
public ProxyRequestContext() => throw null;
public string DomainName { get => throw null; set { } }
public string DomainPrefix { get => throw null; set { } }
public string Error { get => throw null; set { } }
public string EventType { get => throw null; set { } }
public string ExtendedRequestId { get => throw null; set { } }
public string HttpMethod { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayProxyRequest.RequestIdentity Identity { get => throw null; set { } }
public string IntegrationLatency { get => throw null; set { } }
public string MessageDirection { get => throw null; set { } }
public string MessageId { get => throw null; set { } }
public string OperationName { get => throw null; set { } }
public string Path { get => throw null; set { } }
public string RequestId { get => throw null; set { } }
public string RequestTime { get => throw null; set { } }
public long RequestTimeEpoch { get => throw null; set { } }
public string ResourceId { get => throw null; set { } }
public string ResourcePath { get => throw null; set { } }
public string RouteKey { get => throw null; set { } }
public string Stage { get => throw null; set { } }
public string Status { get => throw null; set { } }
}
public System.Collections.Generic.IDictionary<string, string> QueryStringParameters { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayProxyRequest.ProxyRequestContext RequestContext { get => throw null; set { } }
public class RequestIdentity
{
public string AccessKey { get => throw null; set { } }
public string AccountId { get => throw null; set { } }
public string ApiKey { get => throw null; set { } }
public string ApiKeyId { get => throw null; set { } }
public string Caller { get => throw null; set { } }
public Amazon.Lambda.APIGatewayEvents.APIGatewayProxyRequest.ProxyRequestClientCert ClientCert { get => throw null; set { } }
public string CognitoAuthenticationProvider { get => throw null; set { } }
public string CognitoAuthenticationType { get => throw null; set { } }
public string CognitoIdentityId { get => throw null; set { } }
public string CognitoIdentityPoolId { get => throw null; set { } }
public RequestIdentity() => throw null;
public string SourceIp { get => throw null; set { } }
public string User { get => throw null; set { } }
public string UserAgent { get => throw null; set { } }
public string UserArn { get => throw null; set { } }
}
public string Resource { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, string> StageVariables { get => throw null; set { } }
}
public class APIGatewayProxyResponse
{
public string Body { get => throw null; set { } }
public APIGatewayProxyResponse() => throw null;
public System.Collections.Generic.IDictionary<string, string> Headers { get => throw null; set { } }
public bool IsBase64Encoded { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, System.Collections.Generic.IList<string>> MultiValueHeaders { get => throw null; set { } }
public int StatusCode { get => throw null; set { } }
}
}
}
}

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,81 @@
// This file contains auto-generated code.
// Generated from `Amazon.Lambda.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604`.
namespace Amazon
{
namespace Lambda
{
namespace Core
{
public interface IClientApplication
{
string AppPackageName { get; }
string AppTitle { get; }
string AppVersionCode { get; }
string AppVersionName { get; }
string InstallationId { get; }
}
public interface IClientContext
{
Amazon.Lambda.Core.IClientApplication Client { get; }
System.Collections.Generic.IDictionary<string, string> Custom { get; }
System.Collections.Generic.IDictionary<string, string> Environment { get; }
}
public interface ICognitoIdentity
{
string IdentityId { get; }
string IdentityPoolId { get; }
}
public interface ILambdaContext
{
string AwsRequestId { get; }
Amazon.Lambda.Core.IClientContext ClientContext { get; }
string FunctionName { get; }
string FunctionVersion { get; }
Amazon.Lambda.Core.ICognitoIdentity Identity { get; }
string InvokedFunctionArn { get; }
Amazon.Lambda.Core.ILambdaLogger Logger { get; }
string LogGroupName { get; }
string LogStreamName { get; }
int MemoryLimitInMB { get; }
System.TimeSpan RemainingTime { get; }
}
public interface ILambdaLogger
{
void Log(string message);
virtual void Log(string level, string message) => throw null;
virtual void Log(Amazon.Lambda.Core.LogLevel level, string message) => throw null;
virtual void LogCritical(string message) => throw null;
virtual void LogDebug(string message) => throw null;
virtual void LogError(string message) => throw null;
virtual void LogInformation(string message) => throw null;
void LogLine(string message);
virtual void LogTrace(string message) => throw null;
virtual void LogWarning(string message) => throw null;
}
public interface ILambdaSerializer
{
T Deserialize<T>(System.IO.Stream requestStream);
void Serialize<T>(T response, System.IO.Stream responseStream);
}
public static class LambdaLogger
{
public static void Log(string message) => throw null;
}
[System.AttributeUsage((System.AttributeTargets)65, AllowMultiple = false)]
public sealed class LambdaSerializerAttribute : System.Attribute
{
public LambdaSerializerAttribute(System.Type serializerType) => throw null;
public System.Type SerializerType { get => throw null; set { } }
}
public enum LogLevel
{
Trace = 0,
Debug = 1,
Information = 2,
Warning = 3,
Error = 4,
Critical = 5,
}
}
}
}

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -1,46 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Amazon.Lambda.APIGatewayEvents
{
public class APIGatewayHttpApiV2ProxyRequest
{
public string RawPath { get; set; }
public string RawQueryString { get; set; }
public string[] Cookies { get; set; }
public IDictionary<string, string> Headers { get; set; }
public IDictionary<string, string> QueryStringParameters { get; set; }
public ProxyRequestContext RequestContext { get; set; }
public string Body { get; set; }
public IDictionary<string, string> PathParameters { get; set; }
public bool IsBase64Encoded { get; set; }
public IDictionary<string, string> StageVariables { get; set; }
public class ProxyRequestContext
{
public string AccountId { get; set; }
public string ApiId { get; set; }
}
}
public class APIGatewayProxyResponse
{
public int StatusCode { get; set; }
public IDictionary<string, string> Headers { get; set; }
public string Body { get; set; }
}
}

View File

@@ -1,81 +0,0 @@
using System.Collections.Generic;
namespace Amazon.Lambda.Core
{
public interface ILambdaContext
{
string AwsRequestId { get; }
IClientContext ClientContext { get; }
string FunctionName { get; }
string FunctionVersion { get; }
string InvokedFunctionArn { get; }
ILambdaLogger Logger { get; }
string LogGroupName { get; }
string LogStreamName { get; }
int MemoryLimitInMB { get; }
}
public interface IClientContext
{
IDictionary<string, string> Environment { get; }
IClientApplication Client { get; }
IDictionary<string, string> Custom { get; }
}
public interface IClientApplication
{
string AppPackageName { get; }
string AppTitle { get; }
string AppVersionCode { get; }
string AppVersionName { get; }
string InstallationId { get; }
}
public enum LogLevel
{
Trace = 0,
Debug = 1,
Information = 2,
Warning = 3,
Error = 4,
Critical = 5
}
public interface ILambdaLogger
{
void Log(string message);
void LogLine(string message);
void Log(string level, string message) => throw null;
void Log(LogLevel level, string message) => throw null;
void LogTrace(string message) => throw null;
void LogDebug(string message) => throw null;
void LogInformation(string message) => throw null;
void LogWarning(string message) => throw null;
void LogError(string message) => throw null;
void LogCritical(string message) => throw null;
}
}

View File

@@ -1,13 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AWSProjectType>Lambda</AWSProjectType>
<!-- Makes the build directory similar to a publish directory and helps the AWS .NET Lambda Mock Test Tool find project dependencies. -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!-- Generate ready to run images during publishing to improve cold start time. -->
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>
</Project>