repo_name
stringlengths 1
52
| repo_creator
stringclasses 6
values | programming_language
stringclasses 4
values | code
stringlengths 0
9.68M
| num_lines
int64 1
234k
|
---|---|---|---|---|
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeltaSyncConfig Marshaller
/// </summary>
public class DeltaSyncConfigMarshaller : IRequestMarshaller<DeltaSyncConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(DeltaSyncConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetBaseTableTTL())
{
context.Writer.WritePropertyName("baseTableTTL");
context.Writer.Write(requestObject.BaseTableTTL);
}
if(requestObject.IsSetDeltaSyncTableName())
{
context.Writer.WritePropertyName("deltaSyncTableName");
context.Writer.Write(requestObject.DeltaSyncTableName);
}
if(requestObject.IsSetDeltaSyncTableTTL())
{
context.Writer.WritePropertyName("deltaSyncTableTTL");
context.Writer.Write(requestObject.DeltaSyncTableTTL);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static DeltaSyncConfigMarshaller Instance = new DeltaSyncConfigMarshaller();
}
}
| 74 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeltaSyncConfig Object
/// </summary>
public class DeltaSyncConfigUnmarshaller : IUnmarshaller<DeltaSyncConfig, XmlUnmarshallerContext>, IUnmarshaller<DeltaSyncConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
DeltaSyncConfig IUnmarshaller<DeltaSyncConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DeltaSyncConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
DeltaSyncConfig unmarshalledObject = new DeltaSyncConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("baseTableTTL", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
unmarshalledObject.BaseTableTTL = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("deltaSyncTableName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DeltaSyncTableName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("deltaSyncTableTTL", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
unmarshalledObject.DeltaSyncTableTTL = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static DeltaSyncConfigUnmarshaller _instance = new DeltaSyncConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeltaSyncConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 104 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// DisassociateApi Request Marshaller
/// </summary>
public class DisassociateApiRequestMarshaller : IMarshaller<IRequest, DisassociateApiRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((DisassociateApiRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DisassociateApiRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetDomainName())
throw new AmazonAppSyncException("Request object does not have required field DomainName set");
request.AddPathResource("{domainName}", StringUtils.FromString(publicRequest.DomainName));
request.ResourcePath = "/v1/domainnames/{domainName}/apiassociation";
return request;
}
private static DisassociateApiRequestMarshaller _instance = new DisassociateApiRequestMarshaller();
internal static DisassociateApiRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DisassociateApiRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DisassociateApi operation
/// </summary>
public class DisassociateApiResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DisassociateApiResponse response = new DisassociateApiResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DisassociateApiResponseUnmarshaller _instance = new DisassociateApiResponseUnmarshaller();
internal static DisassociateApiResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DisassociateApiResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 115 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// DisassociateMergedGraphqlApi Request Marshaller
/// </summary>
public class DisassociateMergedGraphqlApiRequestMarshaller : IMarshaller<IRequest, DisassociateMergedGraphqlApiRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((DisassociateMergedGraphqlApiRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DisassociateMergedGraphqlApiRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetAssociationId())
throw new AmazonAppSyncException("Request object does not have required field AssociationId set");
request.AddPathResource("{associationId}", StringUtils.FromString(publicRequest.AssociationId));
if (!publicRequest.IsSetSourceApiIdentifier())
throw new AmazonAppSyncException("Request object does not have required field SourceApiIdentifier set");
request.AddPathResource("{sourceApiIdentifier}", StringUtils.FromString(publicRequest.SourceApiIdentifier));
request.ResourcePath = "/v1/sourceApis/{sourceApiIdentifier}/mergedApiAssociations/{associationId}";
return request;
}
private static DisassociateMergedGraphqlApiRequestMarshaller _instance = new DisassociateMergedGraphqlApiRequestMarshaller();
internal static DisassociateMergedGraphqlApiRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DisassociateMergedGraphqlApiRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 90 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DisassociateMergedGraphqlApi operation
/// </summary>
public class DisassociateMergedGraphqlApiResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DisassociateMergedGraphqlApiResponse response = new DisassociateMergedGraphqlApiResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("sourceApiAssociationStatus", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.SourceApiAssociationStatus = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DisassociateMergedGraphqlApiResponseUnmarshaller _instance = new DisassociateMergedGraphqlApiResponseUnmarshaller();
internal static DisassociateMergedGraphqlApiResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DisassociateMergedGraphqlApiResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 126 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// DisassociateSourceGraphqlApi Request Marshaller
/// </summary>
public class DisassociateSourceGraphqlApiRequestMarshaller : IMarshaller<IRequest, DisassociateSourceGraphqlApiRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((DisassociateSourceGraphqlApiRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DisassociateSourceGraphqlApiRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetAssociationId())
throw new AmazonAppSyncException("Request object does not have required field AssociationId set");
request.AddPathResource("{associationId}", StringUtils.FromString(publicRequest.AssociationId));
if (!publicRequest.IsSetMergedApiIdentifier())
throw new AmazonAppSyncException("Request object does not have required field MergedApiIdentifier set");
request.AddPathResource("{mergedApiIdentifier}", StringUtils.FromString(publicRequest.MergedApiIdentifier));
request.ResourcePath = "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}";
return request;
}
private static DisassociateSourceGraphqlApiRequestMarshaller _instance = new DisassociateSourceGraphqlApiRequestMarshaller();
internal static DisassociateSourceGraphqlApiRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DisassociateSourceGraphqlApiRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 90 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DisassociateSourceGraphqlApi operation
/// </summary>
public class DisassociateSourceGraphqlApiResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DisassociateSourceGraphqlApiResponse response = new DisassociateSourceGraphqlApiResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("sourceApiAssociationStatus", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.SourceApiAssociationStatus = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DisassociateSourceGraphqlApiResponseUnmarshaller _instance = new DisassociateSourceGraphqlApiResponseUnmarshaller();
internal static DisassociateSourceGraphqlApiResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DisassociateSourceGraphqlApiResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 126 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DomainNameConfig Object
/// </summary>
public class DomainNameConfigUnmarshaller : IUnmarshaller<DomainNameConfig, XmlUnmarshallerContext>, IUnmarshaller<DomainNameConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
DomainNameConfig IUnmarshaller<DomainNameConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DomainNameConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
DomainNameConfig unmarshalledObject = new DomainNameConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appsyncDomainName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AppsyncDomainName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("certificateArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CertificateArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("domainName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DomainName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("hostedZoneId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.HostedZoneId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static DomainNameConfigUnmarshaller _instance = new DomainNameConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DomainNameConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 116 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// DynamodbDataSourceConfig Marshaller
/// </summary>
public class DynamodbDataSourceConfigMarshaller : IRequestMarshaller<DynamodbDataSourceConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(DynamodbDataSourceConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAwsRegion())
{
context.Writer.WritePropertyName("awsRegion");
context.Writer.Write(requestObject.AwsRegion);
}
if(requestObject.IsSetDeltaSyncConfig())
{
context.Writer.WritePropertyName("deltaSyncConfig");
context.Writer.WriteObjectStart();
var marshaller = DeltaSyncConfigMarshaller.Instance;
marshaller.Marshall(requestObject.DeltaSyncConfig, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetTableName())
{
context.Writer.WritePropertyName("tableName");
context.Writer.Write(requestObject.TableName);
}
if(requestObject.IsSetUseCallerCredentials())
{
context.Writer.WritePropertyName("useCallerCredentials");
context.Writer.Write(requestObject.UseCallerCredentials);
}
if(requestObject.IsSetVersioned())
{
context.Writer.WritePropertyName("versioned");
context.Writer.Write(requestObject.Versioned);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static DynamodbDataSourceConfigMarshaller Instance = new DynamodbDataSourceConfigMarshaller();
}
}
| 91 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DynamodbDataSourceConfig Object
/// </summary>
public class DynamodbDataSourceConfigUnmarshaller : IUnmarshaller<DynamodbDataSourceConfig, XmlUnmarshallerContext>, IUnmarshaller<DynamodbDataSourceConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
DynamodbDataSourceConfig IUnmarshaller<DynamodbDataSourceConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DynamodbDataSourceConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
DynamodbDataSourceConfig unmarshalledObject = new DynamodbDataSourceConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("awsRegion", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AwsRegion = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("deltaSyncConfig", targetDepth))
{
var unmarshaller = DeltaSyncConfigUnmarshaller.Instance;
unmarshalledObject.DeltaSyncConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("tableName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TableName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("useCallerCredentials", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.UseCallerCredentials = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("versioned", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Versioned = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static DynamodbDataSourceConfigUnmarshaller _instance = new DynamodbDataSourceConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DynamodbDataSourceConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 116 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// ElasticsearchDataSourceConfig Marshaller
/// </summary>
public class ElasticsearchDataSourceConfigMarshaller : IRequestMarshaller<ElasticsearchDataSourceConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(ElasticsearchDataSourceConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAwsRegion())
{
context.Writer.WritePropertyName("awsRegion");
context.Writer.Write(requestObject.AwsRegion);
}
if(requestObject.IsSetEndpoint())
{
context.Writer.WritePropertyName("endpoint");
context.Writer.Write(requestObject.Endpoint);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ElasticsearchDataSourceConfigMarshaller Instance = new ElasticsearchDataSourceConfigMarshaller();
}
}
| 68 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ElasticsearchDataSourceConfig Object
/// </summary>
public class ElasticsearchDataSourceConfigUnmarshaller : IUnmarshaller<ElasticsearchDataSourceConfig, XmlUnmarshallerContext>, IUnmarshaller<ElasticsearchDataSourceConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ElasticsearchDataSourceConfig IUnmarshaller<ElasticsearchDataSourceConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ElasticsearchDataSourceConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ElasticsearchDataSourceConfig unmarshalledObject = new ElasticsearchDataSourceConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("awsRegion", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AwsRegion = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("endpoint", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Endpoint = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ElasticsearchDataSourceConfigUnmarshaller _instance = new ElasticsearchDataSourceConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ElasticsearchDataSourceConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ErrorDetail Object
/// </summary>
public class ErrorDetailUnmarshaller : IUnmarshaller<ErrorDetail, XmlUnmarshallerContext>, IUnmarshaller<ErrorDetail, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ErrorDetail IUnmarshaller<ErrorDetail, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ErrorDetail Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ErrorDetail unmarshalledObject = new ErrorDetail();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("message", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Message = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ErrorDetailUnmarshaller _instance = new ErrorDetailUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ErrorDetailUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 92 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for EvaluateCodeErrorDetail Object
/// </summary>
public class EvaluateCodeErrorDetailUnmarshaller : IUnmarshaller<EvaluateCodeErrorDetail, XmlUnmarshallerContext>, IUnmarshaller<EvaluateCodeErrorDetail, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
EvaluateCodeErrorDetail IUnmarshaller<EvaluateCodeErrorDetail, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public EvaluateCodeErrorDetail Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
EvaluateCodeErrorDetail unmarshalledObject = new EvaluateCodeErrorDetail();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("codeErrors", targetDepth))
{
var unmarshaller = new ListUnmarshaller<CodeError, CodeErrorUnmarshaller>(CodeErrorUnmarshaller.Instance);
unmarshalledObject.CodeErrors = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("message", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Message = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static EvaluateCodeErrorDetailUnmarshaller _instance = new EvaluateCodeErrorDetailUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static EvaluateCodeErrorDetailUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// EvaluateCode Request Marshaller
/// </summary>
public class EvaluateCodeRequestMarshaller : IMarshaller<IRequest, EvaluateCodeRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((EvaluateCodeRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(EvaluateCodeRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "POST";
request.ResourcePath = "/v1/dataplane-evaluatecode";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetCode())
{
context.Writer.WritePropertyName("code");
context.Writer.Write(publicRequest.Code);
}
if(publicRequest.IsSetContext())
{
context.Writer.WritePropertyName("context");
context.Writer.Write(publicRequest.Context);
}
if(publicRequest.IsSetFunction())
{
context.Writer.WritePropertyName("function");
context.Writer.Write(publicRequest.Function);
}
if(publicRequest.IsSetRuntime())
{
context.Writer.WritePropertyName("runtime");
context.Writer.WriteObjectStart();
var marshaller = AppSyncRuntimeMarshaller.Instance;
marshaller.Marshall(publicRequest.Runtime, context);
context.Writer.WriteObjectEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static EvaluateCodeRequestMarshaller _instance = new EvaluateCodeRequestMarshaller();
internal static EvaluateCodeRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static EvaluateCodeRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 124 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for EvaluateCode operation
/// </summary>
public class EvaluateCodeResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
EvaluateCodeResponse response = new EvaluateCodeResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = EvaluateCodeErrorDetailUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("evaluationResult", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.EvaluationResult = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("logs", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
response.Logs = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static EvaluateCodeResponseUnmarshaller _instance = new EvaluateCodeResponseUnmarshaller();
internal static EvaluateCodeResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static EvaluateCodeResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 130 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// EvaluateMappingTemplate Request Marshaller
/// </summary>
public class EvaluateMappingTemplateRequestMarshaller : IMarshaller<IRequest, EvaluateMappingTemplateRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((EvaluateMappingTemplateRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(EvaluateMappingTemplateRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "POST";
request.ResourcePath = "/v1/dataplane-evaluatetemplate";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetContext())
{
context.Writer.WritePropertyName("context");
context.Writer.Write(publicRequest.Context);
}
if(publicRequest.IsSetTemplate())
{
context.Writer.WritePropertyName("template");
context.Writer.Write(publicRequest.Template);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static EvaluateMappingTemplateRequestMarshaller _instance = new EvaluateMappingTemplateRequestMarshaller();
internal static EvaluateMappingTemplateRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static EvaluateMappingTemplateRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 107 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for EvaluateMappingTemplate operation
/// </summary>
public class EvaluateMappingTemplateResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
EvaluateMappingTemplateResponse response = new EvaluateMappingTemplateResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = ErrorDetailUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("evaluationResult", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.EvaluationResult = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("logs", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
response.Logs = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static EvaluateMappingTemplateResponseUnmarshaller _instance = new EvaluateMappingTemplateResponseUnmarshaller();
internal static EvaluateMappingTemplateResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static EvaluateMappingTemplateResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 130 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// EventBridgeDataSourceConfig Marshaller
/// </summary>
public class EventBridgeDataSourceConfigMarshaller : IRequestMarshaller<EventBridgeDataSourceConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(EventBridgeDataSourceConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetEventBusArn())
{
context.Writer.WritePropertyName("eventBusArn");
context.Writer.Write(requestObject.EventBusArn);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static EventBridgeDataSourceConfigMarshaller Instance = new EventBridgeDataSourceConfigMarshaller();
}
}
| 62 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for EventBridgeDataSourceConfig Object
/// </summary>
public class EventBridgeDataSourceConfigUnmarshaller : IUnmarshaller<EventBridgeDataSourceConfig, XmlUnmarshallerContext>, IUnmarshaller<EventBridgeDataSourceConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
EventBridgeDataSourceConfig IUnmarshaller<EventBridgeDataSourceConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public EventBridgeDataSourceConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
EventBridgeDataSourceConfig unmarshalledObject = new EventBridgeDataSourceConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("eventBusArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EventBusArn = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static EventBridgeDataSourceConfigUnmarshaller _instance = new EventBridgeDataSourceConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static EventBridgeDataSourceConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 92 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// FlushApiCache Request Marshaller
/// </summary>
public class FlushApiCacheRequestMarshaller : IMarshaller<IRequest, FlushApiCacheRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((FlushApiCacheRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(FlushApiCacheRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
request.ResourcePath = "/v1/apis/{apiId}/FlushCache";
return request;
}
private static FlushApiCacheRequestMarshaller _instance = new FlushApiCacheRequestMarshaller();
internal static FlushApiCacheRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static FlushApiCacheRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FlushApiCache operation
/// </summary>
public class FlushApiCacheResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
FlushApiCacheResponse response = new FlushApiCacheResponse();
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static FlushApiCacheResponseUnmarshaller _instance = new FlushApiCacheResponseUnmarshaller();
internal static FlushApiCacheResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static FlushApiCacheResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 115 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FunctionConfiguration Object
/// </summary>
public class FunctionConfigurationUnmarshaller : IUnmarshaller<FunctionConfiguration, XmlUnmarshallerContext>, IUnmarshaller<FunctionConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FunctionConfiguration IUnmarshaller<FunctionConfiguration, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public FunctionConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FunctionConfiguration unmarshalledObject = new FunctionConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("code", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Code = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dataSourceName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DataSourceName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("functionArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.FunctionArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("functionId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.FunctionId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("functionVersion", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.FunctionVersion = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("maxBatchSize", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MaxBatchSize = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("requestMappingTemplate", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.RequestMappingTemplate = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("responseMappingTemplate", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResponseMappingTemplate = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("runtime", targetDepth))
{
var unmarshaller = AppSyncRuntimeUnmarshaller.Instance;
unmarshalledObject.Runtime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("syncConfig", targetDepth))
{
var unmarshaller = SyncConfigUnmarshaller.Instance;
unmarshalledObject.SyncConfig = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FunctionConfigurationUnmarshaller _instance = new FunctionConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FunctionConfigurationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 158 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetApiAssociation Request Marshaller
/// </summary>
public class GetApiAssociationRequestMarshaller : IMarshaller<IRequest, GetApiAssociationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetApiAssociationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetApiAssociationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetDomainName())
throw new AmazonAppSyncException("Request object does not have required field DomainName set");
request.AddPathResource("{domainName}", StringUtils.FromString(publicRequest.DomainName));
request.ResourcePath = "/v1/domainnames/{domainName}/apiassociation";
return request;
}
private static GetApiAssociationRequestMarshaller _instance = new GetApiAssociationRequestMarshaller();
internal static GetApiAssociationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetApiAssociationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetApiAssociation operation
/// </summary>
public class GetApiAssociationResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetApiAssociationResponse response = new GetApiAssociationResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("apiAssociation", targetDepth))
{
var unmarshaller = ApiAssociationUnmarshaller.Instance;
response.ApiAssociation = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetApiAssociationResponseUnmarshaller _instance = new GetApiAssociationResponseUnmarshaller();
internal static GetApiAssociationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetApiAssociationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 122 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetApiCache Request Marshaller
/// </summary>
public class GetApiCacheRequestMarshaller : IMarshaller<IRequest, GetApiCacheRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetApiCacheRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetApiCacheRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
request.ResourcePath = "/v1/apis/{apiId}/ApiCaches";
return request;
}
private static GetApiCacheRequestMarshaller _instance = new GetApiCacheRequestMarshaller();
internal static GetApiCacheRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetApiCacheRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetApiCache operation
/// </summary>
public class GetApiCacheResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetApiCacheResponse response = new GetApiCacheResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("apiCache", targetDepth))
{
var unmarshaller = ApiCacheUnmarshaller.Instance;
response.ApiCache = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetApiCacheResponseUnmarshaller _instance = new GetApiCacheResponseUnmarshaller();
internal static GetApiCacheResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetApiCacheResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 126 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetDataSource Request Marshaller
/// </summary>
public class GetDataSourceRequestMarshaller : IMarshaller<IRequest, GetDataSourceRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetDataSourceRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetDataSourceRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
if (!publicRequest.IsSetName())
throw new AmazonAppSyncException("Request object does not have required field Name set");
request.AddPathResource("{name}", StringUtils.FromString(publicRequest.Name));
request.ResourcePath = "/v1/apis/{apiId}/datasources/{name}";
return request;
}
private static GetDataSourceRequestMarshaller _instance = new GetDataSourceRequestMarshaller();
internal static GetDataSourceRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetDataSourceRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 90 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetDataSource operation
/// </summary>
public class GetDataSourceResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetDataSourceResponse response = new GetDataSourceResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("dataSource", targetDepth))
{
var unmarshaller = DataSourceUnmarshaller.Instance;
response.DataSource = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetDataSourceResponseUnmarshaller _instance = new GetDataSourceResponseUnmarshaller();
internal static GetDataSourceResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetDataSourceResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 126 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetDomainName Request Marshaller
/// </summary>
public class GetDomainNameRequestMarshaller : IMarshaller<IRequest, GetDomainNameRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetDomainNameRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetDomainNameRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetDomainName())
throw new AmazonAppSyncException("Request object does not have required field DomainName set");
request.AddPathResource("{domainName}", StringUtils.FromString(publicRequest.DomainName));
request.ResourcePath = "/v1/domainnames/{domainName}";
return request;
}
private static GetDomainNameRequestMarshaller _instance = new GetDomainNameRequestMarshaller();
internal static GetDomainNameRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetDomainNameRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetDomainName operation
/// </summary>
public class GetDomainNameResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetDomainNameResponse response = new GetDomainNameResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("domainNameConfig", targetDepth))
{
var unmarshaller = DomainNameConfigUnmarshaller.Instance;
response.DomainNameConfig = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetDomainNameResponseUnmarshaller _instance = new GetDomainNameResponseUnmarshaller();
internal static GetDomainNameResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetDomainNameResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 122 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetFunction Request Marshaller
/// </summary>
public class GetFunctionRequestMarshaller : IMarshaller<IRequest, GetFunctionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetFunctionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetFunctionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
if (!publicRequest.IsSetFunctionId())
throw new AmazonAppSyncException("Request object does not have required field FunctionId set");
request.AddPathResource("{functionId}", StringUtils.FromString(publicRequest.FunctionId));
request.ResourcePath = "/v1/apis/{apiId}/functions/{functionId}";
return request;
}
private static GetFunctionRequestMarshaller _instance = new GetFunctionRequestMarshaller();
internal static GetFunctionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetFunctionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 90 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetFunction operation
/// </summary>
public class GetFunctionResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetFunctionResponse response = new GetFunctionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("functionConfiguration", targetDepth))
{
var unmarshaller = FunctionConfigurationUnmarshaller.Instance;
response.FunctionConfiguration = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetFunctionResponseUnmarshaller _instance = new GetFunctionResponseUnmarshaller();
internal static GetFunctionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetFunctionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 118 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetGraphqlApi Request Marshaller
/// </summary>
public class GetGraphqlApiRequestMarshaller : IMarshaller<IRequest, GetGraphqlApiRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetGraphqlApiRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetGraphqlApiRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
request.ResourcePath = "/v1/apis/{apiId}";
return request;
}
private static GetGraphqlApiRequestMarshaller _instance = new GetGraphqlApiRequestMarshaller();
internal static GetGraphqlApiRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetGraphqlApiRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetGraphqlApi operation
/// </summary>
public class GetGraphqlApiResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetGraphqlApiResponse response = new GetGraphqlApiResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("graphqlApi", targetDepth))
{
var unmarshaller = GraphqlApiUnmarshaller.Instance;
response.GraphqlApi = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetGraphqlApiResponseUnmarshaller _instance = new GetGraphqlApiResponseUnmarshaller();
internal static GetGraphqlApiResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetGraphqlApiResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 126 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetIntrospectionSchema Request Marshaller
/// </summary>
public class GetIntrospectionSchemaRequestMarshaller : IMarshaller<IRequest, GetIntrospectionSchemaRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetIntrospectionSchemaRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetIntrospectionSchemaRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
if (publicRequest.IsSetFormat())
request.Parameters.Add("format", StringUtils.FromString(publicRequest.Format));
if (publicRequest.IsSetIncludeDirectives())
request.Parameters.Add("includeDirectives", StringUtils.FromBool(publicRequest.IncludeDirectives));
request.ResourcePath = "/v1/apis/{apiId}/schema";
request.UseQueryString = true;
return request;
}
private static GetIntrospectionSchemaRequestMarshaller _instance = new GetIntrospectionSchemaRequestMarshaller();
internal static GetIntrospectionSchemaRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetIntrospectionSchemaRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 94 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetIntrospectionSchema operation
/// </summary>
public class GetIntrospectionSchemaResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetIntrospectionSchemaResponse response = new GetIntrospectionSchemaResponse();
var ms = new MemoryStream();
Amazon.Util.AWSSDKUtils.CopyStream(context.Stream, ms);
ms.Seek(0, SeekOrigin.Begin);
response.Schema = ms;
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("GraphQLSchemaException"))
{
return GraphQLSchemaExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetIntrospectionSchemaResponseUnmarshaller _instance = new GetIntrospectionSchemaResponseUnmarshaller();
internal static GetIntrospectionSchemaResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetIntrospectionSchemaResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 115 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetResolver Request Marshaller
/// </summary>
public class GetResolverRequestMarshaller : IMarshaller<IRequest, GetResolverRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetResolverRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetResolverRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
if (!publicRequest.IsSetFieldName())
throw new AmazonAppSyncException("Request object does not have required field FieldName set");
request.AddPathResource("{fieldName}", StringUtils.FromString(publicRequest.FieldName));
if (!publicRequest.IsSetTypeName())
throw new AmazonAppSyncException("Request object does not have required field TypeName set");
request.AddPathResource("{typeName}", StringUtils.FromString(publicRequest.TypeName));
request.ResourcePath = "/v1/apis/{apiId}/types/{typeName}/resolvers/{fieldName}";
return request;
}
private static GetResolverRequestMarshaller _instance = new GetResolverRequestMarshaller();
internal static GetResolverRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetResolverRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 93 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetResolver operation
/// </summary>
public class GetResolverResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetResolverResponse response = new GetResolverResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("resolver", targetDepth))
{
var unmarshaller = ResolverUnmarshaller.Instance;
response.Resolver = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetResolverResponseUnmarshaller _instance = new GetResolverResponseUnmarshaller();
internal static GetResolverResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetResolverResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 118 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetSchemaCreationStatus Request Marshaller
/// </summary>
public class GetSchemaCreationStatusRequestMarshaller : IMarshaller<IRequest, GetSchemaCreationStatusRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetSchemaCreationStatusRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetSchemaCreationStatusRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
request.ResourcePath = "/v1/apis/{apiId}/schemacreation";
return request;
}
private static GetSchemaCreationStatusRequestMarshaller _instance = new GetSchemaCreationStatusRequestMarshaller();
internal static GetSchemaCreationStatusRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetSchemaCreationStatusRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetSchemaCreationStatus operation
/// </summary>
public class GetSchemaCreationStatusResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetSchemaCreationStatusResponse response = new GetSchemaCreationStatusResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("details", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Details = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetSchemaCreationStatusResponseUnmarshaller _instance = new GetSchemaCreationStatusResponseUnmarshaller();
internal static GetSchemaCreationStatusResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetSchemaCreationStatusResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 128 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetSourceApiAssociation Request Marshaller
/// </summary>
public class GetSourceApiAssociationRequestMarshaller : IMarshaller<IRequest, GetSourceApiAssociationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetSourceApiAssociationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetSourceApiAssociationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAssociationId())
throw new AmazonAppSyncException("Request object does not have required field AssociationId set");
request.AddPathResource("{associationId}", StringUtils.FromString(publicRequest.AssociationId));
if (!publicRequest.IsSetMergedApiIdentifier())
throw new AmazonAppSyncException("Request object does not have required field MergedApiIdentifier set");
request.AddPathResource("{mergedApiIdentifier}", StringUtils.FromString(publicRequest.MergedApiIdentifier));
request.ResourcePath = "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}";
return request;
}
private static GetSourceApiAssociationRequestMarshaller _instance = new GetSourceApiAssociationRequestMarshaller();
internal static GetSourceApiAssociationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetSourceApiAssociationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 90 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetSourceApiAssociation operation
/// </summary>
public class GetSourceApiAssociationResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetSourceApiAssociationResponse response = new GetSourceApiAssociationResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("sourceApiAssociation", targetDepth))
{
var unmarshaller = SourceApiAssociationUnmarshaller.Instance;
response.SourceApiAssociation = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetSourceApiAssociationResponseUnmarshaller _instance = new GetSourceApiAssociationResponseUnmarshaller();
internal static GetSourceApiAssociationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetSourceApiAssociationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 122 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetType Request Marshaller
/// </summary>
public class GetTypeRequestMarshaller : IMarshaller<IRequest, GetTypeRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetTypeRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetTypeRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
if (!publicRequest.IsSetTypeName())
throw new AmazonAppSyncException("Request object does not have required field TypeName set");
request.AddPathResource("{typeName}", StringUtils.FromString(publicRequest.TypeName));
if (publicRequest.IsSetFormat())
request.Parameters.Add("format", StringUtils.FromString(publicRequest.Format));
request.ResourcePath = "/v1/apis/{apiId}/types/{typeName}";
request.UseQueryString = true;
return request;
}
private static GetTypeRequestMarshaller _instance = new GetTypeRequestMarshaller();
internal static GetTypeRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetTypeRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 94 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetType operation
/// </summary>
public class GetTypeResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetTypeResponse response = new GetTypeResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("type", targetDepth))
{
var unmarshaller = TypeUnmarshaller.Instance;
response.Type = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetTypeResponseUnmarshaller _instance = new GetTypeResponseUnmarshaller();
internal static GetTypeResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetTypeResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 126 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GraphqlApi Object
/// </summary>
public class GraphqlApiUnmarshaller : IUnmarshaller<GraphqlApi, XmlUnmarshallerContext>, IUnmarshaller<GraphqlApi, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
GraphqlApi IUnmarshaller<GraphqlApi, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public GraphqlApi Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
GraphqlApi unmarshalledObject = new GraphqlApi();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("additionalAuthenticationProviders", targetDepth))
{
var unmarshaller = new ListUnmarshaller<AdditionalAuthenticationProvider, AdditionalAuthenticationProviderUnmarshaller>(AdditionalAuthenticationProviderUnmarshaller.Instance);
unmarshalledObject.AdditionalAuthenticationProviders = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("apiId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ApiId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("apiType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ApiType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("arn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Arn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("authenticationType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AuthenticationType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dns", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.Dns = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("lambdaAuthorizerConfig", targetDepth))
{
var unmarshaller = LambdaAuthorizerConfigUnmarshaller.Instance;
unmarshalledObject.LambdaAuthorizerConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("logConfig", targetDepth))
{
var unmarshaller = LogConfigUnmarshaller.Instance;
unmarshalledObject.LogConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("mergedApiExecutionRoleArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.MergedApiExecutionRoleArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("openIDConnectConfig", targetDepth))
{
var unmarshaller = OpenIDConnectConfigUnmarshaller.Instance;
unmarshalledObject.OpenIDConnectConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("owner", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Owner = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ownerContact", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.OwnerContact = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("tags", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.Tags = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("uris", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.Uris = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("userPoolConfig", targetDepth))
{
var unmarshaller = UserPoolConfigUnmarshaller.Instance;
unmarshalledObject.UserPoolConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("visibility", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Visibility = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("wafWebAclArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.WafWebAclArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("xrayEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.XrayEnabled = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static GraphqlApiUnmarshaller _instance = new GraphqlApiUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static GraphqlApiUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 200 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GraphQLSchemaException Object
/// </summary>
public class GraphQLSchemaExceptionUnmarshaller : IErrorResponseUnmarshaller<GraphQLSchemaException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public GraphQLSchemaException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public GraphQLSchemaException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
GraphQLSchemaException unmarshalledObject = new GraphQLSchemaException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static GraphQLSchemaExceptionUnmarshaller _instance = new GraphQLSchemaExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static GraphQLSchemaExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 85 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// HttpDataSourceConfig Marshaller
/// </summary>
public class HttpDataSourceConfigMarshaller : IRequestMarshaller<HttpDataSourceConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(HttpDataSourceConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAuthorizationConfig())
{
context.Writer.WritePropertyName("authorizationConfig");
context.Writer.WriteObjectStart();
var marshaller = AuthorizationConfigMarshaller.Instance;
marshaller.Marshall(requestObject.AuthorizationConfig, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetEndpoint())
{
context.Writer.WritePropertyName("endpoint");
context.Writer.Write(requestObject.Endpoint);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static HttpDataSourceConfigMarshaller Instance = new HttpDataSourceConfigMarshaller();
}
}
| 73 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for HttpDataSourceConfig Object
/// </summary>
public class HttpDataSourceConfigUnmarshaller : IUnmarshaller<HttpDataSourceConfig, XmlUnmarshallerContext>, IUnmarshaller<HttpDataSourceConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
HttpDataSourceConfig IUnmarshaller<HttpDataSourceConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public HttpDataSourceConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
HttpDataSourceConfig unmarshalledObject = new HttpDataSourceConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("authorizationConfig", targetDepth))
{
var unmarshaller = AuthorizationConfigUnmarshaller.Instance;
unmarshalledObject.AuthorizationConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("endpoint", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Endpoint = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static HttpDataSourceConfigUnmarshaller _instance = new HttpDataSourceConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static HttpDataSourceConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for InternalFailureException Object
/// </summary>
public class InternalFailureExceptionUnmarshaller : IErrorResponseUnmarshaller<InternalFailureException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public InternalFailureException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public InternalFailureException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
InternalFailureException unmarshalledObject = new InternalFailureException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static InternalFailureExceptionUnmarshaller _instance = new InternalFailureExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static InternalFailureExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 85 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// LambdaAuthorizerConfig Marshaller
/// </summary>
public class LambdaAuthorizerConfigMarshaller : IRequestMarshaller<LambdaAuthorizerConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(LambdaAuthorizerConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAuthorizerResultTtlInSeconds())
{
context.Writer.WritePropertyName("authorizerResultTtlInSeconds");
context.Writer.Write(requestObject.AuthorizerResultTtlInSeconds);
}
if(requestObject.IsSetAuthorizerUri())
{
context.Writer.WritePropertyName("authorizerUri");
context.Writer.Write(requestObject.AuthorizerUri);
}
if(requestObject.IsSetIdentityValidationExpression())
{
context.Writer.WritePropertyName("identityValidationExpression");
context.Writer.Write(requestObject.IdentityValidationExpression);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static LambdaAuthorizerConfigMarshaller Instance = new LambdaAuthorizerConfigMarshaller();
}
}
| 74 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LambdaAuthorizerConfig Object
/// </summary>
public class LambdaAuthorizerConfigUnmarshaller : IUnmarshaller<LambdaAuthorizerConfig, XmlUnmarshallerContext>, IUnmarshaller<LambdaAuthorizerConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
LambdaAuthorizerConfig IUnmarshaller<LambdaAuthorizerConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LambdaAuthorizerConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
LambdaAuthorizerConfig unmarshalledObject = new LambdaAuthorizerConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("authorizerResultTtlInSeconds", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.AuthorizerResultTtlInSeconds = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("authorizerUri", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AuthorizerUri = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("identityValidationExpression", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.IdentityValidationExpression = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static LambdaAuthorizerConfigUnmarshaller _instance = new LambdaAuthorizerConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LambdaAuthorizerConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 104 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// LambdaConflictHandlerConfig Marshaller
/// </summary>
public class LambdaConflictHandlerConfigMarshaller : IRequestMarshaller<LambdaConflictHandlerConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(LambdaConflictHandlerConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetLambdaConflictHandlerArn())
{
context.Writer.WritePropertyName("lambdaConflictHandlerArn");
context.Writer.Write(requestObject.LambdaConflictHandlerArn);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static LambdaConflictHandlerConfigMarshaller Instance = new LambdaConflictHandlerConfigMarshaller();
}
}
| 62 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LambdaConflictHandlerConfig Object
/// </summary>
public class LambdaConflictHandlerConfigUnmarshaller : IUnmarshaller<LambdaConflictHandlerConfig, XmlUnmarshallerContext>, IUnmarshaller<LambdaConflictHandlerConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
LambdaConflictHandlerConfig IUnmarshaller<LambdaConflictHandlerConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LambdaConflictHandlerConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
LambdaConflictHandlerConfig unmarshalledObject = new LambdaConflictHandlerConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("lambdaConflictHandlerArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LambdaConflictHandlerArn = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static LambdaConflictHandlerConfigUnmarshaller _instance = new LambdaConflictHandlerConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LambdaConflictHandlerConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 92 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// LambdaDataSourceConfig Marshaller
/// </summary>
public class LambdaDataSourceConfigMarshaller : IRequestMarshaller<LambdaDataSourceConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(LambdaDataSourceConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetLambdaFunctionArn())
{
context.Writer.WritePropertyName("lambdaFunctionArn");
context.Writer.Write(requestObject.LambdaFunctionArn);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static LambdaDataSourceConfigMarshaller Instance = new LambdaDataSourceConfigMarshaller();
}
}
| 62 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LambdaDataSourceConfig Object
/// </summary>
public class LambdaDataSourceConfigUnmarshaller : IUnmarshaller<LambdaDataSourceConfig, XmlUnmarshallerContext>, IUnmarshaller<LambdaDataSourceConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
LambdaDataSourceConfig IUnmarshaller<LambdaDataSourceConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LambdaDataSourceConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
LambdaDataSourceConfig unmarshalledObject = new LambdaDataSourceConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("lambdaFunctionArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LambdaFunctionArn = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static LambdaDataSourceConfigUnmarshaller _instance = new LambdaDataSourceConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LambdaDataSourceConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 92 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LimitExceededException Object
/// </summary>
public class LimitExceededExceptionUnmarshaller : IErrorResponseUnmarshaller<LimitExceededException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LimitExceededException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public LimitExceededException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
LimitExceededException unmarshalledObject = new LimitExceededException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static LimitExceededExceptionUnmarshaller _instance = new LimitExceededExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LimitExceededExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 85 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListApiKeys Request Marshaller
/// </summary>
public class ListApiKeysRequestMarshaller : IMarshaller<IRequest, ListApiKeysRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((ListApiKeysRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListApiKeysRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/v1/apis/{apiId}/apikeys";
request.UseQueryString = true;
return request;
}
private static ListApiKeysRequestMarshaller _instance = new ListApiKeysRequestMarshaller();
internal static ListApiKeysRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListApiKeysRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 94 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListApiKeys operation
/// </summary>
public class ListApiKeysResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ListApiKeysResponse response = new ListApiKeysResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("apiKeys", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ApiKey, ApiKeyUnmarshaller>(ApiKeyUnmarshaller.Instance);
response.ApiKeys = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListApiKeysResponseUnmarshaller _instance = new ListApiKeysResponseUnmarshaller();
internal static ListApiKeysResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListApiKeysResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 128 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListDataSources Request Marshaller
/// </summary>
public class ListDataSourcesRequestMarshaller : IMarshaller<IRequest, ListDataSourcesRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((ListDataSourcesRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListDataSourcesRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/v1/apis/{apiId}/datasources";
request.UseQueryString = true;
return request;
}
private static ListDataSourcesRequestMarshaller _instance = new ListDataSourcesRequestMarshaller();
internal static ListDataSourcesRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListDataSourcesRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 94 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListDataSources operation
/// </summary>
public class ListDataSourcesResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ListDataSourcesResponse response = new ListDataSourcesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("dataSources", targetDepth))
{
var unmarshaller = new ListUnmarshaller<DataSource, DataSourceUnmarshaller>(DataSourceUnmarshaller.Instance);
response.DataSources = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListDataSourcesResponseUnmarshaller _instance = new ListDataSourcesResponseUnmarshaller();
internal static ListDataSourcesResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListDataSourcesResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 128 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListDomainNames Request Marshaller
/// </summary>
public class ListDomainNamesRequestMarshaller : IMarshaller<IRequest, ListDomainNamesRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((ListDomainNamesRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListDomainNamesRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/v1/domainnames";
request.UseQueryString = true;
return request;
}
private static ListDomainNamesRequestMarshaller _instance = new ListDomainNamesRequestMarshaller();
internal static ListDomainNamesRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListDomainNamesRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 91 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListDomainNames operation
/// </summary>
public class ListDomainNamesResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ListDomainNamesResponse response = new ListDomainNamesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("domainNameConfigs", targetDepth))
{
var unmarshaller = new ListUnmarshaller<DomainNameConfig, DomainNameConfigUnmarshaller>(DomainNameConfigUnmarshaller.Instance);
response.DomainNameConfigs = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListDomainNamesResponseUnmarshaller _instance = new ListDomainNamesResponseUnmarshaller();
internal static ListDomainNamesResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListDomainNamesResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 124 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListFunctions Request Marshaller
/// </summary>
public class ListFunctionsRequestMarshaller : IMarshaller<IRequest, ListFunctionsRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((ListFunctionsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListFunctionsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/v1/apis/{apiId}/functions";
request.UseQueryString = true;
return request;
}
private static ListFunctionsRequestMarshaller _instance = new ListFunctionsRequestMarshaller();
internal static ListFunctionsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListFunctionsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 94 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListFunctions operation
/// </summary>
public class ListFunctionsResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ListFunctionsResponse response = new ListFunctionsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("functions", targetDepth))
{
var unmarshaller = new ListUnmarshaller<FunctionConfiguration, FunctionConfigurationUnmarshaller>(FunctionConfigurationUnmarshaller.Instance);
response.Functions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListFunctionsResponseUnmarshaller _instance = new ListFunctionsResponseUnmarshaller();
internal static ListFunctionsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListFunctionsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 128 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListGraphqlApis Request Marshaller
/// </summary>
public class ListGraphqlApisRequestMarshaller : IMarshaller<IRequest, ListGraphqlApisRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((ListGraphqlApisRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListGraphqlApisRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (publicRequest.IsSetApiType())
request.Parameters.Add("apiType", StringUtils.FromString(publicRequest.ApiType));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
if (publicRequest.IsSetOwner())
request.Parameters.Add("owner", StringUtils.FromString(publicRequest.Owner));
request.ResourcePath = "/v1/apis";
request.UseQueryString = true;
return request;
}
private static ListGraphqlApisRequestMarshaller _instance = new ListGraphqlApisRequestMarshaller();
internal static ListGraphqlApisRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListGraphqlApisRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListGraphqlApis operation
/// </summary>
public class ListGraphqlApisResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ListGraphqlApisResponse response = new ListGraphqlApisResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("graphqlApis", targetDepth))
{
var unmarshaller = new ListUnmarshaller<GraphqlApi, GraphqlApiUnmarshaller>(GraphqlApiUnmarshaller.Instance);
response.GraphqlApis = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListGraphqlApisResponseUnmarshaller _instance = new ListGraphqlApisResponseUnmarshaller();
internal static ListGraphqlApisResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListGraphqlApisResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 124 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListResolversByFunction Request Marshaller
/// </summary>
public class ListResolversByFunctionRequestMarshaller : IMarshaller<IRequest, ListResolversByFunctionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((ListResolversByFunctionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListResolversByFunctionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
if (!publicRequest.IsSetFunctionId())
throw new AmazonAppSyncException("Request object does not have required field FunctionId set");
request.AddPathResource("{functionId}", StringUtils.FromString(publicRequest.FunctionId));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/v1/apis/{apiId}/functions/{functionId}/resolvers";
request.UseQueryString = true;
return request;
}
private static ListResolversByFunctionRequestMarshaller _instance = new ListResolversByFunctionRequestMarshaller();
internal static ListResolversByFunctionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListResolversByFunctionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListResolversByFunction operation
/// </summary>
public class ListResolversByFunctionResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ListResolversByFunctionResponse response = new ListResolversByFunctionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("resolvers", targetDepth))
{
var unmarshaller = new ListUnmarshaller<Resolver, ResolverUnmarshaller>(ResolverUnmarshaller.Instance);
response.Resolvers = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListResolversByFunctionResponseUnmarshaller _instance = new ListResolversByFunctionResponseUnmarshaller();
internal static ListResolversByFunctionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListResolversByFunctionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 128 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListResolvers Request Marshaller
/// </summary>
public class ListResolversRequestMarshaller : IMarshaller<IRequest, ListResolversRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((ListResolversRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListResolversRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
if (!publicRequest.IsSetTypeName())
throw new AmazonAppSyncException("Request object does not have required field TypeName set");
request.AddPathResource("{typeName}", StringUtils.FromString(publicRequest.TypeName));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/v1/apis/{apiId}/types/{typeName}/resolvers";
request.UseQueryString = true;
return request;
}
private static ListResolversRequestMarshaller _instance = new ListResolversRequestMarshaller();
internal static ListResolversRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListResolversRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListResolvers operation
/// </summary>
public class ListResolversResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ListResolversResponse response = new ListResolversResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("resolvers", targetDepth))
{
var unmarshaller = new ListUnmarshaller<Resolver, ResolverUnmarshaller>(ResolverUnmarshaller.Instance);
response.Resolvers = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListResolversResponseUnmarshaller _instance = new ListResolversResponseUnmarshaller();
internal static ListResolversResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListResolversResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 128 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListSourceApiAssociations Request Marshaller
/// </summary>
public class ListSourceApiAssociationsRequestMarshaller : IMarshaller<IRequest, ListSourceApiAssociationsRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((ListSourceApiAssociationsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListSourceApiAssociationsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/v1/apis/{apiId}/sourceApiAssociations";
request.UseQueryString = true;
return request;
}
private static ListSourceApiAssociationsRequestMarshaller _instance = new ListSourceApiAssociationsRequestMarshaller();
internal static ListSourceApiAssociationsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListSourceApiAssociationsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 94 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListSourceApiAssociations operation
/// </summary>
public class ListSourceApiAssociationsResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ListSourceApiAssociationsResponse response = new ListSourceApiAssociationsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sourceApiAssociationSummaries", targetDepth))
{
var unmarshaller = new ListUnmarshaller<SourceApiAssociationSummary, SourceApiAssociationSummaryUnmarshaller>(SourceApiAssociationSummaryUnmarshaller.Instance);
response.SourceApiAssociationSummaries = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListSourceApiAssociationsResponseUnmarshaller _instance = new ListSourceApiAssociationsResponseUnmarshaller();
internal static ListSourceApiAssociationsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListSourceApiAssociationsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 128 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListTagsForResource Request Marshaller
/// </summary>
public class ListTagsForResourceRequestMarshaller : IMarshaller<IRequest, ListTagsForResourceRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((ListTagsForResourceRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListTagsForResourceRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetResourceArn())
throw new AmazonAppSyncException("Request object does not have required field ResourceArn set");
request.AddPathResource("{resourceArn}", StringUtils.FromString(publicRequest.ResourceArn));
request.ResourcePath = "/v1/tags/{resourceArn}";
return request;
}
private static ListTagsForResourceRequestMarshaller _instance = new ListTagsForResourceRequestMarshaller();
internal static ListTagsForResourceRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListTagsForResourceRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListTagsForResource operation
/// </summary>
public class ListTagsForResourceResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ListTagsForResourceResponse response = new ListTagsForResourceResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("tags", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
response.Tags = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListTagsForResourceResponseUnmarshaller _instance = new ListTagsForResourceResponseUnmarshaller();
internal static ListTagsForResourceResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListTagsForResourceResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 130 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListTypesByAssociation Request Marshaller
/// </summary>
public class ListTypesByAssociationRequestMarshaller : IMarshaller<IRequest, ListTypesByAssociationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((ListTypesByAssociationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListTypesByAssociationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAssociationId())
throw new AmazonAppSyncException("Request object does not have required field AssociationId set");
request.AddPathResource("{associationId}", StringUtils.FromString(publicRequest.AssociationId));
if (!publicRequest.IsSetMergedApiIdentifier())
throw new AmazonAppSyncException("Request object does not have required field MergedApiIdentifier set");
request.AddPathResource("{mergedApiIdentifier}", StringUtils.FromString(publicRequest.MergedApiIdentifier));
if (publicRequest.IsSetFormat())
request.Parameters.Add("format", StringUtils.FromString(publicRequest.Format));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}/types";
request.UseQueryString = true;
return request;
}
private static ListTypesByAssociationRequestMarshaller _instance = new ListTypesByAssociationRequestMarshaller();
internal static ListTypesByAssociationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListTypesByAssociationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 100 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListTypesByAssociation operation
/// </summary>
public class ListTypesByAssociationResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ListTypesByAssociationResponse response = new ListTypesByAssociationResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("types", targetDepth))
{
var unmarshaller = new ListUnmarshaller<Type, TypeUnmarshaller>(TypeUnmarshaller.Instance);
response.Types = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListTypesByAssociationResponseUnmarshaller _instance = new ListTypesByAssociationResponseUnmarshaller();
internal static ListTypesByAssociationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListTypesByAssociationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 132 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListTypes Request Marshaller
/// </summary>
public class ListTypesRequestMarshaller : IMarshaller<IRequest, ListTypesRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((ListTypesRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListTypesRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "GET";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
if (publicRequest.IsSetFormat())
request.Parameters.Add("format", StringUtils.FromString(publicRequest.Format));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/v1/apis/{apiId}/types";
request.UseQueryString = true;
return request;
}
private static ListTypesRequestMarshaller _instance = new ListTypesRequestMarshaller();
internal static ListTypesRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListTypesRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 97 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListTypes operation
/// </summary>
public class ListTypesResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ListTypesResponse response = new ListTypesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("types", targetDepth))
{
var unmarshaller = new ListUnmarshaller<Type, TypeUnmarshaller>(TypeUnmarshaller.Instance);
response.Types = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListTypesResponseUnmarshaller _instance = new ListTypesResponseUnmarshaller();
internal static ListTypesResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListTypesResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 132 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// LogConfig Marshaller
/// </summary>
public class LogConfigMarshaller : IRequestMarshaller<LogConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(LogConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetCloudWatchLogsRoleArn())
{
context.Writer.WritePropertyName("cloudWatchLogsRoleArn");
context.Writer.Write(requestObject.CloudWatchLogsRoleArn);
}
if(requestObject.IsSetExcludeVerboseContent())
{
context.Writer.WritePropertyName("excludeVerboseContent");
context.Writer.Write(requestObject.ExcludeVerboseContent);
}
if(requestObject.IsSetFieldLogLevel())
{
context.Writer.WritePropertyName("fieldLogLevel");
context.Writer.Write(requestObject.FieldLogLevel);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static LogConfigMarshaller Instance = new LogConfigMarshaller();
}
}
| 74 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for LogConfig Object
/// </summary>
public class LogConfigUnmarshaller : IUnmarshaller<LogConfig, XmlUnmarshallerContext>, IUnmarshaller<LogConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
LogConfig IUnmarshaller<LogConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public LogConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
LogConfig unmarshalledObject = new LogConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("cloudWatchLogsRoleArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CloudWatchLogsRoleArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("excludeVerboseContent", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.ExcludeVerboseContent = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("fieldLogLevel", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.FieldLogLevel = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static LogConfigUnmarshaller _instance = new LogConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static LogConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 104 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for NotFoundException Object
/// </summary>
public class NotFoundExceptionUnmarshaller : IErrorResponseUnmarshaller<NotFoundException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public NotFoundException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public NotFoundException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
NotFoundException unmarshalledObject = new NotFoundException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static NotFoundExceptionUnmarshaller _instance = new NotFoundExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static NotFoundExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 85 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// OpenIDConnectConfig Marshaller
/// </summary>
public class OpenIDConnectConfigMarshaller : IRequestMarshaller<OpenIDConnectConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(OpenIDConnectConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAuthTTL())
{
context.Writer.WritePropertyName("authTTL");
context.Writer.Write(requestObject.AuthTTL);
}
if(requestObject.IsSetClientId())
{
context.Writer.WritePropertyName("clientId");
context.Writer.Write(requestObject.ClientId);
}
if(requestObject.IsSetIatTTL())
{
context.Writer.WritePropertyName("iatTTL");
context.Writer.Write(requestObject.IatTTL);
}
if(requestObject.IsSetIssuer())
{
context.Writer.WritePropertyName("issuer");
context.Writer.Write(requestObject.Issuer);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static OpenIDConnectConfigMarshaller Instance = new OpenIDConnectConfigMarshaller();
}
}
| 80 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for OpenIDConnectConfig Object
/// </summary>
public class OpenIDConnectConfigUnmarshaller : IUnmarshaller<OpenIDConnectConfig, XmlUnmarshallerContext>, IUnmarshaller<OpenIDConnectConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
OpenIDConnectConfig IUnmarshaller<OpenIDConnectConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public OpenIDConnectConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
OpenIDConnectConfig unmarshalledObject = new OpenIDConnectConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("authTTL", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
unmarshalledObject.AuthTTL = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("clientId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ClientId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("iatTTL", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
unmarshalledObject.IatTTL = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("issuer", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Issuer = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static OpenIDConnectConfigUnmarshaller _instance = new OpenIDConnectConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static OpenIDConnectConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 110 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// OpenSearchServiceDataSourceConfig Marshaller
/// </summary>
public class OpenSearchServiceDataSourceConfigMarshaller : IRequestMarshaller<OpenSearchServiceDataSourceConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(OpenSearchServiceDataSourceConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAwsRegion())
{
context.Writer.WritePropertyName("awsRegion");
context.Writer.Write(requestObject.AwsRegion);
}
if(requestObject.IsSetEndpoint())
{
context.Writer.WritePropertyName("endpoint");
context.Writer.Write(requestObject.Endpoint);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static OpenSearchServiceDataSourceConfigMarshaller Instance = new OpenSearchServiceDataSourceConfigMarshaller();
}
}
| 68 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for OpenSearchServiceDataSourceConfig Object
/// </summary>
public class OpenSearchServiceDataSourceConfigUnmarshaller : IUnmarshaller<OpenSearchServiceDataSourceConfig, XmlUnmarshallerContext>, IUnmarshaller<OpenSearchServiceDataSourceConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
OpenSearchServiceDataSourceConfig IUnmarshaller<OpenSearchServiceDataSourceConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public OpenSearchServiceDataSourceConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
OpenSearchServiceDataSourceConfig unmarshalledObject = new OpenSearchServiceDataSourceConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("awsRegion", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AwsRegion = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("endpoint", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Endpoint = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static OpenSearchServiceDataSourceConfigUnmarshaller _instance = new OpenSearchServiceDataSourceConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static OpenSearchServiceDataSourceConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// PipelineConfig Marshaller
/// </summary>
public class PipelineConfigMarshaller : IRequestMarshaller<PipelineConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(PipelineConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetFunctions())
{
context.Writer.WritePropertyName("functions");
context.Writer.WriteArrayStart();
foreach(var requestObjectFunctionsListValue in requestObject.Functions)
{
context.Writer.Write(requestObjectFunctionsListValue);
}
context.Writer.WriteArrayEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static PipelineConfigMarshaller Instance = new PipelineConfigMarshaller();
}
}
| 67 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PipelineConfig Object
/// </summary>
public class PipelineConfigUnmarshaller : IUnmarshaller<PipelineConfig, XmlUnmarshallerContext>, IUnmarshaller<PipelineConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
PipelineConfig IUnmarshaller<PipelineConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public PipelineConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
PipelineConfig unmarshalledObject = new PipelineConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("functions", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.Functions = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static PipelineConfigUnmarshaller _instance = new PipelineConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static PipelineConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 92 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// RdsHttpEndpointConfig Marshaller
/// </summary>
public class RdsHttpEndpointConfigMarshaller : IRequestMarshaller<RdsHttpEndpointConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(RdsHttpEndpointConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAwsRegion())
{
context.Writer.WritePropertyName("awsRegion");
context.Writer.Write(requestObject.AwsRegion);
}
if(requestObject.IsSetAwsSecretStoreArn())
{
context.Writer.WritePropertyName("awsSecretStoreArn");
context.Writer.Write(requestObject.AwsSecretStoreArn);
}
if(requestObject.IsSetDatabaseName())
{
context.Writer.WritePropertyName("databaseName");
context.Writer.Write(requestObject.DatabaseName);
}
if(requestObject.IsSetDbClusterIdentifier())
{
context.Writer.WritePropertyName("dbClusterIdentifier");
context.Writer.Write(requestObject.DbClusterIdentifier);
}
if(requestObject.IsSetSchema())
{
context.Writer.WritePropertyName("schema");
context.Writer.Write(requestObject.Schema);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static RdsHttpEndpointConfigMarshaller Instance = new RdsHttpEndpointConfigMarshaller();
}
}
| 86 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for RdsHttpEndpointConfig Object
/// </summary>
public class RdsHttpEndpointConfigUnmarshaller : IUnmarshaller<RdsHttpEndpointConfig, XmlUnmarshallerContext>, IUnmarshaller<RdsHttpEndpointConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
RdsHttpEndpointConfig IUnmarshaller<RdsHttpEndpointConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public RdsHttpEndpointConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
RdsHttpEndpointConfig unmarshalledObject = new RdsHttpEndpointConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("awsRegion", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AwsRegion = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("awsSecretStoreArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AwsSecretStoreArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("databaseName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DatabaseName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dbClusterIdentifier", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DbClusterIdentifier = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("schema", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Schema = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static RdsHttpEndpointConfigUnmarshaller _instance = new RdsHttpEndpointConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static RdsHttpEndpointConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 116 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// RelationalDatabaseDataSourceConfig Marshaller
/// </summary>
public class RelationalDatabaseDataSourceConfigMarshaller : IRequestMarshaller<RelationalDatabaseDataSourceConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(RelationalDatabaseDataSourceConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetRdsHttpEndpointConfig())
{
context.Writer.WritePropertyName("rdsHttpEndpointConfig");
context.Writer.WriteObjectStart();
var marshaller = RdsHttpEndpointConfigMarshaller.Instance;
marshaller.Marshall(requestObject.RdsHttpEndpointConfig, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetRelationalDatabaseSourceType())
{
context.Writer.WritePropertyName("relationalDatabaseSourceType");
context.Writer.Write(requestObject.RelationalDatabaseSourceType);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static RelationalDatabaseDataSourceConfigMarshaller Instance = new RelationalDatabaseDataSourceConfigMarshaller();
}
}
| 73 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for RelationalDatabaseDataSourceConfig Object
/// </summary>
public class RelationalDatabaseDataSourceConfigUnmarshaller : IUnmarshaller<RelationalDatabaseDataSourceConfig, XmlUnmarshallerContext>, IUnmarshaller<RelationalDatabaseDataSourceConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
RelationalDatabaseDataSourceConfig IUnmarshaller<RelationalDatabaseDataSourceConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public RelationalDatabaseDataSourceConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
RelationalDatabaseDataSourceConfig unmarshalledObject = new RelationalDatabaseDataSourceConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("rdsHttpEndpointConfig", targetDepth))
{
var unmarshaller = RdsHttpEndpointConfigUnmarshaller.Instance;
unmarshalledObject.RdsHttpEndpointConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("relationalDatabaseSourceType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.RelationalDatabaseSourceType = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static RelationalDatabaseDataSourceConfigUnmarshaller _instance = new RelationalDatabaseDataSourceConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static RelationalDatabaseDataSourceConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 98 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Resolver Object
/// </summary>
public class ResolverUnmarshaller : IUnmarshaller<Resolver, XmlUnmarshallerContext>, IUnmarshaller<Resolver, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Resolver IUnmarshaller<Resolver, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public Resolver Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Resolver unmarshalledObject = new Resolver();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("cachingConfig", targetDepth))
{
var unmarshaller = CachingConfigUnmarshaller.Instance;
unmarshalledObject.CachingConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("code", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Code = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dataSourceName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DataSourceName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("fieldName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.FieldName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("kind", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Kind = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("maxBatchSize", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MaxBatchSize = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("pipelineConfig", targetDepth))
{
var unmarshaller = PipelineConfigUnmarshaller.Instance;
unmarshalledObject.PipelineConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("requestMappingTemplate", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.RequestMappingTemplate = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("resolverArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResolverArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("responseMappingTemplate", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResponseMappingTemplate = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("runtime", targetDepth))
{
var unmarshaller = AppSyncRuntimeUnmarshaller.Instance;
unmarshalledObject.Runtime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("syncConfig", targetDepth))
{
var unmarshaller = SyncConfigUnmarshaller.Instance;
unmarshalledObject.SyncConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("typeName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TypeName = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ResolverUnmarshaller _instance = new ResolverUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ResolverUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 164 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// SourceApiAssociationConfig Marshaller
/// </summary>
public class SourceApiAssociationConfigMarshaller : IRequestMarshaller<SourceApiAssociationConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(SourceApiAssociationConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetMergeType())
{
context.Writer.WritePropertyName("mergeType");
context.Writer.Write(requestObject.MergeType);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static SourceApiAssociationConfigMarshaller Instance = new SourceApiAssociationConfigMarshaller();
}
}
| 62 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SourceApiAssociationConfig Object
/// </summary>
public class SourceApiAssociationConfigUnmarshaller : IUnmarshaller<SourceApiAssociationConfig, XmlUnmarshallerContext>, IUnmarshaller<SourceApiAssociationConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SourceApiAssociationConfig IUnmarshaller<SourceApiAssociationConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public SourceApiAssociationConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SourceApiAssociationConfig unmarshalledObject = new SourceApiAssociationConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("mergeType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.MergeType = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SourceApiAssociationConfigUnmarshaller _instance = new SourceApiAssociationConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SourceApiAssociationConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 92 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SourceApiAssociationSummary Object
/// </summary>
public class SourceApiAssociationSummaryUnmarshaller : IUnmarshaller<SourceApiAssociationSummary, XmlUnmarshallerContext>, IUnmarshaller<SourceApiAssociationSummary, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SourceApiAssociationSummary IUnmarshaller<SourceApiAssociationSummary, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public SourceApiAssociationSummary Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SourceApiAssociationSummary unmarshalledObject = new SourceApiAssociationSummary();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("associationArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AssociationArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("associationId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AssociationId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("mergedApiArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.MergedApiArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("mergedApiId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.MergedApiId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sourceApiArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceApiArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sourceApiId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceApiId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SourceApiAssociationSummaryUnmarshaller _instance = new SourceApiAssociationSummaryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SourceApiAssociationSummaryUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 128 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SourceApiAssociation Object
/// </summary>
public class SourceApiAssociationUnmarshaller : IUnmarshaller<SourceApiAssociation, XmlUnmarshallerContext>, IUnmarshaller<SourceApiAssociation, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SourceApiAssociation IUnmarshaller<SourceApiAssociation, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public SourceApiAssociation Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SourceApiAssociation unmarshalledObject = new SourceApiAssociation();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("associationArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AssociationArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("associationId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AssociationId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("lastSuccessfulMergeDate", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.LastSuccessfulMergeDate = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("mergedApiArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.MergedApiArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("mergedApiId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.MergedApiId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sourceApiArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceApiArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sourceApiAssociationConfig", targetDepth))
{
var unmarshaller = SourceApiAssociationConfigUnmarshaller.Instance;
unmarshalledObject.SourceApiAssociationConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sourceApiAssociationStatus", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceApiAssociationStatus = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sourceApiAssociationStatusDetail", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceApiAssociationStatusDetail = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sourceApiId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceApiId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SourceApiAssociationUnmarshaller _instance = new SourceApiAssociationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SourceApiAssociationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 152 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// StartSchemaCreation Request Marshaller
/// </summary>
public class StartSchemaCreationRequestMarshaller : IMarshaller<IRequest, StartSchemaCreationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((StartSchemaCreationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(StartSchemaCreationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AppSync");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-07-25";
request.HttpMethod = "POST";
if (!publicRequest.IsSetApiId())
throw new AmazonAppSyncException("Request object does not have required field ApiId set");
request.AddPathResource("{apiId}", StringUtils.FromString(publicRequest.ApiId));
request.ResourcePath = "/v1/apis/{apiId}/schemacreation";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetDefinition())
{
context.Writer.WritePropertyName("definition");
context.Writer.Write(StringUtils.FromMemoryStream(publicRequest.Definition));
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static StartSchemaCreationRequestMarshaller _instance = new StartSchemaCreationRequestMarshaller();
internal static StartSchemaCreationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static StartSchemaCreationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 104 |
aws-sdk-net
|
aws
|
C#
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.AppSync.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AppSync.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for StartSchemaCreation operation
/// </summary>
public class StartSchemaCreationResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
StartSchemaCreationResponse response = new StartSchemaCreationResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException"))
{
return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException"))
{
return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static StartSchemaCreationResponseUnmarshaller _instance = new StartSchemaCreationResponseUnmarshaller();
internal static StartSchemaCreationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static StartSchemaCreationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 126 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.