forked from nmklotas/GitLabApiClient
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update runners command (nmklotas#161)
Co-authored-by: Joseph Petersen <[email protected]>
- Loading branch information
Showing
17 changed files
with
574 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
src/GitLabApiClient/Models/Runners/Requests/CreateRunnerRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Newtonsoft.Json; | ||
|
||
namespace GitLabApiClient.Models.Runners.Requests | ||
{ | ||
/// <summary> | ||
/// Registers a new runner with gitlab. | ||
/// </summary> | ||
public sealed class CreateRunnerRequest | ||
{ | ||
/// <summary> | ||
/// GitLab token to register runner | ||
/// </summary> | ||
[JsonProperty("token")] | ||
public string Token { get; set; } | ||
|
||
/// <summary> | ||
/// The description of a runner. | ||
/// </summary> | ||
[JsonProperty("description")] | ||
public string Description { get; set; } | ||
|
||
/// <summary> | ||
/// The state of a runner; can be set to true or false. | ||
/// </summary> | ||
[JsonProperty("active")] | ||
public bool? Active { get; set; } | ||
|
||
/// <summary> | ||
/// Flag indicating the runner is locked. | ||
/// </summary> | ||
[JsonProperty("locked")] | ||
public bool? Locked { get; set; } | ||
|
||
/// <summary> | ||
/// Flag indicating the runner can execute untagged jobs. | ||
/// </summary> | ||
[JsonProperty("run_untagged")] | ||
public bool? RunUntagged { get; set; } | ||
|
||
/// <summary> | ||
/// The list of tags for a runner; put array of tags, that should be finally assigned to a runner. | ||
/// </summary> | ||
[JsonProperty("tag_list")] | ||
public List<string> TagList { get; set; } | ||
|
||
/// <summary> | ||
/// The access_level of the runner; not_protected or ref_protected. | ||
/// </summary> | ||
[JsonProperty("access_level")] | ||
public string AccessLevel { get; set; } | ||
|
||
/// <summary> | ||
/// Maximum timeout set when this Runner will handle the job. | ||
/// </summary> | ||
[JsonProperty("maximum_timeout")] | ||
public int? MaximumTimeout { get; set; } | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
src/GitLabApiClient/Models/Runners/Requests/UpdateRunnerRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Newtonsoft.Json; | ||
|
||
namespace GitLabApiClient.Models.Runners.Requests | ||
{ | ||
/// <summary> | ||
/// Modifies an existing user. | ||
/// </summary> | ||
public sealed class UpdateRunnerRequest | ||
{ | ||
/// <summary> | ||
/// The description of a runner. | ||
/// </summary> | ||
[JsonProperty("description")] | ||
public string Description { get; set; } | ||
|
||
/// <summary> | ||
/// The state of a runner; can be set to true or false. | ||
/// </summary> | ||
[JsonProperty("active")] | ||
public bool? Active { get; set; } | ||
|
||
/// <summary> | ||
/// The list of tags for a runner; put array of tags, that should be finally assigned to a runner. | ||
/// </summary> | ||
[JsonProperty("tag_list")] | ||
public List<string> TagList { get; set; } | ||
|
||
/// <summary> | ||
/// Flag indicating the runner can execute untagged jobs. | ||
/// </summary> | ||
[JsonProperty("run_untagged")] | ||
public bool? RunUntagged { get; set; } | ||
|
||
/// <summary> | ||
/// Flag indicating the runner is locked. | ||
/// </summary> | ||
[JsonProperty("locked")] | ||
public bool? Locked { get; set; } | ||
|
||
/// <summary> | ||
/// The access_level of the runner; not_protected or ref_protected. | ||
/// </summary> | ||
[JsonProperty("access_level")] | ||
public string AccessLevel { get; set; } | ||
|
||
/// <summary> | ||
/// Maximum timeout set when this Runner will handle the job. | ||
/// </summary> | ||
[JsonProperty("maximum_timeout")] | ||
public int? MaximumTimeout { get; set; } | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
src/GitLabApiClient/Models/Runners/Responses/RunnerDetails.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace GitLabApiClient.Models.Runners.Responses | ||
{ | ||
public sealed class RunnerDetails | ||
{ | ||
[JsonProperty("active")] | ||
public bool Active { get; set; } | ||
|
||
[JsonProperty("architecture")] | ||
public string Architecture { get; set; } | ||
|
||
[JsonProperty("description")] | ||
public string Description { get; set; } | ||
|
||
[JsonProperty("id")] | ||
public int Id { get; set; } | ||
|
||
[JsonProperty("ip_address")] | ||
public string IpAddresses { get; set; } | ||
|
||
[JsonProperty("is_shared")] | ||
public bool IsShared { get; set; } | ||
|
||
[JsonProperty("contacted_at")] | ||
public string ContactedAt { get; set; } | ||
|
||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonProperty("online")] | ||
public bool Online { get; set; } | ||
|
||
[JsonProperty("status")] | ||
public string Status { get; set; } | ||
|
||
[JsonProperty("platform")] | ||
public string Platform { get; set; } | ||
|
||
[JsonProperty("projects")] | ||
public List<RunnerProject> Projects { get; } = new List<RunnerProject>(); | ||
|
||
[JsonProperty("revision")] | ||
public string Revision { get; set; } | ||
|
||
[JsonProperty("tag_list")] | ||
public List<string> TagList { get; } = new List<string>(); | ||
|
||
[JsonProperty("version")] | ||
public string Version { get; set; } | ||
|
||
[JsonProperty("access_level")] | ||
public string AccessLevel { get; set; } | ||
|
||
[JsonProperty("maximum_timeout")] | ||
public int MaximumTimeout { get; set; } | ||
} | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
src/GitLabApiClient/Models/Runners/Responses/RunnerProject.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace GitLabApiClient.Models.Runners.Responses | ||
{ | ||
public sealed class RunnerProject | ||
{ | ||
[JsonProperty("id")] | ||
public int Id { get; set; } | ||
|
||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonProperty("name_with_namespace")] | ||
public string NameWithNamespace { get; set; } | ||
|
||
[JsonProperty("path")] | ||
public string Path { get; set; } | ||
|
||
[JsonProperty("path_with_namespace")] | ||
public string PathWithNamespace { get; set; } | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/GitLabApiClient/Models/Runners/Responses/RunnerToken.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace GitLabApiClient.Models.Runners.Responses | ||
{ | ||
public sealed class RunnerToken | ||
{ | ||
[JsonProperty("id")] | ||
public int Id { get; set; } | ||
|
||
[JsonProperty("token")] | ||
public string Token { get; set; } | ||
} | ||
} |
Oops, something went wrong.