/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the mediastore-data-2017-09-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.MediaStoreData.Model
{
///
/// This is the response object from the GetObject operation.
///
public partial class GetObjectResponse : AmazonWebServiceResponse, IDisposable
{
private Stream _body;
private string _cacheControl;
private long? _contentLength;
private string _contentRange;
private string _contentType;
private string _eTag;
private DateTime? _lastModified;
private int? _statusCode;
///
/// Gets and sets the property Body.
///
/// The bytes of the object.
///
///
public Stream Body
{
get { return this._body; }
set { this._body = value; }
}
// Check to see if Body property is set
internal bool IsSetBody()
{
return this._body != null;
}
///
/// Gets and sets the property CacheControl.
///
/// An optional CacheControl
header that allows the caller to control the
/// object's cache behavior. Headers can be passed in as specified in the HTTP spec at
/// https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.
///
///
///
/// Headers with a custom user-defined value are also accepted.
///
///
public string CacheControl
{
get { return this._cacheControl; }
set { this._cacheControl = value; }
}
// Check to see if CacheControl property is set
internal bool IsSetCacheControl()
{
return this._cacheControl != null;
}
///
/// Gets and sets the property ContentLength.
///
/// The length of the object in bytes.
///
///
[AWSProperty(Min=0)]
public long ContentLength
{
get { return this._contentLength.GetValueOrDefault(); }
set { this._contentLength = value; }
}
// Check to see if ContentLength property is set
internal bool IsSetContentLength()
{
return this._contentLength.HasValue;
}
///
/// Gets and sets the property ContentRange.
///
/// The range of bytes to retrieve.
///
///
public string ContentRange
{
get { return this._contentRange; }
set { this._contentRange = value; }
}
// Check to see if ContentRange property is set
internal bool IsSetContentRange()
{
return this._contentRange != null;
}
///
/// Gets and sets the property ContentType.
///
/// The content type of the object.
///
///
public string ContentType
{
get { return this._contentType; }
set { this._contentType = value; }
}
// Check to see if ContentType property is set
internal bool IsSetContentType()
{
return this._contentType != null;
}
///
/// Gets and sets the property ETag.
///
/// The ETag that represents a unique instance of the object.
///
///
[AWSProperty(Min=1, Max=64)]
public string ETag
{
get { return this._eTag; }
set { this._eTag = value; }
}
// Check to see if ETag property is set
internal bool IsSetETag()
{
return this._eTag != null;
}
///
/// Gets and sets the property LastModified.
///
/// The date and time that the object was last modified.
///
///
public DateTime LastModified
{
get { return this._lastModified.GetValueOrDefault(); }
set { this._lastModified = value; }
}
// Check to see if LastModified property is set
internal bool IsSetLastModified()
{
return this._lastModified.HasValue;
}
///
/// Gets and sets the property StatusCode.
///
/// The HTML status code of the request. Status codes ranging from 200 to 299 indicate
/// success. All other status codes indicate the type of error that occurred.
///
///
[AWSProperty(Required=true)]
public int StatusCode
{
get { return this._statusCode.GetValueOrDefault(); }
set { this._statusCode = value; }
}
// Check to see if StatusCode property is set
internal bool IsSetStatusCode()
{
return this._statusCode.HasValue;
}
#region Dispose Pattern
private bool _disposed;
///
/// Disposes of all managed and unmanaged resources.
///
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (_disposed)
return;
if (disposing)
{
this._body?.Dispose();
this._body = null;
}
this._disposed = true;
}
#endregion
}
}