2020-03-05 09:12:38 -08:00
|
|
|
namespace k8s.KubeConfigModels
|
|
|
|
|
{
|
|
|
|
|
public class ExecCredentialResponse
|
|
|
|
|
{
|
2022-02-23 09:32:19 -08:00
|
|
|
public class ExecStatus
|
|
|
|
|
{
|
2022-02-25 13:33:23 -08:00
|
|
|
#nullable enable
|
2022-02-23 09:32:19 -08:00
|
|
|
public DateTime? Expiry { get; set; }
|
|
|
|
|
public string? Token { get; set; }
|
|
|
|
|
public string? ClientCertificateData { get; set; }
|
|
|
|
|
public string? ClientKeyData { get; set; }
|
2022-02-25 13:33:23 -08:00
|
|
|
#nullable disable
|
2022-02-23 09:32:19 -08:00
|
|
|
|
|
|
|
|
public bool IsValid()
|
|
|
|
|
{
|
|
|
|
|
return (!string.IsNullOrEmpty(Token) ||
|
|
|
|
|
(!string.IsNullOrEmpty(ClientCertificateData) && !string.IsNullOrEmpty(ClientKeyData)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-13 07:31:59 -08:00
|
|
|
[JsonPropertyName("apiVersion")]
|
2020-11-01 12:24:51 -08:00
|
|
|
public string ApiVersion { get; set; }
|
2021-12-13 07:31:59 -08:00
|
|
|
[JsonPropertyName("kind")]
|
2020-11-01 12:24:51 -08:00
|
|
|
public string Kind { get; set; }
|
2021-12-13 07:31:59 -08:00
|
|
|
[JsonPropertyName("status")]
|
2022-02-23 09:32:19 -08:00
|
|
|
public ExecStatus Status { get; set; }
|
2020-03-05 09:12:38 -08:00
|
|
|
}
|
|
|
|
|
}
|