File tree Expand file tree Collapse file tree 10 files changed +67
-70
lines changed Expand file tree Collapse file tree 10 files changed +67
-70
lines changed Original file line number Diff line number Diff line change 1
- using k8s ;
1
+ using k8s ;
2
2
using k8s . ClientSets ;
3
3
using System . Threading . Tasks ;
4
4
Original file line number Diff line number Diff line change 20
20
<Compile Include =" ..\KubernetesClient\Extensions.cs" />
21
21
<Compile Include =" ..\KubernetesClient\FloatEmitter.cs" />
22
22
<Compile Include =" ..\KubernetesClient\Models\GeneratedModelVersion.cs" />
23
- <Compile Include =" ..\KubernetesClient\IItems.cs" />
23
+ <Compile Include =" ..\KubernetesClient\Models\ IItems.cs" />
24
24
<Compile Include =" ..\KubernetesClient\IKubernetesObject.cs" />
25
- <Compile Include =" ..\KubernetesClient\IMetadata.cs" />
25
+ <Compile Include =" ..\KubernetesClient\Models\ IMetadata.cs" />
26
26
<Compile Include =" ..\KubernetesClient\Models\IntOrStringJsonConverter.cs" />
27
27
<Compile Include =" ..\KubernetesClient\Models\IntOrStringYamlConverter.cs" />
28
28
<Compile Include =" ..\KubernetesClient\Models\IntstrIntOrString.cs" />
29
- <Compile Include =" ..\KubernetesClient\ISpec.cs" />
30
- <Compile Include =" ..\KubernetesClient\IStatus.cs" />
29
+ <Compile Include =" ..\KubernetesClient\Models\ ISpec.cs" />
30
+ <Compile Include =" ..\KubernetesClient\Models\ IStatus.cs" />
31
31
<Compile Include =" ..\KubernetesClient\IValidate.cs" />
32
32
<Compile Include =" ..\KubernetesClient\Models\KubernetesEntityAttribute.cs" />
33
33
<Compile Include =" ..\KubernetesClient\Models\KubernetesList.cs" />
Original file line number Diff line number Diff line change 22
22
<Compile Include =" ..\KubernetesClient\Extensions.cs" />
23
23
<Compile Include =" ..\KubernetesClient\FloatEmitter.cs" />
24
24
<Compile Include =" ..\KubernetesClient\Models\GeneratedModelVersion.cs" />
25
- <Compile Include =" ..\KubernetesClient\IItems.cs" />
25
+ <Compile Include =" ..\KubernetesClient\Models\ IItems.cs" />
26
26
<Compile Include =" ..\KubernetesClient\IKubernetesObject.cs" />
27
- <Compile Include =" ..\KubernetesClient\IMetadata.cs" />
27
+ <Compile Include =" ..\KubernetesClient\Models\ IMetadata.cs" />
28
28
<Compile Include =" ..\KubernetesClient\Models\IntOrStringJsonConverter.cs" />
29
29
<Compile Include =" ..\KubernetesClient\Models\IntOrStringYamlConverter.cs" />
30
30
<Compile Include =" ..\KubernetesClient\Models\IntstrIntOrString.cs" />
31
- <Compile Include =" ..\KubernetesClient\ISpec.cs" />
32
- <Compile Include =" ..\KubernetesClient\IStatus.cs" />
31
+ <Compile Include =" ..\KubernetesClient\Models\ ISpec.cs" />
32
+ <Compile Include =" ..\KubernetesClient\Models\ IStatus.cs" />
33
33
<Compile Include =" ..\KubernetesClient\IValidate.cs" />
34
34
<Compile Include =" ..\KubernetesClient\Models\KubernetesEntityAttribute.cs" />
35
35
<Compile Include =" ..\KubernetesClient\KubernetesJson.cs" />
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ namespace k8s . Models ;
2
+
3
+ /// <summary>
4
+ /// Kubernetes object that exposes list of objects
5
+ /// </summary>
6
+ /// <typeparam name="T">type of the objects</typeparam>
7
+ public interface IItems < T >
8
+ {
9
+ /// <summary>
10
+ /// Gets or sets list of objects. More info:
11
+ /// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
12
+ /// </summary>
13
+ IList < T > Items { get ; set ; }
14
+ }
15
+
16
+ public static class ItemsExt
17
+ {
18
+ public static IEnumerator < T > GetEnumerator < T > ( this IItems < T > items )
19
+ {
20
+ if ( items is null )
21
+ {
22
+ throw new ArgumentNullException ( nameof ( items ) ) ;
23
+ }
24
+
25
+ return items . Items . GetEnumerator ( ) ;
26
+ }
27
+ }
Original file line number Diff line number Diff line change
1
+ namespace k8s . Models ;
2
+
3
+ /// <summary>
4
+ /// Kubernetes object that exposes metadata
5
+ /// </summary>
6
+ /// <typeparam name="T">Type of metadata exposed. Usually this will be either
7
+ /// <see cref="V1ListMeta"/> for lists or <see cref="V1ObjectMeta"/> for objects</typeparam>
8
+ public interface IMetadata < T >
9
+ {
10
+ /// <summary>
11
+ /// Gets or sets standard object's metadata. More info:
12
+ /// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
13
+ /// </summary>
14
+ T Metadata { get ; set ; }
15
+ }
Original file line number Diff line number Diff line change
1
+ namespace k8s . Models ;
2
+
3
+ /// <summary>
4
+ /// Represents a Kubernetes object that has a spec
5
+ /// </summary>
6
+ /// <typeparam name="T">type of Kubernetes object</typeparam>
7
+ public interface ISpec < T >
8
+ {
9
+ /// <summary>
10
+ /// Gets or sets specification of the desired behavior of the entity. More
11
+ /// info:
12
+ /// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
13
+ /// </summary>
14
+ T Spec { get ; set ; }
15
+ }
Original file line number Diff line number Diff line change 1
- namespace k8s
1
+ namespace k8s . Models
2
2
{
3
3
/// <summary>
4
4
/// Kubernetes object that exposes status
You can’t perform that action at this time.
0 commit comments