Skip to content

Commit 21c41e7

Browse files
authored
Implement IMetadata interface (#998)
* V1PodTemplateSpec implements IMetadata interface This will allow using the ModelExteions methods over V1PodTemplateSpec * Typo
1 parent 13cc644 commit 21c41e7

File tree

6 files changed

+15
-5
lines changed

6 files changed

+15
-5
lines changed

examples/customResource/CustomResourceDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class CustomResourceDefinition
2121
public string Namespace { get; set; }
2222
}
2323

24-
public abstract class CustomResource : KubernetesObject
24+
public abstract class CustomResource : KubernetesObject, IMetadata<V1ObjectMeta>
2525
{
2626
[JsonPropertyName("metadata")]
2727
public V1ObjectMeta Metadata { get; set; }

src/KubernetesClient.Models/NodeMetrics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace k8s.Models
33
/// <summary>
44
/// Describes the resource usage metrics of a node pull from metrics server API.
55
/// </summary>
6-
public class NodeMetrics
6+
public class NodeMetrics : IMetadata<V1ObjectMeta>
77
{
88
/// <summary>
99
/// The kubernetes standard object's metadata.

src/KubernetesClient.Models/NodeMetricsList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace k8s.Models
22
{
3-
public class NodeMetricsList
3+
public class NodeMetricsList : IMetadata<V1ObjectMeta>
44
{
55
/// <summary>
66
/// Defines the versioned schema of this representation of an object.

src/KubernetesClient.Models/PodMetrics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace k8s.Models
33
/// <summary>
44
/// Describes the resource usage metrics of a pod pull from metrics server API.
55
/// </summary>
6-
public class PodMetrics
6+
public class PodMetrics : IMetadata<V1ObjectMeta>
77
{
88
/// <summary>
99
/// The kubernetes standard object's metadata.

src/KubernetesClient.Models/PodMetricsList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace k8s.Models
22
{
3-
public class PodMetricsList
3+
public class PodMetricsList : IMetadata<V1ObjectMeta>
44
{
55
/// <summary>
66
/// Defines the versioned schema of this representation of an object.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace k8s.Models
2+
{
3+
/// <summary>
4+
/// Partial implementation of the IMetadata interface
5+
/// to open this class up to ModelExtensions methods
6+
/// </summary>
7+
public partial class V1PodTemplateSpec : IMetadata<V1ObjectMeta>
8+
{
9+
}
10+
}

0 commit comments

Comments
 (0)