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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for RestorePhoneNumber operation
/// </summary>
public class RestorePhoneNumberResponseUnmarshaller : 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)
{
RestorePhoneNumberResponse response = new RestorePhoneNumberResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PhoneNumber", targetDepth))
{
var unmarshaller = PhoneNumberUnmarshaller.Instance;
response.PhoneNumber = 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("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static RestorePhoneNumberResponseUnmarshaller _instance = new RestorePhoneNumberResponseUnmarshaller();
internal static RestorePhoneNumberResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static RestorePhoneNumberResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 138 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// SearchAvailablePhoneNumbers Request Marshaller
/// </summary>
public class SearchAvailablePhoneNumbersRequestMarshaller : IMarshaller<IRequest, SearchAvailablePhoneNumbersRequest> , 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((SearchAvailablePhoneNumbersRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(SearchAvailablePhoneNumbersRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "GET";
request.AddSubResource("type", "phone-numbers");
if (publicRequest.IsSetAreaCode())
request.Parameters.Add("area-code", StringUtils.FromString(publicRequest.AreaCode));
if (publicRequest.IsSetCity())
request.Parameters.Add("city", StringUtils.FromString(publicRequest.City));
if (publicRequest.IsSetCountry())
request.Parameters.Add("country", StringUtils.FromString(publicRequest.Country));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("max-results", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("next-token", StringUtils.FromString(publicRequest.NextToken));
if (publicRequest.IsSetPhoneNumberType())
request.Parameters.Add("phone-number-type", StringUtils.FromString(publicRequest.PhoneNumberType));
if (publicRequest.IsSetState())
request.Parameters.Add("state", StringUtils.FromString(publicRequest.State));
if (publicRequest.IsSetTollFreePrefix())
request.Parameters.Add("toll-free-prefix", StringUtils.FromString(publicRequest.TollFreePrefix));
request.ResourcePath = "/search";
request.UseQueryString = true;
return request;
}
private static SearchAvailablePhoneNumbersRequestMarshaller _instance = new SearchAvailablePhoneNumbersRequestMarshaller();
internal static SearchAvailablePhoneNumbersRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static SearchAvailablePhoneNumbersRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SearchAvailablePhoneNumbers operation
/// </summary>
public class SearchAvailablePhoneNumbersResponseUnmarshaller : 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)
{
SearchAvailablePhoneNumbersResponse response = new SearchAvailablePhoneNumbersResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("E164PhoneNumbers", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
response.E164PhoneNumbers = 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("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static SearchAvailablePhoneNumbersResponseUnmarshaller _instance = new SearchAvailablePhoneNumbersResponseUnmarshaller();
internal static SearchAvailablePhoneNumbersResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static SearchAvailablePhoneNumbersResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 140 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// ServerSideEncryptionConfiguration Marshaller
/// </summary>
public class ServerSideEncryptionConfigurationMarshaller : IRequestMarshaller<ServerSideEncryptionConfiguration, 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(ServerSideEncryptionConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetKmsKeyArn())
{
context.Writer.WritePropertyName("KmsKeyArn");
context.Writer.Write(requestObject.KmsKeyArn);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ServerSideEncryptionConfigurationMarshaller Instance = new ServerSideEncryptionConfigurationMarshaller();
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ServerSideEncryptionConfiguration Object
/// </summary>
public class ServerSideEncryptionConfigurationUnmarshaller : IUnmarshaller<ServerSideEncryptionConfiguration, XmlUnmarshallerContext>, IUnmarshaller<ServerSideEncryptionConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ServerSideEncryptionConfiguration IUnmarshaller<ServerSideEncryptionConfiguration, 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 ServerSideEncryptionConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ServerSideEncryptionConfiguration unmarshalledObject = new ServerSideEncryptionConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("KmsKeyArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.KmsKeyArn = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ServerSideEncryptionConfigurationUnmarshaller _instance = new ServerSideEncryptionConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ServerSideEncryptionConfigurationUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ServiceFailureException Object
/// </summary>
public class ServiceFailureExceptionUnmarshaller : IErrorResponseUnmarshaller<ServiceFailureException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ServiceFailureException 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 ServiceFailureException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
ServiceFailureException unmarshalledObject = new ServiceFailureException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static ServiceFailureExceptionUnmarshaller _instance = new ServiceFailureExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ServiceFailureExceptionUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ServiceUnavailableException Object
/// </summary>
public class ServiceUnavailableExceptionUnmarshaller : IErrorResponseUnmarshaller<ServiceUnavailableException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ServiceUnavailableException 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 ServiceUnavailableException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
ServiceUnavailableException unmarshalledObject = new ServiceUnavailableException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static ServiceUnavailableExceptionUnmarshaller _instance = new ServiceUnavailableExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ServiceUnavailableExceptionUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// SipMediaApplicationAlexaSkillConfiguration Marshaller
/// </summary>
public class SipMediaApplicationAlexaSkillConfigurationMarshaller : IRequestMarshaller<SipMediaApplicationAlexaSkillConfiguration, 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(SipMediaApplicationAlexaSkillConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAlexaSkillIds())
{
context.Writer.WritePropertyName("AlexaSkillIds");
context.Writer.WriteArrayStart();
foreach(var requestObjectAlexaSkillIdsListValue in requestObject.AlexaSkillIds)
{
context.Writer.Write(requestObjectAlexaSkillIdsListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetAlexaSkillStatus())
{
context.Writer.WritePropertyName("AlexaSkillStatus");
context.Writer.Write(requestObject.AlexaSkillStatus);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static SipMediaApplicationAlexaSkillConfigurationMarshaller Instance = new SipMediaApplicationAlexaSkillConfigurationMarshaller();
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SipMediaApplicationAlexaSkillConfiguration Object
/// </summary>
public class SipMediaApplicationAlexaSkillConfigurationUnmarshaller : IUnmarshaller<SipMediaApplicationAlexaSkillConfiguration, XmlUnmarshallerContext>, IUnmarshaller<SipMediaApplicationAlexaSkillConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SipMediaApplicationAlexaSkillConfiguration IUnmarshaller<SipMediaApplicationAlexaSkillConfiguration, 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 SipMediaApplicationAlexaSkillConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SipMediaApplicationAlexaSkillConfiguration unmarshalledObject = new SipMediaApplicationAlexaSkillConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("AlexaSkillIds", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.AlexaSkillIds = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("AlexaSkillStatus", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AlexaSkillStatus = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SipMediaApplicationAlexaSkillConfigurationUnmarshaller _instance = new SipMediaApplicationAlexaSkillConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SipMediaApplicationAlexaSkillConfigurationUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SipMediaApplicationCall Object
/// </summary>
public class SipMediaApplicationCallUnmarshaller : IUnmarshaller<SipMediaApplicationCall, XmlUnmarshallerContext>, IUnmarshaller<SipMediaApplicationCall, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SipMediaApplicationCall IUnmarshaller<SipMediaApplicationCall, 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 SipMediaApplicationCall Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SipMediaApplicationCall unmarshalledObject = new SipMediaApplicationCall();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("TransactionId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TransactionId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SipMediaApplicationCallUnmarshaller _instance = new SipMediaApplicationCallUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SipMediaApplicationCallUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// SipMediaApplicationEndpoint Marshaller
/// </summary>
public class SipMediaApplicationEndpointMarshaller : IRequestMarshaller<SipMediaApplicationEndpoint, 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(SipMediaApplicationEndpoint requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetLambdaArn())
{
context.Writer.WritePropertyName("LambdaArn");
context.Writer.Write(requestObject.LambdaArn);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static SipMediaApplicationEndpointMarshaller Instance = new SipMediaApplicationEndpointMarshaller();
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SipMediaApplicationEndpoint Object
/// </summary>
public class SipMediaApplicationEndpointUnmarshaller : IUnmarshaller<SipMediaApplicationEndpoint, XmlUnmarshallerContext>, IUnmarshaller<SipMediaApplicationEndpoint, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SipMediaApplicationEndpoint IUnmarshaller<SipMediaApplicationEndpoint, 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 SipMediaApplicationEndpoint Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SipMediaApplicationEndpoint unmarshalledObject = new SipMediaApplicationEndpoint();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("LambdaArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LambdaArn = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SipMediaApplicationEndpointUnmarshaller _instance = new SipMediaApplicationEndpointUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SipMediaApplicationEndpointUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// SipMediaApplicationLoggingConfiguration Marshaller
/// </summary>
public class SipMediaApplicationLoggingConfigurationMarshaller : IRequestMarshaller<SipMediaApplicationLoggingConfiguration, 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(SipMediaApplicationLoggingConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetEnableSipMediaApplicationMessageLogs())
{
context.Writer.WritePropertyName("EnableSipMediaApplicationMessageLogs");
context.Writer.Write(requestObject.EnableSipMediaApplicationMessageLogs);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static SipMediaApplicationLoggingConfigurationMarshaller Instance = new SipMediaApplicationLoggingConfigurationMarshaller();
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SipMediaApplicationLoggingConfiguration Object
/// </summary>
public class SipMediaApplicationLoggingConfigurationUnmarshaller : IUnmarshaller<SipMediaApplicationLoggingConfiguration, XmlUnmarshallerContext>, IUnmarshaller<SipMediaApplicationLoggingConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SipMediaApplicationLoggingConfiguration IUnmarshaller<SipMediaApplicationLoggingConfiguration, 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 SipMediaApplicationLoggingConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SipMediaApplicationLoggingConfiguration unmarshalledObject = new SipMediaApplicationLoggingConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("EnableSipMediaApplicationMessageLogs", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EnableSipMediaApplicationMessageLogs = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SipMediaApplicationLoggingConfigurationUnmarshaller _instance = new SipMediaApplicationLoggingConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SipMediaApplicationLoggingConfigurationUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SipMediaApplication Object
/// </summary>
public class SipMediaApplicationUnmarshaller : IUnmarshaller<SipMediaApplication, XmlUnmarshallerContext>, IUnmarshaller<SipMediaApplication, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SipMediaApplication IUnmarshaller<SipMediaApplication, 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 SipMediaApplication Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SipMediaApplication unmarshalledObject = new SipMediaApplication();
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("CreatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Endpoints", targetDepth))
{
var unmarshaller = new ListUnmarshaller<SipMediaApplicationEndpoint, SipMediaApplicationEndpointUnmarshaller>(SipMediaApplicationEndpointUnmarshaller.Instance);
unmarshalledObject.Endpoints = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SipMediaApplicationArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SipMediaApplicationArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SipMediaApplicationId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SipMediaApplicationId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UpdatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.UpdatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SipMediaApplicationUnmarshaller _instance = new SipMediaApplicationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SipMediaApplicationUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// SipRuleTargetApplication Marshaller
/// </summary>
public class SipRuleTargetApplicationMarshaller : IRequestMarshaller<SipRuleTargetApplication, 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(SipRuleTargetApplication requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAwsRegion())
{
context.Writer.WritePropertyName("AwsRegion");
context.Writer.Write(requestObject.AwsRegion);
}
if(requestObject.IsSetPriority())
{
context.Writer.WritePropertyName("Priority");
context.Writer.Write(requestObject.Priority);
}
if(requestObject.IsSetSipMediaApplicationId())
{
context.Writer.WritePropertyName("SipMediaApplicationId");
context.Writer.Write(requestObject.SipMediaApplicationId);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static SipRuleTargetApplicationMarshaller Instance = new SipRuleTargetApplicationMarshaller();
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SipRuleTargetApplication Object
/// </summary>
public class SipRuleTargetApplicationUnmarshaller : IUnmarshaller<SipRuleTargetApplication, XmlUnmarshallerContext>, IUnmarshaller<SipRuleTargetApplication, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SipRuleTargetApplication IUnmarshaller<SipRuleTargetApplication, 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 SipRuleTargetApplication Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SipRuleTargetApplication unmarshalledObject = new SipRuleTargetApplication();
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("Priority", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Priority = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SipMediaApplicationId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SipMediaApplicationId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SipRuleTargetApplicationUnmarshaller _instance = new SipRuleTargetApplicationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SipRuleTargetApplicationUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SipRule Object
/// </summary>
public class SipRuleUnmarshaller : IUnmarshaller<SipRule, XmlUnmarshallerContext>, IUnmarshaller<SipRule, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SipRule IUnmarshaller<SipRule, 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 SipRule Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SipRule unmarshalledObject = new SipRule();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CreatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Disabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Disabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SipRuleId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SipRuleId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TargetApplications", targetDepth))
{
var unmarshaller = new ListUnmarshaller<SipRuleTargetApplication, SipRuleTargetApplicationUnmarshaller>(SipRuleTargetApplicationUnmarshaller.Instance);
unmarshalledObject.TargetApplications = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TriggerType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TriggerType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TriggerValue", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TriggerValue = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UpdatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.UpdatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SipRuleUnmarshaller _instance = new SipRuleUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SipRuleUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 134 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SpeakerSearchDetails Object
/// </summary>
public class SpeakerSearchDetailsUnmarshaller : IUnmarshaller<SpeakerSearchDetails, XmlUnmarshallerContext>, IUnmarshaller<SpeakerSearchDetails, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SpeakerSearchDetails IUnmarshaller<SpeakerSearchDetails, 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 SpeakerSearchDetails Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SpeakerSearchDetails unmarshalledObject = new SpeakerSearchDetails();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Results", targetDepth))
{
var unmarshaller = new ListUnmarshaller<SpeakerSearchResult, SpeakerSearchResultUnmarshaller>(SpeakerSearchResultUnmarshaller.Instance);
unmarshalledObject.Results = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceprintGenerationStatus", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceprintGenerationStatus = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SpeakerSearchDetailsUnmarshaller _instance = new SpeakerSearchDetailsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SpeakerSearchDetailsUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SpeakerSearchResult Object
/// </summary>
public class SpeakerSearchResultUnmarshaller : IUnmarshaller<SpeakerSearchResult, XmlUnmarshallerContext>, IUnmarshaller<SpeakerSearchResult, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SpeakerSearchResult IUnmarshaller<SpeakerSearchResult, 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 SpeakerSearchResult Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SpeakerSearchResult unmarshalledObject = new SpeakerSearchResult();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ConfidenceScore", targetDepth))
{
var unmarshaller = FloatUnmarshaller.Instance;
unmarshalledObject.ConfidenceScore = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceProfileId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceProfileId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SpeakerSearchResultUnmarshaller _instance = new SpeakerSearchResultUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SpeakerSearchResultUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for SpeakerSearchTask Object
/// </summary>
public class SpeakerSearchTaskUnmarshaller : IUnmarshaller<SpeakerSearchTask, XmlUnmarshallerContext>, IUnmarshaller<SpeakerSearchTask, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
SpeakerSearchTask IUnmarshaller<SpeakerSearchTask, 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 SpeakerSearchTask Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
SpeakerSearchTask unmarshalledObject = new SpeakerSearchTask();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CallDetails", targetDepth))
{
var unmarshaller = CallDetailsUnmarshaller.Instance;
unmarshalledObject.CallDetails = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SpeakerSearchDetails", targetDepth))
{
var unmarshaller = SpeakerSearchDetailsUnmarshaller.Instance;
unmarshalledObject.SpeakerSearchDetails = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SpeakerSearchTaskId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SpeakerSearchTaskId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SpeakerSearchTaskStatus", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SpeakerSearchTaskStatus = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StartedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.StartedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StatusMessage", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StatusMessage = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UpdatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.UpdatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static SpeakerSearchTaskUnmarshaller _instance = new SpeakerSearchTaskUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static SpeakerSearchTaskUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 134 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// StartSpeakerSearchTask Request Marshaller
/// </summary>
public class StartSpeakerSearchTaskRequestMarshaller : IMarshaller<IRequest, StartSpeakerSearchTaskRequest> , 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((StartSpeakerSearchTaskRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(StartSpeakerSearchTaskRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{VoiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{VoiceConnectorId}/speaker-search-tasks";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetCallLeg())
{
context.Writer.WritePropertyName("CallLeg");
context.Writer.Write(publicRequest.CallLeg);
}
if(publicRequest.IsSetClientRequestToken())
{
context.Writer.WritePropertyName("ClientRequestToken");
context.Writer.Write(publicRequest.ClientRequestToken);
}
if(publicRequest.IsSetTransactionId())
{
context.Writer.WritePropertyName("TransactionId");
context.Writer.Write(publicRequest.TransactionId);
}
if(publicRequest.IsSetVoiceProfileDomainId())
{
context.Writer.WritePropertyName("VoiceProfileDomainId");
context.Writer.Write(publicRequest.VoiceProfileDomainId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static StartSpeakerSearchTaskRequestMarshaller _instance = new StartSpeakerSearchTaskRequestMarshaller();
internal static StartSpeakerSearchTaskRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static StartSpeakerSearchTaskRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for StartSpeakerSearchTask operation
/// </summary>
public class StartSpeakerSearchTaskResponseUnmarshaller : 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)
{
StartSpeakerSearchTaskResponse response = new StartSpeakerSearchTaskResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("SpeakerSearchTask", targetDepth))
{
var unmarshaller = SpeakerSearchTaskUnmarshaller.Instance;
response.SpeakerSearchTask = 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("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GoneException"))
{
return GoneExceptionUnmarshaller.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("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnprocessableEntityException"))
{
return UnprocessableEntityExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static StartSpeakerSearchTaskResponseUnmarshaller _instance = new StartSpeakerSearchTaskResponseUnmarshaller();
internal static StartSpeakerSearchTaskResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static StartSpeakerSearchTaskResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 154 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// StartVoiceToneAnalysisTask Request Marshaller
/// </summary>
public class StartVoiceToneAnalysisTaskRequestMarshaller : IMarshaller<IRequest, StartVoiceToneAnalysisTaskRequest> , 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((StartVoiceToneAnalysisTaskRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(StartVoiceToneAnalysisTaskRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{VoiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{VoiceConnectorId}/voice-tone-analysis-tasks";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetClientRequestToken())
{
context.Writer.WritePropertyName("ClientRequestToken");
context.Writer.Write(publicRequest.ClientRequestToken);
}
if(publicRequest.IsSetLanguageCode())
{
context.Writer.WritePropertyName("LanguageCode");
context.Writer.Write(publicRequest.LanguageCode);
}
if(publicRequest.IsSetTransactionId())
{
context.Writer.WritePropertyName("TransactionId");
context.Writer.Write(publicRequest.TransactionId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static StartVoiceToneAnalysisTaskRequestMarshaller _instance = new StartVoiceToneAnalysisTaskRequestMarshaller();
internal static StartVoiceToneAnalysisTaskRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static StartVoiceToneAnalysisTaskRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for StartVoiceToneAnalysisTask operation
/// </summary>
public class StartVoiceToneAnalysisTaskResponseUnmarshaller : 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)
{
StartVoiceToneAnalysisTaskResponse response = new StartVoiceToneAnalysisTaskResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("VoiceToneAnalysisTask", targetDepth))
{
var unmarshaller = VoiceToneAnalysisTaskUnmarshaller.Instance;
response.VoiceToneAnalysisTask = 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("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GoneException"))
{
return GoneExceptionUnmarshaller.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("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnprocessableEntityException"))
{
return UnprocessableEntityExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static StartVoiceToneAnalysisTaskResponseUnmarshaller _instance = new StartVoiceToneAnalysisTaskResponseUnmarshaller();
internal static StartVoiceToneAnalysisTaskResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static StartVoiceToneAnalysisTaskResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 154 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// StopSpeakerSearchTask Request Marshaller
/// </summary>
public class StopSpeakerSearchTaskRequestMarshaller : IMarshaller<IRequest, StopSpeakerSearchTaskRequest> , 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((StopSpeakerSearchTaskRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(StopSpeakerSearchTaskRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.AddSubResource("operation", "stop");
if (!publicRequest.IsSetSpeakerSearchTaskId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field SpeakerSearchTaskId set");
request.AddPathResource("{SpeakerSearchTaskId}", StringUtils.FromString(publicRequest.SpeakerSearchTaskId));
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{VoiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{VoiceConnectorId}/speaker-search-tasks/{SpeakerSearchTaskId}";
return request;
}
private static StopSpeakerSearchTaskRequestMarshaller _instance = new StopSpeakerSearchTaskRequestMarshaller();
internal static StopSpeakerSearchTaskRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static StopSpeakerSearchTaskRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for StopSpeakerSearchTask operation
/// </summary>
public class StopSpeakerSearchTaskResponseUnmarshaller : 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)
{
StopSpeakerSearchTaskResponse response = new StopSpeakerSearchTaskResponse();
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("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnprocessableEntityException"))
{
return UnprocessableEntityExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static StopSpeakerSearchTaskResponseUnmarshaller _instance = new StopSpeakerSearchTaskResponseUnmarshaller();
internal static StopSpeakerSearchTaskResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static StopSpeakerSearchTaskResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 135 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// StopVoiceToneAnalysisTask Request Marshaller
/// </summary>
public class StopVoiceToneAnalysisTaskRequestMarshaller : IMarshaller<IRequest, StopVoiceToneAnalysisTaskRequest> , 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((StopVoiceToneAnalysisTaskRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(StopVoiceToneAnalysisTaskRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.AddSubResource("operation", "stop");
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{VoiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
if (!publicRequest.IsSetVoiceToneAnalysisTaskId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceToneAnalysisTaskId set");
request.AddPathResource("{VoiceToneAnalysisTaskId}", StringUtils.FromString(publicRequest.VoiceToneAnalysisTaskId));
request.ResourcePath = "/voice-connectors/{VoiceConnectorId}/voice-tone-analysis-tasks/{VoiceToneAnalysisTaskId}";
return request;
}
private static StopVoiceToneAnalysisTaskRequestMarshaller _instance = new StopVoiceToneAnalysisTaskRequestMarshaller();
internal static StopVoiceToneAnalysisTaskRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static StopVoiceToneAnalysisTaskRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for StopVoiceToneAnalysisTask operation
/// </summary>
public class StopVoiceToneAnalysisTaskResponseUnmarshaller : 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)
{
StopVoiceToneAnalysisTaskResponse response = new StopVoiceToneAnalysisTaskResponse();
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("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnprocessableEntityException"))
{
return UnprocessableEntityExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static StopVoiceToneAnalysisTaskResponseUnmarshaller _instance = new StopVoiceToneAnalysisTaskResponseUnmarshaller();
internal static StopVoiceToneAnalysisTaskResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static StopVoiceToneAnalysisTaskResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 135 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// StreamingConfiguration Marshaller
/// </summary>
public class StreamingConfigurationMarshaller : IRequestMarshaller<StreamingConfiguration, 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(StreamingConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetDataRetentionInHours())
{
context.Writer.WritePropertyName("DataRetentionInHours");
context.Writer.Write(requestObject.DataRetentionInHours);
}
if(requestObject.IsSetDisabled())
{
context.Writer.WritePropertyName("Disabled");
context.Writer.Write(requestObject.Disabled);
}
if(requestObject.IsSetMediaInsightsConfiguration())
{
context.Writer.WritePropertyName("MediaInsightsConfiguration");
context.Writer.WriteObjectStart();
var marshaller = MediaInsightsConfigurationMarshaller.Instance;
marshaller.Marshall(requestObject.MediaInsightsConfiguration, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetStreamingNotificationTargets())
{
context.Writer.WritePropertyName("StreamingNotificationTargets");
context.Writer.WriteArrayStart();
foreach(var requestObjectStreamingNotificationTargetsListValue in requestObject.StreamingNotificationTargets)
{
context.Writer.WriteObjectStart();
var marshaller = StreamingNotificationTargetMarshaller.Instance;
marshaller.Marshall(requestObjectStreamingNotificationTargetsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static StreamingConfigurationMarshaller Instance = new StreamingConfigurationMarshaller();
}
}
| 95 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for StreamingConfiguration Object
/// </summary>
public class StreamingConfigurationUnmarshaller : IUnmarshaller<StreamingConfiguration, XmlUnmarshallerContext>, IUnmarshaller<StreamingConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
StreamingConfiguration IUnmarshaller<StreamingConfiguration, 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 StreamingConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
StreamingConfiguration unmarshalledObject = new StreamingConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("DataRetentionInHours", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.DataRetentionInHours = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Disabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Disabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MediaInsightsConfiguration", targetDepth))
{
var unmarshaller = MediaInsightsConfigurationUnmarshaller.Instance;
unmarshalledObject.MediaInsightsConfiguration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StreamingNotificationTargets", targetDepth))
{
var unmarshaller = new ListUnmarshaller<StreamingNotificationTarget, StreamingNotificationTargetUnmarshaller>(StreamingNotificationTargetUnmarshaller.Instance);
unmarshalledObject.StreamingNotificationTargets = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static StreamingConfigurationUnmarshaller _instance = new StreamingConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static StreamingConfigurationUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// StreamingNotificationTarget Marshaller
/// </summary>
public class StreamingNotificationTargetMarshaller : IRequestMarshaller<StreamingNotificationTarget, 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(StreamingNotificationTarget requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetNotificationTarget())
{
context.Writer.WritePropertyName("NotificationTarget");
context.Writer.Write(requestObject.NotificationTarget);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static StreamingNotificationTargetMarshaller Instance = new StreamingNotificationTargetMarshaller();
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for StreamingNotificationTarget Object
/// </summary>
public class StreamingNotificationTargetUnmarshaller : IUnmarshaller<StreamingNotificationTarget, XmlUnmarshallerContext>, IUnmarshaller<StreamingNotificationTarget, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
StreamingNotificationTarget IUnmarshaller<StreamingNotificationTarget, 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 StreamingNotificationTarget Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
StreamingNotificationTarget unmarshalledObject = new StreamingNotificationTarget();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("NotificationTarget", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.NotificationTarget = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static StreamingNotificationTargetUnmarshaller _instance = new StreamingNotificationTargetUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static StreamingNotificationTargetUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Tag Marshaller
/// </summary>
public class TagMarshaller : IRequestMarshaller<Tag, 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(Tag requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetKey())
{
context.Writer.WritePropertyName("Key");
context.Writer.Write(requestObject.Key);
}
if(requestObject.IsSetValue())
{
context.Writer.WritePropertyName("Value");
context.Writer.Write(requestObject.Value);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static TagMarshaller Instance = new TagMarshaller();
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// TagResource Request Marshaller
/// </summary>
public class TagResourceRequestMarshaller : IMarshaller<IRequest, TagResourceRequest> , 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((TagResourceRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(TagResourceRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.AddSubResource("operation", "tag-resource");
request.ResourcePath = "/tags";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetResourceARN())
{
context.Writer.WritePropertyName("ResourceARN");
context.Writer.Write(publicRequest.ResourceARN);
}
if(publicRequest.IsSetTags())
{
context.Writer.WritePropertyName("Tags");
context.Writer.WriteArrayStart();
foreach(var publicRequestTagsListValue in publicRequest.Tags)
{
context.Writer.WriteObjectStart();
var marshaller = TagMarshaller.Instance;
marshaller.Marshall(publicRequestTagsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static TagResourceRequestMarshaller _instance = new TagResourceRequestMarshaller();
internal static TagResourceRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static TagResourceRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for TagResource operation
/// </summary>
public class TagResourceResponseUnmarshaller : 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)
{
TagResourceResponse response = new TagResourceResponse();
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("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static TagResourceResponseUnmarshaller _instance = new TagResourceResponseUnmarshaller();
internal static TagResourceResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static TagResourceResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 123 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Tag Object
/// </summary>
public class TagUnmarshaller : IUnmarshaller<Tag, XmlUnmarshallerContext>, IUnmarshaller<Tag, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Tag IUnmarshaller<Tag, 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 Tag Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Tag unmarshalledObject = new Tag();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Key", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Key = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Value", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Value = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static TagUnmarshaller _instance = new TagUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TagUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for TerminationHealth Object
/// </summary>
public class TerminationHealthUnmarshaller : IUnmarshaller<TerminationHealth, XmlUnmarshallerContext>, IUnmarshaller<TerminationHealth, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
TerminationHealth IUnmarshaller<TerminationHealth, 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 TerminationHealth Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
TerminationHealth unmarshalledObject = new TerminationHealth();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Source", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Source = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Timestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.Timestamp = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static TerminationHealthUnmarshaller _instance = new TerminationHealthUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TerminationHealthUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Termination Marshaller
/// </summary>
public class TerminationMarshaller : IRequestMarshaller<Termination, 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(Termination requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetCallingRegions())
{
context.Writer.WritePropertyName("CallingRegions");
context.Writer.WriteArrayStart();
foreach(var requestObjectCallingRegionsListValue in requestObject.CallingRegions)
{
context.Writer.Write(requestObjectCallingRegionsListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetCidrAllowedList())
{
context.Writer.WritePropertyName("CidrAllowedList");
context.Writer.WriteArrayStart();
foreach(var requestObjectCidrAllowedListListValue in requestObject.CidrAllowedList)
{
context.Writer.Write(requestObjectCidrAllowedListListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetCpsLimit())
{
context.Writer.WritePropertyName("CpsLimit");
context.Writer.Write(requestObject.CpsLimit);
}
if(requestObject.IsSetDefaultPhoneNumber())
{
context.Writer.WritePropertyName("DefaultPhoneNumber");
context.Writer.Write(requestObject.DefaultPhoneNumber);
}
if(requestObject.IsSetDisabled())
{
context.Writer.WritePropertyName("Disabled");
context.Writer.Write(requestObject.Disabled);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static TerminationMarshaller Instance = new TerminationMarshaller();
}
}
| 96 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Termination Object
/// </summary>
public class TerminationUnmarshaller : IUnmarshaller<Termination, XmlUnmarshallerContext>, IUnmarshaller<Termination, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Termination IUnmarshaller<Termination, 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 Termination Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Termination unmarshalledObject = new Termination();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CallingRegions", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.CallingRegions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CidrAllowedList", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.CidrAllowedList = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CpsLimit", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.CpsLimit = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DefaultPhoneNumber", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DefaultPhoneNumber = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Disabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Disabled = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static TerminationUnmarshaller _instance = new TerminationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TerminationUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ThrottledClientException Object
/// </summary>
public class ThrottledClientExceptionUnmarshaller : IErrorResponseUnmarshaller<ThrottledClientException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ThrottledClientException 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 ThrottledClientException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
ThrottledClientException unmarshalledObject = new ThrottledClientException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static ThrottledClientExceptionUnmarshaller _instance = new ThrottledClientExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ThrottledClientExceptionUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UnauthorizedClientException Object
/// </summary>
public class UnauthorizedClientExceptionUnmarshaller : IErrorResponseUnmarshaller<UnauthorizedClientException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public UnauthorizedClientException 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 UnauthorizedClientException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
UnauthorizedClientException unmarshalledObject = new UnauthorizedClientException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static UnauthorizedClientExceptionUnmarshaller _instance = new UnauthorizedClientExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static UnauthorizedClientExceptionUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UnprocessableEntityException Object
/// </summary>
public class UnprocessableEntityExceptionUnmarshaller : IErrorResponseUnmarshaller<UnprocessableEntityException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public UnprocessableEntityException 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 UnprocessableEntityException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
UnprocessableEntityException unmarshalledObject = new UnprocessableEntityException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static UnprocessableEntityExceptionUnmarshaller _instance = new UnprocessableEntityExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static UnprocessableEntityExceptionUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UntagResource Request Marshaller
/// </summary>
public class UntagResourceRequestMarshaller : IMarshaller<IRequest, UntagResourceRequest> , 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((UntagResourceRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UntagResourceRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.AddSubResource("operation", "untag-resource");
request.ResourcePath = "/tags";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetResourceARN())
{
context.Writer.WritePropertyName("ResourceARN");
context.Writer.Write(publicRequest.ResourceARN);
}
if(publicRequest.IsSetTagKeys())
{
context.Writer.WritePropertyName("TagKeys");
context.Writer.WriteArrayStart();
foreach(var publicRequestTagKeysListValue in publicRequest.TagKeys)
{
context.Writer.Write(publicRequestTagKeysListValue);
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UntagResourceRequestMarshaller _instance = new UntagResourceRequestMarshaller();
internal static UntagResourceRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UntagResourceRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 113 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UntagResource operation
/// </summary>
public class UntagResourceResponseUnmarshaller : 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)
{
UntagResourceResponse response = new UntagResourceResponse();
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("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UntagResourceResponseUnmarshaller _instance = new UntagResourceResponseUnmarshaller();
internal static UntagResourceResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UntagResourceResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 119 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateGlobalSettings Request Marshaller
/// </summary>
public class UpdateGlobalSettingsRequestMarshaller : IMarshaller<IRequest, UpdateGlobalSettingsRequest> , 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((UpdateGlobalSettingsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateGlobalSettingsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "PUT";
request.ResourcePath = "/settings";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetVoiceConnector())
{
context.Writer.WritePropertyName("VoiceConnector");
context.Writer.WriteObjectStart();
var marshaller = VoiceConnectorSettingsMarshaller.Instance;
marshaller.Marshall(publicRequest.VoiceConnector, context);
context.Writer.WriteObjectEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdateGlobalSettingsRequestMarshaller _instance = new UpdateGlobalSettingsRequestMarshaller();
internal static UpdateGlobalSettingsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateGlobalSettingsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 106 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateGlobalSettings operation
/// </summary>
public class UpdateGlobalSettingsResponseUnmarshaller : 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)
{
UpdateGlobalSettingsResponse response = new UpdateGlobalSettingsResponse();
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("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdateGlobalSettingsResponseUnmarshaller _instance = new UpdateGlobalSettingsResponseUnmarshaller();
internal static UpdateGlobalSettingsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateGlobalSettingsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 119 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdatePhoneNumberRequestItem Marshaller
/// </summary>
public class UpdatePhoneNumberRequestItemMarshaller : IRequestMarshaller<UpdatePhoneNumberRequestItem, 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(UpdatePhoneNumberRequestItem requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetCallingName())
{
context.Writer.WritePropertyName("CallingName");
context.Writer.Write(requestObject.CallingName);
}
if(requestObject.IsSetPhoneNumberId())
{
context.Writer.WritePropertyName("PhoneNumberId");
context.Writer.Write(requestObject.PhoneNumberId);
}
if(requestObject.IsSetProductType())
{
context.Writer.WritePropertyName("ProductType");
context.Writer.Write(requestObject.ProductType);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static UpdatePhoneNumberRequestItemMarshaller Instance = new UpdatePhoneNumberRequestItemMarshaller();
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdatePhoneNumber Request Marshaller
/// </summary>
public class UpdatePhoneNumberRequestMarshaller : IMarshaller<IRequest, UpdatePhoneNumberRequest> , 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((UpdatePhoneNumberRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdatePhoneNumberRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
if (!publicRequest.IsSetPhoneNumberId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field PhoneNumberId set");
request.AddPathResource("{phoneNumberId}", StringUtils.FromString(publicRequest.PhoneNumberId));
request.ResourcePath = "/phone-numbers/{phoneNumberId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetCallingName())
{
context.Writer.WritePropertyName("CallingName");
context.Writer.Write(publicRequest.CallingName);
}
if(publicRequest.IsSetProductType())
{
context.Writer.WritePropertyName("ProductType");
context.Writer.Write(publicRequest.ProductType);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdatePhoneNumberRequestMarshaller _instance = new UpdatePhoneNumberRequestMarshaller();
internal static UpdatePhoneNumberRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdatePhoneNumberRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdatePhoneNumber operation
/// </summary>
public class UpdatePhoneNumberResponseUnmarshaller : 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)
{
UpdatePhoneNumberResponse response = new UpdatePhoneNumberResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PhoneNumber", targetDepth))
{
var unmarshaller = PhoneNumberUnmarshaller.Instance;
response.PhoneNumber = 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("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdatePhoneNumberResponseUnmarshaller _instance = new UpdatePhoneNumberResponseUnmarshaller();
internal static UpdatePhoneNumberResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdatePhoneNumberResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 138 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdatePhoneNumberSettings Request Marshaller
/// </summary>
public class UpdatePhoneNumberSettingsRequestMarshaller : IMarshaller<IRequest, UpdatePhoneNumberSettingsRequest> , 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((UpdatePhoneNumberSettingsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdatePhoneNumberSettingsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "PUT";
request.ResourcePath = "/settings/phone-number";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetCallingName())
{
context.Writer.WritePropertyName("CallingName");
context.Writer.Write(publicRequest.CallingName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdatePhoneNumberSettingsRequestMarshaller _instance = new UpdatePhoneNumberSettingsRequestMarshaller();
internal static UpdatePhoneNumberSettingsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdatePhoneNumberSettingsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 101 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdatePhoneNumberSettings operation
/// </summary>
public class UpdatePhoneNumberSettingsResponseUnmarshaller : 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)
{
UpdatePhoneNumberSettingsResponse response = new UpdatePhoneNumberSettingsResponse();
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("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdatePhoneNumberSettingsResponseUnmarshaller _instance = new UpdatePhoneNumberSettingsResponseUnmarshaller();
internal static UpdatePhoneNumberSettingsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdatePhoneNumberSettingsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 119 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateProxySession Request Marshaller
/// </summary>
public class UpdateProxySessionRequestMarshaller : IMarshaller<IRequest, UpdateProxySessionRequest> , 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((UpdateProxySessionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateProxySessionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
if (!publicRequest.IsSetProxySessionId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field ProxySessionId set");
request.AddPathResource("{proxySessionId}", StringUtils.FromString(publicRequest.ProxySessionId));
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}/proxy-sessions/{proxySessionId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetCapabilities())
{
context.Writer.WritePropertyName("Capabilities");
context.Writer.WriteArrayStart();
foreach(var publicRequestCapabilitiesListValue in publicRequest.Capabilities)
{
context.Writer.Write(publicRequestCapabilitiesListValue);
}
context.Writer.WriteArrayEnd();
}
if(publicRequest.IsSetExpiryMinutes())
{
context.Writer.WritePropertyName("ExpiryMinutes");
context.Writer.Write(publicRequest.ExpiryMinutes);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdateProxySessionRequestMarshaller _instance = new UpdateProxySessionRequestMarshaller();
internal static UpdateProxySessionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateProxySessionRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateProxySession operation
/// </summary>
public class UpdateProxySessionResponseUnmarshaller : 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)
{
UpdateProxySessionResponse response = new UpdateProxySessionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ProxySession", targetDepth))
{
var unmarshaller = ProxySessionUnmarshaller.Instance;
response.ProxySession = 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("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdateProxySessionResponseUnmarshaller _instance = new UpdateProxySessionResponseUnmarshaller();
internal static UpdateProxySessionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateProxySessionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 134 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateSipMediaApplicationCall Request Marshaller
/// </summary>
public class UpdateSipMediaApplicationCallRequestMarshaller : IMarshaller<IRequest, UpdateSipMediaApplicationCallRequest> , 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((UpdateSipMediaApplicationCallRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateSipMediaApplicationCallRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
if (!publicRequest.IsSetSipMediaApplicationId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field SipMediaApplicationId set");
request.AddPathResource("{sipMediaApplicationId}", StringUtils.FromString(publicRequest.SipMediaApplicationId));
if (!publicRequest.IsSetTransactionId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field TransactionId set");
request.AddPathResource("{transactionId}", StringUtils.FromString(publicRequest.TransactionId));
request.ResourcePath = "/sip-media-applications/{sipMediaApplicationId}/calls/{transactionId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetArguments())
{
context.Writer.WritePropertyName("Arguments");
context.Writer.WriteObjectStart();
foreach (var publicRequestArgumentsKvp in publicRequest.Arguments)
{
context.Writer.WritePropertyName(publicRequestArgumentsKvp.Key);
var publicRequestArgumentsValue = publicRequestArgumentsKvp.Value;
context.Writer.Write(publicRequestArgumentsValue);
}
context.Writer.WriteObjectEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdateSipMediaApplicationCallRequestMarshaller _instance = new UpdateSipMediaApplicationCallRequestMarshaller();
internal static UpdateSipMediaApplicationCallRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateSipMediaApplicationCallRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateSipMediaApplicationCall operation
/// </summary>
public class UpdateSipMediaApplicationCallResponseUnmarshaller : 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)
{
UpdateSipMediaApplicationCallResponse response = new UpdateSipMediaApplicationCallResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("SipMediaApplicationCall", targetDepth))
{
var unmarshaller = SipMediaApplicationCallUnmarshaller.Instance;
response.SipMediaApplicationCall = 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("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdateSipMediaApplicationCallResponseUnmarshaller _instance = new UpdateSipMediaApplicationCallResponseUnmarshaller();
internal static UpdateSipMediaApplicationCallResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateSipMediaApplicationCallResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 138 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateSipMediaApplication Request Marshaller
/// </summary>
public class UpdateSipMediaApplicationRequestMarshaller : IMarshaller<IRequest, UpdateSipMediaApplicationRequest> , 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((UpdateSipMediaApplicationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateSipMediaApplicationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "PUT";
if (!publicRequest.IsSetSipMediaApplicationId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field SipMediaApplicationId set");
request.AddPathResource("{sipMediaApplicationId}", StringUtils.FromString(publicRequest.SipMediaApplicationId));
request.ResourcePath = "/sip-media-applications/{sipMediaApplicationId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetEndpoints())
{
context.Writer.WritePropertyName("Endpoints");
context.Writer.WriteArrayStart();
foreach(var publicRequestEndpointsListValue in publicRequest.Endpoints)
{
context.Writer.WriteObjectStart();
var marshaller = SipMediaApplicationEndpointMarshaller.Instance;
marshaller.Marshall(publicRequestEndpointsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdateSipMediaApplicationRequestMarshaller _instance = new UpdateSipMediaApplicationRequestMarshaller();
internal static UpdateSipMediaApplicationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateSipMediaApplicationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 120 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateSipMediaApplication operation
/// </summary>
public class UpdateSipMediaApplicationResponseUnmarshaller : 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)
{
UpdateSipMediaApplicationResponse response = new UpdateSipMediaApplicationResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("SipMediaApplication", targetDepth))
{
var unmarshaller = SipMediaApplicationUnmarshaller.Instance;
response.SipMediaApplication = 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("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdateSipMediaApplicationResponseUnmarshaller _instance = new UpdateSipMediaApplicationResponseUnmarshaller();
internal static UpdateSipMediaApplicationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateSipMediaApplicationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 138 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateSipRule Request Marshaller
/// </summary>
public class UpdateSipRuleRequestMarshaller : IMarshaller<IRequest, UpdateSipRuleRequest> , 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((UpdateSipRuleRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateSipRuleRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "PUT";
if (!publicRequest.IsSetSipRuleId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field SipRuleId set");
request.AddPathResource("{sipRuleId}", StringUtils.FromString(publicRequest.SipRuleId));
request.ResourcePath = "/sip-rules/{sipRuleId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetDisabled())
{
context.Writer.WritePropertyName("Disabled");
context.Writer.Write(publicRequest.Disabled);
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetTargetApplications())
{
context.Writer.WritePropertyName("TargetApplications");
context.Writer.WriteArrayStart();
foreach(var publicRequestTargetApplicationsListValue in publicRequest.TargetApplications)
{
context.Writer.WriteObjectStart();
var marshaller = SipRuleTargetApplicationMarshaller.Instance;
marshaller.Marshall(publicRequestTargetApplicationsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdateSipRuleRequestMarshaller _instance = new UpdateSipRuleRequestMarshaller();
internal static UpdateSipRuleRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateSipRuleRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateSipRule operation
/// </summary>
public class UpdateSipRuleResponseUnmarshaller : 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)
{
UpdateSipRuleResponse response = new UpdateSipRuleResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("SipRule", targetDepth))
{
var unmarshaller = SipRuleUnmarshaller.Instance;
response.SipRule = 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("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdateSipRuleResponseUnmarshaller _instance = new UpdateSipRuleResponseUnmarshaller();
internal static UpdateSipRuleResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateSipRuleResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 142 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateVoiceConnectorGroup Request Marshaller
/// </summary>
public class UpdateVoiceConnectorGroupRequestMarshaller : IMarshaller<IRequest, UpdateVoiceConnectorGroupRequest> , 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((UpdateVoiceConnectorGroupRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateVoiceConnectorGroupRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "PUT";
if (!publicRequest.IsSetVoiceConnectorGroupId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorGroupId set");
request.AddPathResource("{voiceConnectorGroupId}", StringUtils.FromString(publicRequest.VoiceConnectorGroupId));
request.ResourcePath = "/voice-connector-groups/{voiceConnectorGroupId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetVoiceConnectorItems())
{
context.Writer.WritePropertyName("VoiceConnectorItems");
context.Writer.WriteArrayStart();
foreach(var publicRequestVoiceConnectorItemsListValue in publicRequest.VoiceConnectorItems)
{
context.Writer.WriteObjectStart();
var marshaller = VoiceConnectorItemMarshaller.Instance;
marshaller.Marshall(publicRequestVoiceConnectorItemsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdateVoiceConnectorGroupRequestMarshaller _instance = new UpdateVoiceConnectorGroupRequestMarshaller();
internal static UpdateVoiceConnectorGroupRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateVoiceConnectorGroupRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 120 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateVoiceConnectorGroup operation
/// </summary>
public class UpdateVoiceConnectorGroupResponseUnmarshaller : 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)
{
UpdateVoiceConnectorGroupResponse response = new UpdateVoiceConnectorGroupResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("VoiceConnectorGroup", targetDepth))
{
var unmarshaller = VoiceConnectorGroupUnmarshaller.Instance;
response.VoiceConnectorGroup = 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("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdateVoiceConnectorGroupResponseUnmarshaller _instance = new UpdateVoiceConnectorGroupResponseUnmarshaller();
internal static UpdateVoiceConnectorGroupResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateVoiceConnectorGroupResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 138 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateVoiceConnector Request Marshaller
/// </summary>
public class UpdateVoiceConnectorRequestMarshaller : IMarshaller<IRequest, UpdateVoiceConnectorRequest> , 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((UpdateVoiceConnectorRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateVoiceConnectorRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "PUT";
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetRequireEncryption())
{
context.Writer.WritePropertyName("RequireEncryption");
context.Writer.Write(publicRequest.RequireEncryption);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdateVoiceConnectorRequestMarshaller _instance = new UpdateVoiceConnectorRequestMarshaller();
internal static UpdateVoiceConnectorRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateVoiceConnectorRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateVoiceConnector operation
/// </summary>
public class UpdateVoiceConnectorResponseUnmarshaller : 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)
{
UpdateVoiceConnectorResponse response = new UpdateVoiceConnectorResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("VoiceConnector", targetDepth))
{
var unmarshaller = VoiceConnectorUnmarshaller.Instance;
response.VoiceConnector = 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("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdateVoiceConnectorResponseUnmarshaller _instance = new UpdateVoiceConnectorResponseUnmarshaller();
internal static UpdateVoiceConnectorResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateVoiceConnectorResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 134 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateVoiceProfileDomain Request Marshaller
/// </summary>
public class UpdateVoiceProfileDomainRequestMarshaller : IMarshaller<IRequest, UpdateVoiceProfileDomainRequest> , 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((UpdateVoiceProfileDomainRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateVoiceProfileDomainRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "PUT";
if (!publicRequest.IsSetVoiceProfileDomainId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceProfileDomainId set");
request.AddPathResource("{VoiceProfileDomainId}", StringUtils.FromString(publicRequest.VoiceProfileDomainId));
request.ResourcePath = "/voice-profile-domains/{VoiceProfileDomainId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetDescription())
{
context.Writer.WritePropertyName("Description");
context.Writer.Write(publicRequest.Description);
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdateVoiceProfileDomainRequestMarshaller _instance = new UpdateVoiceProfileDomainRequestMarshaller();
internal static UpdateVoiceProfileDomainRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateVoiceProfileDomainRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateVoiceProfileDomain operation
/// </summary>
public class UpdateVoiceProfileDomainResponseUnmarshaller : 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)
{
UpdateVoiceProfileDomainResponse response = new UpdateVoiceProfileDomainResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("VoiceProfileDomain", targetDepth))
{
var unmarshaller = VoiceProfileDomainUnmarshaller.Instance;
response.VoiceProfileDomain = 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("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdateVoiceProfileDomainResponseUnmarshaller _instance = new UpdateVoiceProfileDomainResponseUnmarshaller();
internal static UpdateVoiceProfileDomainResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateVoiceProfileDomainResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 138 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateVoiceProfile Request Marshaller
/// </summary>
public class UpdateVoiceProfileRequestMarshaller : IMarshaller<IRequest, UpdateVoiceProfileRequest> , 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((UpdateVoiceProfileRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateVoiceProfileRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "PUT";
if (!publicRequest.IsSetVoiceProfileId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceProfileId set");
request.AddPathResource("{VoiceProfileId}", StringUtils.FromString(publicRequest.VoiceProfileId));
request.ResourcePath = "/voice-profiles/{VoiceProfileId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetSpeakerSearchTaskId())
{
context.Writer.WritePropertyName("SpeakerSearchTaskId");
context.Writer.Write(publicRequest.SpeakerSearchTaskId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdateVoiceProfileRequestMarshaller _instance = new UpdateVoiceProfileRequestMarshaller();
internal static UpdateVoiceProfileRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateVoiceProfileRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateVoiceProfile operation
/// </summary>
public class UpdateVoiceProfileResponseUnmarshaller : 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)
{
UpdateVoiceProfileResponse response = new UpdateVoiceProfileResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("VoiceProfile", targetDepth))
{
var unmarshaller = VoiceProfileUnmarshaller.Instance;
response.VoiceProfile = 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("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GoneException"))
{
return GoneExceptionUnmarshaller.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("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdateVoiceProfileResponseUnmarshaller _instance = new UpdateVoiceProfileResponseUnmarshaller();
internal static UpdateVoiceProfileResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateVoiceProfileResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 146 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// ValidateE911Address Request Marshaller
/// </summary>
public class ValidateE911AddressRequestMarshaller : IMarshaller<IRequest, ValidateE911AddressRequest> , 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((ValidateE911AddressRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ValidateE911AddressRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.ResourcePath = "/emergency-calling/address";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetAwsAccountId())
{
context.Writer.WritePropertyName("AwsAccountId");
context.Writer.Write(publicRequest.AwsAccountId);
}
if(publicRequest.IsSetCity())
{
context.Writer.WritePropertyName("City");
context.Writer.Write(publicRequest.City);
}
if(publicRequest.IsSetCountry())
{
context.Writer.WritePropertyName("Country");
context.Writer.Write(publicRequest.Country);
}
if(publicRequest.IsSetPostalCode())
{
context.Writer.WritePropertyName("PostalCode");
context.Writer.Write(publicRequest.PostalCode);
}
if(publicRequest.IsSetState())
{
context.Writer.WritePropertyName("State");
context.Writer.Write(publicRequest.State);
}
if(publicRequest.IsSetStreetInfo())
{
context.Writer.WritePropertyName("StreetInfo");
context.Writer.Write(publicRequest.StreetInfo);
}
if(publicRequest.IsSetStreetNumber())
{
context.Writer.WritePropertyName("StreetNumber");
context.Writer.Write(publicRequest.StreetNumber);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static ValidateE911AddressRequestMarshaller _instance = new ValidateE911AddressRequestMarshaller();
internal static ValidateE911AddressRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ValidateE911AddressRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 137 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ValidateE911Address operation
/// </summary>
public class ValidateE911AddressResponseUnmarshaller : 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)
{
ValidateE911AddressResponse response = new ValidateE911AddressResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Address", targetDepth))
{
var unmarshaller = AddressUnmarshaller.Instance;
response.Address = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("AddressExternalId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AddressExternalId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CandidateAddressList", targetDepth))
{
var unmarshaller = new ListUnmarshaller<CandidateAddress, CandidateAddressUnmarshaller>(CandidateAddressUnmarshaller.Instance);
response.CandidateAddressList = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ValidationResult", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
response.ValidationResult = 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("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.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("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ValidateE911AddressResponseUnmarshaller _instance = new ValidateE911AddressResponseUnmarshaller();
internal static ValidateE911AddressResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ValidateE911AddressResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for VoiceConnectorGroup Object
/// </summary>
public class VoiceConnectorGroupUnmarshaller : IUnmarshaller<VoiceConnectorGroup, XmlUnmarshallerContext>, IUnmarshaller<VoiceConnectorGroup, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
VoiceConnectorGroup IUnmarshaller<VoiceConnectorGroup, 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 VoiceConnectorGroup Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
VoiceConnectorGroup unmarshalledObject = new VoiceConnectorGroup();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CreatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UpdatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.UpdatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceConnectorGroupArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceConnectorGroupArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceConnectorGroupId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceConnectorGroupId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceConnectorItems", targetDepth))
{
var unmarshaller = new ListUnmarshaller<VoiceConnectorItem, VoiceConnectorItemUnmarshaller>(VoiceConnectorItemUnmarshaller.Instance);
unmarshalledObject.VoiceConnectorItems = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static VoiceConnectorGroupUnmarshaller _instance = new VoiceConnectorGroupUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static VoiceConnectorGroupUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// VoiceConnectorItem Marshaller
/// </summary>
public class VoiceConnectorItemMarshaller : IRequestMarshaller<VoiceConnectorItem, 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(VoiceConnectorItem requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetPriority())
{
context.Writer.WritePropertyName("Priority");
context.Writer.Write(requestObject.Priority);
}
if(requestObject.IsSetVoiceConnectorId())
{
context.Writer.WritePropertyName("VoiceConnectorId");
context.Writer.Write(requestObject.VoiceConnectorId);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static VoiceConnectorItemMarshaller Instance = new VoiceConnectorItemMarshaller();
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for VoiceConnectorItem Object
/// </summary>
public class VoiceConnectorItemUnmarshaller : IUnmarshaller<VoiceConnectorItem, XmlUnmarshallerContext>, IUnmarshaller<VoiceConnectorItem, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
VoiceConnectorItem IUnmarshaller<VoiceConnectorItem, 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 VoiceConnectorItem Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
VoiceConnectorItem unmarshalledObject = new VoiceConnectorItem();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Priority", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Priority = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceConnectorId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceConnectorId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static VoiceConnectorItemUnmarshaller _instance = new VoiceConnectorItemUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static VoiceConnectorItemUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// VoiceConnectorSettings Marshaller
/// </summary>
public class VoiceConnectorSettingsMarshaller : IRequestMarshaller<VoiceConnectorSettings, 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(VoiceConnectorSettings requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetCdrBucket())
{
context.Writer.WritePropertyName("CdrBucket");
context.Writer.Write(requestObject.CdrBucket);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static VoiceConnectorSettingsMarshaller Instance = new VoiceConnectorSettingsMarshaller();
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for VoiceConnectorSettings Object
/// </summary>
public class VoiceConnectorSettingsUnmarshaller : IUnmarshaller<VoiceConnectorSettings, XmlUnmarshallerContext>, IUnmarshaller<VoiceConnectorSettings, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
VoiceConnectorSettings IUnmarshaller<VoiceConnectorSettings, 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 VoiceConnectorSettings Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
VoiceConnectorSettings unmarshalledObject = new VoiceConnectorSettings();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CdrBucket", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CdrBucket = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static VoiceConnectorSettingsUnmarshaller _instance = new VoiceConnectorSettingsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static VoiceConnectorSettingsUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for VoiceConnector Object
/// </summary>
public class VoiceConnectorUnmarshaller : IUnmarshaller<VoiceConnector, XmlUnmarshallerContext>, IUnmarshaller<VoiceConnector, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
VoiceConnector IUnmarshaller<VoiceConnector, 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 VoiceConnector Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
VoiceConnector unmarshalledObject = new VoiceConnector();
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("CreatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("OutboundHostName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.OutboundHostName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RequireEncryption", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.RequireEncryption = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UpdatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.UpdatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceConnectorArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceConnectorArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceConnectorId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceConnectorId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static VoiceConnectorUnmarshaller _instance = new VoiceConnectorUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static VoiceConnectorUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 134 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for VoiceProfileDomainSummary Object
/// </summary>
public class VoiceProfileDomainSummaryUnmarshaller : IUnmarshaller<VoiceProfileDomainSummary, XmlUnmarshallerContext>, IUnmarshaller<VoiceProfileDomainSummary, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
VoiceProfileDomainSummary IUnmarshaller<VoiceProfileDomainSummary, 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 VoiceProfileDomainSummary Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
VoiceProfileDomainSummary unmarshalledObject = new VoiceProfileDomainSummary();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CreatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UpdatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.UpdatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceProfileDomainArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceProfileDomainArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceProfileDomainId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceProfileDomainId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static VoiceProfileDomainSummaryUnmarshaller _instance = new VoiceProfileDomainSummaryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static VoiceProfileDomainSummaryUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for VoiceProfileDomain Object
/// </summary>
public class VoiceProfileDomainUnmarshaller : IUnmarshaller<VoiceProfileDomain, XmlUnmarshallerContext>, IUnmarshaller<VoiceProfileDomain, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
VoiceProfileDomain IUnmarshaller<VoiceProfileDomain, 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 VoiceProfileDomain Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
VoiceProfileDomain unmarshalledObject = new VoiceProfileDomain();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CreatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ServerSideEncryptionConfiguration", targetDepth))
{
var unmarshaller = ServerSideEncryptionConfigurationUnmarshaller.Instance;
unmarshalledObject.ServerSideEncryptionConfiguration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UpdatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.UpdatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceProfileDomainArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceProfileDomainArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceProfileDomainId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceProfileDomainId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static VoiceProfileDomainUnmarshaller _instance = new VoiceProfileDomainUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static VoiceProfileDomainUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for VoiceProfileSummary Object
/// </summary>
public class VoiceProfileSummaryUnmarshaller : IUnmarshaller<VoiceProfileSummary, XmlUnmarshallerContext>, IUnmarshaller<VoiceProfileSummary, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
VoiceProfileSummary IUnmarshaller<VoiceProfileSummary, 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 VoiceProfileSummary Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
VoiceProfileSummary unmarshalledObject = new VoiceProfileSummary();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CreatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ExpirationTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.ExpirationTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UpdatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.UpdatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceProfileArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceProfileArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceProfileDomainId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceProfileDomainId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceProfileId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceProfileId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static VoiceProfileSummaryUnmarshaller _instance = new VoiceProfileSummaryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static VoiceProfileSummaryUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for VoiceProfile Object
/// </summary>
public class VoiceProfileUnmarshaller : IUnmarshaller<VoiceProfile, XmlUnmarshallerContext>, IUnmarshaller<VoiceProfile, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
VoiceProfile IUnmarshaller<VoiceProfile, 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 VoiceProfile Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
VoiceProfile unmarshalledObject = new VoiceProfile();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CreatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ExpirationTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.ExpirationTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UpdatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.UpdatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceProfileArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceProfileArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceProfileDomainId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceProfileDomainId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceProfileId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceProfileId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static VoiceProfileUnmarshaller _instance = new VoiceProfileUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static VoiceProfileUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for VoiceToneAnalysisTask Object
/// </summary>
public class VoiceToneAnalysisTaskUnmarshaller : IUnmarshaller<VoiceToneAnalysisTask, XmlUnmarshallerContext>, IUnmarshaller<VoiceToneAnalysisTask, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
VoiceToneAnalysisTask IUnmarshaller<VoiceToneAnalysisTask, 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 VoiceToneAnalysisTask Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
VoiceToneAnalysisTask unmarshalledObject = new VoiceToneAnalysisTask();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CallDetails", targetDepth))
{
var unmarshaller = CallDetailsUnmarshaller.Instance;
unmarshalledObject.CallDetails = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StartedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.StartedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StatusMessage", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StatusMessage = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UpdatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.UpdatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceToneAnalysisTaskId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceToneAnalysisTaskId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceToneAnalysisTaskStatus", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceToneAnalysisTaskStatus = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static VoiceToneAnalysisTaskUnmarshaller _instance = new VoiceToneAnalysisTaskUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static VoiceToneAnalysisTaskUnmarshaller 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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Paginators for the ChimeSDKVoice service
///</summary>
public class ChimeSDKVoicePaginatorFactory : IChimeSDKVoicePaginatorFactory
{
private readonly IAmazonChimeSDKVoice client;
internal ChimeSDKVoicePaginatorFactory(IAmazonChimeSDKVoice client)
{
this.client = client;
}
/// <summary>
/// Paginator for ListPhoneNumberOrders operation
///</summary>
public IListPhoneNumberOrdersPaginator ListPhoneNumberOrders(ListPhoneNumberOrdersRequest request)
{
return new ListPhoneNumberOrdersPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListPhoneNumbers operation
///</summary>
public IListPhoneNumbersPaginator ListPhoneNumbers(ListPhoneNumbersRequest request)
{
return new ListPhoneNumbersPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListProxySessions operation
///</summary>
public IListProxySessionsPaginator ListProxySessions(ListProxySessionsRequest request)
{
return new ListProxySessionsPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListSipMediaApplications operation
///</summary>
public IListSipMediaApplicationsPaginator ListSipMediaApplications(ListSipMediaApplicationsRequest request)
{
return new ListSipMediaApplicationsPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListSipRules operation
///</summary>
public IListSipRulesPaginator ListSipRules(ListSipRulesRequest request)
{
return new ListSipRulesPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListVoiceConnectorGroups operation
///</summary>
public IListVoiceConnectorGroupsPaginator ListVoiceConnectorGroups(ListVoiceConnectorGroupsRequest request)
{
return new ListVoiceConnectorGroupsPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListVoiceConnectors operation
///</summary>
public IListVoiceConnectorsPaginator ListVoiceConnectors(ListVoiceConnectorsRequest request)
{
return new ListVoiceConnectorsPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListVoiceProfileDomains operation
///</summary>
public IListVoiceProfileDomainsPaginator ListVoiceProfileDomains(ListVoiceProfileDomainsRequest request)
{
return new ListVoiceProfileDomainsPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListVoiceProfiles operation
///</summary>
public IListVoiceProfilesPaginator ListVoiceProfiles(ListVoiceProfilesRequest request)
{
return new ListVoiceProfilesPaginator(this.client, request);
}
/// <summary>
/// Paginator for SearchAvailablePhoneNumbers operation
///</summary>
public ISearchAvailablePhoneNumbersPaginator SearchAvailablePhoneNumbers(SearchAvailablePhoneNumbersRequest request)
{
return new SearchAvailablePhoneNumbersPaginator(this.client, request);
}
}
}
| 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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Paginators for the ChimeSDKVoice service
///</summary>
public interface IChimeSDKVoicePaginatorFactory
{
/// <summary>
/// Paginator for ListPhoneNumberOrders operation
///</summary>
IListPhoneNumberOrdersPaginator ListPhoneNumberOrders(ListPhoneNumberOrdersRequest request);
/// <summary>
/// Paginator for ListPhoneNumbers operation
///</summary>
IListPhoneNumbersPaginator ListPhoneNumbers(ListPhoneNumbersRequest request);
/// <summary>
/// Paginator for ListProxySessions operation
///</summary>
IListProxySessionsPaginator ListProxySessions(ListProxySessionsRequest request);
/// <summary>
/// Paginator for ListSipMediaApplications operation
///</summary>
IListSipMediaApplicationsPaginator ListSipMediaApplications(ListSipMediaApplicationsRequest request);
/// <summary>
/// Paginator for ListSipRules operation
///</summary>
IListSipRulesPaginator ListSipRules(ListSipRulesRequest request);
/// <summary>
/// Paginator for ListVoiceConnectorGroups operation
///</summary>
IListVoiceConnectorGroupsPaginator ListVoiceConnectorGroups(ListVoiceConnectorGroupsRequest request);
/// <summary>
/// Paginator for ListVoiceConnectors operation
///</summary>
IListVoiceConnectorsPaginator ListVoiceConnectors(ListVoiceConnectorsRequest request);
/// <summary>
/// Paginator for ListVoiceProfileDomains operation
///</summary>
IListVoiceProfileDomainsPaginator ListVoiceProfileDomains(ListVoiceProfileDomainsRequest request);
/// <summary>
/// Paginator for ListVoiceProfiles operation
///</summary>
IListVoiceProfilesPaginator ListVoiceProfiles(ListVoiceProfilesRequest request);
/// <summary>
/// Paginator for SearchAvailablePhoneNumbers operation
///</summary>
ISearchAvailablePhoneNumbersPaginator SearchAvailablePhoneNumbers(SearchAvailablePhoneNumbersRequest request);
}
}
| 78 |
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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Paginator for the ListPhoneNumberOrders operation
///</summary>
public interface IListPhoneNumberOrdersPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListPhoneNumberOrdersResponse> Responses { get; }
}
}
| 33 |
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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Paginator for the ListPhoneNumbers operation
///</summary>
public interface IListPhoneNumbersPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListPhoneNumbersResponse> Responses { get; }
}
}
| 33 |
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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Paginator for the ListProxySessions operation
///</summary>
public interface IListProxySessionsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListProxySessionsResponse> Responses { get; }
}
}
| 33 |
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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Paginator for the ListSipMediaApplications operation
///</summary>
public interface IListSipMediaApplicationsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListSipMediaApplicationsResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the SipMediaApplications
/// </summary>
IPaginatedEnumerable<SipMediaApplication> SipMediaApplications { get; }
}
}
| 38 |
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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Paginator for the ListSipRules operation
///</summary>
public interface IListSipRulesPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListSipRulesResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the SipRules
/// </summary>
IPaginatedEnumerable<SipRule> SipRules { get; }
}
}
| 38 |
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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Paginator for the ListVoiceConnectorGroups operation
///</summary>
public interface IListVoiceConnectorGroupsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListVoiceConnectorGroupsResponse> Responses { get; }
}
}
| 33 |
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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Paginator for the ListVoiceConnectors operation
///</summary>
public interface IListVoiceConnectorsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListVoiceConnectorsResponse> Responses { get; }
}
}
| 33 |
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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Paginator for the ListVoiceProfileDomains operation
///</summary>
public interface IListVoiceProfileDomainsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListVoiceProfileDomainsResponse> Responses { get; }
}
}
| 33 |
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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Paginator for the ListVoiceProfiles operation
///</summary>
public interface IListVoiceProfilesPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListVoiceProfilesResponse> Responses { get; }
}
}
| 33 |
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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Paginator for the SearchAvailablePhoneNumbers operation
///</summary>
public interface ISearchAvailablePhoneNumbersPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<SearchAvailablePhoneNumbersResponse> Responses { get; }
}
}
| 33 |
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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Base class for ListPhoneNumberOrders paginators.
/// </summary>
internal sealed partial class ListPhoneNumberOrdersPaginator : IPaginator<ListPhoneNumberOrdersResponse>, IListPhoneNumberOrdersPaginator
{
private readonly IAmazonChimeSDKVoice _client;
private readonly ListPhoneNumberOrdersRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListPhoneNumberOrdersResponse> Responses => new PaginatedResponse<ListPhoneNumberOrdersResponse>(this);
internal ListPhoneNumberOrdersPaginator(IAmazonChimeSDKVoice client, ListPhoneNumberOrdersRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListPhoneNumberOrdersResponse> IPaginator<ListPhoneNumberOrdersResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListPhoneNumberOrdersResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListPhoneNumberOrders(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListPhoneNumberOrdersResponse> IPaginator<ListPhoneNumberOrdersResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListPhoneNumberOrdersResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListPhoneNumberOrdersAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Base class for ListPhoneNumbers paginators.
/// </summary>
internal sealed partial class ListPhoneNumbersPaginator : IPaginator<ListPhoneNumbersResponse>, IListPhoneNumbersPaginator
{
private readonly IAmazonChimeSDKVoice _client;
private readonly ListPhoneNumbersRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListPhoneNumbersResponse> Responses => new PaginatedResponse<ListPhoneNumbersResponse>(this);
internal ListPhoneNumbersPaginator(IAmazonChimeSDKVoice client, ListPhoneNumbersRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListPhoneNumbersResponse> IPaginator<ListPhoneNumbersResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListPhoneNumbersResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListPhoneNumbers(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListPhoneNumbersResponse> IPaginator<ListPhoneNumbersResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListPhoneNumbersResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListPhoneNumbersAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Base class for ListProxySessions paginators.
/// </summary>
internal sealed partial class ListProxySessionsPaginator : IPaginator<ListProxySessionsResponse>, IListProxySessionsPaginator
{
private readonly IAmazonChimeSDKVoice _client;
private readonly ListProxySessionsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListProxySessionsResponse> Responses => new PaginatedResponse<ListProxySessionsResponse>(this);
internal ListProxySessionsPaginator(IAmazonChimeSDKVoice client, ListProxySessionsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListProxySessionsResponse> IPaginator<ListProxySessionsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListProxySessionsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListProxySessions(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListProxySessionsResponse> IPaginator<ListProxySessionsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListProxySessionsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListProxySessionsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Base class for ListSipMediaApplications paginators.
/// </summary>
internal sealed partial class ListSipMediaApplicationsPaginator : IPaginator<ListSipMediaApplicationsResponse>, IListSipMediaApplicationsPaginator
{
private readonly IAmazonChimeSDKVoice _client;
private readonly ListSipMediaApplicationsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListSipMediaApplicationsResponse> Responses => new PaginatedResponse<ListSipMediaApplicationsResponse>(this);
/// <summary>
/// Enumerable containing all of the SipMediaApplications
/// </summary>
public IPaginatedEnumerable<SipMediaApplication> SipMediaApplications =>
new PaginatedResultKeyResponse<ListSipMediaApplicationsResponse, SipMediaApplication>(this, (i) => i.SipMediaApplications);
internal ListSipMediaApplicationsPaginator(IAmazonChimeSDKVoice client, ListSipMediaApplicationsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListSipMediaApplicationsResponse> IPaginator<ListSipMediaApplicationsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListSipMediaApplicationsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListSipMediaApplications(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListSipMediaApplicationsResponse> IPaginator<ListSipMediaApplicationsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListSipMediaApplicationsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListSipMediaApplicationsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Base class for ListSipRules paginators.
/// </summary>
internal sealed partial class ListSipRulesPaginator : IPaginator<ListSipRulesResponse>, IListSipRulesPaginator
{
private readonly IAmazonChimeSDKVoice _client;
private readonly ListSipRulesRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListSipRulesResponse> Responses => new PaginatedResponse<ListSipRulesResponse>(this);
/// <summary>
/// Enumerable containing all of the SipRules
/// </summary>
public IPaginatedEnumerable<SipRule> SipRules =>
new PaginatedResultKeyResponse<ListSipRulesResponse, SipRule>(this, (i) => i.SipRules);
internal ListSipRulesPaginator(IAmazonChimeSDKVoice client, ListSipRulesRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListSipRulesResponse> IPaginator<ListSipRulesResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListSipRulesResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListSipRules(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListSipRulesResponse> IPaginator<ListSipRulesResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListSipRulesResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListSipRulesAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Base class for ListVoiceConnectorGroups paginators.
/// </summary>
internal sealed partial class ListVoiceConnectorGroupsPaginator : IPaginator<ListVoiceConnectorGroupsResponse>, IListVoiceConnectorGroupsPaginator
{
private readonly IAmazonChimeSDKVoice _client;
private readonly ListVoiceConnectorGroupsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListVoiceConnectorGroupsResponse> Responses => new PaginatedResponse<ListVoiceConnectorGroupsResponse>(this);
internal ListVoiceConnectorGroupsPaginator(IAmazonChimeSDKVoice client, ListVoiceConnectorGroupsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListVoiceConnectorGroupsResponse> IPaginator<ListVoiceConnectorGroupsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListVoiceConnectorGroupsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListVoiceConnectorGroups(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListVoiceConnectorGroupsResponse> IPaginator<ListVoiceConnectorGroupsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListVoiceConnectorGroupsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListVoiceConnectorGroupsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 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 chime-sdk-voice-2022-08-03.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.ChimeSDKVoice.Model
{
/// <summary>
/// Base class for ListVoiceConnectors paginators.
/// </summary>
internal sealed partial class ListVoiceConnectorsPaginator : IPaginator<ListVoiceConnectorsResponse>, IListVoiceConnectorsPaginator
{
private readonly IAmazonChimeSDKVoice _client;
private readonly ListVoiceConnectorsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListVoiceConnectorsResponse> Responses => new PaginatedResponse<ListVoiceConnectorsResponse>(this);
internal ListVoiceConnectorsPaginator(IAmazonChimeSDKVoice client, ListVoiceConnectorsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListVoiceConnectorsResponse> IPaginator<ListVoiceConnectorsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListVoiceConnectorsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListVoiceConnectors(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListVoiceConnectorsResponse> IPaginator<ListVoiceConnectorsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListVoiceConnectorsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListVoiceConnectorsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
}
| 91 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.