-
Notifications
You must be signed in to change notification settings - Fork 0
/
object_metric_source.cr
35 lines (29 loc) · 1.53 KB
/
object_metric_source.cr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
@[::K8S::Properties(
metric_name: {type: String, nilable: false, key: "metricName", getter: false, setter: false},
target: {type: Api::Autoscaling::V2beta1::CrossVersionObjectReference, nilable: false, key: "target", getter: false, setter: false},
target_value: {type: Int32 | String, nilable: false, key: "targetValue", getter: false, setter: false},
)]
class Api::Autoscaling::V2beta1::ObjectMetricSource
include ::JSON::Serializable
include ::YAML::Serializable
# metricName is the name of the metric in question.
@[::JSON::Field(key: "metricName", emit_null: true)]
@[::YAML::Field(key: "metricName", emit_null: true)]
property metric_name : String
# target is the described Kubernetes object.
@[::JSON::Field(key: "target", emit_null: true)]
@[::YAML::Field(key: "target", emit_null: true)]
property target : Api::Autoscaling::V2beta1::CrossVersionObjectReference
# targetValue is the target value of the metric (as a quantity).
@[::JSON::Field(key: "targetValue", emit_null: true)]
@[::YAML::Field(key: "targetValue", emit_null: true)]
property target_value : Int32 | String
def initialize(*, @metric_name : String, @target : Api::Autoscaling::V2beta1::CrossVersionObjectReference, @target_value : Int32 | String)
end
end
end