/// <summary> /// Initializes a new instance of the <see cref="Network" /> class. /// </summary> /// <param name="name">name.</param> /// <param name="id">id.</param> /// <param name="created">created.</param> /// <param name="scope">scope.</param> /// <param name="driver">driver.</param> /// <param name="enableIPv6">enableIPv6.</param> /// <param name="iPAM">iPAM.</param> /// <param name="_internal">_internal.</param> /// <param name="attachable">attachable.</param> /// <param name="ingress">ingress.</param> /// <param name="containers">containers.</param> /// <param name="options">options.</param> /// <param name="labels">labels.</param> public Network(string name = default(string), string id = default(string), string created = default(string), string scope = default(string), string driver = default(string), bool?enableIPv6 = default(bool?), IPAM iPAM = default(IPAM), bool?_internal = default(bool?), bool?attachable = default(bool?), bool?ingress = default(bool?), Dictionary <string, NetworkContainer> containers = default(Dictionary <string, NetworkContainer>), Dictionary <string, string> options = default(Dictionary <string, string>), Dictionary <string, string> labels = default(Dictionary <string, string>)) { this.Name = name; this.Id = id; this.Created = created; this.Scope = scope; this.Driver = driver; this.EnableIPv6 = enableIPv6; this.IPAM = iPAM; this.Internal = _internal; this.Attachable = attachable; this.Ingress = ingress; this.Containers = containers; this.Options = options; this.Labels = labels; }
/// <summary> /// Initializes a new instance of the <see cref="NetworkConfig" /> class. /// </summary> /// <param name="name">The network's name. (required).</param> /// <param name="checkDuplicate">Check for networks with duplicate names. Since Network is primarily keyed based on a random ID and not on the name, and network name is strictly a user-friendly alias to the network which is uniquely identified using ID, there is no guaranteed way to check for duplicates. CheckDuplicate is there to provide a best effort checking of any networks which has the same name but it is not guaranteed to catch all name collisions..</param> /// <param name="driver">Name of the network driver plugin to use. (default to "bridge").</param> /// <param name="_internal">Restrict external access to the network..</param> /// <param name="attachable">Globally scoped network is manually attachable by regular containers from workers in swarm mode..</param> /// <param name="ingress">Ingress network is the network which provides the routing-mesh in swarm mode..</param> /// <param name="iPAM">Optional custom IP scheme for the network..</param> /// <param name="enableIPv6">Enable IPv6 on the network..</param> /// <param name="options">Network specific options to be used by the drivers..</param> /// <param name="labels">User-defined key/value metadata..</param> public NetworkConfig(string name = default(string), bool?checkDuplicate = default(bool?), string driver = "bridge", bool?_internal = default(bool?), bool?attachable = default(bool?), bool?ingress = default(bool?), IPAM iPAM = default(IPAM), bool?enableIPv6 = default(bool?), Dictionary <string, string> options = default(Dictionary <string, string>), Dictionary <string, string> labels = default(Dictionary <string, string>)) { // to ensure "name" is required (not null) if (name == null) { throw new InvalidDataException("name is a required property for NetworkConfig and cannot be null"); } else { this.Name = name; } this.CheckDuplicate = checkDuplicate; // use default value if no "driver" provided if (driver == null) { this.Driver = "bridge"; } else { this.Driver = driver; } this.Internal = _internal; this.Attachable = attachable; this.Ingress = ingress; this.IPAM = iPAM; this.EnableIPv6 = enableIPv6; this.Options = options; this.Labels = labels; }