Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DockerImage" /> class.
        /// </summary>
        /// <param name="id">id (required).</param>
        /// <param name="repoTags">repoTags.</param>
        /// <param name="repoDigests">repoDigests.</param>
        /// <param name="parent">parent (required).</param>
        /// <param name="comment">comment (required).</param>
        /// <param name="created">created (required).</param>
        /// <param name="container">container (required).</param>
        /// <param name="containerConfig">containerConfig.</param>
        /// <param name="dockerVersion">dockerVersion (required).</param>
        /// <param name="author">author (required).</param>
        /// <param name="config">config.</param>
        /// <param name="architecture">architecture (required).</param>
        /// <param name="os">os (required).</param>
        /// <param name="osVersion">osVersion.</param>
        /// <param name="size">size (required).</param>
        /// <param name="virtualSize">virtualSize (required).</param>
        /// <param name="graphDriver">graphDriver (required).</param>
        /// <param name="rootFS">rootFS (required).</param>
        /// <param name="metadata">metadata.</param>
        public DockerImage(string id = default(string), List <string> repoTags = default(List <string>), List <string> repoDigests = default(List <string>), string parent = default(string), string comment = default(string), string created = default(string), string container = default(string), DockerContainerConfig containerConfig = default(DockerContainerConfig), string dockerVersion = default(string), string author = default(string), DockerContainerConfig config = default(DockerContainerConfig), string architecture = default(string), string os = default(string), string osVersion = default(string), long size = default(long), long virtualSize = default(long), DockerGraphDriverData graphDriver = default(DockerGraphDriverData), DockerImageRootFS rootFS = default(DockerImageRootFS), DockerImageMetadata metadata = default(DockerImageMetadata))
        {
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.Id = id;
            }

            // to ensure "parent" is required (not null)
            if (parent == null)
            {
                throw new InvalidDataException("parent is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.Parent = parent;
            }

            // to ensure "comment" is required (not null)
            if (comment == null)
            {
                throw new InvalidDataException("comment is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.Comment = comment;
            }

            // to ensure "created" is required (not null)
            if (created == null)
            {
                throw new InvalidDataException("created is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.Created = created;
            }

            // to ensure "container" is required (not null)
            if (container == null)
            {
                throw new InvalidDataException("container is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.Container = container;
            }

            // to ensure "dockerVersion" is required (not null)
            if (dockerVersion == null)
            {
                throw new InvalidDataException("dockerVersion is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.DockerVersion = dockerVersion;
            }

            // to ensure "author" is required (not null)
            if (author == null)
            {
                throw new InvalidDataException("author is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.Author = author;
            }

            // to ensure "architecture" is required (not null)
            if (architecture == null)
            {
                throw new InvalidDataException("architecture is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.Architecture = architecture;
            }

            // to ensure "os" is required (not null)
            if (os == null)
            {
                throw new InvalidDataException("os is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.Os = os;
            }

            // to ensure "size" is required (not null)
            if (size == null)
            {
                throw new InvalidDataException("size is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.Size = size;
            }

            // to ensure "virtualSize" is required (not null)
            if (virtualSize == null)
            {
                throw new InvalidDataException("virtualSize is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.VirtualSize = virtualSize;
            }

            // to ensure "graphDriver" is required (not null)
            if (graphDriver == null)
            {
                throw new InvalidDataException("graphDriver is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.GraphDriver = graphDriver;
            }

            // to ensure "rootFS" is required (not null)
            if (rootFS == null)
            {
                throw new InvalidDataException("rootFS is a required property for DockerImage and cannot be null");
            }
            else
            {
                this.RootFS = rootFS;
            }

            this.RepoTags        = repoTags;
            this.RepoDigests     = repoDigests;
            this.ContainerConfig = containerConfig;
            this.Config          = config;
            this.OsVersion       = osVersion;
            this.Metadata        = metadata;
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DockerContainer" /> class.
 /// </summary>
 /// <param name="id">The ID of the container.</param>
 /// <param name="created">The time the container was created.</param>
 /// <param name="path">The path to the command being run.</param>
 /// <param name="args">The arguments to the command being run.</param>
 /// <param name="state">state.</param>
 /// <param name="image">The container&#39;s image.</param>
 /// <param name="resolvConfPath">resolvConfPath.</param>
 /// <param name="hostnamePath">hostnamePath.</param>
 /// <param name="hostsPath">hostsPath.</param>
 /// <param name="logPath">logPath.</param>
 /// <param name="node">TODO.</param>
 /// <param name="name">name.</param>
 /// <param name="restartCount">restartCount.</param>
 /// <param name="driver">driver.</param>
 /// <param name="mountLabel">mountLabel.</param>
 /// <param name="processLabel">processLabel.</param>
 /// <param name="appArmorProfile">appArmorProfile.</param>
 /// <param name="execIDs">execIDs.</param>
 /// <param name="hostConfig">hostConfig.</param>
 /// <param name="graphDriver">graphDriver.</param>
 /// <param name="sizeRw">The size of files that have been created or changed by this container..</param>
 /// <param name="sizeRootFs">The total size of all the files in this container..</param>
 /// <param name="mounts">mounts.</param>
 /// <param name="config">config.</param>
 /// <param name="networkSettings">networkSettings.</param>
 public DockerContainer(string id = default(string), string created = default(string), string path = default(string), List <string> args = default(List <string>), DockerContainerState state = default(DockerContainerState), string image = default(string), string resolvConfPath = default(string), string hostnamePath = default(string), string hostsPath = default(string), string logPath = default(string), Object node = default(Object), string name = default(string), int restartCount = default(int), string driver = default(string), string mountLabel = default(string), string processLabel = default(string), string appArmorProfile = default(string), List <string> execIDs = default(List <string>), DockerHostConfig hostConfig = default(DockerHostConfig), DockerGraphDriverData graphDriver = default(DockerGraphDriverData), long sizeRw = default(long), long sizeRootFs = default(long), List <DockerMountPoint> mounts = default(List <DockerMountPoint>), DockerContainerConfig config = default(DockerContainerConfig), DockerNetworkSettings networkSettings = default(DockerNetworkSettings))
 {
     this.Id              = id;
     this.Created         = created;
     this.Path            = path;
     this.Args            = args;
     this.State           = state;
     this.Image           = image;
     this.ResolvConfPath  = resolvConfPath;
     this.HostnamePath    = hostnamePath;
     this.HostsPath       = hostsPath;
     this.LogPath         = logPath;
     this.Node            = node;
     this.Name            = name;
     this.RestartCount    = restartCount;
     this.Driver          = driver;
     this.MountLabel      = mountLabel;
     this.ProcessLabel    = processLabel;
     this.AppArmorProfile = appArmorProfile;
     this.ExecIDs         = execIDs;
     this.HostConfig      = hostConfig;
     this.GraphDriver     = graphDriver;
     this.SizeRw          = sizeRw;
     this.SizeRootFs      = sizeRootFs;
     this.Mounts          = mounts;
     this.Config          = config;
     this.NetworkSettings = networkSettings;
 }