From 4e05c623aea40f3628441db8ea32ee959c4aa821 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 31 Oct 2024 21:30:28 +0100 Subject: [PATCH] DRA API: rename DeviceCapacity.Quantity to DeviceCapacity.Value Based on review feedback (https://github.com/kubernetes/kubernetes/pull/127511#discussion_r1823521172). Kubernetes-commit: 30f52826560129839922e1756730b02f184f0ef9 --- applyconfigurations/internal/internal.go | 2 +- applyconfigurations/resource/v1beta1/devicecapacity.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index 4c6dbd01..f14cc835 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -12821,7 +12821,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.resource.v1beta1.DeviceCapacity map: fields: - - name: quantity + - name: value type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - name: io.k8s.api.resource.v1beta1.DeviceClaim diff --git a/applyconfigurations/resource/v1beta1/devicecapacity.go b/applyconfigurations/resource/v1beta1/devicecapacity.go index 89c61b12..dcb3504b 100644 --- a/applyconfigurations/resource/v1beta1/devicecapacity.go +++ b/applyconfigurations/resource/v1beta1/devicecapacity.go @@ -25,7 +25,7 @@ import ( // DeviceCapacityApplyConfiguration represents a declarative configuration of the DeviceCapacity type for use // with apply. type DeviceCapacityApplyConfiguration struct { - Quantity *resource.Quantity `json:"quantity,omitempty"` + Value *resource.Quantity `json:"value,omitempty"` } // DeviceCapacityApplyConfiguration constructs a declarative configuration of the DeviceCapacity type for use with @@ -34,10 +34,10 @@ func DeviceCapacity() *DeviceCapacityApplyConfiguration { return &DeviceCapacityApplyConfiguration{} } -// WithQuantity sets the Quantity field in the declarative configuration to the given value +// WithValue sets the Value field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Quantity field is set to the value of the last call. -func (b *DeviceCapacityApplyConfiguration) WithQuantity(value resource.Quantity) *DeviceCapacityApplyConfiguration { - b.Quantity = &value +// If called multiple times, the Value field is set to the value of the last call. +func (b *DeviceCapacityApplyConfiguration) WithValue(value resource.Quantity) *DeviceCapacityApplyConfiguration { + b.Value = &value return b }