@@ -11,7 +11,9 @@ import com.openlayer.api.core.ExcludeMissing
1111import com.openlayer.api.core.JsonField
1212import com.openlayer.api.core.JsonMissing
1313import com.openlayer.api.core.JsonValue
14+ import com.openlayer.api.core.checkKnown
1415import com.openlayer.api.core.checkRequired
16+ import com.openlayer.api.core.toImmutable
1517import com.openlayer.api.errors.OpenlayerInvalidDataException
1618import java.time.OffsetDateTime
1719import java.util.Collections
@@ -36,8 +38,12 @@ private constructor(
3638 private val taskType: JsonField <TaskType >,
3739 private val versionCount: JsonField <Long >,
3840 private val workspaceId: JsonField <String >,
41+ private val dataRetentionDays: JsonField <Long >,
3942 private val description: JsonField <String >,
4043 private val gitRepo: JsonField <GitRepo >,
44+ private val modelDeveloper: JsonField <String >,
45+ private val modelTypes: JsonField <List <String >>,
46+ private val purpose: JsonField <String >,
4147 private val additionalProperties: MutableMap <String , JsonValue >,
4248) {
4349
@@ -71,10 +77,20 @@ private constructor(
7177 @JsonProperty(" workspaceId" )
7278 @ExcludeMissing
7379 workspaceId: JsonField <String > = JsonMissing .of(),
80+ @JsonProperty(" dataRetentionDays" )
81+ @ExcludeMissing
82+ dataRetentionDays: JsonField <Long > = JsonMissing .of(),
7483 @JsonProperty(" description" )
7584 @ExcludeMissing
7685 description: JsonField <String > = JsonMissing .of(),
7786 @JsonProperty(" gitRepo" ) @ExcludeMissing gitRepo: JsonField <GitRepo > = JsonMissing .of(),
87+ @JsonProperty(" modelDeveloper" )
88+ @ExcludeMissing
89+ modelDeveloper: JsonField <String > = JsonMissing .of(),
90+ @JsonProperty(" modelTypes" )
91+ @ExcludeMissing
92+ modelTypes: JsonField <List <String >> = JsonMissing .of(),
93+ @JsonProperty(" purpose" ) @ExcludeMissing purpose: JsonField <String > = JsonMissing .of(),
7894 ) : this (
7995 id,
8096 creatorId,
@@ -90,8 +106,12 @@ private constructor(
90106 taskType,
91107 versionCount,
92108 workspaceId,
109+ dataRetentionDays,
93110 description,
94111 gitRepo,
112+ modelDeveloper,
113+ modelTypes,
114+ purpose,
95115 mutableMapOf (),
96116 )
97117
@@ -208,6 +228,15 @@ private constructor(
208228 */
209229 fun workspaceId (): Optional <String > = workspaceId.getOptional(" workspaceId" )
210230
231+ /* *
232+ * Number of days to retain monitoring data for this project. Null means data is retained
233+ * indefinitely.
234+ *
235+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
236+ * server responded with an unexpected value).
237+ */
238+ fun dataRetentionDays (): Optional <Long > = dataRetentionDays.getOptional(" dataRetentionDays" )
239+
211240 /* *
212241 * The project description.
213242 *
@@ -222,6 +251,30 @@ private constructor(
222251 */
223252 fun gitRepo (): Optional <GitRepo > = gitRepo.getOptional(" gitRepo" )
224253
254+ /* *
255+ * Who developed the model used in this project.
256+ *
257+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
258+ * server responded with an unexpected value).
259+ */
260+ fun modelDeveloper (): Optional <String > = modelDeveloper.getOptional(" modelDeveloper" )
261+
262+ /* *
263+ * The kinds of model used in this project.
264+ *
265+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
266+ * server responded with an unexpected value).
267+ */
268+ fun modelTypes (): Optional <List <String >> = modelTypes.getOptional(" modelTypes" )
269+
270+ /* *
271+ * What the system in this project is intended to do.
272+ *
273+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
274+ * server responded with an unexpected value).
275+ */
276+ fun purpose (): Optional <String > = purpose.getOptional(" purpose" )
277+
225278 /* *
226279 * Returns the raw JSON value of [id].
227280 *
@@ -335,6 +388,16 @@ private constructor(
335388 */
336389 @JsonProperty(" workspaceId" ) @ExcludeMissing fun _workspaceId (): JsonField <String > = workspaceId
337390
391+ /* *
392+ * Returns the raw JSON value of [dataRetentionDays].
393+ *
394+ * Unlike [dataRetentionDays], this method doesn't throw if the JSON field has an unexpected
395+ * type.
396+ */
397+ @JsonProperty(" dataRetentionDays" )
398+ @ExcludeMissing
399+ fun _dataRetentionDays (): JsonField <Long > = dataRetentionDays
400+
338401 /* *
339402 * Returns the raw JSON value of [description].
340403 *
@@ -349,6 +412,31 @@ private constructor(
349412 */
350413 @JsonProperty(" gitRepo" ) @ExcludeMissing fun _gitRepo (): JsonField <GitRepo > = gitRepo
351414
415+ /* *
416+ * Returns the raw JSON value of [modelDeveloper].
417+ *
418+ * Unlike [modelDeveloper], this method doesn't throw if the JSON field has an unexpected type.
419+ */
420+ @JsonProperty(" modelDeveloper" )
421+ @ExcludeMissing
422+ fun _modelDeveloper (): JsonField <String > = modelDeveloper
423+
424+ /* *
425+ * Returns the raw JSON value of [modelTypes].
426+ *
427+ * Unlike [modelTypes], this method doesn't throw if the JSON field has an unexpected type.
428+ */
429+ @JsonProperty(" modelTypes" )
430+ @ExcludeMissing
431+ fun _modelTypes (): JsonField <List <String >> = modelTypes
432+
433+ /* *
434+ * Returns the raw JSON value of [purpose].
435+ *
436+ * Unlike [purpose], this method doesn't throw if the JSON field has an unexpected type.
437+ */
438+ @JsonProperty(" purpose" ) @ExcludeMissing fun _purpose (): JsonField <String > = purpose
439+
352440 @JsonAnySetter
353441 private fun putAdditionalProperty (key : String , value : JsonValue ) {
354442 additionalProperties.put(key, value)
@@ -404,8 +492,12 @@ private constructor(
404492 private var taskType: JsonField <TaskType >? = null
405493 private var versionCount: JsonField <Long >? = null
406494 private var workspaceId: JsonField <String >? = null
495+ private var dataRetentionDays: JsonField <Long > = JsonMissing .of()
407496 private var description: JsonField <String > = JsonMissing .of()
408497 private var gitRepo: JsonField <GitRepo > = JsonMissing .of()
498+ private var modelDeveloper: JsonField <String > = JsonMissing .of()
499+ private var modelTypes: JsonField <MutableList <String >>? = null
500+ private var purpose: JsonField <String > = JsonMissing .of()
409501 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
410502
411503 @JvmSynthetic
@@ -424,8 +516,12 @@ private constructor(
424516 taskType = projectCreateResponse.taskType
425517 versionCount = projectCreateResponse.versionCount
426518 workspaceId = projectCreateResponse.workspaceId
519+ dataRetentionDays = projectCreateResponse.dataRetentionDays
427520 description = projectCreateResponse.description
428521 gitRepo = projectCreateResponse.gitRepo
522+ modelDeveloper = projectCreateResponse.modelDeveloper
523+ modelTypes = projectCreateResponse.modelTypes.map { it.toMutableList() }
524+ purpose = projectCreateResponse.purpose
429525 additionalProperties = projectCreateResponse.additionalProperties.toMutableMap()
430526 }
431527
@@ -614,6 +710,36 @@ private constructor(
614710 */
615711 fun workspaceId (workspaceId : JsonField <String >) = apply { this .workspaceId = workspaceId }
616712
713+ /* *
714+ * Number of days to retain monitoring data for this project. Null means data is retained
715+ * indefinitely.
716+ */
717+ fun dataRetentionDays (dataRetentionDays : Long? ) =
718+ dataRetentionDays(JsonField .ofNullable(dataRetentionDays))
719+
720+ /* *
721+ * Alias for [Builder.dataRetentionDays].
722+ *
723+ * This unboxed primitive overload exists for backwards compatibility.
724+ */
725+ fun dataRetentionDays (dataRetentionDays : Long ) =
726+ dataRetentionDays(dataRetentionDays as Long? )
727+
728+ /* * Alias for calling [Builder.dataRetentionDays] with `dataRetentionDays.orElse(null)`. */
729+ fun dataRetentionDays (dataRetentionDays : Optional <Long >) =
730+ dataRetentionDays(dataRetentionDays.getOrNull())
731+
732+ /* *
733+ * Sets [Builder.dataRetentionDays] to an arbitrary JSON value.
734+ *
735+ * You should usually call [Builder.dataRetentionDays] with a well-typed [Long] value
736+ * instead. This method is primarily for setting the field to an undocumented or not yet
737+ * supported value.
738+ */
739+ fun dataRetentionDays (dataRetentionDays : JsonField <Long >) = apply {
740+ this .dataRetentionDays = dataRetentionDays
741+ }
742+
617743 /* * The project description. */
618744 fun description (description : String? ) = description(JsonField .ofNullable(description))
619745
@@ -642,6 +768,68 @@ private constructor(
642768 */
643769 fun gitRepo (gitRepo : JsonField <GitRepo >) = apply { this .gitRepo = gitRepo }
644770
771+ /* * Who developed the model used in this project. */
772+ fun modelDeveloper (modelDeveloper : String? ) =
773+ modelDeveloper(JsonField .ofNullable(modelDeveloper))
774+
775+ /* * Alias for calling [Builder.modelDeveloper] with `modelDeveloper.orElse(null)`. */
776+ fun modelDeveloper (modelDeveloper : Optional <String >) =
777+ modelDeveloper(modelDeveloper.getOrNull())
778+
779+ /* *
780+ * Sets [Builder.modelDeveloper] to an arbitrary JSON value.
781+ *
782+ * You should usually call [Builder.modelDeveloper] with a well-typed [String] value
783+ * instead. This method is primarily for setting the field to an undocumented or not yet
784+ * supported value.
785+ */
786+ fun modelDeveloper (modelDeveloper : JsonField <String >) = apply {
787+ this .modelDeveloper = modelDeveloper
788+ }
789+
790+ /* * The kinds of model used in this project. */
791+ fun modelTypes (modelTypes : List <String >? ) = modelTypes(JsonField .ofNullable(modelTypes))
792+
793+ /* * Alias for calling [Builder.modelTypes] with `modelTypes.orElse(null)`. */
794+ fun modelTypes (modelTypes : Optional <List <String >>) = modelTypes(modelTypes.getOrNull())
795+
796+ /* *
797+ * Sets [Builder.modelTypes] to an arbitrary JSON value.
798+ *
799+ * You should usually call [Builder.modelTypes] with a well-typed `List<String>` value
800+ * instead. This method is primarily for setting the field to an undocumented or not yet
801+ * supported value.
802+ */
803+ fun modelTypes (modelTypes : JsonField <List <String >>) = apply {
804+ this .modelTypes = modelTypes.map { it.toMutableList() }
805+ }
806+
807+ /* *
808+ * Adds a single [String] to [modelTypes].
809+ *
810+ * @throws IllegalStateException if the field was previously set to a non-list.
811+ */
812+ fun addModelType (modelType : String ) = apply {
813+ modelTypes =
814+ (modelTypes ? : JsonField .of(mutableListOf ())).also {
815+ checkKnown(" modelTypes" , it).add(modelType)
816+ }
817+ }
818+
819+ /* * What the system in this project is intended to do. */
820+ fun purpose (purpose : String? ) = purpose(JsonField .ofNullable(purpose))
821+
822+ /* * Alias for calling [Builder.purpose] with `purpose.orElse(null)`. */
823+ fun purpose (purpose : Optional <String >) = purpose(purpose.getOrNull())
824+
825+ /* *
826+ * Sets [Builder.purpose] to an arbitrary JSON value.
827+ *
828+ * You should usually call [Builder.purpose] with a well-typed [String] value instead. This
829+ * method is primarily for setting the field to an undocumented or not yet supported value.
830+ */
831+ fun purpose (purpose : JsonField <String >) = apply { this .purpose = purpose }
832+
645833 fun additionalProperties (additionalProperties : Map <String , JsonValue >) = apply {
646834 this .additionalProperties.clear()
647835 putAllAdditionalProperties(additionalProperties)
@@ -702,8 +890,12 @@ private constructor(
702890 checkRequired(" taskType" , taskType),
703891 checkRequired(" versionCount" , versionCount),
704892 checkRequired(" workspaceId" , workspaceId),
893+ dataRetentionDays,
705894 description,
706895 gitRepo,
896+ modelDeveloper,
897+ (modelTypes ? : JsonMissing .of()).map { it.toImmutable() },
898+ purpose,
707899 additionalProperties.toMutableMap(),
708900 )
709901 }
@@ -737,8 +929,12 @@ private constructor(
737929 taskType().validate()
738930 versionCount()
739931 workspaceId()
932+ dataRetentionDays()
740933 description()
741934 gitRepo().ifPresent { it.validate() }
935+ modelDeveloper()
936+ modelTypes()
937+ purpose()
742938 validated = true
743939 }
744940
@@ -771,8 +967,12 @@ private constructor(
771967 (taskType.asKnown().getOrNull()?.validity() ? : 0 ) +
772968 (if (versionCount.asKnown().isPresent) 1 else 0 ) +
773969 (if (workspaceId.asKnown().isPresent) 1 else 0 ) +
970+ (if (dataRetentionDays.asKnown().isPresent) 1 else 0 ) +
774971 (if (description.asKnown().isPresent) 1 else 0 ) +
775- (gitRepo.asKnown().getOrNull()?.validity() ? : 0 )
972+ (gitRepo.asKnown().getOrNull()?.validity() ? : 0 ) +
973+ (if (modelDeveloper.asKnown().isPresent) 1 else 0 ) +
974+ (modelTypes.asKnown().getOrNull()?.size ? : 0 ) +
975+ (if (purpose.asKnown().isPresent) 1 else 0 )
776976
777977 /* * Links to the project. */
778978 class Links
@@ -1840,8 +2040,12 @@ private constructor(
18402040 taskType == other.taskType &&
18412041 versionCount == other.versionCount &&
18422042 workspaceId == other.workspaceId &&
2043+ dataRetentionDays == other.dataRetentionDays &&
18432044 description == other.description &&
18442045 gitRepo == other.gitRepo &&
2046+ modelDeveloper == other.modelDeveloper &&
2047+ modelTypes == other.modelTypes &&
2048+ purpose == other.purpose &&
18452049 additionalProperties == other.additionalProperties
18462050 }
18472051
@@ -1861,14 +2065,18 @@ private constructor(
18612065 taskType,
18622066 versionCount,
18632067 workspaceId,
2068+ dataRetentionDays,
18642069 description,
18652070 gitRepo,
2071+ modelDeveloper,
2072+ modelTypes,
2073+ purpose,
18662074 additionalProperties,
18672075 )
18682076 }
18692077
18702078 override fun hashCode (): Int = hashCode
18712079
18722080 override fun toString () =
1873- " ProjectCreateResponse{id=$id , creatorId=$creatorId , dateCreated=$dateCreated , dateUpdated=$dateUpdated , developmentGoalCount=$developmentGoalCount , goalCount=$goalCount , inferencePipelineCount=$inferencePipelineCount , links=$links , monitoringGoalCount=$monitoringGoalCount , name=$name , source=$source , taskType=$taskType , versionCount=$versionCount , workspaceId=$workspaceId , description=$description , gitRepo=$gitRepo , additionalProperties=$additionalProperties }"
2081+ " ProjectCreateResponse{id=$id , creatorId=$creatorId , dateCreated=$dateCreated , dateUpdated=$dateUpdated , developmentGoalCount=$developmentGoalCount , goalCount=$goalCount , inferencePipelineCount=$inferencePipelineCount , links=$links , monitoringGoalCount=$monitoringGoalCount , name=$name , source=$source , taskType=$taskType , versionCount=$versionCount , workspaceId=$workspaceId , dataRetentionDays= $dataRetentionDays , description=$description , gitRepo=$gitRepo , modelDeveloper= $modelDeveloper , modelTypes= $modelTypes , purpose= $purpose , additionalProperties=$additionalProperties }"
18742082}
0 commit comments