Ejemplo n.º 1
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public OutputGroupSettings Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            OutputGroupSettings unmarshalledObject = new OutputGroupSettings();

            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("archiveGroupSettings", targetDepth))
                {
                    var unmarshaller = ArchiveGroupSettingsUnmarshaller.Instance;
                    unmarshalledObject.ArchiveGroupSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("frameCaptureGroupSettings", targetDepth))
                {
                    var unmarshaller = FrameCaptureGroupSettingsUnmarshaller.Instance;
                    unmarshalledObject.FrameCaptureGroupSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("hlsGroupSettings", targetDepth))
                {
                    var unmarshaller = HlsGroupSettingsUnmarshaller.Instance;
                    unmarshalledObject.HlsGroupSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("mediaPackageGroupSettings", targetDepth))
                {
                    var unmarshaller = MediaPackageGroupSettingsUnmarshaller.Instance;
                    unmarshalledObject.MediaPackageGroupSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("msSmoothGroupSettings", targetDepth))
                {
                    var unmarshaller = MsSmoothGroupSettingsUnmarshaller.Instance;
                    unmarshalledObject.MsSmoothGroupSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("multiplexGroupSettings", targetDepth))
                {
                    var unmarshaller = MultiplexGroupSettingsUnmarshaller.Instance;
                    unmarshalledObject.MultiplexGroupSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("rtmpGroupSettings", targetDepth))
                {
                    var unmarshaller = RtmpGroupSettingsUnmarshaller.Instance;
                    unmarshalledObject.RtmpGroupSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("udpGroupSettings", targetDepth))
                {
                    var unmarshaller = UdpGroupSettingsUnmarshaller.Instance;
                    unmarshalledObject.UdpGroupSettings = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(unmarshalledObject);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>  
        /// <param name="context"></param>
        /// <returns></returns>
        public Cluster Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null) 
                return null;

            Cluster unmarshalledObject = new Cluster();
        
            int targetDepth = context.CurrentDepth;
            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("ActiveNodes", targetDepth))
                {
                    var unmarshaller = IntUnmarshaller.Instance;
                    unmarshalledObject.ActiveNodes = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ClusterArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.ClusterArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ClusterDiscoveryEndpoint", targetDepth))
                {
                    var unmarshaller = EndpointUnmarshaller.Instance;
                    unmarshalledObject.ClusterDiscoveryEndpoint = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ClusterEndpointEncryptionType", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.ClusterEndpointEncryptionType = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ClusterName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.ClusterName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Description", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Description = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("IamRoleArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.IamRoleArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("NodeIdsToRemove", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
                    unmarshalledObject.NodeIdsToRemove = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Nodes", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller<Node, NodeUnmarshaller>(NodeUnmarshaller.Instance);
                    unmarshalledObject.Nodes = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("NodeType", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.NodeType = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("NotificationConfiguration", targetDepth))
                {
                    var unmarshaller = NotificationConfigurationUnmarshaller.Instance;
                    unmarshalledObject.NotificationConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ParameterGroup", targetDepth))
                {
                    var unmarshaller = ParameterGroupStatusUnmarshaller.Instance;
                    unmarshalledObject.ParameterGroup = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PreferredMaintenanceWindow", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.PreferredMaintenanceWindow = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("SecurityGroups", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller<SecurityGroupMembership, SecurityGroupMembershipUnmarshaller>(SecurityGroupMembershipUnmarshaller.Instance);
                    unmarshalledObject.SecurityGroups = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("SSEDescription", targetDepth))
                {
                    var unmarshaller = SSEDescriptionUnmarshaller.Instance;
                    unmarshalledObject.SSEDescription = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Status", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Status = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("SubnetGroup", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.SubnetGroup = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("TotalNodes", targetDepth))
                {
                    var unmarshaller = IntUnmarshaller.Instance;
                    unmarshalledObject.TotalNodes = unmarshaller.Unmarshall(context);
                    continue;
                }
            }
          
            return unmarshalledObject;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Unmarshaller error response to exception.
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public ImageAttribute Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
 /// <summary>
 /// Unmarshaller error response to exception.
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public SAMLProviderListEntry Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Unmarshaller error response to exception.
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public DBClusterSnapshot Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
 /// <summary>
 /// Unmarshaller error response to exception.
 /// </summary>  
 /// <param name="context"></param>
 /// <returns></returns>
 public PropertyDifference Unmarshall(JsonUnmarshallerContext context)
 {
     return null;
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public SearchRecord Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            SearchRecord unmarshalledObject = new SearchRecord();

            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("Endpoint", targetDepth))
                {
                    var unmarshaller = EndpointUnmarshaller.Instance;
                    unmarshalledObject.Endpoint = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Experiment", targetDepth))
                {
                    var unmarshaller = ExperimentUnmarshaller.Instance;
                    unmarshalledObject.Experiment = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("FeatureGroup", targetDepth))
                {
                    var unmarshaller = FeatureGroupUnmarshaller.Instance;
                    unmarshalledObject.FeatureGroup = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ModelPackage", targetDepth))
                {
                    var unmarshaller = ModelPackageUnmarshaller.Instance;
                    unmarshalledObject.ModelPackage = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ModelPackageGroup", targetDepth))
                {
                    var unmarshaller = ModelPackageGroupUnmarshaller.Instance;
                    unmarshalledObject.ModelPackageGroup = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Pipeline", targetDepth))
                {
                    var unmarshaller = PipelineUnmarshaller.Instance;
                    unmarshalledObject.Pipeline = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PipelineExecution", targetDepth))
                {
                    var unmarshaller = PipelineExecutionUnmarshaller.Instance;
                    unmarshalledObject.PipelineExecution = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Project", targetDepth))
                {
                    var unmarshaller = ProjectUnmarshaller.Instance;
                    unmarshalledObject.Project = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("TrainingJob", targetDepth))
                {
                    var unmarshaller = TrainingJobUnmarshaller.Instance;
                    unmarshalledObject.TrainingJob = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Trial", targetDepth))
                {
                    var unmarshaller = TrialUnmarshaller.Instance;
                    unmarshalledObject.Trial = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("TrialComponent", targetDepth))
                {
                    var unmarshaller = TrialComponentUnmarshaller.Instance;
                    unmarshalledObject.TrialComponent = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(unmarshalledObject);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails unmarshalledObject = new AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails();

            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("DeleteOnTermination", targetDepth))
                {
                    var unmarshaller = BoolUnmarshaller.Instance;
                    unmarshalledObject.DeleteOnTermination = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Encrypted", targetDepth))
                {
                    var unmarshaller = BoolUnmarshaller.Instance;
                    unmarshalledObject.Encrypted = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Iops", targetDepth))
                {
                    var unmarshaller = IntUnmarshaller.Instance;
                    unmarshalledObject.Iops = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("SnapshotId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.SnapshotId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("VolumeSize", targetDepth))
                {
                    var unmarshaller = IntUnmarshaller.Instance;
                    unmarshalledObject.VolumeSize = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("VolumeType", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.VolumeType = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(unmarshalledObject);
        }
 public ResetDBParameterGroupResult Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Unmarshaller error response to exception.
 /// </summary>  
 /// <param name="context"></param>
 /// <returns></returns>
 public ResponseLaunchTemplateData Unmarshall(JsonUnmarshallerContext context)
 {
     return null;
 }
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            DescribeModelResponse response = new DescribeModelResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("CreatedAt", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.CreatedAt = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("DataPreProcessingConfiguration", targetDepth))
                {
                    var unmarshaller = DataPreProcessingConfigurationUnmarshaller.Instance;
                    response.DataPreProcessingConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("DatasetArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.DatasetArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("DatasetName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.DatasetName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("EvaluationDataEndTime", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.EvaluationDataEndTime = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("EvaluationDataStartTime", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.EvaluationDataStartTime = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("FailedReason", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.FailedReason = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("LabelsInputConfiguration", targetDepth))
                {
                    var unmarshaller = LabelsInputConfigurationUnmarshaller.Instance;
                    response.LabelsInputConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("LastUpdatedTime", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.LastUpdatedTime = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ModelArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ModelArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ModelMetrics", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ModelMetrics = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ModelName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ModelName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("RoleArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.RoleArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Schema", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Schema = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ServerSideKmsKeyId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ServerSideKmsKeyId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Status", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Status = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("TrainingDataEndTime", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.TrainingDataEndTime = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("TrainingDataStartTime", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.TrainingDataStartTime = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("TrainingExecutionEndTime", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.TrainingExecutionEndTime = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("TrainingExecutionStartTime", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.TrainingExecutionStartTime = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Ejemplo n.º 12
0
        public BatchWriteItemResult Unmarshall(JsonUnmarshallerContext context)
        {
            BatchWriteItemResult batchWriteItemResult = new BatchWriteItemResult();

            batchWriteItemResult.Responses        = null;
            batchWriteItemResult.UnprocessedItems = null;

            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if ((context.IsKey) && (context.CurrentDepth == targetDepth))
                {
                    context.Read();
                    context.Read();

                    if (context.TestExpression("Responses", targetDepth))
                    {
                        batchWriteItemResult.Responses = new Dictionary <String, BatchWriteResponse>();
                        KeyValueUnmarshaller <string, BatchWriteResponse, StringUnmarshaller, BatchWriteResponseUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, BatchWriteResponse, StringUnmarshaller, BatchWriteResponseUnmarshaller>(StringUnmarshaller.GetInstance(), BatchWriteResponseUnmarshaller.GetInstance());
                        while (context.Read())
                        {
                            if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) ||
                                ((context.IsKey) && (context.CurrentDepth == targetDepth + 1)))
                            {
                                KeyValuePair <string, BatchWriteResponse> kvp = unmarshaller.Unmarshall(context);
                                batchWriteItemResult.Responses.Add(kvp.Key, kvp.Value);
                            }
                            else if (context.IsEndElement)
                            {
                                break;
                            }
                        }
                        continue;
                    }

                    if (context.TestExpression("UnprocessedItems", targetDepth))
                    {
                        batchWriteItemResult.UnprocessedItems = new Dictionary <String, List <WriteRequest> >();
                        KeyValueUnmarshaller <string, List <WriteRequest>, StringUnmarshaller, ListUnmarshaller <WriteRequest, WriteRequestUnmarshaller> > unmarshaller = new KeyValueUnmarshaller <string, List <WriteRequest>, StringUnmarshaller, ListUnmarshaller <WriteRequest, WriteRequestUnmarshaller> >(StringUnmarshaller.GetInstance(), new ListUnmarshaller <WriteRequest, WriteRequestUnmarshaller>(WriteRequestUnmarshaller.GetInstance()));
                        while (context.Read())
                        {
                            if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) ||
                                ((context.IsKey) && (context.CurrentDepth == targetDepth + 1)))
                            {
                                KeyValuePair <string, List <WriteRequest> > kvp = unmarshaller.Unmarshall(context);
                                batchWriteItemResult.UnprocessedItems.Add(kvp.Key, kvp.Value);
                            }
                            else if (context.IsEndElement)
                            {
                                break;
                            }
                        }
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(batchWriteItemResult);
                }
            }
            return(batchWriteItemResult);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public Environment Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            Environment unmarshalledObject = new Environment();

            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("AirflowConfigurationOptions", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
                    unmarshalledObject.AirflowConfigurationOptions = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("AirflowVersion", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.AirflowVersion = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Arn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Arn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("CreatedAt", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("DagS3Path", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.DagS3Path = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("EnvironmentClass", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.EnvironmentClass = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ExecutionRoleArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.ExecutionRoleArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("KmsKey", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.KmsKey = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("LastUpdate", targetDepth))
                {
                    var unmarshaller = LastUpdateUnmarshaller.Instance;
                    unmarshalledObject.LastUpdate = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("LoggingConfiguration", targetDepth))
                {
                    var unmarshaller = LoggingConfigurationUnmarshaller.Instance;
                    unmarshalledObject.LoggingConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("MaxWorkers", targetDepth))
                {
                    var unmarshaller = IntUnmarshaller.Instance;
                    unmarshalledObject.MaxWorkers = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("MinWorkers", targetDepth))
                {
                    var unmarshaller = IntUnmarshaller.Instance;
                    unmarshalledObject.MinWorkers = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Name", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Name = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("NetworkConfiguration", targetDepth))
                {
                    var unmarshaller = NetworkConfigurationUnmarshaller.Instance;
                    unmarshalledObject.NetworkConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PluginsS3ObjectVersion", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.PluginsS3ObjectVersion = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PluginsS3Path", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.PluginsS3Path = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("RequirementsS3ObjectVersion", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.RequirementsS3ObjectVersion = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("RequirementsS3Path", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.RequirementsS3Path = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ServiceRoleArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.ServiceRoleArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("SourceBucketArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.SourceBucketArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Status", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Status = 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("WebserverAccessMode", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.WebserverAccessMode = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("WebserverUrl", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.WebserverUrl = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("WeeklyMaintenanceWindowStart", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.WeeklyMaintenanceWindowStart = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(unmarshalledObject);
        }
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            AllocateConnectionOnInterconnectResponse response = new AllocateConnectionOnInterconnectResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("awsDevice", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.AwsDevice = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("awsDeviceV2", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.AwsDeviceV2 = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("bandwidth", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Bandwidth = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("connectionId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ConnectionId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("connectionName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ConnectionName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("connectionState", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ConnectionState = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("jumboFrameCapable", targetDepth))
                {
                    var unmarshaller = BoolUnmarshaller.Instance;
                    response.JumboFrameCapable = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("lagId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.LagId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("loaIssueTime", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.LoaIssueTime = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("location", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Location = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ownerAccount", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.OwnerAccount = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("partnerName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.PartnerName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("region", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Region = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("vlan", targetDepth))
                {
                    var unmarshaller = IntUnmarshaller.Instance;
                    response.Vlan = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
 public PlatformApplication Unmarshall(JsonUnmarshallerContext context)
 {
     return null;
 }
 public SpotDatafeedSubscription Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            DescribeRuleResponse response = new DescribeRuleResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("Arn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Arn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("CreatedBy", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.CreatedBy = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Description", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Description = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("EventBusName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.EventBusName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("EventPattern", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.EventPattern = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ManagedBy", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ManagedBy = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Name", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Name = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("RoleArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.RoleArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ScheduleExpression", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ScheduleExpression = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("State", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.State = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>  
        /// <param name="context"></param>
        /// <returns></returns>
        public WirelessDeviceStatistics Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null) 
                return null;

            WirelessDeviceStatistics unmarshalledObject = new WirelessDeviceStatistics();
        
            int targetDepth = context.CurrentDepth;
            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("Arn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Arn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("DestinationName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.DestinationName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("FuotaDeviceStatus", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.FuotaDeviceStatus = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Id", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Id = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("LastUplinkReceivedAt", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.LastUplinkReceivedAt = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("LoRaWAN", targetDepth))
                {
                    var unmarshaller = LoRaWANListDeviceUnmarshaller.Instance;
                    unmarshalledObject.LoRaWAN = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("McGroupId", targetDepth))
                {
                    var unmarshaller = IntUnmarshaller.Instance;
                    unmarshalledObject.McGroupId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("MulticastDeviceStatus", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.MulticastDeviceStatus = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Name", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Name = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Sidewalk", targetDepth))
                {
                    var unmarshaller = SidewalkListDeviceUnmarshaller.Instance;
                    unmarshalledObject.Sidewalk = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Type", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Type = unmarshaller.Unmarshall(context);
                    continue;
                }
            }
          
            return unmarshalledObject;
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public PhoneNumber Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            PhoneNumber unmarshalledObject = new PhoneNumber();

            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("Associations", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <PhoneNumberAssociation, PhoneNumberAssociationUnmarshaller>(PhoneNumberAssociationUnmarshaller.Instance);
                    unmarshalledObject.Associations = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("CallingName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.CallingName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("CallingNameStatus", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.CallingNameStatus = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Capabilities", targetDepth))
                {
                    var unmarshaller = PhoneNumberCapabilitiesUnmarshaller.Instance;
                    unmarshalledObject.Capabilities = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("CreatedTimestamp", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("DeletionTimestamp", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    unmarshalledObject.DeletionTimestamp = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("E164PhoneNumber", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.E164PhoneNumber = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PhoneNumberId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.PhoneNumberId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ProductType", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.ProductType = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Status", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Status = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Type", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Type = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("UpdatedTimestamp", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    unmarshalledObject.UpdatedTimestamp = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(unmarshalledObject);
        }
 public InstanceNetworkInterfaceAttachment Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Unmarshaller error response to exception.
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public FleetData Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Unmarshaller error response to exception.
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public EbsInfo Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
Ejemplo n.º 23
0
 public Tag Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Unmarshaller error response to exception.
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public RoleDetail Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
 /// <summary>
 /// Unmarshaller error response to exception.
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public FleetLaunchTemplateSpecification Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
Ejemplo n.º 26
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            DescribeWorldExportJobResponse response = new DescribeWorldExportJobResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("arn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Arn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("clientRequestToken", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ClientRequestToken = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("createdAt", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.CreatedAt = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("failureCode", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.FailureCode = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("failureReason", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.FailureReason = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("iamRole", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.IamRole = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("outputLocation", targetDepth))
                {
                    var unmarshaller = OutputLocationUnmarshaller.Instance;
                    response.OutputLocation = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("status", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Status = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("tags", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
                    response.Tags = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("worlds", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance);
                    response.Worlds = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
 public RouteTable Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
Ejemplo n.º 28
0
 /// <summary>
 /// Unmarshaller error response to exception.
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public MetricStat Unmarshall(JsonUnmarshallerContext context)
 {
     return(null);
 }
 /// <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)
 {
     ErrorResponse errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
     if (errorResponse.Code != null && errorResponse.Code.Equals("CloudWatchLogsDeliveryUnavailableException"))
     {
         return new CloudWatchLogsDeliveryUnavailableException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("InsufficientEncryptionPolicyException"))
     {
         return new InsufficientEncryptionPolicyException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("InsufficientS3BucketPolicyException"))
     {
         return new InsufficientS3BucketPolicyException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("InsufficientSnsTopicPolicyException"))
     {
         return new InsufficientSnsTopicPolicyException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidCloudWatchLogsLogGroupArnException"))
     {
         return new InvalidCloudWatchLogsLogGroupArnException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidCloudWatchLogsRoleArnException"))
     {
         return new InvalidCloudWatchLogsRoleArnException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidKmsKeyIdException"))
     {
         return new InvalidKmsKeyIdException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombinationException"))
     {
         return new InvalidParameterCombinationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidS3BucketNameException"))
     {
         return new InvalidS3BucketNameException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidS3PrefixException"))
     {
         return new InvalidS3PrefixException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidSnsTopicNameException"))
     {
         return new InvalidSnsTopicNameException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidTrailNameException"))
     {
         return new InvalidTrailNameException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("KmsException"))
     {
         return new KmsException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("KmsKeyDisabledException"))
     {
         return new KmsKeyDisabledException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("KmsKeyNotFoundException"))
     {
         return new KmsKeyNotFoundException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("MaximumNumberOfTrailsExceededException"))
     {
         return new MaximumNumberOfTrailsExceededException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException"))
     {
         return new OperationNotPermittedException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("S3BucketDoesNotExistException"))
     {
         return new S3BucketDoesNotExistException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("TrailAlreadyExistsException"))
     {
         return new TrailAlreadyExistsException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("TrailNotProvidedException"))
     {
         return new TrailNotProvidedException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     if (errorResponse.Code != null && errorResponse.Code.Equals("UnsupportedOperationException"))
     {
         return new UnsupportedOperationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
     }
     return new AmazonCloudTrailException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
 }
Ejemplo n.º 30
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>  
        /// <param name="context"></param>
        /// <returns></returns>
        public Evaluation Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null) 
                return null;

            Evaluation unmarshalledObject = new Evaluation();
        
            int targetDepth = context.CurrentDepth;
            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("CreatedAt", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("CreatedByIamUser", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.CreatedByIamUser = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("EvaluationDataSourceId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.EvaluationDataSourceId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("EvaluationId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.EvaluationId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("InputDataLocationS3", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.InputDataLocationS3 = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("LastUpdatedAt", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    unmarshalledObject.LastUpdatedAt = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Message", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Message = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("MLModelId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.MLModelId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Name", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Name = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PerformanceMetrics", targetDepth))
                {
                    var unmarshaller = PerformanceMetricsUnmarshaller.Instance;
                    unmarshalledObject.PerformanceMetrics = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Status", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    unmarshalledObject.Status = unmarshaller.Unmarshall(context);
                    continue;
                }
            }
          
            return unmarshalledObject;
        }