001package gudusoft.gsqlparser.lineage.v2.model; 002 003import java.util.Arrays; 004import java.util.Collections; 005import java.util.List; 006import java.util.Map; 007 008/** 009 * Analysis completeness of one feature within a scope (Section 4.4). Generated from the schema 010 * definition FeatureCompleteness by scripts/sqllr/gen_type_model.py; do not edit. 011 * 012 * @since 4.2.17 013 */ 014public final class FeatureCompleteness extends SqllrObject { 015 016 /** The members the schema defines, in schema order. */ 017 public static final List<String> MEMBERS = Collections.unmodifiableList(Arrays.asList("feature", "status", "diagnosticRefs", "extensions")); 018 019 /** The members the schema requires. */ 020 public static final List<String> REQUIRED = Collections.unmodifiableList(Arrays.<String>asList("feature", "status")); 021 022 /** Reads a JSON object as a {@code FeatureCompleteness}. */ 023 public static final Reader<FeatureCompleteness> READER = new Reader<FeatureCompleteness>() { 024 @Override 025 public FeatureCompleteness read(Object json) { 026 return fromJson(json); 027 } 028 }; 029 030 private FeatureCompleteness(Map<String, Object> members) { 031 super(members); 032 } 033 034 /** A {@code FeatureCompleteness} with the members of a JSON object, all kept. */ 035 public static FeatureCompleteness fromJson(Object json) { 036 return new FeatureCompleteness(members(json, "FeatureCompleteness")); 037 } 038 039 public static Builder builder() { 040 return new Builder(null); 041 } 042 043 /** A builder holding every member of this object. */ 044 public Builder toBuilder() { 045 return new Builder(toJson()); 046 } 047 048 /** 049 * The member {@code feature}. A feature of the capability matrix and of feature-scope 050 * completeness. Registry group 'analysisFeatures' (Sections 4.4 and 5.3). Null when absent; 051 * throws IllegalStateException when the member holds another JSON type. 052 */ 053 public String getFeature() { 054 return string("feature"); 055 } 056 057 /** 058 * The member {@code status}. Analysis completeness of a scope. Registry group 059 * 'analysisCompleteness' (Section 4.4). Null when absent; throws IllegalStateException when the 060 * member holds another JSON type. 061 */ 062 public String getStatus() { 063 return string("status"); 064 } 065 066 /** 067 * The member {@code diagnosticRefs}. A set of local references. Null when absent; throws 068 * IllegalStateException when the member holds another JSON type. 069 */ 070 public List<Long> getDiagnosticRefs() { 071 return typed("diagnosticRefs", listOf(INTEGER)); 072 } 073 074 /** 075 * The member {@code extensions}. Extension data keyed by namespace. Every core object may carry 076 * it; it never takes part in a core identity. Null when absent; throws IllegalStateException 077 * when the member holds another JSON type. 078 */ 079 public Map<String, Extension> getExtensions() { 080 return typed("extensions", mapOf(Extension.READER)); 081 } 082 083 /** Collects the members of a new {@code FeatureCompleteness}. */ 084 public static final class Builder extends SqllrObject.Builder<FeatureCompleteness, Builder> { 085 private Builder(Map<String, Object> from) { 086 super(from); 087 } 088 089 /** Sets the member {@code feature}; null removes it. */ 090 public Builder feature(String value) { 091 return set("feature", value); 092 } 093 094 /** Sets the member {@code status}; null removes it. */ 095 public Builder status(String value) { 096 return set("status", value); 097 } 098 099 /** Sets the member {@code diagnosticRefs}; null removes it. */ 100 public Builder diagnosticRefs(List<Long> value) { 101 return set("diagnosticRefs", value); 102 } 103 104 /** Sets the member {@code extensions}; null removes it. */ 105 public Builder extensions(Map<String, Extension> value) { 106 return set("extensions", value); 107 } 108 109 @Override 110 public FeatureCompleteness build() { 111 return new FeatureCompleteness(frozenMembers()); 112 } 113 } 114}