From ef72da3ae5eec8748c0f07c965d5bc3d2527a8d7 Mon Sep 17 00:00:00 2001 From: Zhenhua Li Date: Thu, 26 Sep 2024 08:50:54 -0700 Subject: [PATCH] Set output to true for Fingerprint --- mmv1/api/type.go | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/mmv1/api/type.go b/mmv1/api/type.go index ba33c137414a..4d81f796f784 100644 --- a/mmv1/api/type.go +++ b/mmv1/api/type.go @@ -335,6 +335,11 @@ func (t *Type) SetDefault(r *Resource) { if t.Description == "" { t.Description = fmt.Sprintf("A reference to %s resource", t.Resource) } + case t.IsA("Fingerprint"): + // Represents a fingerprint. A fingerprint is an output-only + // field used for optimistic locking during updates. + // They are fetched from the GCP response. + t.Output = true default: } @@ -647,17 +652,6 @@ func (t *Type) GetDescription() string { return strings.TrimSpace(strings.TrimRight(t.Description, "\n")) } -// TODO rewrite: validation -// Represents a fingerprint. A fingerprint is an output-only -// field used for optimistic locking during updates. -// They are fetched from the GCP response. -// class Fingerprint < FetchedExternal -// func (t *Type) validate -// super -// @output = true if @output.nil? -// end -// end - // TODO rewrite: validation // class Array < Composite // check :item_type, type: [::String, NestedObject, ResourceRef, Enum], required: true