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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ComponentChild Object
/// </summary>
public class ComponentChildUnmarshaller : IUnmarshaller<ComponentChild, XmlUnmarshallerContext>, IUnmarshaller<ComponentChild, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ComponentChild IUnmarshaller<ComponentChild, 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 ComponentChild Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ComponentChild unmarshalledObject = new ComponentChild();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("children", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ComponentChild, ComponentChildUnmarshaller>(ComponentChildUnmarshaller.Instance);
unmarshalledObject.Children = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("componentType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ComponentType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("events", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, ComponentEvent, StringUnmarshaller, ComponentEventUnmarshaller>(StringUnmarshaller.Instance, ComponentEventUnmarshaller.Instance);
unmarshalledObject.Events = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("properties", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, ComponentProperty, StringUnmarshaller, ComponentPropertyUnmarshaller>(StringUnmarshaller.Instance, ComponentPropertyUnmarshaller.Instance);
unmarshalledObject.Properties = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sourceId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ComponentChildUnmarshaller _instance = new ComponentChildUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ComponentChildUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ComponentConditionProperty Marshaller
/// </summary>
public class ComponentConditionPropertyMarshaller : IRequestMarshaller<ComponentConditionProperty, 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(ComponentConditionProperty requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetElse())
{
context.Writer.WritePropertyName("else");
context.Writer.WriteObjectStart();
var marshaller = ComponentPropertyMarshaller.Instance;
marshaller.Marshall(requestObject.Else, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetField())
{
context.Writer.WritePropertyName("field");
context.Writer.Write(requestObject.Field);
}
if(requestObject.IsSetOperand())
{
context.Writer.WritePropertyName("operand");
context.Writer.Write(requestObject.Operand);
}
if(requestObject.IsSetOperandType())
{
context.Writer.WritePropertyName("operandType");
context.Writer.Write(requestObject.OperandType);
}
if(requestObject.IsSetOperator())
{
context.Writer.WritePropertyName("operator");
context.Writer.Write(requestObject.Operator);
}
if(requestObject.IsSetProperty())
{
context.Writer.WritePropertyName("property");
context.Writer.Write(requestObject.Property);
}
if(requestObject.IsSetThen())
{
context.Writer.WritePropertyName("then");
context.Writer.WriteObjectStart();
var marshaller = ComponentPropertyMarshaller.Instance;
marshaller.Marshall(requestObject.Then, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ComponentConditionPropertyMarshaller Instance = new ComponentConditionPropertyMarshaller();
}
} | 108 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ComponentConditionProperty Object
/// </summary>
public class ComponentConditionPropertyUnmarshaller : IUnmarshaller<ComponentConditionProperty, XmlUnmarshallerContext>, IUnmarshaller<ComponentConditionProperty, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ComponentConditionProperty IUnmarshaller<ComponentConditionProperty, 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 ComponentConditionProperty Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ComponentConditionProperty unmarshalledObject = new ComponentConditionProperty();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("else", targetDepth))
{
var unmarshaller = ComponentPropertyUnmarshaller.Instance;
unmarshalledObject.Else = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("field", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Field = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operand", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Operand = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operandType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.OperandType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operator", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Operator = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("property", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Property = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("then", targetDepth))
{
var unmarshaller = ComponentPropertyUnmarshaller.Instance;
unmarshalledObject.Then = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ComponentConditionPropertyUnmarshaller _instance = new ComponentConditionPropertyUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ComponentConditionPropertyUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ComponentDataConfiguration Marshaller
/// </summary>
public class ComponentDataConfigurationMarshaller : IRequestMarshaller<ComponentDataConfiguration, 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(ComponentDataConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetIdentifiers())
{
context.Writer.WritePropertyName("identifiers");
context.Writer.WriteArrayStart();
foreach(var requestObjectIdentifiersListValue in requestObject.Identifiers)
{
context.Writer.Write(requestObjectIdentifiersListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetModel())
{
context.Writer.WritePropertyName("model");
context.Writer.Write(requestObject.Model);
}
if(requestObject.IsSetPredicate())
{
context.Writer.WritePropertyName("predicate");
context.Writer.WriteObjectStart();
var marshaller = PredicateMarshaller.Instance;
marshaller.Marshall(requestObject.Predicate, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetSort())
{
context.Writer.WritePropertyName("sort");
context.Writer.WriteArrayStart();
foreach(var requestObjectSortListValue in requestObject.Sort)
{
context.Writer.WriteObjectStart();
var marshaller = SortPropertyMarshaller.Instance;
marshaller.Marshall(requestObjectSortListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ComponentDataConfigurationMarshaller Instance = new ComponentDataConfigurationMarshaller();
}
} | 100 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ComponentDataConfiguration Object
/// </summary>
public class ComponentDataConfigurationUnmarshaller : IUnmarshaller<ComponentDataConfiguration, XmlUnmarshallerContext>, IUnmarshaller<ComponentDataConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ComponentDataConfiguration IUnmarshaller<ComponentDataConfiguration, 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 ComponentDataConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ComponentDataConfiguration unmarshalledObject = new ComponentDataConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("identifiers", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.Identifiers = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("model", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Model = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("predicate", targetDepth))
{
var unmarshaller = PredicateUnmarshaller.Instance;
unmarshalledObject.Predicate = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sort", targetDepth))
{
var unmarshaller = new ListUnmarshaller<SortProperty, SortPropertyUnmarshaller>(SortPropertyUnmarshaller.Instance);
unmarshalledObject.Sort = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ComponentDataConfigurationUnmarshaller _instance = new ComponentDataConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ComponentDataConfigurationUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ComponentEvent Marshaller
/// </summary>
public class ComponentEventMarshaller : IRequestMarshaller<ComponentEvent, 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(ComponentEvent requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAction())
{
context.Writer.WritePropertyName("action");
context.Writer.Write(requestObject.Action);
}
if(requestObject.IsSetBindingEvent())
{
context.Writer.WritePropertyName("bindingEvent");
context.Writer.Write(requestObject.BindingEvent);
}
if(requestObject.IsSetParameters())
{
context.Writer.WritePropertyName("parameters");
context.Writer.WriteObjectStart();
var marshaller = ActionParametersMarshaller.Instance;
marshaller.Marshall(requestObject.Parameters, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ComponentEventMarshaller Instance = new ComponentEventMarshaller();
}
} | 79 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ComponentEvent Object
/// </summary>
public class ComponentEventUnmarshaller : IUnmarshaller<ComponentEvent, XmlUnmarshallerContext>, IUnmarshaller<ComponentEvent, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ComponentEvent IUnmarshaller<ComponentEvent, 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 ComponentEvent Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ComponentEvent unmarshalledObject = new ComponentEvent();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("action", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Action = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("bindingEvent", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.BindingEvent = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("parameters", targetDepth))
{
var unmarshaller = ActionParametersUnmarshaller.Instance;
unmarshalledObject.Parameters = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ComponentEventUnmarshaller _instance = new ComponentEventUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ComponentEventUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ComponentPropertyBindingProperties Marshaller
/// </summary>
public class ComponentPropertyBindingPropertiesMarshaller : IRequestMarshaller<ComponentPropertyBindingProperties, 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(ComponentPropertyBindingProperties requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetField())
{
context.Writer.WritePropertyName("field");
context.Writer.Write(requestObject.Field);
}
if(requestObject.IsSetProperty())
{
context.Writer.WritePropertyName("property");
context.Writer.Write(requestObject.Property);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ComponentPropertyBindingPropertiesMarshaller Instance = new ComponentPropertyBindingPropertiesMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ComponentPropertyBindingProperties Object
/// </summary>
public class ComponentPropertyBindingPropertiesUnmarshaller : IUnmarshaller<ComponentPropertyBindingProperties, XmlUnmarshallerContext>, IUnmarshaller<ComponentPropertyBindingProperties, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ComponentPropertyBindingProperties IUnmarshaller<ComponentPropertyBindingProperties, 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 ComponentPropertyBindingProperties Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ComponentPropertyBindingProperties unmarshalledObject = new ComponentPropertyBindingProperties();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("field", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Field = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("property", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Property = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ComponentPropertyBindingPropertiesUnmarshaller _instance = new ComponentPropertyBindingPropertiesUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ComponentPropertyBindingPropertiesUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ComponentProperty Marshaller
/// </summary>
public class ComponentPropertyMarshaller : IRequestMarshaller<ComponentProperty, 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(ComponentProperty requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetBindingProperties())
{
context.Writer.WritePropertyName("bindingProperties");
context.Writer.WriteObjectStart();
var marshaller = ComponentPropertyBindingPropertiesMarshaller.Instance;
marshaller.Marshall(requestObject.BindingProperties, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetBindings())
{
context.Writer.WritePropertyName("bindings");
context.Writer.WriteObjectStart();
foreach (var requestObjectBindingsKvp in requestObject.Bindings)
{
context.Writer.WritePropertyName(requestObjectBindingsKvp.Key);
var requestObjectBindingsValue = requestObjectBindingsKvp.Value;
context.Writer.WriteObjectStart();
var marshaller = FormBindingElementMarshaller.Instance;
marshaller.Marshall(requestObjectBindingsValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetCollectionBindingProperties())
{
context.Writer.WritePropertyName("collectionBindingProperties");
context.Writer.WriteObjectStart();
var marshaller = ComponentPropertyBindingPropertiesMarshaller.Instance;
marshaller.Marshall(requestObject.CollectionBindingProperties, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetComponentName())
{
context.Writer.WritePropertyName("componentName");
context.Writer.Write(requestObject.ComponentName);
}
if(requestObject.IsSetConcat())
{
context.Writer.WritePropertyName("concat");
context.Writer.WriteArrayStart();
foreach(var requestObjectConcatListValue in requestObject.Concat)
{
context.Writer.WriteObjectStart();
var marshaller = ComponentPropertyMarshaller.Instance;
marshaller.Marshall(requestObjectConcatListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetCondition())
{
context.Writer.WritePropertyName("condition");
context.Writer.WriteObjectStart();
var marshaller = ComponentConditionPropertyMarshaller.Instance;
marshaller.Marshall(requestObject.Condition, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetConfigured())
{
context.Writer.WritePropertyName("configured");
context.Writer.Write(requestObject.Configured);
}
if(requestObject.IsSetDefaultValue())
{
context.Writer.WritePropertyName("defaultValue");
context.Writer.Write(requestObject.DefaultValue);
}
if(requestObject.IsSetEvent())
{
context.Writer.WritePropertyName("event");
context.Writer.Write(requestObject.Event);
}
if(requestObject.IsSetImportedValue())
{
context.Writer.WritePropertyName("importedValue");
context.Writer.Write(requestObject.ImportedValue);
}
if(requestObject.IsSetModel())
{
context.Writer.WritePropertyName("model");
context.Writer.Write(requestObject.Model);
}
if(requestObject.IsSetProperty())
{
context.Writer.WritePropertyName("property");
context.Writer.Write(requestObject.Property);
}
if(requestObject.IsSetType())
{
context.Writer.WritePropertyName("type");
context.Writer.Write(requestObject.Type);
}
if(requestObject.IsSetUserAttribute())
{
context.Writer.WritePropertyName("userAttribute");
context.Writer.Write(requestObject.UserAttribute);
}
if(requestObject.IsSetValue())
{
context.Writer.WritePropertyName("value");
context.Writer.Write(requestObject.Value);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ComponentPropertyMarshaller Instance = new ComponentPropertyMarshaller();
}
} | 184 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ComponentProperty Object
/// </summary>
public class ComponentPropertyUnmarshaller : IUnmarshaller<ComponentProperty, XmlUnmarshallerContext>, IUnmarshaller<ComponentProperty, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ComponentProperty IUnmarshaller<ComponentProperty, 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 ComponentProperty Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ComponentProperty unmarshalledObject = new ComponentProperty();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("bindingProperties", targetDepth))
{
var unmarshaller = ComponentPropertyBindingPropertiesUnmarshaller.Instance;
unmarshalledObject.BindingProperties = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("bindings", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, FormBindingElement, StringUnmarshaller, FormBindingElementUnmarshaller>(StringUnmarshaller.Instance, FormBindingElementUnmarshaller.Instance);
unmarshalledObject.Bindings = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("collectionBindingProperties", targetDepth))
{
var unmarshaller = ComponentPropertyBindingPropertiesUnmarshaller.Instance;
unmarshalledObject.CollectionBindingProperties = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("componentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ComponentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("concat", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ComponentProperty, ComponentPropertyUnmarshaller>(ComponentPropertyUnmarshaller.Instance);
unmarshalledObject.Concat = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("condition", targetDepth))
{
var unmarshaller = ComponentConditionPropertyUnmarshaller.Instance;
unmarshalledObject.Condition = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("configured", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Configured = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("defaultValue", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DefaultValue = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("event", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Event = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("importedValue", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ImportedValue = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("model", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Model = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("property", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Property = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("type", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Type = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("userAttribute", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.UserAttribute = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("value", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Value = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ComponentPropertyUnmarshaller _instance = new ComponentPropertyUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ComponentPropertyUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 176 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ComponentSummary Object
/// </summary>
public class ComponentSummaryUnmarshaller : IUnmarshaller<ComponentSummary, XmlUnmarshallerContext>, IUnmarshaller<ComponentSummary, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ComponentSummary IUnmarshaller<ComponentSummary, 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 ComponentSummary Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ComponentSummary unmarshalledObject = new ComponentSummary();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("componentType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ComponentType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("environmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Id = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ComponentSummaryUnmarshaller _instance = new ComponentSummaryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ComponentSummaryUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Component Object
/// </summary>
public class ComponentUnmarshaller : IUnmarshaller<Component, XmlUnmarshallerContext>, IUnmarshaller<Component, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Component IUnmarshaller<Component, 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 Component Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Component unmarshalledObject = new Component();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("bindingProperties", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, ComponentBindingPropertiesValue, StringUnmarshaller, ComponentBindingPropertiesValueUnmarshaller>(StringUnmarshaller.Instance, ComponentBindingPropertiesValueUnmarshaller.Instance);
unmarshalledObject.BindingProperties = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("children", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ComponentChild, ComponentChildUnmarshaller>(ComponentChildUnmarshaller.Instance);
unmarshalledObject.Children = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("collectionProperties", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, ComponentDataConfiguration, StringUnmarshaller, ComponentDataConfigurationUnmarshaller>(StringUnmarshaller.Instance, ComponentDataConfigurationUnmarshaller.Instance);
unmarshalledObject.CollectionProperties = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("componentType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ComponentType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("createdAt", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("environmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("events", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, ComponentEvent, StringUnmarshaller, ComponentEventUnmarshaller>(StringUnmarshaller.Instance, ComponentEventUnmarshaller.Instance);
unmarshalledObject.Events = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Id = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("modifiedAt", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.ModifiedAt = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("overrides", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, Dictionary<string, string>, StringUnmarshaller, DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>>(StringUnmarshaller.Instance, new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance));
unmarshalledObject.Overrides = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("properties", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, ComponentProperty, StringUnmarshaller, ComponentPropertyUnmarshaller>(StringUnmarshaller.Instance, ComponentPropertyUnmarshaller.Instance);
unmarshalledObject.Properties = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("schemaVersion", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SchemaVersion = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sourceId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("tags", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.Tags = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("variants", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ComponentVariant, ComponentVariantUnmarshaller>(ComponentVariantUnmarshaller.Instance);
unmarshalledObject.Variants = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ComponentUnmarshaller _instance = new ComponentUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ComponentUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 188 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ComponentVariant Marshaller
/// </summary>
public class ComponentVariantMarshaller : IRequestMarshaller<ComponentVariant, 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(ComponentVariant requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetOverrides())
{
context.Writer.WritePropertyName("overrides");
context.Writer.WriteObjectStart();
foreach (var requestObjectOverridesKvp in requestObject.Overrides)
{
context.Writer.WritePropertyName(requestObjectOverridesKvp.Key);
var requestObjectOverridesValue = requestObjectOverridesKvp.Value;
context.Writer.WriteObjectStart();
foreach (var requestObjectOverridesValueKvp in requestObjectOverridesValue)
{
context.Writer.WritePropertyName(requestObjectOverridesValueKvp.Key);
var requestObjectOverridesValueValue = requestObjectOverridesValueKvp.Value;
context.Writer.Write(requestObjectOverridesValueValue);
}
context.Writer.WriteObjectEnd();
}
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetVariantValues())
{
context.Writer.WritePropertyName("variantValues");
context.Writer.WriteObjectStart();
foreach (var requestObjectVariantValuesKvp in requestObject.VariantValues)
{
context.Writer.WritePropertyName(requestObjectVariantValuesKvp.Key);
var requestObjectVariantValuesValue = requestObjectVariantValuesKvp.Value;
context.Writer.Write(requestObjectVariantValuesValue);
}
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ComponentVariantMarshaller Instance = new ComponentVariantMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ComponentVariant Object
/// </summary>
public class ComponentVariantUnmarshaller : IUnmarshaller<ComponentVariant, XmlUnmarshallerContext>, IUnmarshaller<ComponentVariant, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ComponentVariant IUnmarshaller<ComponentVariant, 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 ComponentVariant Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ComponentVariant unmarshalledObject = new ComponentVariant();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("overrides", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, Dictionary<string, string>, StringUnmarshaller, DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>>(StringUnmarshaller.Instance, new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance));
unmarshalledObject.Overrides = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("variantValues", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.VariantValues = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ComponentVariantUnmarshaller _instance = new ComponentVariantUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ComponentVariantUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateComponentData Marshaller
/// </summary>
public class CreateComponentDataMarshaller : IRequestMarshaller<CreateComponentData, 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(CreateComponentData requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetBindingProperties())
{
context.Writer.WritePropertyName("bindingProperties");
context.Writer.WriteObjectStart();
foreach (var requestObjectBindingPropertiesKvp in requestObject.BindingProperties)
{
context.Writer.WritePropertyName(requestObjectBindingPropertiesKvp.Key);
var requestObjectBindingPropertiesValue = requestObjectBindingPropertiesKvp.Value;
context.Writer.WriteObjectStart();
var marshaller = ComponentBindingPropertiesValueMarshaller.Instance;
marshaller.Marshall(requestObjectBindingPropertiesValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetChildren())
{
context.Writer.WritePropertyName("children");
context.Writer.WriteArrayStart();
foreach(var requestObjectChildrenListValue in requestObject.Children)
{
context.Writer.WriteObjectStart();
var marshaller = ComponentChildMarshaller.Instance;
marshaller.Marshall(requestObjectChildrenListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetCollectionProperties())
{
context.Writer.WritePropertyName("collectionProperties");
context.Writer.WriteObjectStart();
foreach (var requestObjectCollectionPropertiesKvp in requestObject.CollectionProperties)
{
context.Writer.WritePropertyName(requestObjectCollectionPropertiesKvp.Key);
var requestObjectCollectionPropertiesValue = requestObjectCollectionPropertiesKvp.Value;
context.Writer.WriteObjectStart();
var marshaller = ComponentDataConfigurationMarshaller.Instance;
marshaller.Marshall(requestObjectCollectionPropertiesValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetComponentType())
{
context.Writer.WritePropertyName("componentType");
context.Writer.Write(requestObject.ComponentType);
}
if(requestObject.IsSetEvents())
{
context.Writer.WritePropertyName("events");
context.Writer.WriteObjectStart();
foreach (var requestObjectEventsKvp in requestObject.Events)
{
context.Writer.WritePropertyName(requestObjectEventsKvp.Key);
var requestObjectEventsValue = requestObjectEventsKvp.Value;
context.Writer.WriteObjectStart();
var marshaller = ComponentEventMarshaller.Instance;
marshaller.Marshall(requestObjectEventsValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetName())
{
context.Writer.WritePropertyName("name");
context.Writer.Write(requestObject.Name);
}
if(requestObject.IsSetOverrides())
{
context.Writer.WritePropertyName("overrides");
context.Writer.WriteObjectStart();
foreach (var requestObjectOverridesKvp in requestObject.Overrides)
{
context.Writer.WritePropertyName(requestObjectOverridesKvp.Key);
var requestObjectOverridesValue = requestObjectOverridesKvp.Value;
context.Writer.WriteObjectStart();
foreach (var requestObjectOverridesValueKvp in requestObjectOverridesValue)
{
context.Writer.WritePropertyName(requestObjectOverridesValueKvp.Key);
var requestObjectOverridesValueValue = requestObjectOverridesValueKvp.Value;
context.Writer.Write(requestObjectOverridesValueValue);
}
context.Writer.WriteObjectEnd();
}
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetProperties())
{
context.Writer.WritePropertyName("properties");
context.Writer.WriteObjectStart();
foreach (var requestObjectPropertiesKvp in requestObject.Properties)
{
context.Writer.WritePropertyName(requestObjectPropertiesKvp.Key);
var requestObjectPropertiesValue = requestObjectPropertiesKvp.Value;
context.Writer.WriteObjectStart();
var marshaller = ComponentPropertyMarshaller.Instance;
marshaller.Marshall(requestObjectPropertiesValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetSchemaVersion())
{
context.Writer.WritePropertyName("schemaVersion");
context.Writer.Write(requestObject.SchemaVersion);
}
if(requestObject.IsSetSourceId())
{
context.Writer.WritePropertyName("sourceId");
context.Writer.Write(requestObject.SourceId);
}
if(requestObject.IsSetTags())
{
context.Writer.WritePropertyName("tags");
context.Writer.WriteObjectStart();
foreach (var requestObjectTagsKvp in requestObject.Tags)
{
context.Writer.WritePropertyName(requestObjectTagsKvp.Key);
var requestObjectTagsValue = requestObjectTagsKvp.Value;
context.Writer.Write(requestObjectTagsValue);
}
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetVariants())
{
context.Writer.WritePropertyName("variants");
context.Writer.WriteArrayStart();
foreach(var requestObjectVariantsListValue in requestObject.Variants)
{
context.Writer.WriteObjectStart();
var marshaller = ComponentVariantMarshaller.Instance;
marshaller.Marshall(requestObjectVariantsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateComponentDataMarshaller Instance = new CreateComponentDataMarshaller();
}
} | 224 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateComponent Request Marshaller
/// </summary>
public class CreateComponentRequestMarshaller : IMarshaller<IRequest, CreateComponentRequest> , 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((CreateComponentRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateComponentRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (publicRequest.IsSetClientToken())
request.Parameters.Add("clientToken", StringUtils.FromString(publicRequest.ClientToken));
else
request.Parameters.Add("clientToken", System.Guid.NewGuid().ToString());
request.ResourcePath = "/app/{appId}/environment/{environmentName}/components";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
var context = new JsonMarshallerContext(request, writer);
context.Writer.WriteObjectStart();
var marshaller = CreateComponentDataMarshaller.Instance;
marshaller.Marshall(publicRequest.ComponentToCreate, context);
context.Writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
request.UseQueryString = true;
return request;
}
private static CreateComponentRequestMarshaller _instance = new CreateComponentRequestMarshaller();
internal static CreateComponentRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateComponentRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 112 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateComponent operation
/// </summary>
public class CreateComponentResponseUnmarshaller : 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)
{
CreateComponentResponse response = new CreateComponentResponse();
var unmarshaller = ComponentUnmarshaller.Instance;
response.Entity = unmarshaller.Unmarshall(context);
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceConflictException"))
{
return ResourceConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceQuotaExceededException"))
{
return ServiceQuotaExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateComponentResponseUnmarshaller _instance = new CreateComponentResponseUnmarshaller();
internal static CreateComponentResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateComponentResponseUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateFormData Marshaller
/// </summary>
public class CreateFormDataMarshaller : IRequestMarshaller<CreateFormData, 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(CreateFormData requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetCta())
{
context.Writer.WritePropertyName("cta");
context.Writer.WriteObjectStart();
var marshaller = FormCTAMarshaller.Instance;
marshaller.Marshall(requestObject.Cta, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetDataType())
{
context.Writer.WritePropertyName("dataType");
context.Writer.WriteObjectStart();
var marshaller = FormDataTypeConfigMarshaller.Instance;
marshaller.Marshall(requestObject.DataType, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetFields())
{
context.Writer.WritePropertyName("fields");
context.Writer.WriteObjectStart();
foreach (var requestObjectFieldsKvp in requestObject.Fields)
{
context.Writer.WritePropertyName(requestObjectFieldsKvp.Key);
var requestObjectFieldsValue = requestObjectFieldsKvp.Value;
context.Writer.WriteObjectStart();
var marshaller = FieldConfigMarshaller.Instance;
marshaller.Marshall(requestObjectFieldsValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetFormActionType())
{
context.Writer.WritePropertyName("formActionType");
context.Writer.Write(requestObject.FormActionType);
}
if(requestObject.IsSetLabelDecorator())
{
context.Writer.WritePropertyName("labelDecorator");
context.Writer.Write(requestObject.LabelDecorator);
}
if(requestObject.IsSetName())
{
context.Writer.WritePropertyName("name");
context.Writer.Write(requestObject.Name);
}
if(requestObject.IsSetSchemaVersion())
{
context.Writer.WritePropertyName("schemaVersion");
context.Writer.Write(requestObject.SchemaVersion);
}
if(requestObject.IsSetSectionalElements())
{
context.Writer.WritePropertyName("sectionalElements");
context.Writer.WriteObjectStart();
foreach (var requestObjectSectionalElementsKvp in requestObject.SectionalElements)
{
context.Writer.WritePropertyName(requestObjectSectionalElementsKvp.Key);
var requestObjectSectionalElementsValue = requestObjectSectionalElementsKvp.Value;
context.Writer.WriteObjectStart();
var marshaller = SectionalElementMarshaller.Instance;
marshaller.Marshall(requestObjectSectionalElementsValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetStyle())
{
context.Writer.WritePropertyName("style");
context.Writer.WriteObjectStart();
var marshaller = FormStyleMarshaller.Instance;
marshaller.Marshall(requestObject.Style, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetTags())
{
context.Writer.WritePropertyName("tags");
context.Writer.WriteObjectStart();
foreach (var requestObjectTagsKvp in requestObject.Tags)
{
context.Writer.WritePropertyName(requestObjectTagsKvp.Key);
var requestObjectTagsValue = requestObjectTagsKvp.Value;
context.Writer.Write(requestObjectTagsValue);
}
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateFormDataMarshaller Instance = new CreateFormDataMarshaller();
}
} | 165 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateForm Request Marshaller
/// </summary>
public class CreateFormRequestMarshaller : IMarshaller<IRequest, CreateFormRequest> , 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((CreateFormRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateFormRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (publicRequest.IsSetClientToken())
request.Parameters.Add("clientToken", StringUtils.FromString(publicRequest.ClientToken));
else
request.Parameters.Add("clientToken", System.Guid.NewGuid().ToString());
request.ResourcePath = "/app/{appId}/environment/{environmentName}/forms";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
var context = new JsonMarshallerContext(request, writer);
context.Writer.WriteObjectStart();
var marshaller = CreateFormDataMarshaller.Instance;
marshaller.Marshall(publicRequest.FormToCreate, context);
context.Writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
request.UseQueryString = true;
return request;
}
private static CreateFormRequestMarshaller _instance = new CreateFormRequestMarshaller();
internal static CreateFormRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateFormRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 112 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateForm operation
/// </summary>
public class CreateFormResponseUnmarshaller : 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)
{
CreateFormResponse response = new CreateFormResponse();
var unmarshaller = FormUnmarshaller.Instance;
response.Entity = unmarshaller.Unmarshall(context);
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceConflictException"))
{
return ResourceConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceQuotaExceededException"))
{
return ServiceQuotaExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateFormResponseUnmarshaller _instance = new CreateFormResponseUnmarshaller();
internal static CreateFormResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateFormResponseUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateThemeData Marshaller
/// </summary>
public class CreateThemeDataMarshaller : IRequestMarshaller<CreateThemeData, 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(CreateThemeData requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetName())
{
context.Writer.WritePropertyName("name");
context.Writer.Write(requestObject.Name);
}
if(requestObject.IsSetOverrides())
{
context.Writer.WritePropertyName("overrides");
context.Writer.WriteArrayStart();
foreach(var requestObjectOverridesListValue in requestObject.Overrides)
{
context.Writer.WriteObjectStart();
var marshaller = ThemeValuesMarshaller.Instance;
marshaller.Marshall(requestObjectOverridesListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetTags())
{
context.Writer.WritePropertyName("tags");
context.Writer.WriteObjectStart();
foreach (var requestObjectTagsKvp in requestObject.Tags)
{
context.Writer.WritePropertyName(requestObjectTagsKvp.Key);
var requestObjectTagsValue = requestObjectTagsKvp.Value;
context.Writer.Write(requestObjectTagsValue);
}
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetValues())
{
context.Writer.WritePropertyName("values");
context.Writer.WriteArrayStart();
foreach(var requestObjectValuesListValue in requestObject.Values)
{
context.Writer.WriteObjectStart();
var marshaller = ThemeValuesMarshaller.Instance;
marshaller.Marshall(requestObjectValuesListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateThemeDataMarshaller Instance = new CreateThemeDataMarshaller();
}
} | 108 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateTheme Request Marshaller
/// </summary>
public class CreateThemeRequestMarshaller : IMarshaller<IRequest, CreateThemeRequest> , 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((CreateThemeRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateThemeRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (publicRequest.IsSetClientToken())
request.Parameters.Add("clientToken", StringUtils.FromString(publicRequest.ClientToken));
else
request.Parameters.Add("clientToken", System.Guid.NewGuid().ToString());
request.ResourcePath = "/app/{appId}/environment/{environmentName}/themes";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
var context = new JsonMarshallerContext(request, writer);
context.Writer.WriteObjectStart();
var marshaller = CreateThemeDataMarshaller.Instance;
marshaller.Marshall(publicRequest.ThemeToCreate, context);
context.Writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
request.UseQueryString = true;
return request;
}
private static CreateThemeRequestMarshaller _instance = new CreateThemeRequestMarshaller();
internal static CreateThemeRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateThemeRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 112 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateTheme operation
/// </summary>
public class CreateThemeResponseUnmarshaller : 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)
{
CreateThemeResponse response = new CreateThemeResponse();
var unmarshaller = ThemeUnmarshaller.Instance;
response.Entity = unmarshaller.Unmarshall(context);
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceConflictException"))
{
return ResourceConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceQuotaExceededException"))
{
return ServiceQuotaExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateThemeResponseUnmarshaller _instance = new CreateThemeResponseUnmarshaller();
internal static CreateThemeResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateThemeResponseUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteComponent Request Marshaller
/// </summary>
public class DeleteComponentRequestMarshaller : IMarshaller<IRequest, DeleteComponentRequest> , 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((DeleteComponentRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteComponentRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (!publicRequest.IsSetId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field Id set");
request.AddPathResource("{id}", StringUtils.FromString(publicRequest.Id));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/components/{id}";
return request;
}
private static DeleteComponentRequestMarshaller _instance = new DeleteComponentRequestMarshaller();
internal static DeleteComponentRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteComponentRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 93 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteComponent operation
/// </summary>
public class DeleteComponentResponseUnmarshaller : 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)
{
DeleteComponentResponse response = new DeleteComponentResponse();
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteComponentResponseUnmarshaller _instance = new DeleteComponentResponseUnmarshaller();
internal static DeleteComponentResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteComponentResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 107 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteForm Request Marshaller
/// </summary>
public class DeleteFormRequestMarshaller : IMarshaller<IRequest, DeleteFormRequest> , 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((DeleteFormRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteFormRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (!publicRequest.IsSetId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field Id set");
request.AddPathResource("{id}", StringUtils.FromString(publicRequest.Id));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/forms/{id}";
return request;
}
private static DeleteFormRequestMarshaller _instance = new DeleteFormRequestMarshaller();
internal static DeleteFormRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteFormRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 93 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteForm operation
/// </summary>
public class DeleteFormResponseUnmarshaller : 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)
{
DeleteFormResponse response = new DeleteFormResponse();
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteFormResponseUnmarshaller _instance = new DeleteFormResponseUnmarshaller();
internal static DeleteFormResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteFormResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 107 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteTheme Request Marshaller
/// </summary>
public class DeleteThemeRequestMarshaller : IMarshaller<IRequest, DeleteThemeRequest> , 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((DeleteThemeRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteThemeRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (!publicRequest.IsSetId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field Id set");
request.AddPathResource("{id}", StringUtils.FromString(publicRequest.Id));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/themes/{id}";
return request;
}
private static DeleteThemeRequestMarshaller _instance = new DeleteThemeRequestMarshaller();
internal static DeleteThemeRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteThemeRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 93 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteTheme operation
/// </summary>
public class DeleteThemeResponseUnmarshaller : 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)
{
DeleteThemeResponse response = new DeleteThemeResponse();
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteThemeResponseUnmarshaller _instance = new DeleteThemeResponseUnmarshaller();
internal static DeleteThemeResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteThemeResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 107 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ExchangeCodeForTokenRequestBody Marshaller
/// </summary>
public class ExchangeCodeForTokenRequestBodyMarshaller : IRequestMarshaller<ExchangeCodeForTokenRequestBody, 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(ExchangeCodeForTokenRequestBody requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetClientId())
{
context.Writer.WritePropertyName("clientId");
context.Writer.Write(requestObject.ClientId);
}
if(requestObject.IsSetCode())
{
context.Writer.WritePropertyName("code");
context.Writer.Write(requestObject.Code);
}
if(requestObject.IsSetRedirectUri())
{
context.Writer.WritePropertyName("redirectUri");
context.Writer.Write(requestObject.RedirectUri);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ExchangeCodeForTokenRequestBodyMarshaller Instance = new ExchangeCodeForTokenRequestBodyMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ExchangeCodeForToken Request Marshaller
/// </summary>
public class ExchangeCodeForTokenRequestMarshaller : IMarshaller<IRequest, ExchangeCodeForTokenRequest> , 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((ExchangeCodeForTokenRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ExchangeCodeForTokenRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetProvider())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field Provider set");
request.AddPathResource("{provider}", StringUtils.FromString(publicRequest.Provider));
request.ResourcePath = "/tokens/{provider}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
var context = new JsonMarshallerContext(request, writer);
context.Writer.WriteObjectStart();
var marshaller = ExchangeCodeForTokenRequestBodyMarshaller.Instance;
marshaller.Marshall(publicRequest.Request, context);
context.Writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static ExchangeCodeForTokenRequestMarshaller _instance = new ExchangeCodeForTokenRequestMarshaller();
internal static ExchangeCodeForTokenRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExchangeCodeForTokenRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 102 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ExchangeCodeForToken operation
/// </summary>
public class ExchangeCodeForTokenResponseUnmarshaller : 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)
{
ExchangeCodeForTokenResponse response = new ExchangeCodeForTokenResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("accessToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AccessToken = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("expiresIn", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
response.ExpiresIn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("refreshToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.RefreshToken = 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("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ExchangeCodeForTokenResponseUnmarshaller _instance = new ExchangeCodeForTokenResponseUnmarshaller();
internal static ExchangeCodeForTokenResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExchangeCodeForTokenResponseUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ExportComponents Request Marshaller
/// </summary>
public class ExportComponentsRequestMarshaller : IMarshaller<IRequest, ExportComponentsRequest> , 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((ExportComponentsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ExportComponentsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/export/app/{appId}/environment/{environmentName}/components";
request.UseQueryString = true;
return request;
}
private static ExportComponentsRequestMarshaller _instance = new ExportComponentsRequestMarshaller();
internal static ExportComponentsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExportComponentsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 94 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ExportComponents operation
/// </summary>
public class ExportComponentsResponseUnmarshaller : 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)
{
ExportComponentsResponse response = new ExportComponentsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("entities", targetDepth))
{
var unmarshaller = new ListUnmarshaller<Component, ComponentUnmarshaller>(ComponentUnmarshaller.Instance);
response.Entities = 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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ExportComponentsResponseUnmarshaller _instance = new ExportComponentsResponseUnmarshaller();
internal static ExportComponentsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExportComponentsResponseUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ExportForms Request Marshaller
/// </summary>
public class ExportFormsRequestMarshaller : IMarshaller<IRequest, ExportFormsRequest> , 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((ExportFormsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ExportFormsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/export/app/{appId}/environment/{environmentName}/forms";
request.UseQueryString = true;
return request;
}
private static ExportFormsRequestMarshaller _instance = new ExportFormsRequestMarshaller();
internal static ExportFormsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExportFormsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 94 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ExportForms operation
/// </summary>
public class ExportFormsResponseUnmarshaller : 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)
{
ExportFormsResponse response = new ExportFormsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("entities", targetDepth))
{
var unmarshaller = new ListUnmarshaller<Form, FormUnmarshaller>(FormUnmarshaller.Instance);
response.Entities = 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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ExportFormsResponseUnmarshaller _instance = new ExportFormsResponseUnmarshaller();
internal static ExportFormsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExportFormsResponseUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ExportThemes Request Marshaller
/// </summary>
public class ExportThemesRequestMarshaller : IMarshaller<IRequest, ExportThemesRequest> , 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((ExportThemesRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ExportThemesRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/export/app/{appId}/environment/{environmentName}/themes";
request.UseQueryString = true;
return request;
}
private static ExportThemesRequestMarshaller _instance = new ExportThemesRequestMarshaller();
internal static ExportThemesRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExportThemesRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 94 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ExportThemes operation
/// </summary>
public class ExportThemesResponseUnmarshaller : 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)
{
ExportThemesResponse response = new ExportThemesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("entities", targetDepth))
{
var unmarshaller = new ListUnmarshaller<Theme, ThemeUnmarshaller>(ThemeUnmarshaller.Instance);
response.Entities = 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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ExportThemesResponseUnmarshaller _instance = new ExportThemesResponseUnmarshaller();
internal static ExportThemesResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExportThemesResponseUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FieldConfig Marshaller
/// </summary>
public class FieldConfigMarshaller : IRequestMarshaller<FieldConfig, 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(FieldConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetExcluded())
{
context.Writer.WritePropertyName("excluded");
context.Writer.Write(requestObject.Excluded);
}
if(requestObject.IsSetInputType())
{
context.Writer.WritePropertyName("inputType");
context.Writer.WriteObjectStart();
var marshaller = FieldInputConfigMarshaller.Instance;
marshaller.Marshall(requestObject.InputType, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetLabel())
{
context.Writer.WritePropertyName("label");
context.Writer.Write(requestObject.Label);
}
if(requestObject.IsSetPosition())
{
context.Writer.WritePropertyName("position");
context.Writer.WriteObjectStart();
var marshaller = FieldPositionMarshaller.Instance;
marshaller.Marshall(requestObject.Position, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetValidations())
{
context.Writer.WritePropertyName("validations");
context.Writer.WriteArrayStart();
foreach(var requestObjectValidationsListValue in requestObject.Validations)
{
context.Writer.WriteObjectStart();
var marshaller = FieldValidationConfigurationMarshaller.Instance;
marshaller.Marshall(requestObjectValidationsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FieldConfigMarshaller Instance = new FieldConfigMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FieldConfig Object
/// </summary>
public class FieldConfigUnmarshaller : IUnmarshaller<FieldConfig, XmlUnmarshallerContext>, IUnmarshaller<FieldConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FieldConfig IUnmarshaller<FieldConfig, 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 FieldConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FieldConfig unmarshalledObject = new FieldConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("excluded", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Excluded = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("inputType", targetDepth))
{
var unmarshaller = FieldInputConfigUnmarshaller.Instance;
unmarshalledObject.InputType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("label", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Label = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("position", targetDepth))
{
var unmarshaller = FieldPositionUnmarshaller.Instance;
unmarshalledObject.Position = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("validations", targetDepth))
{
var unmarshaller = new ListUnmarshaller<FieldValidationConfiguration, FieldValidationConfigurationUnmarshaller>(FieldValidationConfigurationUnmarshaller.Instance);
unmarshalledObject.Validations = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FieldConfigUnmarshaller _instance = new FieldConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FieldConfigUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FieldInputConfig Marshaller
/// </summary>
public class FieldInputConfigMarshaller : IRequestMarshaller<FieldInputConfig, 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(FieldInputConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetDefaultChecked())
{
context.Writer.WritePropertyName("defaultChecked");
context.Writer.Write(requestObject.DefaultChecked);
}
if(requestObject.IsSetDefaultCountryCode())
{
context.Writer.WritePropertyName("defaultCountryCode");
context.Writer.Write(requestObject.DefaultCountryCode);
}
if(requestObject.IsSetDefaultValue())
{
context.Writer.WritePropertyName("defaultValue");
context.Writer.Write(requestObject.DefaultValue);
}
if(requestObject.IsSetDescriptiveText())
{
context.Writer.WritePropertyName("descriptiveText");
context.Writer.Write(requestObject.DescriptiveText);
}
if(requestObject.IsSetFileUploaderConfig())
{
context.Writer.WritePropertyName("fileUploaderConfig");
context.Writer.WriteObjectStart();
var marshaller = FileUploaderFieldConfigMarshaller.Instance;
marshaller.Marshall(requestObject.FileUploaderConfig, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetIsArray())
{
context.Writer.WritePropertyName("isArray");
context.Writer.Write(requestObject.IsArray);
}
if(requestObject.IsSetMaxValue())
{
context.Writer.WritePropertyName("maxValue");
context.Writer.Write(requestObject.MaxValue);
}
if(requestObject.IsSetMinValue())
{
context.Writer.WritePropertyName("minValue");
context.Writer.Write(requestObject.MinValue);
}
if(requestObject.IsSetName())
{
context.Writer.WritePropertyName("name");
context.Writer.Write(requestObject.Name);
}
if(requestObject.IsSetPlaceholder())
{
context.Writer.WritePropertyName("placeholder");
context.Writer.Write(requestObject.Placeholder);
}
if(requestObject.IsSetReadOnly())
{
context.Writer.WritePropertyName("readOnly");
context.Writer.Write(requestObject.ReadOnly);
}
if(requestObject.IsSetRequired())
{
context.Writer.WritePropertyName("required");
context.Writer.Write(requestObject.Required);
}
if(requestObject.IsSetStep())
{
context.Writer.WritePropertyName("step");
context.Writer.Write(requestObject.Step);
}
if(requestObject.IsSetType())
{
context.Writer.WritePropertyName("type");
context.Writer.Write(requestObject.Type);
}
if(requestObject.IsSetValue())
{
context.Writer.WritePropertyName("value");
context.Writer.Write(requestObject.Value);
}
if(requestObject.IsSetValueMappings())
{
context.Writer.WritePropertyName("valueMappings");
context.Writer.WriteObjectStart();
var marshaller = ValueMappingsMarshaller.Instance;
marshaller.Marshall(requestObject.ValueMappings, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FieldInputConfigMarshaller Instance = new FieldInputConfigMarshaller();
}
} | 162 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FieldInputConfig Object
/// </summary>
public class FieldInputConfigUnmarshaller : IUnmarshaller<FieldInputConfig, XmlUnmarshallerContext>, IUnmarshaller<FieldInputConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FieldInputConfig IUnmarshaller<FieldInputConfig, 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 FieldInputConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FieldInputConfig unmarshalledObject = new FieldInputConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("defaultChecked", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.DefaultChecked = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("defaultCountryCode", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DefaultCountryCode = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("defaultValue", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DefaultValue = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("descriptiveText", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DescriptiveText = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("fileUploaderConfig", targetDepth))
{
var unmarshaller = FileUploaderFieldConfigUnmarshaller.Instance;
unmarshalledObject.FileUploaderConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("isArray", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.IsArray = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("maxValue", targetDepth))
{
var unmarshaller = FloatUnmarshaller.Instance;
unmarshalledObject.MaxValue = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("minValue", targetDepth))
{
var unmarshaller = FloatUnmarshaller.Instance;
unmarshalledObject.MinValue = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("placeholder", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Placeholder = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("readOnly", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.ReadOnly = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("required", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Required = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("step", targetDepth))
{
var unmarshaller = FloatUnmarshaller.Instance;
unmarshalledObject.Step = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("type", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Type = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("value", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Value = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("valueMappings", targetDepth))
{
var unmarshaller = ValueMappingsUnmarshaller.Instance;
unmarshalledObject.ValueMappings = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FieldInputConfigUnmarshaller _instance = new FieldInputConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FieldInputConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 182 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FieldPosition Marshaller
/// </summary>
public class FieldPositionMarshaller : IRequestMarshaller<FieldPosition, 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(FieldPosition requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetBelow())
{
context.Writer.WritePropertyName("below");
context.Writer.Write(requestObject.Below);
}
if(requestObject.IsSetFixed())
{
context.Writer.WritePropertyName("fixed");
context.Writer.Write(requestObject.Fixed);
}
if(requestObject.IsSetRightOf())
{
context.Writer.WritePropertyName("rightOf");
context.Writer.Write(requestObject.RightOf);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FieldPositionMarshaller Instance = new FieldPositionMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FieldPosition Object
/// </summary>
public class FieldPositionUnmarshaller : IUnmarshaller<FieldPosition, XmlUnmarshallerContext>, IUnmarshaller<FieldPosition, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FieldPosition IUnmarshaller<FieldPosition, 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 FieldPosition Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FieldPosition unmarshalledObject = new FieldPosition();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("below", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Below = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("fixed", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Fixed = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("rightOf", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.RightOf = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FieldPositionUnmarshaller _instance = new FieldPositionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FieldPositionUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FieldValidationConfiguration Marshaller
/// </summary>
public class FieldValidationConfigurationMarshaller : IRequestMarshaller<FieldValidationConfiguration, 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(FieldValidationConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetNumValues())
{
context.Writer.WritePropertyName("numValues");
context.Writer.WriteArrayStart();
foreach(var requestObjectNumValuesListValue in requestObject.NumValues)
{
context.Writer.Write(requestObjectNumValuesListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetStrValues())
{
context.Writer.WritePropertyName("strValues");
context.Writer.WriteArrayStart();
foreach(var requestObjectStrValuesListValue in requestObject.StrValues)
{
context.Writer.Write(requestObjectStrValuesListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetType())
{
context.Writer.WritePropertyName("type");
context.Writer.Write(requestObject.Type);
}
if(requestObject.IsSetValidationMessage())
{
context.Writer.WritePropertyName("validationMessage");
context.Writer.Write(requestObject.ValidationMessage);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FieldValidationConfigurationMarshaller Instance = new FieldValidationConfigurationMarshaller();
}
} | 90 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FieldValidationConfiguration Object
/// </summary>
public class FieldValidationConfigurationUnmarshaller : IUnmarshaller<FieldValidationConfiguration, XmlUnmarshallerContext>, IUnmarshaller<FieldValidationConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FieldValidationConfiguration IUnmarshaller<FieldValidationConfiguration, 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 FieldValidationConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FieldValidationConfiguration unmarshalledObject = new FieldValidationConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("numValues", targetDepth))
{
var unmarshaller = new ListUnmarshaller<int, IntUnmarshaller>(IntUnmarshaller.Instance);
unmarshalledObject.NumValues = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("strValues", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.StrValues = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("type", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Type = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("validationMessage", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ValidationMessage = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FieldValidationConfigurationUnmarshaller _instance = new FieldValidationConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FieldValidationConfigurationUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FileUploaderFieldConfig Marshaller
/// </summary>
public class FileUploaderFieldConfigMarshaller : IRequestMarshaller<FileUploaderFieldConfig, 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(FileUploaderFieldConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAcceptedFileTypes())
{
context.Writer.WritePropertyName("acceptedFileTypes");
context.Writer.WriteArrayStart();
foreach(var requestObjectAcceptedFileTypesListValue in requestObject.AcceptedFileTypes)
{
context.Writer.Write(requestObjectAcceptedFileTypesListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetAccessLevel())
{
context.Writer.WritePropertyName("accessLevel");
context.Writer.Write(requestObject.AccessLevel);
}
if(requestObject.IsSetIsResumable())
{
context.Writer.WritePropertyName("isResumable");
context.Writer.Write(requestObject.IsResumable);
}
if(requestObject.IsSetMaxFileCount())
{
context.Writer.WritePropertyName("maxFileCount");
context.Writer.Write(requestObject.MaxFileCount);
}
if(requestObject.IsSetMaxSize())
{
context.Writer.WritePropertyName("maxSize");
context.Writer.Write(requestObject.MaxSize);
}
if(requestObject.IsSetShowThumbnails())
{
context.Writer.WritePropertyName("showThumbnails");
context.Writer.Write(requestObject.ShowThumbnails);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FileUploaderFieldConfigMarshaller Instance = new FileUploaderFieldConfigMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FileUploaderFieldConfig Object
/// </summary>
public class FileUploaderFieldConfigUnmarshaller : IUnmarshaller<FileUploaderFieldConfig, XmlUnmarshallerContext>, IUnmarshaller<FileUploaderFieldConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FileUploaderFieldConfig IUnmarshaller<FileUploaderFieldConfig, 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 FileUploaderFieldConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FileUploaderFieldConfig unmarshalledObject = new FileUploaderFieldConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("acceptedFileTypes", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.AcceptedFileTypes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("accessLevel", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AccessLevel = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("isResumable", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.IsResumable = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("maxFileCount", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MaxFileCount = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("maxSize", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MaxSize = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("showThumbnails", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.ShowThumbnails = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FileUploaderFieldConfigUnmarshaller _instance = new FileUploaderFieldConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FileUploaderFieldConfigUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FormBindingElement Marshaller
/// </summary>
public class FormBindingElementMarshaller : IRequestMarshaller<FormBindingElement, 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(FormBindingElement requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetElement())
{
context.Writer.WritePropertyName("element");
context.Writer.Write(requestObject.Element);
}
if(requestObject.IsSetProperty())
{
context.Writer.WritePropertyName("property");
context.Writer.Write(requestObject.Property);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FormBindingElementMarshaller Instance = new FormBindingElementMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FormBindingElement Object
/// </summary>
public class FormBindingElementUnmarshaller : IUnmarshaller<FormBindingElement, XmlUnmarshallerContext>, IUnmarshaller<FormBindingElement, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FormBindingElement IUnmarshaller<FormBindingElement, 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 FormBindingElement Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FormBindingElement unmarshalledObject = new FormBindingElement();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("element", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Element = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("property", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Property = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FormBindingElementUnmarshaller _instance = new FormBindingElementUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FormBindingElementUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FormButton Marshaller
/// </summary>
public class FormButtonMarshaller : IRequestMarshaller<FormButton, 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(FormButton requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetChildren())
{
context.Writer.WritePropertyName("children");
context.Writer.Write(requestObject.Children);
}
if(requestObject.IsSetExcluded())
{
context.Writer.WritePropertyName("excluded");
context.Writer.Write(requestObject.Excluded);
}
if(requestObject.IsSetPosition())
{
context.Writer.WritePropertyName("position");
context.Writer.WriteObjectStart();
var marshaller = FieldPositionMarshaller.Instance;
marshaller.Marshall(requestObject.Position, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FormButtonMarshaller Instance = new FormButtonMarshaller();
}
} | 79 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FormButton Object
/// </summary>
public class FormButtonUnmarshaller : IUnmarshaller<FormButton, XmlUnmarshallerContext>, IUnmarshaller<FormButton, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FormButton IUnmarshaller<FormButton, 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 FormButton Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FormButton unmarshalledObject = new FormButton();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("children", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Children = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("excluded", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Excluded = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("position", targetDepth))
{
var unmarshaller = FieldPositionUnmarshaller.Instance;
unmarshalledObject.Position = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FormButtonUnmarshaller _instance = new FormButtonUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FormButtonUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FormCTA Marshaller
/// </summary>
public class FormCTAMarshaller : IRequestMarshaller<FormCTA, 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(FormCTA requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetCancel())
{
context.Writer.WritePropertyName("cancel");
context.Writer.WriteObjectStart();
var marshaller = FormButtonMarshaller.Instance;
marshaller.Marshall(requestObject.Cancel, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetClear())
{
context.Writer.WritePropertyName("clear");
context.Writer.WriteObjectStart();
var marshaller = FormButtonMarshaller.Instance;
marshaller.Marshall(requestObject.Clear, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetPosition())
{
context.Writer.WritePropertyName("position");
context.Writer.Write(requestObject.Position);
}
if(requestObject.IsSetSubmit())
{
context.Writer.WritePropertyName("submit");
context.Writer.WriteObjectStart();
var marshaller = FormButtonMarshaller.Instance;
marshaller.Marshall(requestObject.Submit, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FormCTAMarshaller Instance = new FormCTAMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FormCTA Object
/// </summary>
public class FormCTAUnmarshaller : IUnmarshaller<FormCTA, XmlUnmarshallerContext>, IUnmarshaller<FormCTA, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FormCTA IUnmarshaller<FormCTA, 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 FormCTA Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FormCTA unmarshalledObject = new FormCTA();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("cancel", targetDepth))
{
var unmarshaller = FormButtonUnmarshaller.Instance;
unmarshalledObject.Cancel = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("clear", targetDepth))
{
var unmarshaller = FormButtonUnmarshaller.Instance;
unmarshalledObject.Clear = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("position", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Position = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("submit", targetDepth))
{
var unmarshaller = FormButtonUnmarshaller.Instance;
unmarshalledObject.Submit = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FormCTAUnmarshaller _instance = new FormCTAUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FormCTAUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FormDataTypeConfig Marshaller
/// </summary>
public class FormDataTypeConfigMarshaller : IRequestMarshaller<FormDataTypeConfig, 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(FormDataTypeConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetDataSourceType())
{
context.Writer.WritePropertyName("dataSourceType");
context.Writer.Write(requestObject.DataSourceType);
}
if(requestObject.IsSetDataTypeName())
{
context.Writer.WritePropertyName("dataTypeName");
context.Writer.Write(requestObject.DataTypeName);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FormDataTypeConfigMarshaller Instance = new FormDataTypeConfigMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FormDataTypeConfig Object
/// </summary>
public class FormDataTypeConfigUnmarshaller : IUnmarshaller<FormDataTypeConfig, XmlUnmarshallerContext>, IUnmarshaller<FormDataTypeConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FormDataTypeConfig IUnmarshaller<FormDataTypeConfig, 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 FormDataTypeConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FormDataTypeConfig unmarshalledObject = new FormDataTypeConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("dataSourceType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DataSourceType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dataTypeName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DataTypeName = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FormDataTypeConfigUnmarshaller _instance = new FormDataTypeConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FormDataTypeConfigUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FormInputBindingPropertiesValue Marshaller
/// </summary>
public class FormInputBindingPropertiesValueMarshaller : IRequestMarshaller<FormInputBindingPropertiesValue, 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(FormInputBindingPropertiesValue requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetBindingProperties())
{
context.Writer.WritePropertyName("bindingProperties");
context.Writer.WriteObjectStart();
var marshaller = FormInputBindingPropertiesValuePropertiesMarshaller.Instance;
marshaller.Marshall(requestObject.BindingProperties, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetType())
{
context.Writer.WritePropertyName("type");
context.Writer.Write(requestObject.Type);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FormInputBindingPropertiesValueMarshaller Instance = new FormInputBindingPropertiesValueMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FormInputBindingPropertiesValueProperties Marshaller
/// </summary>
public class FormInputBindingPropertiesValuePropertiesMarshaller : IRequestMarshaller<FormInputBindingPropertiesValueProperties, 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(FormInputBindingPropertiesValueProperties requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetModel())
{
context.Writer.WritePropertyName("model");
context.Writer.Write(requestObject.Model);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FormInputBindingPropertiesValuePropertiesMarshaller Instance = new FormInputBindingPropertiesValuePropertiesMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FormInputBindingPropertiesValueProperties Object
/// </summary>
public class FormInputBindingPropertiesValuePropertiesUnmarshaller : IUnmarshaller<FormInputBindingPropertiesValueProperties, XmlUnmarshallerContext>, IUnmarshaller<FormInputBindingPropertiesValueProperties, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FormInputBindingPropertiesValueProperties IUnmarshaller<FormInputBindingPropertiesValueProperties, 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 FormInputBindingPropertiesValueProperties Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FormInputBindingPropertiesValueProperties unmarshalledObject = new FormInputBindingPropertiesValueProperties();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("model", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Model = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FormInputBindingPropertiesValuePropertiesUnmarshaller _instance = new FormInputBindingPropertiesValuePropertiesUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FormInputBindingPropertiesValuePropertiesUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FormInputBindingPropertiesValue Object
/// </summary>
public class FormInputBindingPropertiesValueUnmarshaller : IUnmarshaller<FormInputBindingPropertiesValue, XmlUnmarshallerContext>, IUnmarshaller<FormInputBindingPropertiesValue, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FormInputBindingPropertiesValue IUnmarshaller<FormInputBindingPropertiesValue, 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 FormInputBindingPropertiesValue Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FormInputBindingPropertiesValue unmarshalledObject = new FormInputBindingPropertiesValue();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("bindingProperties", targetDepth))
{
var unmarshaller = FormInputBindingPropertiesValuePropertiesUnmarshaller.Instance;
unmarshalledObject.BindingProperties = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("type", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Type = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FormInputBindingPropertiesValueUnmarshaller _instance = new FormInputBindingPropertiesValueUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FormInputBindingPropertiesValueUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FormInputValuePropertyBindingProperties Marshaller
/// </summary>
public class FormInputValuePropertyBindingPropertiesMarshaller : IRequestMarshaller<FormInputValuePropertyBindingProperties, 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(FormInputValuePropertyBindingProperties requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetField())
{
context.Writer.WritePropertyName("field");
context.Writer.Write(requestObject.Field);
}
if(requestObject.IsSetProperty())
{
context.Writer.WritePropertyName("property");
context.Writer.Write(requestObject.Property);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FormInputValuePropertyBindingPropertiesMarshaller Instance = new FormInputValuePropertyBindingPropertiesMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FormInputValuePropertyBindingProperties Object
/// </summary>
public class FormInputValuePropertyBindingPropertiesUnmarshaller : IUnmarshaller<FormInputValuePropertyBindingProperties, XmlUnmarshallerContext>, IUnmarshaller<FormInputValuePropertyBindingProperties, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FormInputValuePropertyBindingProperties IUnmarshaller<FormInputValuePropertyBindingProperties, 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 FormInputValuePropertyBindingProperties Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FormInputValuePropertyBindingProperties unmarshalledObject = new FormInputValuePropertyBindingProperties();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("field", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Field = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("property", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Property = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FormInputValuePropertyBindingPropertiesUnmarshaller _instance = new FormInputValuePropertyBindingPropertiesUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FormInputValuePropertyBindingPropertiesUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FormInputValueProperty Marshaller
/// </summary>
public class FormInputValuePropertyMarshaller : IRequestMarshaller<FormInputValueProperty, 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(FormInputValueProperty requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetBindingProperties())
{
context.Writer.WritePropertyName("bindingProperties");
context.Writer.WriteObjectStart();
var marshaller = FormInputValuePropertyBindingPropertiesMarshaller.Instance;
marshaller.Marshall(requestObject.BindingProperties, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetConcat())
{
context.Writer.WritePropertyName("concat");
context.Writer.WriteArrayStart();
foreach(var requestObjectConcatListValue in requestObject.Concat)
{
context.Writer.WriteObjectStart();
var marshaller = FormInputValuePropertyMarshaller.Instance;
marshaller.Marshall(requestObjectConcatListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetValue())
{
context.Writer.WritePropertyName("value");
context.Writer.Write(requestObject.Value);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FormInputValuePropertyMarshaller Instance = new FormInputValuePropertyMarshaller();
}
} | 89 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FormInputValueProperty Object
/// </summary>
public class FormInputValuePropertyUnmarshaller : IUnmarshaller<FormInputValueProperty, XmlUnmarshallerContext>, IUnmarshaller<FormInputValueProperty, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FormInputValueProperty IUnmarshaller<FormInputValueProperty, 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 FormInputValueProperty Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FormInputValueProperty unmarshalledObject = new FormInputValueProperty();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("bindingProperties", targetDepth))
{
var unmarshaller = FormInputValuePropertyBindingPropertiesUnmarshaller.Instance;
unmarshalledObject.BindingProperties = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("concat", targetDepth))
{
var unmarshaller = new ListUnmarshaller<FormInputValueProperty, FormInputValuePropertyUnmarshaller>(FormInputValuePropertyUnmarshaller.Instance);
unmarshalledObject.Concat = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("value", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Value = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FormInputValuePropertyUnmarshaller _instance = new FormInputValuePropertyUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FormInputValuePropertyUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FormStyleConfig Marshaller
/// </summary>
public class FormStyleConfigMarshaller : IRequestMarshaller<FormStyleConfig, 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(FormStyleConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetTokenReference())
{
context.Writer.WritePropertyName("tokenReference");
context.Writer.Write(requestObject.TokenReference);
}
if(requestObject.IsSetValue())
{
context.Writer.WritePropertyName("value");
context.Writer.Write(requestObject.Value);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FormStyleConfigMarshaller Instance = new FormStyleConfigMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FormStyleConfig Object
/// </summary>
public class FormStyleConfigUnmarshaller : IUnmarshaller<FormStyleConfig, XmlUnmarshallerContext>, IUnmarshaller<FormStyleConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FormStyleConfig IUnmarshaller<FormStyleConfig, 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 FormStyleConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FormStyleConfig unmarshalledObject = new FormStyleConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("tokenReference", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TokenReference = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("value", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Value = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FormStyleConfigUnmarshaller _instance = new FormStyleConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FormStyleConfigUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// FormStyle Marshaller
/// </summary>
public class FormStyleMarshaller : IRequestMarshaller<FormStyle, 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(FormStyle requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetHorizontalGap())
{
context.Writer.WritePropertyName("horizontalGap");
context.Writer.WriteObjectStart();
var marshaller = FormStyleConfigMarshaller.Instance;
marshaller.Marshall(requestObject.HorizontalGap, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetOuterPadding())
{
context.Writer.WritePropertyName("outerPadding");
context.Writer.WriteObjectStart();
var marshaller = FormStyleConfigMarshaller.Instance;
marshaller.Marshall(requestObject.OuterPadding, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetVerticalGap())
{
context.Writer.WritePropertyName("verticalGap");
context.Writer.WriteObjectStart();
var marshaller = FormStyleConfigMarshaller.Instance;
marshaller.Marshall(requestObject.VerticalGap, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static FormStyleMarshaller Instance = new FormStyleMarshaller();
}
} | 89 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FormStyle Object
/// </summary>
public class FormStyleUnmarshaller : IUnmarshaller<FormStyle, XmlUnmarshallerContext>, IUnmarshaller<FormStyle, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FormStyle IUnmarshaller<FormStyle, 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 FormStyle Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FormStyle unmarshalledObject = new FormStyle();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("horizontalGap", targetDepth))
{
var unmarshaller = FormStyleConfigUnmarshaller.Instance;
unmarshalledObject.HorizontalGap = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("outerPadding", targetDepth))
{
var unmarshaller = FormStyleConfigUnmarshaller.Instance;
unmarshalledObject.OuterPadding = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("verticalGap", targetDepth))
{
var unmarshaller = FormStyleConfigUnmarshaller.Instance;
unmarshalledObject.VerticalGap = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FormStyleUnmarshaller _instance = new FormStyleUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FormStyleUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for FormSummary Object
/// </summary>
public class FormSummaryUnmarshaller : IUnmarshaller<FormSummary, XmlUnmarshallerContext>, IUnmarshaller<FormSummary, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
FormSummary IUnmarshaller<FormSummary, 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 FormSummary Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
FormSummary unmarshalledObject = new FormSummary();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dataType", targetDepth))
{
var unmarshaller = FormDataTypeConfigUnmarshaller.Instance;
unmarshalledObject.DataType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("environmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("formActionType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.FormActionType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Id = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FormSummaryUnmarshaller _instance = new FormSummaryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FormSummaryUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Form Object
/// </summary>
public class FormUnmarshaller : IUnmarshaller<Form, XmlUnmarshallerContext>, IUnmarshaller<Form, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Form IUnmarshaller<Form, 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 Form Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Form unmarshalledObject = new Form();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("cta", targetDepth))
{
var unmarshaller = FormCTAUnmarshaller.Instance;
unmarshalledObject.Cta = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dataType", targetDepth))
{
var unmarshaller = FormDataTypeConfigUnmarshaller.Instance;
unmarshalledObject.DataType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("environmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("fields", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, FieldConfig, StringUnmarshaller, FieldConfigUnmarshaller>(StringUnmarshaller.Instance, FieldConfigUnmarshaller.Instance);
unmarshalledObject.Fields = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("formActionType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.FormActionType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Id = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("labelDecorator", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LabelDecorator = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("schemaVersion", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SchemaVersion = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sectionalElements", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, SectionalElement, StringUnmarshaller, SectionalElementUnmarshaller>(StringUnmarshaller.Instance, SectionalElementUnmarshaller.Instance);
unmarshalledObject.SectionalElements = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("style", targetDepth))
{
var unmarshaller = FormStyleUnmarshaller.Instance;
unmarshalledObject.Style = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("tags", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.Tags = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static FormUnmarshaller _instance = new FormUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static FormUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 164 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetCodegenJob Request Marshaller
/// </summary>
public class GetCodegenJobRequestMarshaller : IMarshaller<IRequest, GetCodegenJobRequest> , 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((GetCodegenJobRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetCodegenJobRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (!publicRequest.IsSetId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field Id set");
request.AddPathResource("{id}", StringUtils.FromString(publicRequest.Id));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/codegen-jobs/{id}";
return request;
}
private static GetCodegenJobRequestMarshaller _instance = new GetCodegenJobRequestMarshaller();
internal static GetCodegenJobRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetCodegenJobRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 93 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetCodegenJob operation
/// </summary>
public class GetCodegenJobResponseUnmarshaller : 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)
{
GetCodegenJobResponse response = new GetCodegenJobResponse();
var unmarshaller = CodegenJobUnmarshaller.Instance;
response.Job = unmarshaller.Unmarshall(context);
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException"))
{
return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetCodegenJobResponseUnmarshaller _instance = new GetCodegenJobResponseUnmarshaller();
internal static GetCodegenJobResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetCodegenJobResponseUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetComponent Request Marshaller
/// </summary>
public class GetComponentRequestMarshaller : IMarshaller<IRequest, GetComponentRequest> , 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((GetComponentRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetComponentRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (!publicRequest.IsSetId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field Id set");
request.AddPathResource("{id}", StringUtils.FromString(publicRequest.Id));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/components/{id}";
return request;
}
private static GetComponentRequestMarshaller _instance = new GetComponentRequestMarshaller();
internal static GetComponentRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetComponentRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 93 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetComponent operation
/// </summary>
public class GetComponentResponseUnmarshaller : 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)
{
GetComponentResponse response = new GetComponentResponse();
var unmarshaller = ComponentUnmarshaller.Instance;
response.Component = unmarshaller.Unmarshall(context);
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetComponentResponseUnmarshaller _instance = new GetComponentResponseUnmarshaller();
internal static GetComponentResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetComponentResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 109 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetForm Request Marshaller
/// </summary>
public class GetFormRequestMarshaller : IMarshaller<IRequest, GetFormRequest> , 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((GetFormRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetFormRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (!publicRequest.IsSetId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field Id set");
request.AddPathResource("{id}", StringUtils.FromString(publicRequest.Id));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/forms/{id}";
return request;
}
private static GetFormRequestMarshaller _instance = new GetFormRequestMarshaller();
internal static GetFormRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetFormRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 93 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetForm operation
/// </summary>
public class GetFormResponseUnmarshaller : 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)
{
GetFormResponse response = new GetFormResponse();
var unmarshaller = FormUnmarshaller.Instance;
response.Form = unmarshaller.Unmarshall(context);
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetFormResponseUnmarshaller _instance = new GetFormResponseUnmarshaller();
internal static GetFormResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetFormResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 109 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetMetadata Request Marshaller
/// </summary>
public class GetMetadataRequestMarshaller : IMarshaller<IRequest, GetMetadataRequest> , 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((GetMetadataRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetMetadataRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/metadata";
return request;
}
private static GetMetadataRequestMarshaller _instance = new GetMetadataRequestMarshaller();
internal static GetMetadataRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetMetadataRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 90 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetMetadata operation
/// </summary>
public class GetMetadataResponseUnmarshaller : 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)
{
GetMetadataResponse response = new GetMetadataResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("features", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
response.Features = 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("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetMetadataResponseUnmarshaller _instance = new GetMetadataResponseUnmarshaller();
internal static GetMetadataResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetMetadataResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 114 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetTheme Request Marshaller
/// </summary>
public class GetThemeRequestMarshaller : IMarshaller<IRequest, GetThemeRequest> , 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((GetThemeRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetThemeRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (!publicRequest.IsSetId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field Id set");
request.AddPathResource("{id}", StringUtils.FromString(publicRequest.Id));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/themes/{id}";
return request;
}
private static GetThemeRequestMarshaller _instance = new GetThemeRequestMarshaller();
internal static GetThemeRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetThemeRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 93 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetTheme operation
/// </summary>
public class GetThemeResponseUnmarshaller : 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)
{
GetThemeResponse response = new GetThemeResponse();
var unmarshaller = ThemeUnmarshaller.Instance;
response.Theme = unmarshaller.Unmarshall(context);
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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetThemeResponseUnmarshaller _instance = new GetThemeResponseUnmarshaller();
internal static GetThemeResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetThemeResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 109 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for InternalServerException Object
/// </summary>
public class InternalServerExceptionUnmarshaller : IErrorResponseUnmarshaller<InternalServerException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public InternalServerException 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 InternalServerException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
InternalServerException unmarshalledObject = new InternalServerException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static InternalServerExceptionUnmarshaller _instance = new InternalServerExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static InternalServerExceptionUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for InvalidParameterException Object
/// </summary>
public class InvalidParameterExceptionUnmarshaller : IErrorResponseUnmarshaller<InvalidParameterException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public InvalidParameterException 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 InvalidParameterException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
InvalidParameterException unmarshalledObject = new InvalidParameterException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static InvalidParameterExceptionUnmarshaller _instance = new InvalidParameterExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static InvalidParameterExceptionUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListCodegenJobs Request Marshaller
/// </summary>
public class ListCodegenJobsRequestMarshaller : IMarshaller<IRequest, ListCodegenJobsRequest> , 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((ListCodegenJobsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListCodegenJobsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/codegen-jobs";
request.UseQueryString = true;
return request;
}
private static ListCodegenJobsRequestMarshaller _instance = new ListCodegenJobsRequestMarshaller();
internal static ListCodegenJobsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListCodegenJobsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 97 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListCodegenJobs operation
/// </summary>
public class ListCodegenJobsResponseUnmarshaller : 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)
{
ListCodegenJobsResponse response = new ListCodegenJobsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("entities", targetDepth))
{
var unmarshaller = new ListUnmarshaller<CodegenJobSummary, CodegenJobSummaryUnmarshaller>(CodegenJobSummaryUnmarshaller.Instance);
response.Entities = 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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException"))
{
return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListCodegenJobsResponseUnmarshaller _instance = new ListCodegenJobsResponseUnmarshaller();
internal static ListCodegenJobsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListCodegenJobsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 124 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListComponents Request Marshaller
/// </summary>
public class ListComponentsRequestMarshaller : IMarshaller<IRequest, ListComponentsRequest> , 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((ListComponentsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListComponentsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/components";
request.UseQueryString = true;
return request;
}
private static ListComponentsRequestMarshaller _instance = new ListComponentsRequestMarshaller();
internal static ListComponentsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListComponentsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 97 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListComponents operation
/// </summary>
public class ListComponentsResponseUnmarshaller : 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)
{
ListComponentsResponse response = new ListComponentsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("entities", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ComponentSummary, ComponentSummaryUnmarshaller>(ComponentSummaryUnmarshaller.Instance);
response.Entities = 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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListComponentsResponseUnmarshaller _instance = new ListComponentsResponseUnmarshaller();
internal static ListComponentsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListComponentsResponseUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListForms Request Marshaller
/// </summary>
public class ListFormsRequestMarshaller : IMarshaller<IRequest, ListFormsRequest> , 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((ListFormsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListFormsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/forms";
request.UseQueryString = true;
return request;
}
private static ListFormsRequestMarshaller _instance = new ListFormsRequestMarshaller();
internal static ListFormsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListFormsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 97 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListForms operation
/// </summary>
public class ListFormsResponseUnmarshaller : 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)
{
ListFormsResponse response = new ListFormsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("entities", targetDepth))
{
var unmarshaller = new ListUnmarshaller<FormSummary, FormSummaryUnmarshaller>(FormSummaryUnmarshaller.Instance);
response.Entities = 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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListFormsResponseUnmarshaller _instance = new ListFormsResponseUnmarshaller();
internal static ListFormsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListFormsResponseUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListThemes Request Marshaller
/// </summary>
public class ListThemesRequestMarshaller : IMarshaller<IRequest, ListThemesRequest> , 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((ListThemesRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListThemesRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/themes";
request.UseQueryString = true;
return request;
}
private static ListThemesRequestMarshaller _instance = new ListThemesRequestMarshaller();
internal static ListThemesRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListThemesRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 97 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListThemes operation
/// </summary>
public class ListThemesResponseUnmarshaller : 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)
{
ListThemesResponse response = new ListThemesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("entities", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ThemeSummary, ThemeSummaryUnmarshaller>(ThemeSummaryUnmarshaller.Instance);
response.Entities = 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("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListThemesResponseUnmarshaller _instance = new ListThemesResponseUnmarshaller();
internal static ListThemesResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListThemesResponseUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// MutationActionSetStateParameter Marshaller
/// </summary>
public class MutationActionSetStateParameterMarshaller : IRequestMarshaller<MutationActionSetStateParameter, 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(MutationActionSetStateParameter requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetComponentName())
{
context.Writer.WritePropertyName("componentName");
context.Writer.Write(requestObject.ComponentName);
}
if(requestObject.IsSetProperty())
{
context.Writer.WritePropertyName("property");
context.Writer.Write(requestObject.Property);
}
if(requestObject.IsSetSet())
{
context.Writer.WritePropertyName("set");
context.Writer.WriteObjectStart();
var marshaller = ComponentPropertyMarshaller.Instance;
marshaller.Marshall(requestObject.Set, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static MutationActionSetStateParameterMarshaller Instance = new MutationActionSetStateParameterMarshaller();
}
} | 79 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for MutationActionSetStateParameter Object
/// </summary>
public class MutationActionSetStateParameterUnmarshaller : IUnmarshaller<MutationActionSetStateParameter, XmlUnmarshallerContext>, IUnmarshaller<MutationActionSetStateParameter, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
MutationActionSetStateParameter IUnmarshaller<MutationActionSetStateParameter, 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 MutationActionSetStateParameter Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
MutationActionSetStateParameter unmarshalledObject = new MutationActionSetStateParameter();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("componentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ComponentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("property", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Property = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("set", targetDepth))
{
var unmarshaller = ComponentPropertyUnmarshaller.Instance;
unmarshalledObject.Set = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static MutationActionSetStateParameterUnmarshaller _instance = new MutationActionSetStateParameterUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static MutationActionSetStateParameterUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Predicate Marshaller
/// </summary>
public class PredicateMarshaller : IRequestMarshaller<Predicate, 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(Predicate requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAnd())
{
context.Writer.WritePropertyName("and");
context.Writer.WriteArrayStart();
foreach(var requestObjectAndListValue in requestObject.And)
{
context.Writer.WriteObjectStart();
var marshaller = PredicateMarshaller.Instance;
marshaller.Marshall(requestObjectAndListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetField())
{
context.Writer.WritePropertyName("field");
context.Writer.Write(requestObject.Field);
}
if(requestObject.IsSetOperand())
{
context.Writer.WritePropertyName("operand");
context.Writer.Write(requestObject.Operand);
}
if(requestObject.IsSetOperandType())
{
context.Writer.WritePropertyName("operandType");
context.Writer.Write(requestObject.OperandType);
}
if(requestObject.IsSetOperator())
{
context.Writer.WritePropertyName("operator");
context.Writer.Write(requestObject.Operator);
}
if(requestObject.IsSetOr())
{
context.Writer.WritePropertyName("or");
context.Writer.WriteArrayStart();
foreach(var requestObjectOrListValue in requestObject.Or)
{
context.Writer.WriteObjectStart();
var marshaller = PredicateMarshaller.Instance;
marshaller.Marshall(requestObjectOrListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static PredicateMarshaller Instance = new PredicateMarshaller();
}
} | 112 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Predicate Object
/// </summary>
public class PredicateUnmarshaller : IUnmarshaller<Predicate, XmlUnmarshallerContext>, IUnmarshaller<Predicate, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Predicate IUnmarshaller<Predicate, 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 Predicate Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Predicate unmarshalledObject = new Predicate();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("and", targetDepth))
{
var unmarshaller = new ListUnmarshaller<Predicate, PredicateUnmarshaller>(PredicateUnmarshaller.Instance);
unmarshalledObject.And = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("field", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Field = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operand", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Operand = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operandType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.OperandType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operator", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Operator = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("or", targetDepth))
{
var unmarshaller = new ListUnmarshaller<Predicate, PredicateUnmarshaller>(PredicateUnmarshaller.Instance);
unmarshalledObject.Or = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static PredicateUnmarshaller _instance = new PredicateUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static PredicateUnmarshaller 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// PutMetadataFlagBody Marshaller
/// </summary>
public class PutMetadataFlagBodyMarshaller : IRequestMarshaller<PutMetadataFlagBody, 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(PutMetadataFlagBody requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetNewValue())
{
context.Writer.WritePropertyName("newValue");
context.Writer.Write(requestObject.NewValue);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static PutMetadataFlagBodyMarshaller Instance = new PutMetadataFlagBodyMarshaller();
}
} | 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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// PutMetadataFlag Request Marshaller
/// </summary>
public class PutMetadataFlagRequestMarshaller : IMarshaller<IRequest, PutMetadataFlagRequest> , 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((PutMetadataFlagRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(PutMetadataFlagRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyUIBuilder");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "PUT";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetEnvironmentName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field EnvironmentName set");
request.AddPathResource("{environmentName}", StringUtils.FromString(publicRequest.EnvironmentName));
if (!publicRequest.IsSetFeatureName())
throw new AmazonAmplifyUIBuilderException("Request object does not have required field FeatureName set");
request.AddPathResource("{featureName}", StringUtils.FromString(publicRequest.FeatureName));
request.ResourcePath = "/app/{appId}/environment/{environmentName}/metadata/features/{featureName}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
var context = new JsonMarshallerContext(request, writer);
context.Writer.WriteObjectStart();
var marshaller = PutMetadataFlagBodyMarshaller.Instance;
marshaller.Marshall(publicRequest.Body, context);
context.Writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static PutMetadataFlagRequestMarshaller _instance = new PutMetadataFlagRequestMarshaller();
internal static PutMetadataFlagRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutMetadataFlagRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 108 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PutMetadataFlag operation
/// </summary>
public class PutMetadataFlagResponseUnmarshaller : 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)
{
PutMetadataFlagResponse response = new PutMetadataFlagResponse();
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("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException"))
{
return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyUIBuilderException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static PutMetadataFlagResponseUnmarshaller _instance = new PutMetadataFlagResponseUnmarshaller();
internal static PutMetadataFlagResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutMetadataFlagResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 103 |
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 amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// ReactStartCodegenJobData Marshaller
/// </summary>
public class ReactStartCodegenJobDataMarshaller : IRequestMarshaller<ReactStartCodegenJobData, 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(ReactStartCodegenJobData requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetInlineSourceMap())
{
context.Writer.WritePropertyName("inlineSourceMap");
context.Writer.Write(requestObject.InlineSourceMap);
}
if(requestObject.IsSetModule())
{
context.Writer.WritePropertyName("module");
context.Writer.Write(requestObject.Module);
}
if(requestObject.IsSetRenderTypeDeclarations())
{
context.Writer.WritePropertyName("renderTypeDeclarations");
context.Writer.Write(requestObject.RenderTypeDeclarations);
}
if(requestObject.IsSetScript())
{
context.Writer.WritePropertyName("script");
context.Writer.Write(requestObject.Script);
}
if(requestObject.IsSetTarget())
{
context.Writer.WritePropertyName("target");
context.Writer.Write(requestObject.Target);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static ReactStartCodegenJobDataMarshaller Instance = new ReactStartCodegenJobDataMarshaller();
}
} | 86 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifyuibuilder-2021-08-11.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.AmplifyUIBuilder.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyUIBuilder.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ReactStartCodegenJobData Object
/// </summary>
public class ReactStartCodegenJobDataUnmarshaller : IUnmarshaller<ReactStartCodegenJobData, XmlUnmarshallerContext>, IUnmarshaller<ReactStartCodegenJobData, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ReactStartCodegenJobData IUnmarshaller<ReactStartCodegenJobData, 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 ReactStartCodegenJobData Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ReactStartCodegenJobData unmarshalledObject = new ReactStartCodegenJobData();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("inlineSourceMap", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.InlineSourceMap = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("module", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Module = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("renderTypeDeclarations", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.RenderTypeDeclarations = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("script", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Script = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("target", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Target = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ReactStartCodegenJobDataUnmarshaller _instance = new ReactStartCodegenJobDataUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ReactStartCodegenJobDataUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 116 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.