public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { RestoreDBInstanceFromDBSnapshotResponse response = new RestoreDBInstanceFromDBSnapshotResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if (context.TestExpression("RestoreDBInstanceFromDBSnapshotResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, RestoreDBInstanceFromDBSnapshotResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("DBInstance", targetDepth)) { response.DBInstance = DBInstanceUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } }
/// <summary> /// <para> Restores a DB Instance to an arbitrary point-in-time. Users can restore to any point in time before the latestRestorableTime for up /// to backupRetentionPeriod days. The target database is created from the source database with the same configuration as the original database /// except that the DB instance is created with the default DB security group. </para> /// </summary> /// /// <param name="restoreDBInstanceFromDBSnapshotRequest">Container for the necessary parameters to execute the RestoreDBInstanceFromDBSnapshot /// service method on AmazonRDS.</param> /// /// <returns>The response from the RestoreDBInstanceFromDBSnapshot service method, as returned by AmazonRDS.</returns> /// /// <exception cref="InstanceQuotaExceededException"/> /// <exception cref="DBInstanceAlreadyExistsException"/> /// <exception cref="StorageQuotaExceededException"/> /// <exception cref="InvalidDBSnapshotStateException"/> /// <exception cref="InsufficientDBInstanceCapacityException"/> /// <exception cref="DBSnapshotNotFoundException"/> public RestoreDBInstanceFromDBSnapshotResponse RestoreDBInstanceFromDBSnapshot(RestoreDBInstanceFromDBSnapshotRequest restoreDBInstanceFromDBSnapshotRequest) { IRequest <RestoreDBInstanceFromDBSnapshotRequest> request = new RestoreDBInstanceFromDBSnapshotRequestMarshaller().Marshall(restoreDBInstanceFromDBSnapshotRequest); RestoreDBInstanceFromDBSnapshotResponse response = Invoke <RestoreDBInstanceFromDBSnapshotRequest, RestoreDBInstanceFromDBSnapshotResponse> (request, this.signer, RestoreDBInstanceFromDBSnapshotResponseUnmarshaller.GetInstance()); return(response); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { RestoreDBInstanceFromDBSnapshotResponse response = new RestoreDBInstanceFromDBSnapshotResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("RestoreDBInstanceFromDBSnapshotResult", 2)) { response.RestoreDBInstanceFromDBSnapshotResult = RestoreDBInstanceFromDBSnapshotResultUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }