-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add project environment variables support * increase coverage project environment variable * initialize fields explicitely * use new projectId and fix tests Co-authored-by: Cristian Ramon Garcia <[email protected]> Co-authored-by: Joseph Petersen <[email protected]>
- Loading branch information
1 parent
baa9da1
commit 3d6844b
Showing
5 changed files
with
273 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
src/GitLabApiClient/Models/Variables/Request/CreateVariableRequest.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,44 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace GitLabApiClient.Models.Variables.Request | ||
{ | ||
public class CreateVariableRequest | ||
{ | ||
/// <summary> | ||
/// The type of a variable. | ||
/// Available types are: env_var (default) and file | ||
/// </summary> | ||
[JsonProperty("variable_type")] | ||
public string VariableType { get; set; } | ||
|
||
/// <summary> | ||
/// The key of a variable | ||
/// </summary> | ||
[JsonProperty("key")] | ||
public string Key { get; set; } | ||
|
||
/// <summary> | ||
/// The value of a variable | ||
/// </summary> | ||
[JsonProperty("value")] | ||
public string Value { get; set; } | ||
|
||
/// <summary> | ||
/// Whether the variable is protected | ||
/// </summary> | ||
[JsonProperty("protected")] | ||
public bool? Protected { get; set; } | ||
|
||
/// <summary> | ||
/// Whether the variable is masked | ||
/// </summary> | ||
[JsonProperty("masked")] | ||
public bool? Masked { get; set; } | ||
|
||
/// <summary> | ||
/// The environment_scope of the variable | ||
/// </summary> | ||
[JsonProperty("environment_scope")] | ||
public string EnvironmentScope { get; set; } | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
src/GitLabApiClient/Models/Variables/Request/UpdateProjectVariableRequest.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,44 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace GitLabApiClient.Models.Variables.Request | ||
{ | ||
public class UpdateProjectVariableRequest | ||
{ | ||
/// <summary> | ||
/// The type of a variable. | ||
/// Available types are: env_var (default) and file | ||
/// </summary> | ||
[JsonProperty("variable_type")] | ||
public string VariableType { get; set; } | ||
|
||
/// <summary> | ||
/// The key of a variable | ||
/// </summary> | ||
[JsonProperty("key")] | ||
public string Key { get; set; } | ||
|
||
/// <summary> | ||
/// The value of a variable | ||
/// </summary> | ||
[JsonProperty("value")] | ||
public string Value { get; set; } | ||
|
||
/// <summary> | ||
/// Whether the variable is protected | ||
/// </summary> | ||
[JsonProperty("protected")] | ||
public bool? Protected { get; set; } | ||
|
||
/// <summary> | ||
/// Whether the variable is masked | ||
/// </summary> | ||
[JsonProperty("masked")] | ||
public bool? Masked { get; set; } | ||
|
||
/// <summary> | ||
/// The environment_scope of the variable | ||
/// </summary> | ||
[JsonProperty("environment_scope")] | ||
public string EnvironmentScope { get; set; } | ||
} | ||
} |
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,44 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace GitLabApiClient.Models.Variables.Response | ||
{ | ||
public sealed class Variable | ||
{ | ||
/// <summary> | ||
/// The type of a variable. | ||
/// Available types are: env_var (default) and file | ||
/// </summary> | ||
[JsonProperty("variable_type")] | ||
public string VariableType { get; set; } | ||
|
||
/// <summary> | ||
/// The key of a variable | ||
/// </summary> | ||
[JsonProperty("key")] | ||
public string Key { get; set; } | ||
|
||
/// <summary> | ||
/// The value of a variable | ||
/// </summary> | ||
[JsonProperty("value")] | ||
public string Value { get; set; } | ||
|
||
/// <summary> | ||
/// Whether the variable is protected | ||
/// </summary> | ||
[JsonProperty("protected")] | ||
public bool Protected { get; set; } | ||
|
||
/// <summary> | ||
/// Whether the variable is masked | ||
/// </summary> | ||
[JsonProperty("masked")] | ||
public bool Masked { get; set; } | ||
|
||
/// <summary> | ||
/// The environment_scope of the variable | ||
/// </summary> | ||
[JsonProperty("environment_scope")] | ||
public string EnvironmentScope { get; set; } | ||
} | ||
} |
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