/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using Amazon.Runtime;
namespace Amazon.S3.Model
{
///
/// Returns information about the DeleteObjects response and response metadata.
///
#if !NETSTANDARD
[Serializable]
public class DeleteObjectsResponse : AmazonWebServiceResponse, System.Runtime.Serialization.ISerializable
#else
public class DeleteObjectsResponse : AmazonWebServiceResponse
#endif
{
private List deleted = new List();
private List errors = new List();
private RequestCharged requestCharged;
///
/// A default constructor for DeleteObjectsResponse
///
public DeleteObjectsResponse()
{
}
///
/// Gets and sets the DeletedObjects property.
/// A list of successful deletes.
/// Set only when Quiet=false on DeleteObjectsRequest.
///
public List DeletedObjects
{
get { return this.deleted; }
set { this.deleted = value; }
}
// Check to see if Deleted property is set
internal bool IsSetDeletedObjects()
{
return this.deleted.Count > 0;
}
///
/// Gets and sets the DeleteErrors property.
/// A list of errors encountered while deleting objects.
///
public List DeleteErrors
{
get { return this.errors; }
set { this.errors = value; }
}
// Check to see if DeleteErrors property is set
internal bool IsSetDeleteErrors()
{
return this.errors.Count > 0;
}
///
/// If present, indicates that the requester was successfully charged for the request.
///
public RequestCharged RequestCharged
{
get { return this.requestCharged; }
set { this.requestCharged = value; }
}
///
/// Checks to see if RequestCharged is set.
///
/// true, if RequestCharged property is set.
internal bool IsSetRequestCharged()
{
return requestCharged != null;
}
#if !NETSTANDARD
///
/// Sets the with information about DeleteObjectsResponse
///
/// The that holds the serialized object data.
/// The that contains contextual information about the source or destination.
protected DeleteObjectsResponse(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
if (info != null)
{
this.deleted = (List)info.GetValue("deleted", typeof(List));
this.errors = (List)info.GetValue("errors", typeof(List));
this.requestCharged = RequestCharged.FindValue((string) info.GetValue("requestCharged", typeof(string)));
}
}
///
/// Sets the with information about the DeleteObjectsResponse.
///
/// The that holds the serialized object data about the exception being thrown.
/// The that contains contextual information about the source or destination.
[System.Security.SecurityCritical]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
if (info != null)
{
info.AddValue("deleted", deleted);
info.AddValue("errors", errors);
info.AddValue("requestCharged", (string) requestCharged);
}
}
#endif
}
}