private static void UnmarshallResult(XmlUnmarshallerContext context, ListBucketAnalyticsConfigurationsResponse response) { int currentDepth = context.get_CurrentDepth(); int num = currentDepth + 1; if (context.get_IsStartOfDocument()) { num += 2; } while (context.Read()) { if (context.get_IsStartElement() || context.get_IsAttribute()) { if (context.TestExpression("ContinuationToken", num)) { response.ContinuationToken = StringUnmarshaller.get_Instance().Unmarshall(context); } else if (context.TestExpression("AnalyticsConfiguration", num)) { response.AnalyticsConfigurationList.Add(AnalyticsConfigurationUnmarshaller.Instance.Unmarshall(context)); } else if (context.TestExpression("IsTruncated", num)) { response.IsTruncated = BoolUnmarshaller.get_Instance().Unmarshall(context); } else if (context.TestExpression("NextContinuationToken", num)) { response.NextContinuationToken = StringUnmarshaller.get_Instance().Unmarshall(context); } } else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth) { break; } } }
private static void UnmarshallResult(XmlUnmarshallerContext context, GetFieldLevelEncryptionProfileResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("FieldLevelEncryptionProfile", targetDepth)) { var unmarshaller = FieldLevelEncryptionProfileUnmarshaller.Instance; response.FieldLevelEncryptionProfile = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ListAvailableSolutionStacksResponse response = new ListAvailableSolutionStacksResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("ListAvailableSolutionStacksResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, ListCloudFrontOriginAccessIdentitiesResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CloudFrontOriginAccessIdentityList", targetDepth)) { var unmarshaller = CloudFrontOriginAccessIdentityListUnmarshaller.Instance; response.CloudFrontOriginAccessIdentityList = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateEnvironmentResponse response = new CreateEnvironmentResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("CreateEnvironmentResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeAutoScalingNotificationTypesResponse response = new DescribeAutoScalingNotificationTypesResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("DescribeAutoScalingNotificationTypesResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context,DescribeLaunchConfigurationsResponse 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("LaunchConfigurations/member", targetDepth)) { response.LaunchConfigurations.Add(LaunchConfigurationUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("NextToken", targetDepth)) { response.NextToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeregisterInstancesFromLoadBalancerResponse response = new DeregisterInstancesFromLoadBalancerResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("DeregisterInstancesFromLoadBalancerResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { PurchaseReservedNodeOfferingResponse response = new PurchaseReservedNodeOfferingResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("PurchaseReservedNodeOfferingResult", 2)) { response.PurchaseReservedNodeOfferingResult = PurchaseReservedNodeOfferingResultUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { RemoveSourceIdentifierFromSubscriptionResponse response = new RemoveSourceIdentifierFromSubscriptionResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("RemoveSourceIdentifierFromSubscriptionResult", 2)) { response.RemoveSourceIdentifierFromSubscriptionResult = RemoveSourceIdentifierFromSubscriptionResultUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ModifyDBSubnetGroupResponse response = new ModifyDBSubnetGroupResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("ModifyDBSubnetGroupResult", 2)) { response.ModifyDBSubnetGroupResult = ModifyDBSubnetGroupResultUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketLoggingResponse response) { int currentDepth = context.get_CurrentDepth(); int num = currentDepth + 1; if (context.get_IsStartOfDocument()) { num += 2; } while (context.Read()) { if (context.get_IsStartElement() || context.get_IsAttribute()) { if (context.TestExpression("LoggingEnabled", num)) { response.BucketLoggingConfig = LoggingEnabledUnmarshaller.Instance.Unmarshall(context); } } else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth) { break; } } }
private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketAccelerateConfigurationResponse response) { int currentDepth = context.get_CurrentDepth(); int num = currentDepth + 1; if (context.get_IsStartOfDocument()) { num += 2; } while (context.Read()) { if (context.get_IsStartElement() || context.get_IsAttribute()) { if (context.TestExpression("Status", num)) { response.Status = StringUnmarshaller.GetInstance().Unmarshall(context); } } else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth) { break; } } }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetPlatformApplicationAttributesResponse response = new GetPlatformApplicationAttributesResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("GetPlatformApplicationAttributesResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeDefaultClusterParametersResponse response = new DescribeDefaultClusterParametersResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("DescribeDefaultClusterParametersResult", 2)) { response.DescribeDefaultClusterParametersResult = DescribeDefaultClusterParametersResultUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { AuthorizeClusterSecurityGroupIngressResponse response = new AuthorizeClusterSecurityGroupIngressResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("AuthorizeClusterSecurityGroupIngressResult", 2)) { response.AuthorizeClusterSecurityGroupIngressResult = AuthorizeClusterSecurityGroupIngressResultUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { RebootCacheClusterResponse response = new RebootCacheClusterResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("RebootCacheClusterResult", 2)) { response.RebootCacheClusterResult = RebootCacheClusterResultUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateDistributionResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Distribution", targetDepth)) { var unmarshaller = DistributionUnmarshaller.Instance; response.Distribution = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ModifySnapshotCopyRetentionPeriodResponse response = new ModifySnapshotCopyRetentionPeriodResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("ModifySnapshotCopyRetentionPeriodResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, GetCachePolicyConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CachePolicyConfig", targetDepth)) { var unmarshaller = CachePolicyConfigUnmarshaller.Instance; response.CachePolicyConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, ListVersionsResponse 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("IsTruncated", targetDepth)) { response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("KeyMarker", targetDepth)) { response.KeyMarker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Delimiter", targetDepth)) { response.Delimiter = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VersionIdMarker", targetDepth)) { response.VersionIdMarker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextKeyMarker", targetDepth)) { response.NextKeyMarker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextVersionIdMarker", targetDepth)) { response.NextVersionIdMarker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Version", targetDepth)) { response.Versions.Add(VersionsItemUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("DeleteMarker", targetDepth)) { var version = VersionsItemUnmarshaller.GetInstance().Unmarshall(context); version.IsDeleteMarker = true; response.Versions.Add(version); continue; } if (context.TestExpression("Name", targetDepth)) { response.Name = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Prefix", targetDepth)) { response.Prefix = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxKeys", targetDepth)) { response.MaxKeys = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CommonPrefixes", targetDepth)) { var prefix = CommonPrefixesItemUnmarshaller.GetInstance().Unmarshall(context); if (prefix != null) { response.CommonPrefixes.Add(prefix); } continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, ListPartsResponse 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("Bucket", targetDepth)) { response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Key", targetDepth)) { response.Key = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("UploadId", targetDepth)) { response.UploadId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PartNumberMarker", targetDepth)) { response.PartNumberMarker = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextPartNumberMarker", targetDepth)) { response.NextPartNumberMarker = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxParts", targetDepth)) { response.MaxParts = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("IsTruncated", targetDepth)) { response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Part", targetDepth)) { response.Parts.Add(PartDetailUnmarshaller.Instance.Unmarshall(context)); continue; } if (context.TestExpression("Initiator", targetDepth)) { response.Initiator = InitiatorUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Owner", targetDepth)) { response.Owner = OwnerUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("StorageClass", targetDepth)) { response.StorageClass = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, EnableLoggingResponse 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("LoggingEnabled", targetDepth)) { response.LoggingEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("BucketName", targetDepth)) { response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("S3KeyPrefix", targetDepth)) { response.S3KeyPrefix = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastSuccessfulDeliveryTime", targetDepth)) { response.LastSuccessfulDeliveryTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastFailureTime", targetDepth)) { response.LastFailureTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastFailureMessage", targetDepth)) { response.LastFailureMessage = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeResizeResponse 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("TargetNodeType", targetDepth)) { response.TargetNodeType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TargetNumberOfNodes", targetDepth)) { response.TargetNumberOfNodes = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TargetClusterType", targetDepth)) { response.TargetClusterType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { response.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ImportTablesCompleted/member", targetDepth)) { response.ImportTablesCompleted.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("ImportTablesInProgress/member", targetDepth)) { response.ImportTablesInProgress.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("ImportTablesNotStarted/member", targetDepth)) { response.ImportTablesNotStarted.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("AvgResizeRateInMegaBytesPerSecond", targetDepth)) { response.AvgResizeRateInMegaBytesPerSecond = DoubleUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TotalResizeDataInMegaBytes", targetDepth)) { response.TotalResizeDataInMegaBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ProgressInMegaBytes", targetDepth)) { response.ProgressInMegaBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ElapsedTimeInSeconds", targetDepth)) { response.ElapsedTimeInSeconds = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EstimatedTimeToCompletionInSeconds", targetDepth)) { response.EstimatedTimeToCompletionInSeconds = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, InitiateMultipartUploadResponse 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("Bucket", targetDepth)) { response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Key", targetDepth)) { response.Key = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("UploadId", targetDepth)) { response.UploadId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } IWebResponseData responseData = context.ResponseData; if (responseData.IsHeaderPresent("x-amz-server-side-encryption")) { response.ServerSideEncryptionMethod = S3Transforms.ToString(responseData.GetHeaderValue("x-amz-server-side-encryption")); } if (responseData.IsHeaderPresent(HeaderKeys.XAmzServerSideEncryptionAwsKmsKeyIdHeader)) { response.ServerSideEncryptionKeyManagementServiceKeyId = S3Transforms.ToString(responseData.GetHeaderValue(HeaderKeys.XAmzServerSideEncryptionAwsKmsKeyIdHeader)); } if (responseData.IsHeaderPresent(HeaderKeys.XAmzAbortDateHeader)) { response.AbortDate = S3Transforms.ToDateTime(responseData.GetHeaderValue(HeaderKeys.XAmzAbortDateHeader)); } if (responseData.IsHeaderPresent(HeaderKeys.XAmzAbortRuleIdHeader)) { response.AbortRuleId = S3Transforms.ToString(responseData.GetHeaderValue(HeaderKeys.XAmzAbortRuleIdHeader)); } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, CompleteMultipartUploadResponse 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("Location", targetDepth)) { response.Location = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Bucket", targetDepth)) { response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Key", targetDepth)) { response.Key = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ETag", targetDepth)) { response.ETag = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } IWebResponseData responseData = context.ResponseData; if (responseData.IsHeaderPresent("x-amz-expiration")) { response.Expiration = new Expiration(responseData.GetHeaderValue("x-amz-expiration")); } if (responseData.IsHeaderPresent("x-amz-server-side-encryption")) { response.ServerSideEncryptionMethod = S3Transforms.ToString(responseData.GetHeaderValue("x-amz-server-side-encryption")); } if (responseData.IsHeaderPresent("x-amz-version-id")) { response.VersionId = S3Transforms.ToString(responseData.GetHeaderValue("x-amz-version-id")); } if (responseData.IsHeaderPresent(HeaderKeys.XAmzServerSideEncryptionAwsKmsKeyIdHeader)) { response.ServerSideEncryptionKeyManagementServiceKeyId = S3Transforms.ToString(responseData.GetHeaderValue(HeaderKeys.XAmzServerSideEncryptionAwsKmsKeyIdHeader)); } if (responseData.IsHeaderPresent(S3Constants.AmzHeaderRequestCharged)) { response.RequestCharged = RequestCharged.FindValue(responseData.GetHeaderValue(S3Constants.AmzHeaderRequestCharged)); } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, ListObjectsResponse 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("IsTruncated", targetDepth)) { response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextMarker", targetDepth)) { response.NextMarker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Contents", targetDepth)) { // adding the bucket name into the S3Object instance enables // a better pipelining experience in PowerShell var s3Object = ContentsItemUnmarshaller.Instance.Unmarshall(context); s3Object.BucketName = response.Name; response.S3Objects.Add(s3Object); continue; } if (context.TestExpression("Name", targetDepth)) { response.Name = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Prefix", targetDepth)) { response.Prefix = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Delimiter", targetDepth)) { response.Delimiter = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxKeys", targetDepth)) { response.MaxKeys = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CommonPrefixes", targetDepth)) { var prefix = CommonPrefixesItemUnmarshaller.Instance.Unmarshall(context); if (prefix != null) { response.CommonPrefixes.Add(prefix); } continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, ListVersionsResponse response) { int currentDepth = context.get_CurrentDepth(); int num = currentDepth + 1; if (context.get_IsStartOfDocument()) { num += 2; } while (context.Read()) { if (context.get_IsStartElement() || context.get_IsAttribute()) { if (context.TestExpression("IsTruncated", num)) { response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("KeyMarker", num)) { response.KeyMarker = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("Delimiter", num)) { response.Delimiter = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("VersionIdMarker", num)) { response.VersionIdMarker = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("NextKeyMarker", num)) { response.NextKeyMarker = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("NextVersionIdMarker", num)) { response.NextVersionIdMarker = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("Version", num)) { response.Versions.Add(VersionsItemUnmarshaller.Instance.Unmarshall(context)); } else if (context.TestExpression("DeleteMarker", num)) { S3ObjectVersion s3ObjectVersion = VersionsItemUnmarshaller.Instance.Unmarshall(context); s3ObjectVersion.IsDeleteMarker = true; response.Versions.Add(s3ObjectVersion); } else if (context.TestExpression("Name", num)) { response.Name = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("Prefix", num)) { response.Prefix = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("MaxKeys", num)) { response.MaxKeys = IntUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("CommonPrefixes", num)) { string text = CommonPrefixesItemUnmarshaller.Instance.Unmarshall(context); if (text != null) { response.CommonPrefixes.Add(text); } } } else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth) { break; } } }
private static void UnmarshallResult(XmlUnmarshallerContext context, InitiateMultipartUploadResponse 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("Bucket", targetDepth)) { response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Key", targetDepth)) { response.Key = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("UploadId", targetDepth)) { response.UploadId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } IWebResponseData responseData = context.ResponseData; if (responseData.IsHeaderPresent("x-amz-server-side-encryption")) { response.ServerSideEncryptionMethod = S3Transforms.ToString(responseData.GetHeaderValue("x-amz-server-side-encryption")); } if (responseData.IsHeaderPresent("x-amz-server-side-encryption-customer-algorithm")) { response.ServerSideEncryptionCustomerMethod = S3Transforms.ToString(responseData.GetHeaderValue("x-amz-server-side-encryption-customer-algorithm")); } if (responseData.IsHeaderPresent("x-amz-server-side-encryption-customer-key-MD5")) { response.ServerSideEncryptionCustomerProvidedKeyMD5 = S3Transforms.ToString(responseData.GetHeaderValue("x-amz-server-side-encryption-customer-key-MD5")); } if (responseData.IsHeaderPresent(HeaderKeys.XAmzServerSideEncryptionAwsKmsKeyIdHeader)) { response.ServerSideEncryptionKeyManagementServiceKeyId = S3Transforms.ToString(responseData.GetHeaderValue(HeaderKeys.XAmzServerSideEncryptionAwsKmsKeyIdHeader)); } if (responseData.IsHeaderPresent("x-amz-server-side-encryption-context")) { response.ServerSideEncryptionKeyManagementServiceEncryptionContext = S3Transforms.ToString(responseData.GetHeaderValue("x-amz-server-side-encryption-context")); } if (responseData.IsHeaderPresent(HeaderKeys.XAmzAbortDateHeader)) { response.AbortDate = S3Transforms.ToDateTime(responseData.GetHeaderValue(HeaderKeys.XAmzAbortDateHeader)); } if (responseData.IsHeaderPresent(HeaderKeys.XAmzAbortRuleIdHeader)) { response.AbortRuleId = S3Transforms.ToString(responseData.GetHeaderValue(HeaderKeys.XAmzAbortRuleIdHeader)); } if (responseData.IsHeaderPresent(S3Constants.AmzHeaderRequestCharged)) { response.RequestCharged = RequestCharged.FindValue(responseData.GetHeaderValue(S3Constants.AmzHeaderRequestCharged)); } if (responseData.IsHeaderPresent(S3Constants.AmzHeaderBucketKeyEnabled)) { response.BucketKeyEnabled = S3Transforms.ToBool(responseData.GetHeaderValue(S3Constants.AmzHeaderBucketKeyEnabled)); } if (responseData.IsHeaderPresent(S3Constants.AmzHeaderChecksumAlgorithm)) { response.ChecksumAlgorithm = context.ResponseData.GetHeaderValue("x-amz-checksum-algorithm"); } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketInventoryConfigurationResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } response.InventoryConfiguration = new InventoryConfiguration(); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Destination", targetDepth)) { response.InventoryConfiguration.Destination = InventoryDestinationUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("IsEnabled", targetDepth)) { response.InventoryConfiguration.IsEnabled = BoolUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Filter", targetDepth)) { response.InventoryConfiguration.InventoryFilter = InventoryFilterUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Id", targetDepth)) { response.InventoryConfiguration.InventoryId = StringUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("IncludedObjectVersions", targetDepth)) { response.InventoryConfiguration.IncludedObjectVersions = StringUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Field", targetDepth + 1)) { response.InventoryConfiguration.InventoryOptionalFields.Add(StringUnmarshaller.Instance.Unmarshall(context)); continue; } if (context.TestExpression("Schedule", targetDepth)) { response.InventoryConfiguration.Schedule = InventoryScheduleUnmarshaller.Instance.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }