Skip to content

Commit cae08cc

Browse files
authored
Merge pull request #20 from JuliaComputing/tan/newapi
add metrics APIs (metrics.k8s.io)
2 parents e7c35eb + 2455134 commit cae08cc

13 files changed

+763
-3
lines changed

gen/generate.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ then
2121
fi
2222

2323
# ensure CSTParser is of right version
24-
cstpver=`${JULIA} -e 'using Pkg; println(Pkg.installed()["CSTParser"] == v"2.1.0")'`
24+
cstpver=`${JULIA} -e 'using Pkg; println(Pkg.installed()["CSTParser"] == v"2.2.0")'`
2525
if [ "$cstpver" != "true" ]
2626
then
27-
echo "CSTParser v2.1.0 is required"
27+
echo "CSTParser v2.2.0 is required"
2828
exit -1
2929
fi
3030

gen/spec/swagger.json

Lines changed: 446 additions & 0 deletions
Large diffs are not rendered by default.

src/api/Kubernetes.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ include("api_ExtensionsV1beta1Api.jl")
5858
include("api_FlowcontrolApiserverApi.jl")
5959
include("api_FlowcontrolApiserverV1alpha1Api.jl")
6060
include("api_LogsApi.jl")
61+
include("api_MetricsV1beta1Api.jl")
6162
include("api_NetworkingApi.jl")
6263
include("api_NetworkingV1Api.jl")
6364
include("api_NetworkingV1beta1Api.jl")
@@ -565,6 +566,11 @@ export convert, IoK8sApiFlowcontrolV1alpha1ResourcePolicyRule
565566
export convert, IoK8sApiFlowcontrolV1alpha1ServiceAccountSubject
566567
export convert, IoK8sApiFlowcontrolV1alpha1Subject
567568
export convert, IoK8sApiFlowcontrolV1alpha1UserSubject
569+
export convert, IoK8sApiMetricsV1beta1ContainerMetrics
570+
export convert, IoK8sApiMetricsV1beta1NodeMetrics
571+
export convert, IoK8sApiMetricsV1beta1NodeMetricsList
572+
export convert, IoK8sApiMetricsV1beta1PodMetrics
573+
export convert, IoK8sApiMetricsV1beta1PodMetricsList
568574
export convert, IoK8sApiNetworkingV1IPBlock
569575
export convert, IoK8sApiNetworkingV1NetworkPolicy
570576
export convert, IoK8sApiNetworkingV1NetworkPolicyEgressRule
@@ -740,6 +746,7 @@ export convert, IoK8sApimachineryPkgApisMetaV1APIResource
740746
export convert, IoK8sApimachineryPkgApisMetaV1APIResourceList
741747
export convert, IoK8sApimachineryPkgApisMetaV1APIVersions
742748
export convert, IoK8sApimachineryPkgApisMetaV1DeleteOptions
749+
export convert, IoK8sApimachineryPkgApisMetaV1Duration
743750
export convert, IoK8sApimachineryPkgApisMetaV1FieldsV1
744751
export convert, IoK8sApimachineryPkgApisMetaV1GroupVersionForDiscovery
745752
export convert, IoK8sApimachineryPkgApisMetaV1LabelSelector
@@ -774,7 +781,7 @@ export convert, IoK8sKubeAggregatorPkgApisApiregistrationV1beta1APIServiceStatus
774781
export convert, IoK8sKubeAggregatorPkgApisApiregistrationV1beta1ServiceReference
775782

776783
# export operations
777-
export convert, AdmissionregistrationApi, AdmissionregistrationV1Api, AdmissionregistrationV1beta1Api, ApiextensionsApi, ApiextensionsV1Api, ApiextensionsV1beta1Api, ApiregistrationApi, ApiregistrationV1Api, ApiregistrationV1beta1Api, ApisApi, AppsApi, AppsV1Api, AppsV1beta1Api, AppsV1beta2Api, AuditregistrationApi, AuditregistrationV1alpha1Api, AuthenticationApi, AuthenticationV1Api, AuthenticationV1beta1Api, AuthorizationApi, AuthorizationV1Api, AuthorizationV1beta1Api, AutoscalingApi, AutoscalingV1Api, AutoscalingV2beta1Api, AutoscalingV2beta2Api, BatchApi, BatchV1Api, BatchV1beta1Api, BatchV2alpha1Api, CertificatesApi, CertificatesV1beta1Api, CoordinationApi, CoordinationV1Api, CoordinationV1beta1Api, CoreApi, CoreV1Api, DiscoveryApi, DiscoveryV1beta1Api, EventsApi, EventsV1beta1Api, ExtensionsApi, ExtensionsV1beta1Api, FlowcontrolApiserverApi, FlowcontrolApiserverV1alpha1Api, LogsApi, NetworkingApi, NetworkingV1Api, NetworkingV1beta1Api, NodeApi, NodeV1alpha1Api, NodeV1beta1Api, PolicyApi, PolicyV1beta1Api, RbacAuthorizationApi, RbacAuthorizationV1Api, RbacAuthorizationV1alpha1Api, RbacAuthorizationV1beta1Api, SchedulingApi, SchedulingV1Api, SchedulingV1alpha1Api, SchedulingV1beta1Api, SettingsApi, SettingsV1alpha1Api, StorageApi, StorageV1Api, StorageV1alpha1Api, StorageV1beta1Api, VersionApi
784+
export convert, AdmissionregistrationApi, AdmissionregistrationV1Api, AdmissionregistrationV1beta1Api, ApiextensionsApi, ApiextensionsV1Api, ApiextensionsV1beta1Api, ApiregistrationApi, ApiregistrationV1Api, ApiregistrationV1beta1Api, ApisApi, AppsApi, AppsV1Api, AppsV1beta1Api, AppsV1beta2Api, AuditregistrationApi, AuditregistrationV1alpha1Api, AuthenticationApi, AuthenticationV1Api, AuthenticationV1beta1Api, AuthorizationApi, AuthorizationV1Api, AuthorizationV1beta1Api, AutoscalingApi, AutoscalingV1Api, AutoscalingV2beta1Api, AutoscalingV2beta2Api, BatchApi, BatchV1Api, BatchV1beta1Api, BatchV2alpha1Api, CertificatesApi, CertificatesV1beta1Api, CoordinationApi, CoordinationV1Api, CoordinationV1beta1Api, CoreApi, CoreV1Api, DiscoveryApi, DiscoveryV1beta1Api, EventsApi, EventsV1beta1Api, ExtensionsApi, ExtensionsV1beta1Api, FlowcontrolApiserverApi, FlowcontrolApiserverV1alpha1Api, LogsApi, MetricsV1beta1Api, NetworkingApi, NetworkingV1Api, NetworkingV1beta1Api, NodeApi, NodeV1alpha1Api, NodeV1beta1Api, PolicyApi, PolicyV1beta1Api, RbacAuthorizationApi, RbacAuthorizationV1Api, RbacAuthorizationV1alpha1Api, RbacAuthorizationV1beta1Api, SchedulingApi, SchedulingV1Api, SchedulingV1alpha1Api, SchedulingV1beta1Api, SettingsApi, SettingsV1alpha1Api, StorageApi, StorageV1Api, StorageV1alpha1Api, StorageV1beta1Api, VersionApi
778785

779786
export check_required, field_name, property_type, hasproperty, propertynames, validate_property, convert
780787

src/api/api_MetricsV1beta1Api.jl

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# This file was generated by the Julia Swagger Code Generator
2+
# Do not modify this file directly. Modify the swagger specification instead.
3+
4+
struct MetricsV1beta1Api <: SwaggerApi
5+
client::Swagger.Client
6+
end
7+
8+
"""
9+
10+
list or watch objects of kind NodeMetrics
11+
Param: allowWatchBookmarks::Bool
12+
Param: __continue__::String
13+
Param: fieldSelector::String
14+
Param: labelSelector::String
15+
Param: limit::Int32
16+
Param: resourceVersion::String
17+
Param: timeoutSeconds::Int32
18+
Param: watch::Bool
19+
Return: IoK8sApiMetricsV1beta1NodeMetricsList
20+
"""
21+
function listMetricsV1beta1NodeMetrics(_api::MetricsV1beta1Api; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
22+
_ctx = Swagger.Ctx(_api.client, "GET", IoK8sApiMetricsV1beta1NodeMetricsList, "/apis/metrics.k8s.io/v1beta1/nodes", ["BearerToken"])
23+
Swagger.set_param(_ctx.query, "allowWatchBookmarks", allowWatchBookmarks) # type Bool
24+
Swagger.set_param(_ctx.query, "continue", __continue__) # type String
25+
Swagger.set_param(_ctx.query, "fieldSelector", fieldSelector) # type String
26+
Swagger.set_param(_ctx.query, "labelSelector", labelSelector) # type String
27+
Swagger.set_param(_ctx.query, "limit", limit) # type Int32
28+
Swagger.set_param(_ctx.query, "resourceVersion", resourceVersion) # type String
29+
Swagger.set_param(_ctx.query, "timeoutSeconds", timeoutSeconds) # type Int32
30+
Swagger.set_param(_ctx.query, "watch", watch) # type Bool
31+
Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch"])
32+
Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
33+
Swagger.exec(_ctx)
34+
end
35+
36+
"""
37+
38+
list or watch objects of kind PodMetrics
39+
Param: allowWatchBookmarks::Bool
40+
Param: __continue__::String
41+
Param: fieldSelector::String
42+
Param: labelSelector::String
43+
Param: limit::Int32
44+
Param: resourceVersion::String
45+
Param: timeoutSeconds::Int32
46+
Param: watch::Bool
47+
Return: IoK8sApiMetricsV1beta1PodMetricsList
48+
"""
49+
function listMetricsV1beta1PodMetrics(_api::MetricsV1beta1Api; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
50+
_ctx = Swagger.Ctx(_api.client, "GET", IoK8sApiMetricsV1beta1PodMetricsList, "/apis/metrics.k8s.io/v1beta1/pods", ["BearerToken"])
51+
Swagger.set_param(_ctx.query, "allowWatchBookmarks", allowWatchBookmarks) # type Bool
52+
Swagger.set_param(_ctx.query, "continue", __continue__) # type String
53+
Swagger.set_param(_ctx.query, "fieldSelector", fieldSelector) # type String
54+
Swagger.set_param(_ctx.query, "labelSelector", labelSelector) # type String
55+
Swagger.set_param(_ctx.query, "limit", limit) # type Int32
56+
Swagger.set_param(_ctx.query, "resourceVersion", resourceVersion) # type String
57+
Swagger.set_param(_ctx.query, "timeoutSeconds", timeoutSeconds) # type Int32
58+
Swagger.set_param(_ctx.query, "watch", watch) # type Bool
59+
Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch"])
60+
Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
61+
Swagger.exec(_ctx)
62+
end
63+
64+
"""
65+
66+
read the specified PodMetrics
67+
Param: name::String (required)
68+
Param: namespace::String (required)
69+
Param: pretty::String
70+
Param: exact::Bool
71+
Param: __export__::Bool
72+
Return: IoK8sApiMetricsV1beta1PodMetrics
73+
"""
74+
function readMetricsV1beta1NamespacedPodMetrics(_api::MetricsV1beta1Api, name::String, namespace::String; pretty=nothing, exact=nothing, __export__=nothing, _mediaType=nothing)
75+
_ctx = Swagger.Ctx(_api.client, "GET", IoK8sApiMetricsV1beta1PodMetrics, "/apis/metrics.k8s.io/v1beta1/namespaces/{namespace}/pods/{name}", ["BearerToken"])
76+
Swagger.set_param(_ctx.path, "name", name) # type String
77+
Swagger.set_param(_ctx.path, "namespace", namespace) # type String
78+
Swagger.set_param(_ctx.query, "pretty", pretty) # type String
79+
Swagger.set_param(_ctx.query, "exact", exact) # type Bool
80+
Swagger.set_param(_ctx.query, "export", __export__) # type Bool
81+
Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch"])
82+
Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
83+
Swagger.exec(_ctx)
84+
end
85+
86+
"""
87+
88+
read the specified NodeMetrics
89+
Param: name::String (required)
90+
Param: pretty::String
91+
Param: exact::Bool
92+
Param: __export__::Bool
93+
Return: IoK8sApiMetricsV1beta1NodeMetrics
94+
"""
95+
function readMetricsV1beta1NodeMetrics(_api::MetricsV1beta1Api, name::String; pretty=nothing, exact=nothing, __export__=nothing, _mediaType=nothing)
96+
_ctx = Swagger.Ctx(_api.client, "GET", IoK8sApiMetricsV1beta1NodeMetrics, "/apis/metrics.k8s.io/v1beta1/nodes/{name}", ["BearerToken"])
97+
Swagger.set_param(_ctx.path, "name", name) # type String
98+
Swagger.set_param(_ctx.query, "pretty", pretty) # type String
99+
Swagger.set_param(_ctx.query, "exact", exact) # type Bool
100+
Swagger.set_param(_ctx.query, "export", __export__) # type Bool
101+
Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
102+
Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
103+
Swagger.exec(_ctx)
104+
end
105+
106+
export listMetricsV1beta1NodeMetrics, listMetricsV1beta1PodMetrics, readMetricsV1beta1NamespacedPodMetrics, readMetricsV1beta1NodeMetrics
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This file was generated by the Julia Swagger Code Generator
2+
# Do not modify this file directly. Modify the swagger specification instead.
3+
4+
5+
mutable struct IoK8sApiMetricsV1beta1ContainerMetrics <: SwaggerModel
6+
name::Any # spec type: Union{ Nothing, String } # spec name: name
7+
usage::Any # spec type: Union{ Nothing, Dict{String, IoK8sApimachineryPkgApiResourceQuantity} } # spec name: usage
8+
9+
function IoK8sApiMetricsV1beta1ContainerMetrics(;name=nothing, usage=nothing)
10+
o = new()
11+
validate_property(IoK8sApiMetricsV1beta1ContainerMetrics, Symbol("name"), name)
12+
setfield!(o, Symbol("name"), name)
13+
validate_property(IoK8sApiMetricsV1beta1ContainerMetrics, Symbol("usage"), usage)
14+
setfield!(o, Symbol("usage"), usage)
15+
o
16+
end
17+
end # type IoK8sApiMetricsV1beta1ContainerMetrics
18+
19+
const _property_map_IoK8sApiMetricsV1beta1ContainerMetrics = Dict{Symbol,Symbol}(Symbol("name")=>Symbol("name"), Symbol("usage")=>Symbol("usage"))
20+
const _property_types_IoK8sApiMetricsV1beta1ContainerMetrics = Dict{Symbol,String}(Symbol("name")=>"String", Symbol("usage")=>"Dict{String, IoK8sApimachineryPkgApiResourceQuantity}")
21+
Base.propertynames(::Type{ IoK8sApiMetricsV1beta1ContainerMetrics }) = collect(keys(_property_map_IoK8sApiMetricsV1beta1ContainerMetrics))
22+
Swagger.property_type(::Type{ IoK8sApiMetricsV1beta1ContainerMetrics }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiMetricsV1beta1ContainerMetrics[name]))}
23+
Swagger.field_name(::Type{ IoK8sApiMetricsV1beta1ContainerMetrics }, property_name::Symbol) = _property_map_IoK8sApiMetricsV1beta1ContainerMetrics[property_name]
24+
25+
function check_required(o::IoK8sApiMetricsV1beta1ContainerMetrics)
26+
true
27+
end
28+
29+
function validate_property(::Type{ IoK8sApiMetricsV1beta1ContainerMetrics }, name::Symbol, val)
30+
end
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This file was generated by the Julia Swagger Code Generator
2+
# Do not modify this file directly. Modify the swagger specification instead.
3+
4+
5+
mutable struct IoK8sApiMetricsV1beta1NodeMetrics <: SwaggerModel
6+
metadata::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApisMetaV1ObjectMeta } # spec name: metadata
7+
timestamp::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApisMetaV1Time } # spec name: timestamp
8+
window::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApisMetaV1Duration } # spec name: window
9+
usage::Any # spec type: Union{ Nothing, Dict{String, IoK8sApimachineryPkgApiResourceQuantity} } # spec name: usage
10+
11+
function IoK8sApiMetricsV1beta1NodeMetrics(;metadata=nothing, timestamp=nothing, window=nothing, usage=nothing)
12+
o = new()
13+
validate_property(IoK8sApiMetricsV1beta1NodeMetrics, Symbol("metadata"), metadata)
14+
setfield!(o, Symbol("metadata"), metadata)
15+
validate_property(IoK8sApiMetricsV1beta1NodeMetrics, Symbol("timestamp"), timestamp)
16+
setfield!(o, Symbol("timestamp"), timestamp)
17+
validate_property(IoK8sApiMetricsV1beta1NodeMetrics, Symbol("window"), window)
18+
setfield!(o, Symbol("window"), window)
19+
validate_property(IoK8sApiMetricsV1beta1NodeMetrics, Symbol("usage"), usage)
20+
setfield!(o, Symbol("usage"), usage)
21+
o
22+
end
23+
end # type IoK8sApiMetricsV1beta1NodeMetrics
24+
25+
const _property_map_IoK8sApiMetricsV1beta1NodeMetrics = Dict{Symbol,Symbol}(Symbol("metadata")=>Symbol("metadata"), Symbol("timestamp")=>Symbol("timestamp"), Symbol("window")=>Symbol("window"), Symbol("usage")=>Symbol("usage"))
26+
const _property_types_IoK8sApiMetricsV1beta1NodeMetrics = Dict{Symbol,String}(Symbol("metadata")=>"IoK8sApimachineryPkgApisMetaV1ObjectMeta", Symbol("timestamp")=>"IoK8sApimachineryPkgApisMetaV1Time", Symbol("window")=>"IoK8sApimachineryPkgApisMetaV1Duration", Symbol("usage")=>"Dict{String, IoK8sApimachineryPkgApiResourceQuantity}")
27+
Base.propertynames(::Type{ IoK8sApiMetricsV1beta1NodeMetrics }) = collect(keys(_property_map_IoK8sApiMetricsV1beta1NodeMetrics))
28+
Swagger.property_type(::Type{ IoK8sApiMetricsV1beta1NodeMetrics }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiMetricsV1beta1NodeMetrics[name]))}
29+
Swagger.field_name(::Type{ IoK8sApiMetricsV1beta1NodeMetrics }, property_name::Symbol) = _property_map_IoK8sApiMetricsV1beta1NodeMetrics[property_name]
30+
31+
function check_required(o::IoK8sApiMetricsV1beta1NodeMetrics)
32+
true
33+
end
34+
35+
function validate_property(::Type{ IoK8sApiMetricsV1beta1NodeMetrics }, name::Symbol, val)
36+
end
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This file was generated by the Julia Swagger Code Generator
2+
# Do not modify this file directly. Modify the swagger specification instead.
3+
4+
5+
mutable struct IoK8sApiMetricsV1beta1NodeMetricsList <: SwaggerModel
6+
metadata::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApisMetaV1ListMeta } # spec name: metadata
7+
items::Any # spec type: Union{ Nothing, Vector{IoK8sApiMetricsV1beta1NodeMetrics} } # spec name: items
8+
9+
function IoK8sApiMetricsV1beta1NodeMetricsList(;metadata=nothing, items=nothing)
10+
o = new()
11+
validate_property(IoK8sApiMetricsV1beta1NodeMetricsList, Symbol("metadata"), metadata)
12+
setfield!(o, Symbol("metadata"), metadata)
13+
validate_property(IoK8sApiMetricsV1beta1NodeMetricsList, Symbol("items"), items)
14+
setfield!(o, Symbol("items"), items)
15+
o
16+
end
17+
end # type IoK8sApiMetricsV1beta1NodeMetricsList
18+
19+
const _property_map_IoK8sApiMetricsV1beta1NodeMetricsList = Dict{Symbol,Symbol}(Symbol("metadata")=>Symbol("metadata"), Symbol("items")=>Symbol("items"))
20+
const _property_types_IoK8sApiMetricsV1beta1NodeMetricsList = Dict{Symbol,String}(Symbol("metadata")=>"IoK8sApimachineryPkgApisMetaV1ListMeta", Symbol("items")=>"Vector{IoK8sApiMetricsV1beta1NodeMetrics}")
21+
Base.propertynames(::Type{ IoK8sApiMetricsV1beta1NodeMetricsList }) = collect(keys(_property_map_IoK8sApiMetricsV1beta1NodeMetricsList))
22+
Swagger.property_type(::Type{ IoK8sApiMetricsV1beta1NodeMetricsList }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiMetricsV1beta1NodeMetricsList[name]))}
23+
Swagger.field_name(::Type{ IoK8sApiMetricsV1beta1NodeMetricsList }, property_name::Symbol) = _property_map_IoK8sApiMetricsV1beta1NodeMetricsList[property_name]
24+
25+
function check_required(o::IoK8sApiMetricsV1beta1NodeMetricsList)
26+
true
27+
end
28+
29+
function validate_property(::Type{ IoK8sApiMetricsV1beta1NodeMetricsList }, name::Symbol, val)
30+
end
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This file was generated by the Julia Swagger Code Generator
2+
# Do not modify this file directly. Modify the swagger specification instead.
3+
4+
5+
mutable struct IoK8sApiMetricsV1beta1PodMetrics <: SwaggerModel
6+
metadata::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApisMetaV1ObjectMeta } # spec name: metadata
7+
timestamp::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApisMetaV1Time } # spec name: timestamp
8+
window::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApisMetaV1Duration } # spec name: window
9+
containers::Any # spec type: Union{ Nothing, Vector{IoK8sApiMetricsV1beta1ContainerMetrics} } # spec name: containers
10+
11+
function IoK8sApiMetricsV1beta1PodMetrics(;metadata=nothing, timestamp=nothing, window=nothing, containers=nothing)
12+
o = new()
13+
validate_property(IoK8sApiMetricsV1beta1PodMetrics, Symbol("metadata"), metadata)
14+
setfield!(o, Symbol("metadata"), metadata)
15+
validate_property(IoK8sApiMetricsV1beta1PodMetrics, Symbol("timestamp"), timestamp)
16+
setfield!(o, Symbol("timestamp"), timestamp)
17+
validate_property(IoK8sApiMetricsV1beta1PodMetrics, Symbol("window"), window)
18+
setfield!(o, Symbol("window"), window)
19+
validate_property(IoK8sApiMetricsV1beta1PodMetrics, Symbol("containers"), containers)
20+
setfield!(o, Symbol("containers"), containers)
21+
o
22+
end
23+
end # type IoK8sApiMetricsV1beta1PodMetrics
24+
25+
const _property_map_IoK8sApiMetricsV1beta1PodMetrics = Dict{Symbol,Symbol}(Symbol("metadata")=>Symbol("metadata"), Symbol("timestamp")=>Symbol("timestamp"), Symbol("window")=>Symbol("window"), Symbol("containers")=>Symbol("containers"))
26+
const _property_types_IoK8sApiMetricsV1beta1PodMetrics = Dict{Symbol,String}(Symbol("metadata")=>"IoK8sApimachineryPkgApisMetaV1ObjectMeta", Symbol("timestamp")=>"IoK8sApimachineryPkgApisMetaV1Time", Symbol("window")=>"IoK8sApimachineryPkgApisMetaV1Duration", Symbol("containers")=>"Vector{IoK8sApiMetricsV1beta1ContainerMetrics}")
27+
Base.propertynames(::Type{ IoK8sApiMetricsV1beta1PodMetrics }) = collect(keys(_property_map_IoK8sApiMetricsV1beta1PodMetrics))
28+
Swagger.property_type(::Type{ IoK8sApiMetricsV1beta1PodMetrics }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiMetricsV1beta1PodMetrics[name]))}
29+
Swagger.field_name(::Type{ IoK8sApiMetricsV1beta1PodMetrics }, property_name::Symbol) = _property_map_IoK8sApiMetricsV1beta1PodMetrics[property_name]
30+
31+
function check_required(o::IoK8sApiMetricsV1beta1PodMetrics)
32+
true
33+
end
34+
35+
function validate_property(::Type{ IoK8sApiMetricsV1beta1PodMetrics }, name::Symbol, val)
36+
end

0 commit comments

Comments
 (0)