コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DockerProxyRepositoryApiRequest" /> class.
 /// </summary>
 /// <param name="name">A unique identifier for this repository (required).</param>
 /// <param name="online">Whether this repository accepts incoming requests (required).</param>
 /// <param name="storage">storage (required).</param>
 /// <param name="cleanup">cleanup.</param>
 /// <param name="proxy">proxy (required).</param>
 /// <param name="negativeCache">negativeCache (required).</param>
 /// <param name="httpClient">httpClient (required).</param>
 /// <param name="routingRule">routingRule.</param>
 /// <param name="docker">docker (required).</param>
 /// <param name="dockerProxy">dockerProxy (required).</param>
 public DockerProxyRepositoryApiRequest(string name = default(string), bool?online = default(bool?), StorageAttributes storage = default(StorageAttributes), CleanupPolicyAttributes cleanup = default(CleanupPolicyAttributes), ProxyAttributes proxy = default(ProxyAttributes), NegativeCacheAttributes negativeCache = default(NegativeCacheAttributes), HttpClientAttributes httpClient = default(HttpClientAttributes), string routingRule = default(string), DockerAttributes docker = default(DockerAttributes), DockerProxyAttributes dockerProxy = default(DockerProxyAttributes))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for DockerProxyRepositoryApiRequest and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     // to ensure "online" is required (not null)
     if (online == null)
     {
         throw new InvalidDataException("online is a required property for DockerProxyRepositoryApiRequest and cannot be null");
     }
     else
     {
         this.Online = online;
     }
     // to ensure "storage" is required (not null)
     if (storage == null)
     {
         throw new InvalidDataException("storage is a required property for DockerProxyRepositoryApiRequest and cannot be null");
     }
     else
     {
         this.Storage = storage;
     }
     // to ensure "proxy" is required (not null)
     if (proxy == null)
     {
         throw new InvalidDataException("proxy is a required property for DockerProxyRepositoryApiRequest and cannot be null");
     }
     else
     {
         this.Proxy = proxy;
     }
     // to ensure "negativeCache" is required (not null)
     if (negativeCache == null)
     {
         throw new InvalidDataException("negativeCache is a required property for DockerProxyRepositoryApiRequest and cannot be null");
     }
     else
     {
         this.NegativeCache = negativeCache;
     }
     // to ensure "httpClient" is required (not null)
     if (httpClient == null)
     {
         throw new InvalidDataException("httpClient is a required property for DockerProxyRepositoryApiRequest and cannot be null");
     }
     else
     {
         this.HttpClient = httpClient;
     }
     // to ensure "docker" is required (not null)
     if (docker == null)
     {
         throw new InvalidDataException("docker is a required property for DockerProxyRepositoryApiRequest and cannot be null");
     }
     else
     {
         this.Docker = docker;
     }
     // to ensure "dockerProxy" is required (not null)
     if (dockerProxy == null)
     {
         throw new InvalidDataException("dockerProxy is a required property for DockerProxyRepositoryApiRequest and cannot be null");
     }
     else
     {
         this.DockerProxy = dockerProxy;
     }
     this.Cleanup     = cleanup;
     this.RoutingRule = routingRule;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RubyGemsHostedRepositoryApiRequest" /> class.
 /// </summary>
 /// <param name="name">A unique identifier for this repository (required).</param>
 /// <param name="online">Whether this repository accepts incoming requests (required).</param>
 /// <param name="storage">storage (required).</param>
 /// <param name="cleanup">cleanup.</param>
 public RubyGemsHostedRepositoryApiRequest(string name = default(string), bool?online = default(bool?), HostedStorageAttributes storage = default(HostedStorageAttributes), CleanupPolicyAttributes cleanup = default(CleanupPolicyAttributes))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for RubyGemsHostedRepositoryApiRequest and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     // to ensure "online" is required (not null)
     if (online == null)
     {
         throw new InvalidDataException("online is a required property for RubyGemsHostedRepositoryApiRequest and cannot be null");
     }
     else
     {
         this.Online = online;
     }
     // to ensure "storage" is required (not null)
     if (storage == null)
     {
         throw new InvalidDataException("storage is a required property for RubyGemsHostedRepositoryApiRequest and cannot be null");
     }
     else
     {
         this.Storage = storage;
     }
     this.Cleanup = cleanup;
 }