From d2cdd64ea80bd292e5ae7e249af9fca0cffa5b4d Mon Sep 17 00:00:00 2001 From: Jiahui Feng Date: Fri, 10 Mar 2023 09:03:49 -0800 Subject: [PATCH] generated: ./hack/update-codegen.sh && ./hack/update-openapi-spec.sh Kubernetes-commit: 1fff4949bd3168bea68f9d64525f394fd6821c54 --- .../admissionregistration/v1alpha1/validation.go | 15 ++++++++++++--- applyconfigurations/internal/internal.go | 3 +++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/applyconfigurations/admissionregistration/v1alpha1/validation.go b/applyconfigurations/admissionregistration/v1alpha1/validation.go index 43916603..9a5fc847 100644 --- a/applyconfigurations/admissionregistration/v1alpha1/validation.go +++ b/applyconfigurations/admissionregistration/v1alpha1/validation.go @@ -25,9 +25,10 @@ import ( // ValidationApplyConfiguration represents an declarative configuration of the Validation type for use // with apply. type ValidationApplyConfiguration struct { - Expression *string `json:"expression,omitempty"` - Message *string `json:"message,omitempty"` - Reason *v1.StatusReason `json:"reason,omitempty"` + Expression *string `json:"expression,omitempty"` + Message *string `json:"message,omitempty"` + Reason *v1.StatusReason `json:"reason,omitempty"` + MessageExpression *string `json:"messageExpression,omitempty"` } // ValidationApplyConfiguration constructs an declarative configuration of the Validation type for use with @@ -59,3 +60,11 @@ func (b *ValidationApplyConfiguration) WithReason(value v1.StatusReason) *Valida b.Reason = &value return b } + +// WithMessageExpression sets the MessageExpression 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 MessageExpression field is set to the value of the last call. +func (b *ValidationApplyConfiguration) WithMessageExpression(value string) *ValidationApplyConfiguration { + b.MessageExpression = &value + return b +} diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index cde5e823..1dd82912 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -404,6 +404,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: message type: scalar: string + - name: messageExpression + type: + scalar: string - name: reason type: scalar: string