// /* ============================================================================ // Copyright 2014 Hewlett Packard // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License 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. // ============================================================================ */ namespace Openstack.Storage { using System; using System.Collections.Generic; using Openstack.Common; /// /// Represents the manifest for a dynamic large object on the remote instance of Openstack. /// public class DynamicLargeObjectManifest : StorageManifest { /// /// Gets the path where the object segments that make up the manifest can be found. /// public string SegmentsPath { get; internal set; } /// /// Creates a new instance of the DynamicLargeObjectManifest class. /// /// The name of the parent container. /// The full name of the manifest file /// The path where the segments that make up this manifest can be found. public DynamicLargeObjectManifest(string containerName, string manifestFullName, string segmentsPath) : this(containerName, manifestFullName, new Dictionary(), segmentsPath) { } /// /// Creates a new instance of the DynamicLargeObjectManifest class. /// /// The name of the parent container. /// The full name of the manifest file /// The metadata associated with the storage manifest. /// The path where the segments that make up this manifest can be found. public DynamicLargeObjectManifest(string containerName, string manifestFullName, IDictionary metadata, string segmentsPath) : base(containerName, manifestFullName, metadata) { segmentsPath.AssertIsNotNullOrEmpty("segmentsPath", "Cannot create a dynamic large object manifest with a null or empty segments path."); this.SegmentsPath = segmentsPath; } /// /// Creates a new instance of the DynamicLargeObjectManifest class. /// /// The full name of the storage manifest. /// The name of the parent storage container for the storage manifest. /// The last modified data for the storage manifest. /// The ETag for the storage manifest. /// The length/size of the storage manifest. /// The content type of the storage manifest. /// The metadata associated with the storage manifest. /// The path where the segments that make up this manifest can be found. internal DynamicLargeObjectManifest(string fullName, string containerName, DateTime lastModified, string eTag, long length, string contentType, IDictionary metadata, string segmentsPath) : base(fullName, containerName, lastModified, eTag, length, contentType, metadata) { this.SegmentsPath = segmentsPath; } } }