diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6b7b74c..cce9240 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.0" + ".": "0.3.1" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index aa5f69b..d4e5380 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,3 +1,3 @@ configured_endpoints: 24 -openapi_spec_hash: 68055a774f3305fb11efa5b5b5881446 +openapi_spec_hash: c97a5263afcc72ca5a47bc5a87683a78 config_hash: f0743196c68fb84cbd06a95f134702b3 diff --git a/CHANGELOG.md b/CHANGELOG.md index c9980f8..31fc5ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.3.1 (2026-01-08) + +Full Changelog: [v0.3.0...v0.3.1](https://github.com/openlayer-ai/openlayer-go/compare/v0.3.0...v0.3.1) + +### Chores + +* **closes OPEN-8644:** address warnings on Stainless studio ([de613ce](https://github.com/openlayer-ai/openlayer-go/commit/de613cee414f827584da1373a18dde844bc42ecd)) +* remove _meta ([5102af9](https://github.com/openlayer-ai/openlayer-go/commit/5102af92c4592a8547b05e564e33ee661ea9accc)) + ## 0.3.0 (2026-01-08) Full Changelog: [v0.2.1...v0.3.0](https://github.com/openlayer-ai/openlayer-go/compare/v0.2.1...v0.3.0) diff --git a/README.md b/README.md index 86df3c3..7f90ad5 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Or to pin the version: ```sh -go get -u 'github.com/openlayer-ai/openlayer-go@v0.3.0' +go get -u 'github.com/openlayer-ai/openlayer-go@v0.3.1' ``` diff --git a/inferencepipeline.go b/inferencepipeline.go index 911dbbf..66a7689 100644 --- a/inferencepipeline.go +++ b/inferencepipeline.go @@ -205,7 +205,11 @@ type InferencePipelineGetResponseDataBackend struct { BackendType InferencePipelineGetResponseDataBackendBackendType `json:"backendType,required"` BigqueryConnectionID string `json:"bigqueryConnectionId,nullable" format:"uuid"` // This field can have the runtime type of - // [InferencePipelineGetResponseDataBackendObjectConfig]. + // [InferencePipelineGetResponseDataBackendBigQueryDataBackendConfig], + // [InferencePipelineGetResponseDataBackendSnowflakeDataBackendConfig], + // [InferencePipelineGetResponseDataBackendDatabricksDtlDataBackendConfig], + // [InferencePipelineGetResponseDataBackendRedshiftDataBackendConfig], + // [InferencePipelineGetResponseDataBackendPostgresDataBackendConfig]. Config interface{} `json:"config"` Database string `json:"database"` DatabricksDtlConnectionID string `json:"databricksDtlConnectionId,nullable" format:"uuid"` @@ -264,22 +268,22 @@ func (r *InferencePipelineGetResponseDataBackend) UnmarshalJSON(data []byte) (er // you can cast to the specific types for more type safety. // // Possible runtime types of the union are -// [InferencePipelineGetResponseDataBackendObject], -// [InferencePipelineGetResponseDataBackendBackendType], -// [InferencePipelineGetResponseDataBackendObject], -// [InferencePipelineGetResponseDataBackendObject], -// [InferencePipelineGetResponseDataBackendObject], -// [InferencePipelineGetResponseDataBackendObject]. +// [InferencePipelineGetResponseDataBackendBigQueryDataBackend], +// [InferencePipelineGetResponseDataBackendDefaultDataBackend], +// [InferencePipelineGetResponseDataBackendSnowflakeDataBackend], +// [InferencePipelineGetResponseDataBackendDatabricksDtlDataBackend], +// [InferencePipelineGetResponseDataBackendRedshiftDataBackend], +// [InferencePipelineGetResponseDataBackendPostgresDataBackend]. func (r InferencePipelineGetResponseDataBackend) AsUnion() InferencePipelineGetResponseDataBackendUnion { return r.union } -// Union satisfied by [InferencePipelineGetResponseDataBackendObject], -// [InferencePipelineGetResponseDataBackendBackendType], -// [InferencePipelineGetResponseDataBackendObject], -// [InferencePipelineGetResponseDataBackendObject], -// [InferencePipelineGetResponseDataBackendObject] or -// [InferencePipelineGetResponseDataBackendObject]. +// Union satisfied by [InferencePipelineGetResponseDataBackendBigQueryDataBackend], +// [InferencePipelineGetResponseDataBackendDefaultDataBackend], +// [InferencePipelineGetResponseDataBackendSnowflakeDataBackend], +// [InferencePipelineGetResponseDataBackendDatabricksDtlDataBackend], +// [InferencePipelineGetResponseDataBackendRedshiftDataBackend] or +// [InferencePipelineGetResponseDataBackendPostgresDataBackend]. type InferencePipelineGetResponseDataBackendUnion interface { implementsInferencePipelineGetResponseDataBackend() } @@ -290,44 +294,45 @@ func init() { "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(InferencePipelineGetResponseDataBackendObject{}), + Type: reflect.TypeOf(InferencePipelineGetResponseDataBackendBigQueryDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(InferencePipelineGetResponseDataBackendBackendType{}), + Type: reflect.TypeOf(InferencePipelineGetResponseDataBackendDefaultDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(InferencePipelineGetResponseDataBackendObject{}), + Type: reflect.TypeOf(InferencePipelineGetResponseDataBackendSnowflakeDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(InferencePipelineGetResponseDataBackendObject{}), + Type: reflect.TypeOf(InferencePipelineGetResponseDataBackendDatabricksDtlDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(InferencePipelineGetResponseDataBackendObject{}), + Type: reflect.TypeOf(InferencePipelineGetResponseDataBackendRedshiftDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(InferencePipelineGetResponseDataBackendObject{}), + Type: reflect.TypeOf(InferencePipelineGetResponseDataBackendPostgresDataBackend{}), }, ) } -type InferencePipelineGetResponseDataBackendObject struct { - BackendType InferencePipelineGetResponseDataBackendObjectBackendType `json:"backendType,required"` - BigqueryConnectionID string `json:"bigqueryConnectionId,required,nullable" format:"uuid"` - DatasetID string `json:"datasetId,required"` - ProjectID string `json:"projectId,required"` - TableID string `json:"tableId,required,nullable"` - PartitionType InferencePipelineGetResponseDataBackendObjectPartitionType `json:"partitionType,nullable"` - JSON inferencePipelineGetResponseDataBackendObjectJSON `json:"-"` +type InferencePipelineGetResponseDataBackendBigQueryDataBackend struct { + BackendType InferencePipelineGetResponseDataBackendBigQueryDataBackendBackendType `json:"backendType,required"` + BigqueryConnectionID string `json:"bigqueryConnectionId,required,nullable" format:"uuid"` + DatasetID string `json:"datasetId,required"` + ProjectID string `json:"projectId,required"` + TableID string `json:"tableId,required,nullable"` + PartitionType InferencePipelineGetResponseDataBackendBigQueryDataBackendPartitionType `json:"partitionType,nullable"` + JSON inferencePipelineGetResponseDataBackendBigQueryDataBackendJSON `json:"-"` } -// inferencePipelineGetResponseDataBackendObjectJSON contains the JSON metadata for -// the struct [InferencePipelineGetResponseDataBackendObject] -type inferencePipelineGetResponseDataBackendObjectJSON struct { +// inferencePipelineGetResponseDataBackendBigQueryDataBackendJSON contains the JSON +// metadata for the struct +// [InferencePipelineGetResponseDataBackendBigQueryDataBackend] +type inferencePipelineGetResponseDataBackendBigQueryDataBackendJSON struct { BackendType apijson.Field BigqueryConnectionID apijson.Field DatasetID apijson.Field @@ -338,32 +343,32 @@ type inferencePipelineGetResponseDataBackendObjectJSON struct { ExtraFields map[string]apijson.Field } -func (r *InferencePipelineGetResponseDataBackendObject) UnmarshalJSON(data []byte) (err error) { +func (r *InferencePipelineGetResponseDataBackendBigQueryDataBackend) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r inferencePipelineGetResponseDataBackendObjectJSON) RawJSON() string { +func (r inferencePipelineGetResponseDataBackendBigQueryDataBackendJSON) RawJSON() string { return r.raw } -func (r InferencePipelineGetResponseDataBackendObject) implementsInferencePipelineGetResponseDataBackend() { +func (r InferencePipelineGetResponseDataBackendBigQueryDataBackend) implementsInferencePipelineGetResponseDataBackend() { } -type InferencePipelineGetResponseDataBackendObjectBackendType string +type InferencePipelineGetResponseDataBackendBigQueryDataBackendBackendType string const ( - InferencePipelineGetResponseDataBackendObjectBackendTypeBigquery InferencePipelineGetResponseDataBackendObjectBackendType = "bigquery" + InferencePipelineGetResponseDataBackendBigQueryDataBackendBackendTypeBigquery InferencePipelineGetResponseDataBackendBigQueryDataBackendBackendType = "bigquery" ) -func (r InferencePipelineGetResponseDataBackendObjectBackendType) IsKnown() bool { +func (r InferencePipelineGetResponseDataBackendBigQueryDataBackendBackendType) IsKnown() bool { switch r { - case InferencePipelineGetResponseDataBackendObjectBackendTypeBigquery: + case InferencePipelineGetResponseDataBackendBigQueryDataBackendBackendTypeBigquery: return true } return false } -type InferencePipelineGetResponseDataBackendObjectConfig struct { +type InferencePipelineGetResponseDataBackendBigQueryDataBackendConfig struct { // Name of the column with the ground truths. GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` // Name of the column with human feedback. @@ -372,13 +377,14 @@ type InferencePipelineGetResponseDataBackendObjectConfig struct { LatencyColumnName string `json:"latencyColumnName,nullable"` // Name of the column with the timestamps. Timestamps must be in UNIX sec format. // If not provided, the upload timestamp is used. - TimestampColumnName string `json:"timestampColumnName,nullable"` - JSON inferencePipelineGetResponseDataBackendObjectConfigJSON `json:"-"` + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON inferencePipelineGetResponseDataBackendBigQueryDataBackendConfigJSON `json:"-"` } -// inferencePipelineGetResponseDataBackendObjectConfigJSON contains the JSON -// metadata for the struct [InferencePipelineGetResponseDataBackendObjectConfig] -type inferencePipelineGetResponseDataBackendObjectConfigJSON struct { +// inferencePipelineGetResponseDataBackendBigQueryDataBackendConfigJSON contains +// the JSON metadata for the struct +// [InferencePipelineGetResponseDataBackendBigQueryDataBackendConfig] +type inferencePipelineGetResponseDataBackendBigQueryDataBackendConfigJSON struct { GroundTruthColumnName apijson.Field HumanFeedbackColumnName apijson.Field LatencyColumnName apijson.Field @@ -387,63 +393,397 @@ type inferencePipelineGetResponseDataBackendObjectConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *InferencePipelineGetResponseDataBackendObjectConfig) UnmarshalJSON(data []byte) (err error) { +func (r *InferencePipelineGetResponseDataBackendBigQueryDataBackendConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r inferencePipelineGetResponseDataBackendObjectConfigJSON) RawJSON() string { +func (r inferencePipelineGetResponseDataBackendBigQueryDataBackendConfigJSON) RawJSON() string { return r.raw } -type InferencePipelineGetResponseDataBackendObjectPartitionType string +type InferencePipelineGetResponseDataBackendBigQueryDataBackendPartitionType string const ( - InferencePipelineGetResponseDataBackendObjectPartitionTypeDay InferencePipelineGetResponseDataBackendObjectPartitionType = "DAY" - InferencePipelineGetResponseDataBackendObjectPartitionTypeMonth InferencePipelineGetResponseDataBackendObjectPartitionType = "MONTH" - InferencePipelineGetResponseDataBackendObjectPartitionTypeYear InferencePipelineGetResponseDataBackendObjectPartitionType = "YEAR" + InferencePipelineGetResponseDataBackendBigQueryDataBackendPartitionTypeDay InferencePipelineGetResponseDataBackendBigQueryDataBackendPartitionType = "DAY" + InferencePipelineGetResponseDataBackendBigQueryDataBackendPartitionTypeMonth InferencePipelineGetResponseDataBackendBigQueryDataBackendPartitionType = "MONTH" + InferencePipelineGetResponseDataBackendBigQueryDataBackendPartitionTypeYear InferencePipelineGetResponseDataBackendBigQueryDataBackendPartitionType = "YEAR" ) -func (r InferencePipelineGetResponseDataBackendObjectPartitionType) IsKnown() bool { +func (r InferencePipelineGetResponseDataBackendBigQueryDataBackendPartitionType) IsKnown() bool { switch r { - case InferencePipelineGetResponseDataBackendObjectPartitionTypeDay, InferencePipelineGetResponseDataBackendObjectPartitionTypeMonth, InferencePipelineGetResponseDataBackendObjectPartitionTypeYear: + case InferencePipelineGetResponseDataBackendBigQueryDataBackendPartitionTypeDay, InferencePipelineGetResponseDataBackendBigQueryDataBackendPartitionTypeMonth, InferencePipelineGetResponseDataBackendBigQueryDataBackendPartitionTypeYear: return true } return false } -type InferencePipelineGetResponseDataBackendBackendType struct { - BackendType InferencePipelineGetResponseDataBackendBackendTypeBackendType `json:"backendType,required"` - JSON inferencePipelineGetResponseDataBackendBackendTypeJSON `json:"-"` +type InferencePipelineGetResponseDataBackendDefaultDataBackend struct { + BackendType InferencePipelineGetResponseDataBackendDefaultDataBackendBackendType `json:"backendType,required"` + JSON inferencePipelineGetResponseDataBackendDefaultDataBackendJSON `json:"-"` } -// inferencePipelineGetResponseDataBackendBackendTypeJSON contains the JSON -// metadata for the struct [InferencePipelineGetResponseDataBackendBackendType] -type inferencePipelineGetResponseDataBackendBackendTypeJSON struct { +// inferencePipelineGetResponseDataBackendDefaultDataBackendJSON contains the JSON +// metadata for the struct +// [InferencePipelineGetResponseDataBackendDefaultDataBackend] +type inferencePipelineGetResponseDataBackendDefaultDataBackendJSON struct { BackendType apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *InferencePipelineGetResponseDataBackendBackendType) UnmarshalJSON(data []byte) (err error) { +func (r *InferencePipelineGetResponseDataBackendDefaultDataBackend) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r inferencePipelineGetResponseDataBackendBackendTypeJSON) RawJSON() string { +func (r inferencePipelineGetResponseDataBackendDefaultDataBackendJSON) RawJSON() string { return r.raw } -func (r InferencePipelineGetResponseDataBackendBackendType) implementsInferencePipelineGetResponseDataBackend() { +func (r InferencePipelineGetResponseDataBackendDefaultDataBackend) implementsInferencePipelineGetResponseDataBackend() { } -type InferencePipelineGetResponseDataBackendBackendTypeBackendType string +type InferencePipelineGetResponseDataBackendDefaultDataBackendBackendType string const ( - InferencePipelineGetResponseDataBackendBackendTypeBackendTypeDefault InferencePipelineGetResponseDataBackendBackendTypeBackendType = "default" + InferencePipelineGetResponseDataBackendDefaultDataBackendBackendTypeDefault InferencePipelineGetResponseDataBackendDefaultDataBackendBackendType = "default" ) -func (r InferencePipelineGetResponseDataBackendBackendTypeBackendType) IsKnown() bool { +func (r InferencePipelineGetResponseDataBackendDefaultDataBackendBackendType) IsKnown() bool { switch r { - case InferencePipelineGetResponseDataBackendBackendTypeBackendTypeDefault: + case InferencePipelineGetResponseDataBackendDefaultDataBackendBackendTypeDefault: + return true + } + return false +} + +type InferencePipelineGetResponseDataBackendSnowflakeDataBackend struct { + BackendType InferencePipelineGetResponseDataBackendSnowflakeDataBackendBackendType `json:"backendType,required"` + Database string `json:"database,required"` + Schema string `json:"schema,required"` + SnowflakeConnectionID string `json:"snowflakeConnectionId,required,nullable" format:"uuid"` + Table string `json:"table,required,nullable"` + JSON inferencePipelineGetResponseDataBackendSnowflakeDataBackendJSON `json:"-"` +} + +// inferencePipelineGetResponseDataBackendSnowflakeDataBackendJSON contains the +// JSON metadata for the struct +// [InferencePipelineGetResponseDataBackendSnowflakeDataBackend] +type inferencePipelineGetResponseDataBackendSnowflakeDataBackendJSON struct { + BackendType apijson.Field + Database apijson.Field + Schema apijson.Field + SnowflakeConnectionID apijson.Field + Table apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineGetResponseDataBackendSnowflakeDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineGetResponseDataBackendSnowflakeDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r InferencePipelineGetResponseDataBackendSnowflakeDataBackend) implementsInferencePipelineGetResponseDataBackend() { +} + +type InferencePipelineGetResponseDataBackendSnowflakeDataBackendBackendType string + +const ( + InferencePipelineGetResponseDataBackendSnowflakeDataBackendBackendTypeSnowflake InferencePipelineGetResponseDataBackendSnowflakeDataBackendBackendType = "snowflake" +) + +func (r InferencePipelineGetResponseDataBackendSnowflakeDataBackendBackendType) IsKnown() bool { + switch r { + case InferencePipelineGetResponseDataBackendSnowflakeDataBackendBackendTypeSnowflake: + return true + } + return false +} + +type InferencePipelineGetResponseDataBackendSnowflakeDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON inferencePipelineGetResponseDataBackendSnowflakeDataBackendConfigJSON `json:"-"` +} + +// inferencePipelineGetResponseDataBackendSnowflakeDataBackendConfigJSON contains +// the JSON metadata for the struct +// [InferencePipelineGetResponseDataBackendSnowflakeDataBackendConfig] +type inferencePipelineGetResponseDataBackendSnowflakeDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineGetResponseDataBackendSnowflakeDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineGetResponseDataBackendSnowflakeDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type InferencePipelineGetResponseDataBackendDatabricksDtlDataBackend struct { + BackendType InferencePipelineGetResponseDataBackendDatabricksDtlDataBackendBackendType `json:"backendType,required"` + DatabricksDtlConnectionID string `json:"databricksDtlConnectionId,required,nullable" format:"uuid"` + TableID string `json:"tableId,required,nullable"` + JSON inferencePipelineGetResponseDataBackendDatabricksDtlDataBackendJSON `json:"-"` +} + +// inferencePipelineGetResponseDataBackendDatabricksDtlDataBackendJSON contains the +// JSON metadata for the struct +// [InferencePipelineGetResponseDataBackendDatabricksDtlDataBackend] +type inferencePipelineGetResponseDataBackendDatabricksDtlDataBackendJSON struct { + BackendType apijson.Field + DatabricksDtlConnectionID apijson.Field + TableID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineGetResponseDataBackendDatabricksDtlDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineGetResponseDataBackendDatabricksDtlDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r InferencePipelineGetResponseDataBackendDatabricksDtlDataBackend) implementsInferencePipelineGetResponseDataBackend() { +} + +type InferencePipelineGetResponseDataBackendDatabricksDtlDataBackendBackendType string + +const ( + InferencePipelineGetResponseDataBackendDatabricksDtlDataBackendBackendTypeDatabricksDtl InferencePipelineGetResponseDataBackendDatabricksDtlDataBackendBackendType = "databricks_dtl" +) + +func (r InferencePipelineGetResponseDataBackendDatabricksDtlDataBackendBackendType) IsKnown() bool { + switch r { + case InferencePipelineGetResponseDataBackendDatabricksDtlDataBackendBackendTypeDatabricksDtl: + return true + } + return false +} + +type InferencePipelineGetResponseDataBackendDatabricksDtlDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON inferencePipelineGetResponseDataBackendDatabricksDtlDataBackendConfigJSON `json:"-"` +} + +// inferencePipelineGetResponseDataBackendDatabricksDtlDataBackendConfigJSON +// contains the JSON metadata for the struct +// [InferencePipelineGetResponseDataBackendDatabricksDtlDataBackendConfig] +type inferencePipelineGetResponseDataBackendDatabricksDtlDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineGetResponseDataBackendDatabricksDtlDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineGetResponseDataBackendDatabricksDtlDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type InferencePipelineGetResponseDataBackendRedshiftDataBackend struct { + BackendType InferencePipelineGetResponseDataBackendRedshiftDataBackendBackendType `json:"backendType,required"` + RedshiftConnectionID string `json:"redshiftConnectionId,required,nullable" format:"uuid"` + SchemaName string `json:"schemaName,required"` + TableName string `json:"tableName,required"` + JSON inferencePipelineGetResponseDataBackendRedshiftDataBackendJSON `json:"-"` +} + +// inferencePipelineGetResponseDataBackendRedshiftDataBackendJSON contains the JSON +// metadata for the struct +// [InferencePipelineGetResponseDataBackendRedshiftDataBackend] +type inferencePipelineGetResponseDataBackendRedshiftDataBackendJSON struct { + BackendType apijson.Field + RedshiftConnectionID apijson.Field + SchemaName apijson.Field + TableName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineGetResponseDataBackendRedshiftDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineGetResponseDataBackendRedshiftDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r InferencePipelineGetResponseDataBackendRedshiftDataBackend) implementsInferencePipelineGetResponseDataBackend() { +} + +type InferencePipelineGetResponseDataBackendRedshiftDataBackendBackendType string + +const ( + InferencePipelineGetResponseDataBackendRedshiftDataBackendBackendTypeRedshift InferencePipelineGetResponseDataBackendRedshiftDataBackendBackendType = "redshift" +) + +func (r InferencePipelineGetResponseDataBackendRedshiftDataBackendBackendType) IsKnown() bool { + switch r { + case InferencePipelineGetResponseDataBackendRedshiftDataBackendBackendTypeRedshift: + return true + } + return false +} + +type InferencePipelineGetResponseDataBackendRedshiftDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON inferencePipelineGetResponseDataBackendRedshiftDataBackendConfigJSON `json:"-"` +} + +// inferencePipelineGetResponseDataBackendRedshiftDataBackendConfigJSON contains +// the JSON metadata for the struct +// [InferencePipelineGetResponseDataBackendRedshiftDataBackendConfig] +type inferencePipelineGetResponseDataBackendRedshiftDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineGetResponseDataBackendRedshiftDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineGetResponseDataBackendRedshiftDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type InferencePipelineGetResponseDataBackendPostgresDataBackend struct { + BackendType InferencePipelineGetResponseDataBackendPostgresDataBackendBackendType `json:"backendType,required"` + Database string `json:"database,required"` + PostgresConnectionID string `json:"postgresConnectionId,required,nullable" format:"uuid"` + Schema string `json:"schema,required"` + Table string `json:"table,required,nullable"` + JSON inferencePipelineGetResponseDataBackendPostgresDataBackendJSON `json:"-"` +} + +// inferencePipelineGetResponseDataBackendPostgresDataBackendJSON contains the JSON +// metadata for the struct +// [InferencePipelineGetResponseDataBackendPostgresDataBackend] +type inferencePipelineGetResponseDataBackendPostgresDataBackendJSON struct { + BackendType apijson.Field + Database apijson.Field + PostgresConnectionID apijson.Field + Schema apijson.Field + Table apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineGetResponseDataBackendPostgresDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineGetResponseDataBackendPostgresDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r InferencePipelineGetResponseDataBackendPostgresDataBackend) implementsInferencePipelineGetResponseDataBackend() { +} + +type InferencePipelineGetResponseDataBackendPostgresDataBackendBackendType string + +const ( + InferencePipelineGetResponseDataBackendPostgresDataBackendBackendTypePostgres InferencePipelineGetResponseDataBackendPostgresDataBackendBackendType = "postgres" +) + +func (r InferencePipelineGetResponseDataBackendPostgresDataBackendBackendType) IsKnown() bool { + switch r { + case InferencePipelineGetResponseDataBackendPostgresDataBackendBackendTypePostgres: + return true + } + return false +} + +type InferencePipelineGetResponseDataBackendPostgresDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON inferencePipelineGetResponseDataBackendPostgresDataBackendConfigJSON `json:"-"` +} + +// inferencePipelineGetResponseDataBackendPostgresDataBackendConfigJSON contains +// the JSON metadata for the struct +// [InferencePipelineGetResponseDataBackendPostgresDataBackendConfig] +type inferencePipelineGetResponseDataBackendPostgresDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineGetResponseDataBackendPostgresDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineGetResponseDataBackendPostgresDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type InferencePipelineGetResponseDataBackendBackendType string + +const ( + InferencePipelineGetResponseDataBackendBackendTypeBigquery InferencePipelineGetResponseDataBackendBackendType = "bigquery" + InferencePipelineGetResponseDataBackendBackendTypeDefault InferencePipelineGetResponseDataBackendBackendType = "default" + InferencePipelineGetResponseDataBackendBackendTypeSnowflake InferencePipelineGetResponseDataBackendBackendType = "snowflake" + InferencePipelineGetResponseDataBackendBackendTypeDatabricksDtl InferencePipelineGetResponseDataBackendBackendType = "databricks_dtl" + InferencePipelineGetResponseDataBackendBackendTypeRedshift InferencePipelineGetResponseDataBackendBackendType = "redshift" + InferencePipelineGetResponseDataBackendBackendTypePostgres InferencePipelineGetResponseDataBackendBackendType = "postgres" +) + +func (r InferencePipelineGetResponseDataBackendBackendType) IsKnown() bool { + switch r { + case InferencePipelineGetResponseDataBackendBackendTypeBigquery, InferencePipelineGetResponseDataBackendBackendTypeDefault, InferencePipelineGetResponseDataBackendBackendTypeSnowflake, InferencePipelineGetResponseDataBackendBackendTypeDatabricksDtl, InferencePipelineGetResponseDataBackendBackendTypeRedshift, InferencePipelineGetResponseDataBackendBackendTypePostgres: return true } return false @@ -861,7 +1201,11 @@ type InferencePipelineUpdateResponseDataBackend struct { BackendType InferencePipelineUpdateResponseDataBackendBackendType `json:"backendType,required"` BigqueryConnectionID string `json:"bigqueryConnectionId,nullable" format:"uuid"` // This field can have the runtime type of - // [InferencePipelineUpdateResponseDataBackendObjectConfig]. + // [InferencePipelineUpdateResponseDataBackendBigQueryDataBackendConfig], + // [InferencePipelineUpdateResponseDataBackendSnowflakeDataBackendConfig], + // [InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendConfig], + // [InferencePipelineUpdateResponseDataBackendRedshiftDataBackendConfig], + // [InferencePipelineUpdateResponseDataBackendPostgresDataBackendConfig]. Config interface{} `json:"config"` Database string `json:"database"` DatabricksDtlConnectionID string `json:"databricksDtlConnectionId,nullable" format:"uuid"` @@ -920,22 +1264,23 @@ func (r *InferencePipelineUpdateResponseDataBackend) UnmarshalJSON(data []byte) // which you can cast to the specific types for more type safety. // // Possible runtime types of the union are -// [InferencePipelineUpdateResponseDataBackendObject], -// [InferencePipelineUpdateResponseDataBackendBackendType], -// [InferencePipelineUpdateResponseDataBackendObject], -// [InferencePipelineUpdateResponseDataBackendObject], -// [InferencePipelineUpdateResponseDataBackendObject], -// [InferencePipelineUpdateResponseDataBackendObject]. +// [InferencePipelineUpdateResponseDataBackendBigQueryDataBackend], +// [InferencePipelineUpdateResponseDataBackendDefaultDataBackend], +// [InferencePipelineUpdateResponseDataBackendSnowflakeDataBackend], +// [InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackend], +// [InferencePipelineUpdateResponseDataBackendRedshiftDataBackend], +// [InferencePipelineUpdateResponseDataBackendPostgresDataBackend]. func (r InferencePipelineUpdateResponseDataBackend) AsUnion() InferencePipelineUpdateResponseDataBackendUnion { return r.union } -// Union satisfied by [InferencePipelineUpdateResponseDataBackendObject], -// [InferencePipelineUpdateResponseDataBackendBackendType], -// [InferencePipelineUpdateResponseDataBackendObject], -// [InferencePipelineUpdateResponseDataBackendObject], -// [InferencePipelineUpdateResponseDataBackendObject] or -// [InferencePipelineUpdateResponseDataBackendObject]. +// Union satisfied by +// [InferencePipelineUpdateResponseDataBackendBigQueryDataBackend], +// [InferencePipelineUpdateResponseDataBackendDefaultDataBackend], +// [InferencePipelineUpdateResponseDataBackendSnowflakeDataBackend], +// [InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackend], +// [InferencePipelineUpdateResponseDataBackendRedshiftDataBackend] or +// [InferencePipelineUpdateResponseDataBackendPostgresDataBackend]. type InferencePipelineUpdateResponseDataBackendUnion interface { implementsInferencePipelineUpdateResponseDataBackend() } @@ -946,44 +1291,45 @@ func init() { "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(InferencePipelineUpdateResponseDataBackendObject{}), + Type: reflect.TypeOf(InferencePipelineUpdateResponseDataBackendBigQueryDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(InferencePipelineUpdateResponseDataBackendBackendType{}), + Type: reflect.TypeOf(InferencePipelineUpdateResponseDataBackendDefaultDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(InferencePipelineUpdateResponseDataBackendObject{}), + Type: reflect.TypeOf(InferencePipelineUpdateResponseDataBackendSnowflakeDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(InferencePipelineUpdateResponseDataBackendObject{}), + Type: reflect.TypeOf(InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(InferencePipelineUpdateResponseDataBackendObject{}), + Type: reflect.TypeOf(InferencePipelineUpdateResponseDataBackendRedshiftDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(InferencePipelineUpdateResponseDataBackendObject{}), + Type: reflect.TypeOf(InferencePipelineUpdateResponseDataBackendPostgresDataBackend{}), }, ) } -type InferencePipelineUpdateResponseDataBackendObject struct { - BackendType InferencePipelineUpdateResponseDataBackendObjectBackendType `json:"backendType,required"` - BigqueryConnectionID string `json:"bigqueryConnectionId,required,nullable" format:"uuid"` - DatasetID string `json:"datasetId,required"` - ProjectID string `json:"projectId,required"` - TableID string `json:"tableId,required,nullable"` - PartitionType InferencePipelineUpdateResponseDataBackendObjectPartitionType `json:"partitionType,nullable"` - JSON inferencePipelineUpdateResponseDataBackendObjectJSON `json:"-"` +type InferencePipelineUpdateResponseDataBackendBigQueryDataBackend struct { + BackendType InferencePipelineUpdateResponseDataBackendBigQueryDataBackendBackendType `json:"backendType,required"` + BigqueryConnectionID string `json:"bigqueryConnectionId,required,nullable" format:"uuid"` + DatasetID string `json:"datasetId,required"` + ProjectID string `json:"projectId,required"` + TableID string `json:"tableId,required,nullable"` + PartitionType InferencePipelineUpdateResponseDataBackendBigQueryDataBackendPartitionType `json:"partitionType,nullable"` + JSON inferencePipelineUpdateResponseDataBackendBigQueryDataBackendJSON `json:"-"` } -// inferencePipelineUpdateResponseDataBackendObjectJSON contains the JSON metadata -// for the struct [InferencePipelineUpdateResponseDataBackendObject] -type inferencePipelineUpdateResponseDataBackendObjectJSON struct { +// inferencePipelineUpdateResponseDataBackendBigQueryDataBackendJSON contains the +// JSON metadata for the struct +// [InferencePipelineUpdateResponseDataBackendBigQueryDataBackend] +type inferencePipelineUpdateResponseDataBackendBigQueryDataBackendJSON struct { BackendType apijson.Field BigqueryConnectionID apijson.Field DatasetID apijson.Field @@ -994,32 +1340,32 @@ type inferencePipelineUpdateResponseDataBackendObjectJSON struct { ExtraFields map[string]apijson.Field } -func (r *InferencePipelineUpdateResponseDataBackendObject) UnmarshalJSON(data []byte) (err error) { +func (r *InferencePipelineUpdateResponseDataBackendBigQueryDataBackend) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r inferencePipelineUpdateResponseDataBackendObjectJSON) RawJSON() string { +func (r inferencePipelineUpdateResponseDataBackendBigQueryDataBackendJSON) RawJSON() string { return r.raw } -func (r InferencePipelineUpdateResponseDataBackendObject) implementsInferencePipelineUpdateResponseDataBackend() { +func (r InferencePipelineUpdateResponseDataBackendBigQueryDataBackend) implementsInferencePipelineUpdateResponseDataBackend() { } -type InferencePipelineUpdateResponseDataBackendObjectBackendType string +type InferencePipelineUpdateResponseDataBackendBigQueryDataBackendBackendType string const ( - InferencePipelineUpdateResponseDataBackendObjectBackendTypeBigquery InferencePipelineUpdateResponseDataBackendObjectBackendType = "bigquery" + InferencePipelineUpdateResponseDataBackendBigQueryDataBackendBackendTypeBigquery InferencePipelineUpdateResponseDataBackendBigQueryDataBackendBackendType = "bigquery" ) -func (r InferencePipelineUpdateResponseDataBackendObjectBackendType) IsKnown() bool { +func (r InferencePipelineUpdateResponseDataBackendBigQueryDataBackendBackendType) IsKnown() bool { switch r { - case InferencePipelineUpdateResponseDataBackendObjectBackendTypeBigquery: + case InferencePipelineUpdateResponseDataBackendBigQueryDataBackendBackendTypeBigquery: return true } return false } -type InferencePipelineUpdateResponseDataBackendObjectConfig struct { +type InferencePipelineUpdateResponseDataBackendBigQueryDataBackendConfig struct { // Name of the column with the ground truths. GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` // Name of the column with human feedback. @@ -1028,13 +1374,14 @@ type InferencePipelineUpdateResponseDataBackendObjectConfig struct { LatencyColumnName string `json:"latencyColumnName,nullable"` // Name of the column with the timestamps. Timestamps must be in UNIX sec format. // If not provided, the upload timestamp is used. - TimestampColumnName string `json:"timestampColumnName,nullable"` - JSON inferencePipelineUpdateResponseDataBackendObjectConfigJSON `json:"-"` + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON inferencePipelineUpdateResponseDataBackendBigQueryDataBackendConfigJSON `json:"-"` } -// inferencePipelineUpdateResponseDataBackendObjectConfigJSON contains the JSON -// metadata for the struct [InferencePipelineUpdateResponseDataBackendObjectConfig] -type inferencePipelineUpdateResponseDataBackendObjectConfigJSON struct { +// inferencePipelineUpdateResponseDataBackendBigQueryDataBackendConfigJSON contains +// the JSON metadata for the struct +// [InferencePipelineUpdateResponseDataBackendBigQueryDataBackendConfig] +type inferencePipelineUpdateResponseDataBackendBigQueryDataBackendConfigJSON struct { GroundTruthColumnName apijson.Field HumanFeedbackColumnName apijson.Field LatencyColumnName apijson.Field @@ -1043,63 +1390,397 @@ type inferencePipelineUpdateResponseDataBackendObjectConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *InferencePipelineUpdateResponseDataBackendObjectConfig) UnmarshalJSON(data []byte) (err error) { +func (r *InferencePipelineUpdateResponseDataBackendBigQueryDataBackendConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r inferencePipelineUpdateResponseDataBackendObjectConfigJSON) RawJSON() string { +func (r inferencePipelineUpdateResponseDataBackendBigQueryDataBackendConfigJSON) RawJSON() string { return r.raw } -type InferencePipelineUpdateResponseDataBackendObjectPartitionType string +type InferencePipelineUpdateResponseDataBackendBigQueryDataBackendPartitionType string const ( - InferencePipelineUpdateResponseDataBackendObjectPartitionTypeDay InferencePipelineUpdateResponseDataBackendObjectPartitionType = "DAY" - InferencePipelineUpdateResponseDataBackendObjectPartitionTypeMonth InferencePipelineUpdateResponseDataBackendObjectPartitionType = "MONTH" - InferencePipelineUpdateResponseDataBackendObjectPartitionTypeYear InferencePipelineUpdateResponseDataBackendObjectPartitionType = "YEAR" + InferencePipelineUpdateResponseDataBackendBigQueryDataBackendPartitionTypeDay InferencePipelineUpdateResponseDataBackendBigQueryDataBackendPartitionType = "DAY" + InferencePipelineUpdateResponseDataBackendBigQueryDataBackendPartitionTypeMonth InferencePipelineUpdateResponseDataBackendBigQueryDataBackendPartitionType = "MONTH" + InferencePipelineUpdateResponseDataBackendBigQueryDataBackendPartitionTypeYear InferencePipelineUpdateResponseDataBackendBigQueryDataBackendPartitionType = "YEAR" ) -func (r InferencePipelineUpdateResponseDataBackendObjectPartitionType) IsKnown() bool { +func (r InferencePipelineUpdateResponseDataBackendBigQueryDataBackendPartitionType) IsKnown() bool { switch r { - case InferencePipelineUpdateResponseDataBackendObjectPartitionTypeDay, InferencePipelineUpdateResponseDataBackendObjectPartitionTypeMonth, InferencePipelineUpdateResponseDataBackendObjectPartitionTypeYear: + case InferencePipelineUpdateResponseDataBackendBigQueryDataBackendPartitionTypeDay, InferencePipelineUpdateResponseDataBackendBigQueryDataBackendPartitionTypeMonth, InferencePipelineUpdateResponseDataBackendBigQueryDataBackendPartitionTypeYear: return true } return false } -type InferencePipelineUpdateResponseDataBackendBackendType struct { - BackendType InferencePipelineUpdateResponseDataBackendBackendTypeBackendType `json:"backendType,required"` - JSON inferencePipelineUpdateResponseDataBackendBackendTypeJSON `json:"-"` +type InferencePipelineUpdateResponseDataBackendDefaultDataBackend struct { + BackendType InferencePipelineUpdateResponseDataBackendDefaultDataBackendBackendType `json:"backendType,required"` + JSON inferencePipelineUpdateResponseDataBackendDefaultDataBackendJSON `json:"-"` } -// inferencePipelineUpdateResponseDataBackendBackendTypeJSON contains the JSON -// metadata for the struct [InferencePipelineUpdateResponseDataBackendBackendType] -type inferencePipelineUpdateResponseDataBackendBackendTypeJSON struct { +// inferencePipelineUpdateResponseDataBackendDefaultDataBackendJSON contains the +// JSON metadata for the struct +// [InferencePipelineUpdateResponseDataBackendDefaultDataBackend] +type inferencePipelineUpdateResponseDataBackendDefaultDataBackendJSON struct { BackendType apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *InferencePipelineUpdateResponseDataBackendBackendType) UnmarshalJSON(data []byte) (err error) { +func (r *InferencePipelineUpdateResponseDataBackendDefaultDataBackend) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r inferencePipelineUpdateResponseDataBackendBackendTypeJSON) RawJSON() string { +func (r inferencePipelineUpdateResponseDataBackendDefaultDataBackendJSON) RawJSON() string { return r.raw } -func (r InferencePipelineUpdateResponseDataBackendBackendType) implementsInferencePipelineUpdateResponseDataBackend() { +func (r InferencePipelineUpdateResponseDataBackendDefaultDataBackend) implementsInferencePipelineUpdateResponseDataBackend() { +} + +type InferencePipelineUpdateResponseDataBackendDefaultDataBackendBackendType string + +const ( + InferencePipelineUpdateResponseDataBackendDefaultDataBackendBackendTypeDefault InferencePipelineUpdateResponseDataBackendDefaultDataBackendBackendType = "default" +) + +func (r InferencePipelineUpdateResponseDataBackendDefaultDataBackendBackendType) IsKnown() bool { + switch r { + case InferencePipelineUpdateResponseDataBackendDefaultDataBackendBackendTypeDefault: + return true + } + return false +} + +type InferencePipelineUpdateResponseDataBackendSnowflakeDataBackend struct { + BackendType InferencePipelineUpdateResponseDataBackendSnowflakeDataBackendBackendType `json:"backendType,required"` + Database string `json:"database,required"` + Schema string `json:"schema,required"` + SnowflakeConnectionID string `json:"snowflakeConnectionId,required,nullable" format:"uuid"` + Table string `json:"table,required,nullable"` + JSON inferencePipelineUpdateResponseDataBackendSnowflakeDataBackendJSON `json:"-"` +} + +// inferencePipelineUpdateResponseDataBackendSnowflakeDataBackendJSON contains the +// JSON metadata for the struct +// [InferencePipelineUpdateResponseDataBackendSnowflakeDataBackend] +type inferencePipelineUpdateResponseDataBackendSnowflakeDataBackendJSON struct { + BackendType apijson.Field + Database apijson.Field + Schema apijson.Field + SnowflakeConnectionID apijson.Field + Table apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineUpdateResponseDataBackendSnowflakeDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineUpdateResponseDataBackendSnowflakeDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r InferencePipelineUpdateResponseDataBackendSnowflakeDataBackend) implementsInferencePipelineUpdateResponseDataBackend() { +} + +type InferencePipelineUpdateResponseDataBackendSnowflakeDataBackendBackendType string + +const ( + InferencePipelineUpdateResponseDataBackendSnowflakeDataBackendBackendTypeSnowflake InferencePipelineUpdateResponseDataBackendSnowflakeDataBackendBackendType = "snowflake" +) + +func (r InferencePipelineUpdateResponseDataBackendSnowflakeDataBackendBackendType) IsKnown() bool { + switch r { + case InferencePipelineUpdateResponseDataBackendSnowflakeDataBackendBackendTypeSnowflake: + return true + } + return false +} + +type InferencePipelineUpdateResponseDataBackendSnowflakeDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON inferencePipelineUpdateResponseDataBackendSnowflakeDataBackendConfigJSON `json:"-"` +} + +// inferencePipelineUpdateResponseDataBackendSnowflakeDataBackendConfigJSON +// contains the JSON metadata for the struct +// [InferencePipelineUpdateResponseDataBackendSnowflakeDataBackendConfig] +type inferencePipelineUpdateResponseDataBackendSnowflakeDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineUpdateResponseDataBackendSnowflakeDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineUpdateResponseDataBackendSnowflakeDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackend struct { + BackendType InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendBackendType `json:"backendType,required"` + DatabricksDtlConnectionID string `json:"databricksDtlConnectionId,required,nullable" format:"uuid"` + TableID string `json:"tableId,required,nullable"` + JSON inferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendJSON `json:"-"` +} + +// inferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendJSON contains +// the JSON metadata for the struct +// [InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackend] +type inferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendJSON struct { + BackendType apijson.Field + DatabricksDtlConnectionID apijson.Field + TableID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackend) implementsInferencePipelineUpdateResponseDataBackend() { +} + +type InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendBackendType string + +const ( + InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendBackendTypeDatabricksDtl InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendBackendType = "databricks_dtl" +) + +func (r InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendBackendType) IsKnown() bool { + switch r { + case InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendBackendTypeDatabricksDtl: + return true + } + return false +} + +type InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON inferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendConfigJSON `json:"-"` +} + +// inferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendConfigJSON +// contains the JSON metadata for the struct +// [InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendConfig] +type inferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineUpdateResponseDataBackendDatabricksDtlDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type InferencePipelineUpdateResponseDataBackendRedshiftDataBackend struct { + BackendType InferencePipelineUpdateResponseDataBackendRedshiftDataBackendBackendType `json:"backendType,required"` + RedshiftConnectionID string `json:"redshiftConnectionId,required,nullable" format:"uuid"` + SchemaName string `json:"schemaName,required"` + TableName string `json:"tableName,required"` + JSON inferencePipelineUpdateResponseDataBackendRedshiftDataBackendJSON `json:"-"` +} + +// inferencePipelineUpdateResponseDataBackendRedshiftDataBackendJSON contains the +// JSON metadata for the struct +// [InferencePipelineUpdateResponseDataBackendRedshiftDataBackend] +type inferencePipelineUpdateResponseDataBackendRedshiftDataBackendJSON struct { + BackendType apijson.Field + RedshiftConnectionID apijson.Field + SchemaName apijson.Field + TableName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineUpdateResponseDataBackendRedshiftDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineUpdateResponseDataBackendRedshiftDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r InferencePipelineUpdateResponseDataBackendRedshiftDataBackend) implementsInferencePipelineUpdateResponseDataBackend() { +} + +type InferencePipelineUpdateResponseDataBackendRedshiftDataBackendBackendType string + +const ( + InferencePipelineUpdateResponseDataBackendRedshiftDataBackendBackendTypeRedshift InferencePipelineUpdateResponseDataBackendRedshiftDataBackendBackendType = "redshift" +) + +func (r InferencePipelineUpdateResponseDataBackendRedshiftDataBackendBackendType) IsKnown() bool { + switch r { + case InferencePipelineUpdateResponseDataBackendRedshiftDataBackendBackendTypeRedshift: + return true + } + return false +} + +type InferencePipelineUpdateResponseDataBackendRedshiftDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON inferencePipelineUpdateResponseDataBackendRedshiftDataBackendConfigJSON `json:"-"` +} + +// inferencePipelineUpdateResponseDataBackendRedshiftDataBackendConfigJSON contains +// the JSON metadata for the struct +// [InferencePipelineUpdateResponseDataBackendRedshiftDataBackendConfig] +type inferencePipelineUpdateResponseDataBackendRedshiftDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineUpdateResponseDataBackendRedshiftDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineUpdateResponseDataBackendRedshiftDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type InferencePipelineUpdateResponseDataBackendPostgresDataBackend struct { + BackendType InferencePipelineUpdateResponseDataBackendPostgresDataBackendBackendType `json:"backendType,required"` + Database string `json:"database,required"` + PostgresConnectionID string `json:"postgresConnectionId,required,nullable" format:"uuid"` + Schema string `json:"schema,required"` + Table string `json:"table,required,nullable"` + JSON inferencePipelineUpdateResponseDataBackendPostgresDataBackendJSON `json:"-"` +} + +// inferencePipelineUpdateResponseDataBackendPostgresDataBackendJSON contains the +// JSON metadata for the struct +// [InferencePipelineUpdateResponseDataBackendPostgresDataBackend] +type inferencePipelineUpdateResponseDataBackendPostgresDataBackendJSON struct { + BackendType apijson.Field + Database apijson.Field + PostgresConnectionID apijson.Field + Schema apijson.Field + Table apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineUpdateResponseDataBackendPostgresDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineUpdateResponseDataBackendPostgresDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r InferencePipelineUpdateResponseDataBackendPostgresDataBackend) implementsInferencePipelineUpdateResponseDataBackend() { +} + +type InferencePipelineUpdateResponseDataBackendPostgresDataBackendBackendType string + +const ( + InferencePipelineUpdateResponseDataBackendPostgresDataBackendBackendTypePostgres InferencePipelineUpdateResponseDataBackendPostgresDataBackendBackendType = "postgres" +) + +func (r InferencePipelineUpdateResponseDataBackendPostgresDataBackendBackendType) IsKnown() bool { + switch r { + case InferencePipelineUpdateResponseDataBackendPostgresDataBackendBackendTypePostgres: + return true + } + return false +} + +type InferencePipelineUpdateResponseDataBackendPostgresDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON inferencePipelineUpdateResponseDataBackendPostgresDataBackendConfigJSON `json:"-"` +} + +// inferencePipelineUpdateResponseDataBackendPostgresDataBackendConfigJSON contains +// the JSON metadata for the struct +// [InferencePipelineUpdateResponseDataBackendPostgresDataBackendConfig] +type inferencePipelineUpdateResponseDataBackendPostgresDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InferencePipelineUpdateResponseDataBackendPostgresDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r inferencePipelineUpdateResponseDataBackendPostgresDataBackendConfigJSON) RawJSON() string { + return r.raw } -type InferencePipelineUpdateResponseDataBackendBackendTypeBackendType string +type InferencePipelineUpdateResponseDataBackendBackendType string const ( - InferencePipelineUpdateResponseDataBackendBackendTypeBackendTypeDefault InferencePipelineUpdateResponseDataBackendBackendTypeBackendType = "default" + InferencePipelineUpdateResponseDataBackendBackendTypeBigquery InferencePipelineUpdateResponseDataBackendBackendType = "bigquery" + InferencePipelineUpdateResponseDataBackendBackendTypeDefault InferencePipelineUpdateResponseDataBackendBackendType = "default" + InferencePipelineUpdateResponseDataBackendBackendTypeSnowflake InferencePipelineUpdateResponseDataBackendBackendType = "snowflake" + InferencePipelineUpdateResponseDataBackendBackendTypeDatabricksDtl InferencePipelineUpdateResponseDataBackendBackendType = "databricks_dtl" + InferencePipelineUpdateResponseDataBackendBackendTypeRedshift InferencePipelineUpdateResponseDataBackendBackendType = "redshift" + InferencePipelineUpdateResponseDataBackendBackendTypePostgres InferencePipelineUpdateResponseDataBackendBackendType = "postgres" ) -func (r InferencePipelineUpdateResponseDataBackendBackendTypeBackendType) IsKnown() bool { +func (r InferencePipelineUpdateResponseDataBackendBackendType) IsKnown() bool { switch r { - case InferencePipelineUpdateResponseDataBackendBackendTypeBackendTypeDefault: + case InferencePipelineUpdateResponseDataBackendBackendTypeBigquery, InferencePipelineUpdateResponseDataBackendBackendTypeDefault, InferencePipelineUpdateResponseDataBackendBackendTypeSnowflake, InferencePipelineUpdateResponseDataBackendBackendTypeDatabricksDtl, InferencePipelineUpdateResponseDataBackendBackendTypeRedshift, InferencePipelineUpdateResponseDataBackendBackendTypePostgres: return true } return false diff --git a/internal/version.go b/internal/version.go index 7cb1898..9e4f81e 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.3.0" // x-release-please-version +const PackageVersion = "0.3.1" // x-release-please-version diff --git a/projectinferencepipeline.go b/projectinferencepipeline.go index a69379d..08fb764 100644 --- a/projectinferencepipeline.go +++ b/projectinferencepipeline.go @@ -186,7 +186,11 @@ type ProjectInferencePipelineNewResponseDataBackend struct { BackendType ProjectInferencePipelineNewResponseDataBackendBackendType `json:"backendType,required"` BigqueryConnectionID string `json:"bigqueryConnectionId,nullable" format:"uuid"` // This field can have the runtime type of - // [ProjectInferencePipelineNewResponseDataBackendObjectConfig]. + // [ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendConfig], + // [ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackendConfig], + // [ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendConfig], + // [ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackendConfig], + // [ProjectInferencePipelineNewResponseDataBackendPostgresDataBackendConfig]. Config interface{} `json:"config"` Database string `json:"database"` DatabricksDtlConnectionID string `json:"databricksDtlConnectionId,nullable" format:"uuid"` @@ -245,22 +249,23 @@ func (r *ProjectInferencePipelineNewResponseDataBackend) UnmarshalJSON(data []by // interface which you can cast to the specific types for more type safety. // // Possible runtime types of the union are -// [ProjectInferencePipelineNewResponseDataBackendObject], -// [ProjectInferencePipelineNewResponseDataBackendBackendType], -// [ProjectInferencePipelineNewResponseDataBackendObject], -// [ProjectInferencePipelineNewResponseDataBackendObject], -// [ProjectInferencePipelineNewResponseDataBackendObject], -// [ProjectInferencePipelineNewResponseDataBackendObject]. +// [ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackend], +// [ProjectInferencePipelineNewResponseDataBackendDefaultDataBackend], +// [ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackend], +// [ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackend], +// [ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackend], +// [ProjectInferencePipelineNewResponseDataBackendPostgresDataBackend]. func (r ProjectInferencePipelineNewResponseDataBackend) AsUnion() ProjectInferencePipelineNewResponseDataBackendUnion { return r.union } -// Union satisfied by [ProjectInferencePipelineNewResponseDataBackendObject], -// [ProjectInferencePipelineNewResponseDataBackendBackendType], -// [ProjectInferencePipelineNewResponseDataBackendObject], -// [ProjectInferencePipelineNewResponseDataBackendObject], -// [ProjectInferencePipelineNewResponseDataBackendObject] or -// [ProjectInferencePipelineNewResponseDataBackendObject]. +// Union satisfied by +// [ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackend], +// [ProjectInferencePipelineNewResponseDataBackendDefaultDataBackend], +// [ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackend], +// [ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackend], +// [ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackend] or +// [ProjectInferencePipelineNewResponseDataBackendPostgresDataBackend]. type ProjectInferencePipelineNewResponseDataBackendUnion interface { implementsProjectInferencePipelineNewResponseDataBackend() } @@ -271,44 +276,45 @@ func init() { "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectInferencePipelineNewResponseDataBackendObject{}), + Type: reflect.TypeOf(ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectInferencePipelineNewResponseDataBackendBackendType{}), + Type: reflect.TypeOf(ProjectInferencePipelineNewResponseDataBackendDefaultDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectInferencePipelineNewResponseDataBackendObject{}), + Type: reflect.TypeOf(ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectInferencePipelineNewResponseDataBackendObject{}), + Type: reflect.TypeOf(ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectInferencePipelineNewResponseDataBackendObject{}), + Type: reflect.TypeOf(ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectInferencePipelineNewResponseDataBackendObject{}), + Type: reflect.TypeOf(ProjectInferencePipelineNewResponseDataBackendPostgresDataBackend{}), }, ) } -type ProjectInferencePipelineNewResponseDataBackendObject struct { - BackendType ProjectInferencePipelineNewResponseDataBackendObjectBackendType `json:"backendType,required"` - BigqueryConnectionID string `json:"bigqueryConnectionId,required,nullable" format:"uuid"` - DatasetID string `json:"datasetId,required"` - ProjectID string `json:"projectId,required"` - TableID string `json:"tableId,required,nullable"` - PartitionType ProjectInferencePipelineNewResponseDataBackendObjectPartitionType `json:"partitionType,nullable"` - JSON projectInferencePipelineNewResponseDataBackendObjectJSON `json:"-"` +type ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackend struct { + BackendType ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendBackendType `json:"backendType,required"` + BigqueryConnectionID string `json:"bigqueryConnectionId,required,nullable" format:"uuid"` + DatasetID string `json:"datasetId,required"` + ProjectID string `json:"projectId,required"` + TableID string `json:"tableId,required,nullable"` + PartitionType ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendPartitionType `json:"partitionType,nullable"` + JSON projectInferencePipelineNewResponseDataBackendBigQueryDataBackendJSON `json:"-"` } -// projectInferencePipelineNewResponseDataBackendObjectJSON contains the JSON -// metadata for the struct [ProjectInferencePipelineNewResponseDataBackendObject] -type projectInferencePipelineNewResponseDataBackendObjectJSON struct { +// projectInferencePipelineNewResponseDataBackendBigQueryDataBackendJSON contains +// the JSON metadata for the struct +// [ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackend] +type projectInferencePipelineNewResponseDataBackendBigQueryDataBackendJSON struct { BackendType apijson.Field BigqueryConnectionID apijson.Field DatasetID apijson.Field @@ -319,32 +325,32 @@ type projectInferencePipelineNewResponseDataBackendObjectJSON struct { ExtraFields map[string]apijson.Field } -func (r *ProjectInferencePipelineNewResponseDataBackendObject) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackend) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectInferencePipelineNewResponseDataBackendObjectJSON) RawJSON() string { +func (r projectInferencePipelineNewResponseDataBackendBigQueryDataBackendJSON) RawJSON() string { return r.raw } -func (r ProjectInferencePipelineNewResponseDataBackendObject) implementsProjectInferencePipelineNewResponseDataBackend() { +func (r ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackend) implementsProjectInferencePipelineNewResponseDataBackend() { } -type ProjectInferencePipelineNewResponseDataBackendObjectBackendType string +type ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendBackendType string const ( - ProjectInferencePipelineNewResponseDataBackendObjectBackendTypeBigquery ProjectInferencePipelineNewResponseDataBackendObjectBackendType = "bigquery" + ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendBackendTypeBigquery ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendBackendType = "bigquery" ) -func (r ProjectInferencePipelineNewResponseDataBackendObjectBackendType) IsKnown() bool { +func (r ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendBackendType) IsKnown() bool { switch r { - case ProjectInferencePipelineNewResponseDataBackendObjectBackendTypeBigquery: + case ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendBackendTypeBigquery: return true } return false } -type ProjectInferencePipelineNewResponseDataBackendObjectConfig struct { +type ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendConfig struct { // Name of the column with the ground truths. GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` // Name of the column with human feedback. @@ -353,14 +359,14 @@ type ProjectInferencePipelineNewResponseDataBackendObjectConfig struct { LatencyColumnName string `json:"latencyColumnName,nullable"` // Name of the column with the timestamps. Timestamps must be in UNIX sec format. // If not provided, the upload timestamp is used. - TimestampColumnName string `json:"timestampColumnName,nullable"` - JSON projectInferencePipelineNewResponseDataBackendObjectConfigJSON `json:"-"` + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON projectInferencePipelineNewResponseDataBackendBigQueryDataBackendConfigJSON `json:"-"` } -// projectInferencePipelineNewResponseDataBackendObjectConfigJSON contains the JSON -// metadata for the struct -// [ProjectInferencePipelineNewResponseDataBackendObjectConfig] -type projectInferencePipelineNewResponseDataBackendObjectConfigJSON struct { +// projectInferencePipelineNewResponseDataBackendBigQueryDataBackendConfigJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendConfig] +type projectInferencePipelineNewResponseDataBackendBigQueryDataBackendConfigJSON struct { GroundTruthColumnName apijson.Field HumanFeedbackColumnName apijson.Field LatencyColumnName apijson.Field @@ -369,64 +375,397 @@ type projectInferencePipelineNewResponseDataBackendObjectConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *ProjectInferencePipelineNewResponseDataBackendObjectConfig) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectInferencePipelineNewResponseDataBackendObjectConfigJSON) RawJSON() string { +func (r projectInferencePipelineNewResponseDataBackendBigQueryDataBackendConfigJSON) RawJSON() string { return r.raw } -type ProjectInferencePipelineNewResponseDataBackendObjectPartitionType string +type ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendPartitionType string const ( - ProjectInferencePipelineNewResponseDataBackendObjectPartitionTypeDay ProjectInferencePipelineNewResponseDataBackendObjectPartitionType = "DAY" - ProjectInferencePipelineNewResponseDataBackendObjectPartitionTypeMonth ProjectInferencePipelineNewResponseDataBackendObjectPartitionType = "MONTH" - ProjectInferencePipelineNewResponseDataBackendObjectPartitionTypeYear ProjectInferencePipelineNewResponseDataBackendObjectPartitionType = "YEAR" + ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendPartitionTypeDay ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendPartitionType = "DAY" + ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendPartitionTypeMonth ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendPartitionType = "MONTH" + ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendPartitionTypeYear ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendPartitionType = "YEAR" ) -func (r ProjectInferencePipelineNewResponseDataBackendObjectPartitionType) IsKnown() bool { +func (r ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendPartitionType) IsKnown() bool { switch r { - case ProjectInferencePipelineNewResponseDataBackendObjectPartitionTypeDay, ProjectInferencePipelineNewResponseDataBackendObjectPartitionTypeMonth, ProjectInferencePipelineNewResponseDataBackendObjectPartitionTypeYear: + case ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendPartitionTypeDay, ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendPartitionTypeMonth, ProjectInferencePipelineNewResponseDataBackendBigQueryDataBackendPartitionTypeYear: return true } return false } -type ProjectInferencePipelineNewResponseDataBackendBackendType struct { - BackendType ProjectInferencePipelineNewResponseDataBackendBackendTypeBackendType `json:"backendType,required"` - JSON projectInferencePipelineNewResponseDataBackendBackendTypeJSON `json:"-"` +type ProjectInferencePipelineNewResponseDataBackendDefaultDataBackend struct { + BackendType ProjectInferencePipelineNewResponseDataBackendDefaultDataBackendBackendType `json:"backendType,required"` + JSON projectInferencePipelineNewResponseDataBackendDefaultDataBackendJSON `json:"-"` } -// projectInferencePipelineNewResponseDataBackendBackendTypeJSON contains the JSON -// metadata for the struct -// [ProjectInferencePipelineNewResponseDataBackendBackendType] -type projectInferencePipelineNewResponseDataBackendBackendTypeJSON struct { +// projectInferencePipelineNewResponseDataBackendDefaultDataBackendJSON contains +// the JSON metadata for the struct +// [ProjectInferencePipelineNewResponseDataBackendDefaultDataBackend] +type projectInferencePipelineNewResponseDataBackendDefaultDataBackendJSON struct { BackendType apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectInferencePipelineNewResponseDataBackendBackendType) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectInferencePipelineNewResponseDataBackendDefaultDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineNewResponseDataBackendDefaultDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r ProjectInferencePipelineNewResponseDataBackendDefaultDataBackend) implementsProjectInferencePipelineNewResponseDataBackend() { +} + +type ProjectInferencePipelineNewResponseDataBackendDefaultDataBackendBackendType string + +const ( + ProjectInferencePipelineNewResponseDataBackendDefaultDataBackendBackendTypeDefault ProjectInferencePipelineNewResponseDataBackendDefaultDataBackendBackendType = "default" +) + +func (r ProjectInferencePipelineNewResponseDataBackendDefaultDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineNewResponseDataBackendDefaultDataBackendBackendTypeDefault: + return true + } + return false +} + +type ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackend struct { + BackendType ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackendBackendType `json:"backendType,required"` + Database string `json:"database,required"` + Schema string `json:"schema,required"` + SnowflakeConnectionID string `json:"snowflakeConnectionId,required,nullable" format:"uuid"` + Table string `json:"table,required,nullable"` + JSON projectInferencePipelineNewResponseDataBackendSnowflakeDataBackendJSON `json:"-"` +} + +// projectInferencePipelineNewResponseDataBackendSnowflakeDataBackendJSON contains +// the JSON metadata for the struct +// [ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackend] +type projectInferencePipelineNewResponseDataBackendSnowflakeDataBackendJSON struct { + BackendType apijson.Field + Database apijson.Field + Schema apijson.Field + SnowflakeConnectionID apijson.Field + Table apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineNewResponseDataBackendSnowflakeDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackend) implementsProjectInferencePipelineNewResponseDataBackend() { +} + +type ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackendBackendType string + +const ( + ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackendBackendTypeSnowflake ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackendBackendType = "snowflake" +) + +func (r ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackendBackendTypeSnowflake: + return true + } + return false +} + +type ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON projectInferencePipelineNewResponseDataBackendSnowflakeDataBackendConfigJSON `json:"-"` +} + +// projectInferencePipelineNewResponseDataBackendSnowflakeDataBackendConfigJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackendConfig] +type projectInferencePipelineNewResponseDataBackendSnowflakeDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineNewResponseDataBackendSnowflakeDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineNewResponseDataBackendSnowflakeDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackend struct { + BackendType ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendBackendType `json:"backendType,required"` + DatabricksDtlConnectionID string `json:"databricksDtlConnectionId,required,nullable" format:"uuid"` + TableID string `json:"tableId,required,nullable"` + JSON projectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendJSON `json:"-"` +} + +// projectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackend] +type projectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendJSON struct { + BackendType apijson.Field + DatabricksDtlConnectionID apijson.Field + TableID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackend) implementsProjectInferencePipelineNewResponseDataBackend() { +} + +type ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendBackendType string + +const ( + ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendBackendTypeDatabricksDtl ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendBackendType = "databricks_dtl" +) + +func (r ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendBackendTypeDatabricksDtl: + return true + } + return false +} + +type ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON projectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendConfigJSON `json:"-"` +} + +// projectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendConfigJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendConfig] +type projectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineNewResponseDataBackendDatabricksDtlDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackend struct { + BackendType ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackendBackendType `json:"backendType,required"` + RedshiftConnectionID string `json:"redshiftConnectionId,required,nullable" format:"uuid"` + SchemaName string `json:"schemaName,required"` + TableName string `json:"tableName,required"` + JSON projectInferencePipelineNewResponseDataBackendRedshiftDataBackendJSON `json:"-"` +} + +// projectInferencePipelineNewResponseDataBackendRedshiftDataBackendJSON contains +// the JSON metadata for the struct +// [ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackend] +type projectInferencePipelineNewResponseDataBackendRedshiftDataBackendJSON struct { + BackendType apijson.Field + RedshiftConnectionID apijson.Field + SchemaName apijson.Field + TableName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineNewResponseDataBackendRedshiftDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackend) implementsProjectInferencePipelineNewResponseDataBackend() { +} + +type ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackendBackendType string + +const ( + ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackendBackendTypeRedshift ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackendBackendType = "redshift" +) + +func (r ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackendBackendTypeRedshift: + return true + } + return false +} + +type ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON projectInferencePipelineNewResponseDataBackendRedshiftDataBackendConfigJSON `json:"-"` +} + +// projectInferencePipelineNewResponseDataBackendRedshiftDataBackendConfigJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackendConfig] +type projectInferencePipelineNewResponseDataBackendRedshiftDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineNewResponseDataBackendRedshiftDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineNewResponseDataBackendRedshiftDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type ProjectInferencePipelineNewResponseDataBackendPostgresDataBackend struct { + BackendType ProjectInferencePipelineNewResponseDataBackendPostgresDataBackendBackendType `json:"backendType,required"` + Database string `json:"database,required"` + PostgresConnectionID string `json:"postgresConnectionId,required,nullable" format:"uuid"` + Schema string `json:"schema,required"` + Table string `json:"table,required,nullable"` + JSON projectInferencePipelineNewResponseDataBackendPostgresDataBackendJSON `json:"-"` +} + +// projectInferencePipelineNewResponseDataBackendPostgresDataBackendJSON contains +// the JSON metadata for the struct +// [ProjectInferencePipelineNewResponseDataBackendPostgresDataBackend] +type projectInferencePipelineNewResponseDataBackendPostgresDataBackendJSON struct { + BackendType apijson.Field + Database apijson.Field + PostgresConnectionID apijson.Field + Schema apijson.Field + Table apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineNewResponseDataBackendPostgresDataBackend) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectInferencePipelineNewResponseDataBackendBackendTypeJSON) RawJSON() string { +func (r projectInferencePipelineNewResponseDataBackendPostgresDataBackendJSON) RawJSON() string { return r.raw } -func (r ProjectInferencePipelineNewResponseDataBackendBackendType) implementsProjectInferencePipelineNewResponseDataBackend() { +func (r ProjectInferencePipelineNewResponseDataBackendPostgresDataBackend) implementsProjectInferencePipelineNewResponseDataBackend() { +} + +type ProjectInferencePipelineNewResponseDataBackendPostgresDataBackendBackendType string + +const ( + ProjectInferencePipelineNewResponseDataBackendPostgresDataBackendBackendTypePostgres ProjectInferencePipelineNewResponseDataBackendPostgresDataBackendBackendType = "postgres" +) + +func (r ProjectInferencePipelineNewResponseDataBackendPostgresDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineNewResponseDataBackendPostgresDataBackendBackendTypePostgres: + return true + } + return false +} + +type ProjectInferencePipelineNewResponseDataBackendPostgresDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON projectInferencePipelineNewResponseDataBackendPostgresDataBackendConfigJSON `json:"-"` +} + +// projectInferencePipelineNewResponseDataBackendPostgresDataBackendConfigJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineNewResponseDataBackendPostgresDataBackendConfig] +type projectInferencePipelineNewResponseDataBackendPostgresDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineNewResponseDataBackendPostgresDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineNewResponseDataBackendPostgresDataBackendConfigJSON) RawJSON() string { + return r.raw } -type ProjectInferencePipelineNewResponseDataBackendBackendTypeBackendType string +type ProjectInferencePipelineNewResponseDataBackendBackendType string const ( - ProjectInferencePipelineNewResponseDataBackendBackendTypeBackendTypeDefault ProjectInferencePipelineNewResponseDataBackendBackendTypeBackendType = "default" + ProjectInferencePipelineNewResponseDataBackendBackendTypeBigquery ProjectInferencePipelineNewResponseDataBackendBackendType = "bigquery" + ProjectInferencePipelineNewResponseDataBackendBackendTypeDefault ProjectInferencePipelineNewResponseDataBackendBackendType = "default" + ProjectInferencePipelineNewResponseDataBackendBackendTypeSnowflake ProjectInferencePipelineNewResponseDataBackendBackendType = "snowflake" + ProjectInferencePipelineNewResponseDataBackendBackendTypeDatabricksDtl ProjectInferencePipelineNewResponseDataBackendBackendType = "databricks_dtl" + ProjectInferencePipelineNewResponseDataBackendBackendTypeRedshift ProjectInferencePipelineNewResponseDataBackendBackendType = "redshift" + ProjectInferencePipelineNewResponseDataBackendBackendTypePostgres ProjectInferencePipelineNewResponseDataBackendBackendType = "postgres" ) -func (r ProjectInferencePipelineNewResponseDataBackendBackendTypeBackendType) IsKnown() bool { +func (r ProjectInferencePipelineNewResponseDataBackendBackendType) IsKnown() bool { switch r { - case ProjectInferencePipelineNewResponseDataBackendBackendTypeBackendTypeDefault: + case ProjectInferencePipelineNewResponseDataBackendBackendTypeBigquery, ProjectInferencePipelineNewResponseDataBackendBackendTypeDefault, ProjectInferencePipelineNewResponseDataBackendBackendTypeSnowflake, ProjectInferencePipelineNewResponseDataBackendBackendTypeDatabricksDtl, ProjectInferencePipelineNewResponseDataBackendBackendTypeRedshift, ProjectInferencePipelineNewResponseDataBackendBackendTypePostgres: return true } return false @@ -866,7 +1205,11 @@ type ProjectInferencePipelineListResponseItemsDataBackend struct { BackendType ProjectInferencePipelineListResponseItemsDataBackendBackendType `json:"backendType,required"` BigqueryConnectionID string `json:"bigqueryConnectionId,nullable" format:"uuid"` // This field can have the runtime type of - // [ProjectInferencePipelineListResponseItemsDataBackendObjectConfig]. + // [ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendConfig], + // [ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendConfig], + // [ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendConfig], + // [ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendConfig], + // [ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackendConfig]. Config interface{} `json:"config"` Database string `json:"database"` DatabricksDtlConnectionID string `json:"databricksDtlConnectionId,nullable" format:"uuid"` @@ -925,22 +1268,23 @@ func (r *ProjectInferencePipelineListResponseItemsDataBackend) UnmarshalJSON(dat // interface which you can cast to the specific types for more type safety. // // Possible runtime types of the union are -// [ProjectInferencePipelineListResponseItemsDataBackendObject], -// [ProjectInferencePipelineListResponseItemsDataBackendBackendType], -// [ProjectInferencePipelineListResponseItemsDataBackendObject], -// [ProjectInferencePipelineListResponseItemsDataBackendObject], -// [ProjectInferencePipelineListResponseItemsDataBackendObject], -// [ProjectInferencePipelineListResponseItemsDataBackendObject]. +// [ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackend], +// [ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackend], +// [ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackend], +// [ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackend], +// [ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackend], +// [ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackend]. func (r ProjectInferencePipelineListResponseItemsDataBackend) AsUnion() ProjectInferencePipelineListResponseItemsDataBackendUnion { return r.union } -// Union satisfied by [ProjectInferencePipelineListResponseItemsDataBackendObject], -// [ProjectInferencePipelineListResponseItemsDataBackendBackendType], -// [ProjectInferencePipelineListResponseItemsDataBackendObject], -// [ProjectInferencePipelineListResponseItemsDataBackendObject], -// [ProjectInferencePipelineListResponseItemsDataBackendObject] or -// [ProjectInferencePipelineListResponseItemsDataBackendObject]. +// Union satisfied by +// [ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackend], +// [ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackend], +// [ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackend], +// [ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackend], +// [ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackend] or +// [ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackend]. type ProjectInferencePipelineListResponseItemsDataBackendUnion interface { implementsProjectInferencePipelineListResponseItemsDataBackend() } @@ -951,45 +1295,45 @@ func init() { "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectInferencePipelineListResponseItemsDataBackendObject{}), + Type: reflect.TypeOf(ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectInferencePipelineListResponseItemsDataBackendBackendType{}), + Type: reflect.TypeOf(ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectInferencePipelineListResponseItemsDataBackendObject{}), + Type: reflect.TypeOf(ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectInferencePipelineListResponseItemsDataBackendObject{}), + Type: reflect.TypeOf(ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectInferencePipelineListResponseItemsDataBackendObject{}), + Type: reflect.TypeOf(ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackend{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectInferencePipelineListResponseItemsDataBackendObject{}), + Type: reflect.TypeOf(ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackend{}), }, ) } -type ProjectInferencePipelineListResponseItemsDataBackendObject struct { - BackendType ProjectInferencePipelineListResponseItemsDataBackendObjectBackendType `json:"backendType,required"` - BigqueryConnectionID string `json:"bigqueryConnectionId,required,nullable" format:"uuid"` - DatasetID string `json:"datasetId,required"` - ProjectID string `json:"projectId,required"` - TableID string `json:"tableId,required,nullable"` - PartitionType ProjectInferencePipelineListResponseItemsDataBackendObjectPartitionType `json:"partitionType,nullable"` - JSON projectInferencePipelineListResponseItemsDataBackendObjectJSON `json:"-"` +type ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackend struct { + BackendType ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendBackendType `json:"backendType,required"` + BigqueryConnectionID string `json:"bigqueryConnectionId,required,nullable" format:"uuid"` + DatasetID string `json:"datasetId,required"` + ProjectID string `json:"projectId,required"` + TableID string `json:"tableId,required,nullable"` + PartitionType ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendPartitionType `json:"partitionType,nullable"` + JSON projectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendJSON `json:"-"` } -// projectInferencePipelineListResponseItemsDataBackendObjectJSON contains the JSON -// metadata for the struct -// [ProjectInferencePipelineListResponseItemsDataBackendObject] -type projectInferencePipelineListResponseItemsDataBackendObjectJSON struct { +// projectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackend] +type projectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendJSON struct { BackendType apijson.Field BigqueryConnectionID apijson.Field DatasetID apijson.Field @@ -1000,32 +1344,32 @@ type projectInferencePipelineListResponseItemsDataBackendObjectJSON struct { ExtraFields map[string]apijson.Field } -func (r *ProjectInferencePipelineListResponseItemsDataBackendObject) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackend) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectInferencePipelineListResponseItemsDataBackendObjectJSON) RawJSON() string { +func (r projectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendJSON) RawJSON() string { return r.raw } -func (r ProjectInferencePipelineListResponseItemsDataBackendObject) implementsProjectInferencePipelineListResponseItemsDataBackend() { +func (r ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackend) implementsProjectInferencePipelineListResponseItemsDataBackend() { } -type ProjectInferencePipelineListResponseItemsDataBackendObjectBackendType string +type ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendBackendType string const ( - ProjectInferencePipelineListResponseItemsDataBackendObjectBackendTypeBigquery ProjectInferencePipelineListResponseItemsDataBackendObjectBackendType = "bigquery" + ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendBackendTypeBigquery ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendBackendType = "bigquery" ) -func (r ProjectInferencePipelineListResponseItemsDataBackendObjectBackendType) IsKnown() bool { +func (r ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendBackendType) IsKnown() bool { switch r { - case ProjectInferencePipelineListResponseItemsDataBackendObjectBackendTypeBigquery: + case ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendBackendTypeBigquery: return true } return false } -type ProjectInferencePipelineListResponseItemsDataBackendObjectConfig struct { +type ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendConfig struct { // Name of the column with the ground truths. GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` // Name of the column with human feedback. @@ -1034,14 +1378,14 @@ type ProjectInferencePipelineListResponseItemsDataBackendObjectConfig struct { LatencyColumnName string `json:"latencyColumnName,nullable"` // Name of the column with the timestamps. Timestamps must be in UNIX sec format. // If not provided, the upload timestamp is used. - TimestampColumnName string `json:"timestampColumnName,nullable"` - JSON projectInferencePipelineListResponseItemsDataBackendObjectConfigJSON `json:"-"` + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON projectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendConfigJSON `json:"-"` } -// projectInferencePipelineListResponseItemsDataBackendObjectConfigJSON contains -// the JSON metadata for the struct -// [ProjectInferencePipelineListResponseItemsDataBackendObjectConfig] -type projectInferencePipelineListResponseItemsDataBackendObjectConfigJSON struct { +// projectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendConfigJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendConfig] +type projectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendConfigJSON struct { GroundTruthColumnName apijson.Field HumanFeedbackColumnName apijson.Field LatencyColumnName apijson.Field @@ -1050,110 +1394,443 @@ type projectInferencePipelineListResponseItemsDataBackendObjectConfigJSON struct ExtraFields map[string]apijson.Field } -func (r *ProjectInferencePipelineListResponseItemsDataBackendObjectConfig) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectInferencePipelineListResponseItemsDataBackendObjectConfigJSON) RawJSON() string { +func (r projectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendConfigJSON) RawJSON() string { return r.raw } -type ProjectInferencePipelineListResponseItemsDataBackendObjectPartitionType string +type ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendPartitionType string const ( - ProjectInferencePipelineListResponseItemsDataBackendObjectPartitionTypeDay ProjectInferencePipelineListResponseItemsDataBackendObjectPartitionType = "DAY" - ProjectInferencePipelineListResponseItemsDataBackendObjectPartitionTypeMonth ProjectInferencePipelineListResponseItemsDataBackendObjectPartitionType = "MONTH" - ProjectInferencePipelineListResponseItemsDataBackendObjectPartitionTypeYear ProjectInferencePipelineListResponseItemsDataBackendObjectPartitionType = "YEAR" + ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendPartitionTypeDay ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendPartitionType = "DAY" + ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendPartitionTypeMonth ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendPartitionType = "MONTH" + ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendPartitionTypeYear ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendPartitionType = "YEAR" ) -func (r ProjectInferencePipelineListResponseItemsDataBackendObjectPartitionType) IsKnown() bool { +func (r ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendPartitionType) IsKnown() bool { switch r { - case ProjectInferencePipelineListResponseItemsDataBackendObjectPartitionTypeDay, ProjectInferencePipelineListResponseItemsDataBackendObjectPartitionTypeMonth, ProjectInferencePipelineListResponseItemsDataBackendObjectPartitionTypeYear: + case ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendPartitionTypeDay, ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendPartitionTypeMonth, ProjectInferencePipelineListResponseItemsDataBackendBigQueryDataBackendPartitionTypeYear: return true } return false } -type ProjectInferencePipelineListResponseItemsDataBackendBackendType struct { - BackendType ProjectInferencePipelineListResponseItemsDataBackendBackendTypeBackendType `json:"backendType,required"` - JSON projectInferencePipelineListResponseItemsDataBackendBackendTypeJSON `json:"-"` +type ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackend struct { + BackendType ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackendBackendType `json:"backendType,required"` + JSON projectInferencePipelineListResponseItemsDataBackendDefaultDataBackendJSON `json:"-"` } -// projectInferencePipelineListResponseItemsDataBackendBackendTypeJSON contains the -// JSON metadata for the struct -// [ProjectInferencePipelineListResponseItemsDataBackendBackendType] -type projectInferencePipelineListResponseItemsDataBackendBackendTypeJSON struct { +// projectInferencePipelineListResponseItemsDataBackendDefaultDataBackendJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackend] +type projectInferencePipelineListResponseItemsDataBackendDefaultDataBackendJSON struct { BackendType apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectInferencePipelineListResponseItemsDataBackendBackendType) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackend) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectInferencePipelineListResponseItemsDataBackendBackendTypeJSON) RawJSON() string { +func (r projectInferencePipelineListResponseItemsDataBackendDefaultDataBackendJSON) RawJSON() string { return r.raw } -func (r ProjectInferencePipelineListResponseItemsDataBackendBackendType) implementsProjectInferencePipelineListResponseItemsDataBackend() { +func (r ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackend) implementsProjectInferencePipelineListResponseItemsDataBackend() { } -type ProjectInferencePipelineListResponseItemsDataBackendBackendTypeBackendType string +type ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackendBackendType string const ( - ProjectInferencePipelineListResponseItemsDataBackendBackendTypeBackendTypeDefault ProjectInferencePipelineListResponseItemsDataBackendBackendTypeBackendType = "default" + ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackendBackendTypeDefault ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackendBackendType = "default" ) -func (r ProjectInferencePipelineListResponseItemsDataBackendBackendTypeBackendType) IsKnown() bool { +func (r ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackendBackendType) IsKnown() bool { switch r { - case ProjectInferencePipelineListResponseItemsDataBackendBackendTypeBackendTypeDefault: + case ProjectInferencePipelineListResponseItemsDataBackendDefaultDataBackendBackendTypeDefault: return true } return false } -type ProjectInferencePipelineListResponseItemsDataBackendPartitionType string +type ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackend struct { + BackendType ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendBackendType `json:"backendType,required"` + Database string `json:"database,required"` + Schema string `json:"schema,required"` + SnowflakeConnectionID string `json:"snowflakeConnectionId,required,nullable" format:"uuid"` + Table string `json:"table,required,nullable"` + JSON projectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendJSON `json:"-"` +} + +// projectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackend] +type projectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendJSON struct { + BackendType apijson.Field + Database apijson.Field + Schema apijson.Field + SnowflakeConnectionID apijson.Field + Table apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackend) implementsProjectInferencePipelineListResponseItemsDataBackend() { +} + +type ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendBackendType string const ( - ProjectInferencePipelineListResponseItemsDataBackendPartitionTypeDay ProjectInferencePipelineListResponseItemsDataBackendPartitionType = "DAY" - ProjectInferencePipelineListResponseItemsDataBackendPartitionTypeMonth ProjectInferencePipelineListResponseItemsDataBackendPartitionType = "MONTH" - ProjectInferencePipelineListResponseItemsDataBackendPartitionTypeYear ProjectInferencePipelineListResponseItemsDataBackendPartitionType = "YEAR" + ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendBackendTypeSnowflake ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendBackendType = "snowflake" ) -func (r ProjectInferencePipelineListResponseItemsDataBackendPartitionType) IsKnown() bool { +func (r ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendBackendType) IsKnown() bool { switch r { - case ProjectInferencePipelineListResponseItemsDataBackendPartitionTypeDay, ProjectInferencePipelineListResponseItemsDataBackendPartitionTypeMonth, ProjectInferencePipelineListResponseItemsDataBackendPartitionTypeYear: + case ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendBackendTypeSnowflake: return true } return false } -type ProjectInferencePipelineListResponseItemsProject struct { - // The project id. - ID string `json:"id,required" format:"uuid"` - // The project creator id. - CreatorID string `json:"creatorId,required,nullable" format:"uuid"` - // The project creation date. - DateCreated time.Time `json:"dateCreated,required" format:"date-time"` - // The project last updated date. - DateUpdated time.Time `json:"dateUpdated,required" format:"date-time"` - // The number of tests in the development mode of the project. - DevelopmentGoalCount int64 `json:"developmentGoalCount,required"` - // The total number of tests in the project. - GoalCount int64 `json:"goalCount,required"` - // The number of inference pipelines in the project. - InferencePipelineCount int64 `json:"inferencePipelineCount,required"` - // Links to the project. - Links ProjectInferencePipelineListResponseItemsProjectLinks `json:"links,required"` - // The number of tests in the monitoring mode of the project. - MonitoringGoalCount int64 `json:"monitoringGoalCount,required"` - // The project name. - Name string `json:"name,required"` - // The source of the project. - Source ProjectInferencePipelineListResponseItemsProjectSource `json:"source,required,nullable"` - // The task type of the project. - TaskType ProjectInferencePipelineListResponseItemsProjectTaskType `json:"taskType,required"` +type ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON projectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendConfigJSON `json:"-"` +} + +// projectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendConfigJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendConfig] +type projectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineListResponseItemsDataBackendSnowflakeDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackend struct { + BackendType ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendBackendType `json:"backendType,required"` + DatabricksDtlConnectionID string `json:"databricksDtlConnectionId,required,nullable" format:"uuid"` + TableID string `json:"tableId,required,nullable"` + JSON projectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendJSON `json:"-"` +} + +// projectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackend] +type projectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendJSON struct { + BackendType apijson.Field + DatabricksDtlConnectionID apijson.Field + TableID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackend) implementsProjectInferencePipelineListResponseItemsDataBackend() { +} + +type ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendBackendType string + +const ( + ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendBackendTypeDatabricksDtl ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendBackendType = "databricks_dtl" +) + +func (r ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendBackendTypeDatabricksDtl: + return true + } + return false +} + +type ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON projectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendConfigJSON `json:"-"` +} + +// projectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendConfigJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendConfig] +type projectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineListResponseItemsDataBackendDatabricksDtlDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackend struct { + BackendType ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendBackendType `json:"backendType,required"` + RedshiftConnectionID string `json:"redshiftConnectionId,required,nullable" format:"uuid"` + SchemaName string `json:"schemaName,required"` + TableName string `json:"tableName,required"` + JSON projectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendJSON `json:"-"` +} + +// projectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackend] +type projectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendJSON struct { + BackendType apijson.Field + RedshiftConnectionID apijson.Field + SchemaName apijson.Field + TableName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackend) implementsProjectInferencePipelineListResponseItemsDataBackend() { +} + +type ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendBackendType string + +const ( + ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendBackendTypeRedshift ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendBackendType = "redshift" +) + +func (r ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendBackendTypeRedshift: + return true + } + return false +} + +type ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON projectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendConfigJSON `json:"-"` +} + +// projectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendConfigJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendConfig] +type projectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineListResponseItemsDataBackendRedshiftDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackend struct { + BackendType ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackendBackendType `json:"backendType,required"` + Database string `json:"database,required"` + PostgresConnectionID string `json:"postgresConnectionId,required,nullable" format:"uuid"` + Schema string `json:"schema,required"` + Table string `json:"table,required,nullable"` + JSON projectInferencePipelineListResponseItemsDataBackendPostgresDataBackendJSON `json:"-"` +} + +// projectInferencePipelineListResponseItemsDataBackendPostgresDataBackendJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackend] +type projectInferencePipelineListResponseItemsDataBackendPostgresDataBackendJSON struct { + BackendType apijson.Field + Database apijson.Field + PostgresConnectionID apijson.Field + Schema apijson.Field + Table apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackend) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineListResponseItemsDataBackendPostgresDataBackendJSON) RawJSON() string { + return r.raw +} + +func (r ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackend) implementsProjectInferencePipelineListResponseItemsDataBackend() { +} + +type ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackendBackendType string + +const ( + ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackendBackendTypePostgres ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackendBackendType = "postgres" +) + +func (r ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackendBackendTypePostgres: + return true + } + return false +} + +type ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName string `json:"groundTruthColumnName,nullable"` + // Name of the column with human feedback. + HumanFeedbackColumnName string `json:"humanFeedbackColumnName,nullable"` + // Name of the column with the latencies. + LatencyColumnName string `json:"latencyColumnName,nullable"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName string `json:"timestampColumnName,nullable"` + JSON projectInferencePipelineListResponseItemsDataBackendPostgresDataBackendConfigJSON `json:"-"` +} + +// projectInferencePipelineListResponseItemsDataBackendPostgresDataBackendConfigJSON +// contains the JSON metadata for the struct +// [ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackendConfig] +type projectInferencePipelineListResponseItemsDataBackendPostgresDataBackendConfigJSON struct { + GroundTruthColumnName apijson.Field + HumanFeedbackColumnName apijson.Field + LatencyColumnName apijson.Field + TimestampColumnName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectInferencePipelineListResponseItemsDataBackendPostgresDataBackendConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectInferencePipelineListResponseItemsDataBackendPostgresDataBackendConfigJSON) RawJSON() string { + return r.raw +} + +type ProjectInferencePipelineListResponseItemsDataBackendBackendType string + +const ( + ProjectInferencePipelineListResponseItemsDataBackendBackendTypeBigquery ProjectInferencePipelineListResponseItemsDataBackendBackendType = "bigquery" + ProjectInferencePipelineListResponseItemsDataBackendBackendTypeDefault ProjectInferencePipelineListResponseItemsDataBackendBackendType = "default" + ProjectInferencePipelineListResponseItemsDataBackendBackendTypeSnowflake ProjectInferencePipelineListResponseItemsDataBackendBackendType = "snowflake" + ProjectInferencePipelineListResponseItemsDataBackendBackendTypeDatabricksDtl ProjectInferencePipelineListResponseItemsDataBackendBackendType = "databricks_dtl" + ProjectInferencePipelineListResponseItemsDataBackendBackendTypeRedshift ProjectInferencePipelineListResponseItemsDataBackendBackendType = "redshift" + ProjectInferencePipelineListResponseItemsDataBackendBackendTypePostgres ProjectInferencePipelineListResponseItemsDataBackendBackendType = "postgres" +) + +func (r ProjectInferencePipelineListResponseItemsDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineListResponseItemsDataBackendBackendTypeBigquery, ProjectInferencePipelineListResponseItemsDataBackendBackendTypeDefault, ProjectInferencePipelineListResponseItemsDataBackendBackendTypeSnowflake, ProjectInferencePipelineListResponseItemsDataBackendBackendTypeDatabricksDtl, ProjectInferencePipelineListResponseItemsDataBackendBackendTypeRedshift, ProjectInferencePipelineListResponseItemsDataBackendBackendTypePostgres: + return true + } + return false +} + +type ProjectInferencePipelineListResponseItemsDataBackendPartitionType string + +const ( + ProjectInferencePipelineListResponseItemsDataBackendPartitionTypeDay ProjectInferencePipelineListResponseItemsDataBackendPartitionType = "DAY" + ProjectInferencePipelineListResponseItemsDataBackendPartitionTypeMonth ProjectInferencePipelineListResponseItemsDataBackendPartitionType = "MONTH" + ProjectInferencePipelineListResponseItemsDataBackendPartitionTypeYear ProjectInferencePipelineListResponseItemsDataBackendPartitionType = "YEAR" +) + +func (r ProjectInferencePipelineListResponseItemsDataBackendPartitionType) IsKnown() bool { + switch r { + case ProjectInferencePipelineListResponseItemsDataBackendPartitionTypeDay, ProjectInferencePipelineListResponseItemsDataBackendPartitionTypeMonth, ProjectInferencePipelineListResponseItemsDataBackendPartitionTypeYear: + return true + } + return false +} + +type ProjectInferencePipelineListResponseItemsProject struct { + // The project id. + ID string `json:"id,required" format:"uuid"` + // The project creator id. + CreatorID string `json:"creatorId,required,nullable" format:"uuid"` + // The project creation date. + DateCreated time.Time `json:"dateCreated,required" format:"date-time"` + // The project last updated date. + DateUpdated time.Time `json:"dateUpdated,required" format:"date-time"` + // The number of tests in the development mode of the project. + DevelopmentGoalCount int64 `json:"developmentGoalCount,required"` + // The total number of tests in the project. + GoalCount int64 `json:"goalCount,required"` + // The number of inference pipelines in the project. + InferencePipelineCount int64 `json:"inferencePipelineCount,required"` + // Links to the project. + Links ProjectInferencePipelineListResponseItemsProjectLinks `json:"links,required"` + // The number of tests in the monitoring mode of the project. + MonitoringGoalCount int64 `json:"monitoringGoalCount,required"` + // The project name. + Name string `json:"name,required"` + // The source of the project. + Source ProjectInferencePipelineListResponseItemsProjectSource `json:"source,required,nullable"` + // The task type of the project. + TaskType ProjectInferencePipelineListResponseItemsProjectTaskType `json:"taskType,required"` // The number of versions (commits) in the project. VersionCount int64 `json:"versionCount,required"` // The workspace id. @@ -1444,49 +2121,49 @@ func (r ProjectInferencePipelineNewParamsDataBackend) MarshalJSON() (data []byte func (r ProjectInferencePipelineNewParamsDataBackend) implementsProjectInferencePipelineNewParamsDataBackendUnion() { } -// Satisfied by [ProjectInferencePipelineNewParamsDataBackendObject], -// [ProjectInferencePipelineNewParamsDataBackendBackendType], -// [ProjectInferencePipelineNewParamsDataBackendObject], -// [ProjectInferencePipelineNewParamsDataBackendObject], -// [ProjectInferencePipelineNewParamsDataBackendObject], -// [ProjectInferencePipelineNewParamsDataBackendObject], +// Satisfied by [ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackend], +// [ProjectInferencePipelineNewParamsDataBackendDefaultDataBackend], +// [ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackend], +// [ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackend], +// [ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackend], +// [ProjectInferencePipelineNewParamsDataBackendPostgresDataBackend], // [ProjectInferencePipelineNewParamsDataBackend]. type ProjectInferencePipelineNewParamsDataBackendUnion interface { implementsProjectInferencePipelineNewParamsDataBackendUnion() } -type ProjectInferencePipelineNewParamsDataBackendObject struct { - BackendType param.Field[ProjectInferencePipelineNewParamsDataBackendObjectBackendType] `json:"backendType,required"` - BigqueryConnectionID param.Field[string] `json:"bigqueryConnectionId,required" format:"uuid"` - Config param.Field[ProjectInferencePipelineNewParamsDataBackendObjectConfig] `json:"config,required"` - DatasetID param.Field[string] `json:"datasetId,required"` - ProjectID param.Field[string] `json:"projectId,required"` - TableID param.Field[string] `json:"tableId,required"` - PartitionType param.Field[ProjectInferencePipelineNewParamsDataBackendObjectPartitionType] `json:"partitionType"` +type ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackend struct { + BackendType param.Field[ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendBackendType] `json:"backendType,required"` + BigqueryConnectionID param.Field[string] `json:"bigqueryConnectionId,required" format:"uuid"` + Config param.Field[ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendConfig] `json:"config,required"` + DatasetID param.Field[string] `json:"datasetId,required"` + ProjectID param.Field[string] `json:"projectId,required"` + TableID param.Field[string] `json:"tableId,required"` + PartitionType param.Field[ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionType] `json:"partitionType"` } -func (r ProjectInferencePipelineNewParamsDataBackendObject) MarshalJSON() (data []byte, err error) { +func (r ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackend) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r ProjectInferencePipelineNewParamsDataBackendObject) implementsProjectInferencePipelineNewParamsDataBackendUnion() { +func (r ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackend) implementsProjectInferencePipelineNewParamsDataBackendUnion() { } -type ProjectInferencePipelineNewParamsDataBackendObjectBackendType string +type ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendBackendType string const ( - ProjectInferencePipelineNewParamsDataBackendObjectBackendTypeBigquery ProjectInferencePipelineNewParamsDataBackendObjectBackendType = "bigquery" + ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendBackendTypeBigquery ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendBackendType = "bigquery" ) -func (r ProjectInferencePipelineNewParamsDataBackendObjectBackendType) IsKnown() bool { +func (r ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendBackendType) IsKnown() bool { switch r { - case ProjectInferencePipelineNewParamsDataBackendObjectBackendTypeBigquery: + case ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendBackendTypeBigquery: return true } return false } -type ProjectInferencePipelineNewParamsDataBackendObjectConfig struct { +type ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendConfig struct { // Name of the column with the ground truths. GroundTruthColumnName param.Field[string] `json:"groundTruthColumnName"` // Name of the column with human feedback. @@ -1502,46 +2179,262 @@ type ProjectInferencePipelineNewParamsDataBackendObjectConfig struct { TimestampColumnName param.Field[string] `json:"timestampColumnName"` } -func (r ProjectInferencePipelineNewParamsDataBackendObjectConfig) MarshalJSON() (data []byte, err error) { +func (r ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionType string + +const ( + ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionTypeDay ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionType = "DAY" + ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionTypeMonth ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionType = "MONTH" + ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionTypeYear ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionType = "YEAR" +) + +func (r ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionType) IsKnown() bool { + switch r { + case ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionTypeDay, ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionTypeMonth, ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionTypeYear: + return true + } + return false +} + +type ProjectInferencePipelineNewParamsDataBackendDefaultDataBackend struct { + BackendType param.Field[ProjectInferencePipelineNewParamsDataBackendDefaultDataBackendBackendType] `json:"backendType,required"` +} + +func (r ProjectInferencePipelineNewParamsDataBackendDefaultDataBackend) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -type ProjectInferencePipelineNewParamsDataBackendObjectPartitionType string +func (r ProjectInferencePipelineNewParamsDataBackendDefaultDataBackend) implementsProjectInferencePipelineNewParamsDataBackendUnion() { +} + +type ProjectInferencePipelineNewParamsDataBackendDefaultDataBackendBackendType string const ( - ProjectInferencePipelineNewParamsDataBackendObjectPartitionTypeDay ProjectInferencePipelineNewParamsDataBackendObjectPartitionType = "DAY" - ProjectInferencePipelineNewParamsDataBackendObjectPartitionTypeMonth ProjectInferencePipelineNewParamsDataBackendObjectPartitionType = "MONTH" - ProjectInferencePipelineNewParamsDataBackendObjectPartitionTypeYear ProjectInferencePipelineNewParamsDataBackendObjectPartitionType = "YEAR" + ProjectInferencePipelineNewParamsDataBackendDefaultDataBackendBackendTypeDefault ProjectInferencePipelineNewParamsDataBackendDefaultDataBackendBackendType = "default" ) -func (r ProjectInferencePipelineNewParamsDataBackendObjectPartitionType) IsKnown() bool { +func (r ProjectInferencePipelineNewParamsDataBackendDefaultDataBackendBackendType) IsKnown() bool { switch r { - case ProjectInferencePipelineNewParamsDataBackendObjectPartitionTypeDay, ProjectInferencePipelineNewParamsDataBackendObjectPartitionTypeMonth, ProjectInferencePipelineNewParamsDataBackendObjectPartitionTypeYear: + case ProjectInferencePipelineNewParamsDataBackendDefaultDataBackendBackendTypeDefault: return true } return false } -type ProjectInferencePipelineNewParamsDataBackendBackendType struct { - BackendType param.Field[ProjectInferencePipelineNewParamsDataBackendBackendTypeBackendType] `json:"backendType,required"` +type ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackend struct { + BackendType param.Field[ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackendBackendType] `json:"backendType,required"` + Config param.Field[ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackendConfig] `json:"config,required"` + Database param.Field[string] `json:"database,required"` + Schema param.Field[string] `json:"schema,required"` + SnowflakeConnectionID param.Field[string] `json:"snowflakeConnectionId,required" format:"uuid"` + Table param.Field[string] `json:"table,required"` } -func (r ProjectInferencePipelineNewParamsDataBackendBackendType) MarshalJSON() (data []byte, err error) { +func (r ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackend) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r ProjectInferencePipelineNewParamsDataBackendBackendType) implementsProjectInferencePipelineNewParamsDataBackendUnion() { +func (r ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackend) implementsProjectInferencePipelineNewParamsDataBackendUnion() { +} + +type ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackendBackendType string + +const ( + ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackendBackendTypeSnowflake ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackendBackendType = "snowflake" +) + +func (r ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackendBackendTypeSnowflake: + return true + } + return false +} + +type ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName param.Field[string] `json:"groundTruthColumnName"` + // Name of the column with human feedback. + HumanFeedbackColumnName param.Field[string] `json:"humanFeedbackColumnName"` + // Name of the column with the inference ids. This is useful if you want to update + // rows at a later point in time. If not provided, a unique id is generated by + // Openlayer. + InferenceIDColumnName param.Field[string] `json:"inferenceIdColumnName"` + // Name of the column with the latencies. + LatencyColumnName param.Field[string] `json:"latencyColumnName"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName param.Field[string] `json:"timestampColumnName"` +} + +func (r ProjectInferencePipelineNewParamsDataBackendSnowflakeDataBackendConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackend struct { + BackendType param.Field[ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackendBackendType] `json:"backendType,required"` + Config param.Field[ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackendConfig] `json:"config,required"` + DatabricksDtlConnectionID param.Field[string] `json:"databricksDtlConnectionId,required" format:"uuid"` + TableID param.Field[string] `json:"tableId,required"` +} + +func (r ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackend) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackend) implementsProjectInferencePipelineNewParamsDataBackendUnion() { +} + +type ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackendBackendType string + +const ( + ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackendBackendTypeDatabricksDtl ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackendBackendType = "databricks_dtl" +) + +func (r ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackendBackendTypeDatabricksDtl: + return true + } + return false +} + +type ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName param.Field[string] `json:"groundTruthColumnName"` + // Name of the column with human feedback. + HumanFeedbackColumnName param.Field[string] `json:"humanFeedbackColumnName"` + // Name of the column with the inference ids. This is useful if you want to update + // rows at a later point in time. If not provided, a unique id is generated by + // Openlayer. + InferenceIDColumnName param.Field[string] `json:"inferenceIdColumnName"` + // Name of the column with the latencies. + LatencyColumnName param.Field[string] `json:"latencyColumnName"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName param.Field[string] `json:"timestampColumnName"` +} + +func (r ProjectInferencePipelineNewParamsDataBackendDatabricksDtlDataBackendConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackend struct { + BackendType param.Field[ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackendBackendType] `json:"backendType,required"` + Config param.Field[ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackendConfig] `json:"config,required"` + RedshiftConnectionID param.Field[string] `json:"redshiftConnectionId,required" format:"uuid"` + SchemaName param.Field[string] `json:"schemaName,required"` + TableName param.Field[string] `json:"tableName,required"` +} + +func (r ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackend) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackend) implementsProjectInferencePipelineNewParamsDataBackendUnion() { +} + +type ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackendBackendType string + +const ( + ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackendBackendTypeRedshift ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackendBackendType = "redshift" +) + +func (r ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackendBackendTypeRedshift: + return true + } + return false +} + +type ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName param.Field[string] `json:"groundTruthColumnName"` + // Name of the column with human feedback. + HumanFeedbackColumnName param.Field[string] `json:"humanFeedbackColumnName"` + // Name of the column with the inference ids. This is useful if you want to update + // rows at a later point in time. If not provided, a unique id is generated by + // Openlayer. + InferenceIDColumnName param.Field[string] `json:"inferenceIdColumnName"` + // Name of the column with the latencies. + LatencyColumnName param.Field[string] `json:"latencyColumnName"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName param.Field[string] `json:"timestampColumnName"` +} + +func (r ProjectInferencePipelineNewParamsDataBackendRedshiftDataBackendConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type ProjectInferencePipelineNewParamsDataBackendPostgresDataBackend struct { + BackendType param.Field[ProjectInferencePipelineNewParamsDataBackendPostgresDataBackendBackendType] `json:"backendType,required"` + Config param.Field[ProjectInferencePipelineNewParamsDataBackendPostgresDataBackendConfig] `json:"config,required"` + Database param.Field[string] `json:"database,required"` + PostgresConnectionID param.Field[string] `json:"postgresConnectionId,required" format:"uuid"` + Schema param.Field[string] `json:"schema,required"` + Table param.Field[string] `json:"table,required"` +} + +func (r ProjectInferencePipelineNewParamsDataBackendPostgresDataBackend) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r ProjectInferencePipelineNewParamsDataBackendPostgresDataBackend) implementsProjectInferencePipelineNewParamsDataBackendUnion() { +} + +type ProjectInferencePipelineNewParamsDataBackendPostgresDataBackendBackendType string + +const ( + ProjectInferencePipelineNewParamsDataBackendPostgresDataBackendBackendTypePostgres ProjectInferencePipelineNewParamsDataBackendPostgresDataBackendBackendType = "postgres" +) + +func (r ProjectInferencePipelineNewParamsDataBackendPostgresDataBackendBackendType) IsKnown() bool { + switch r { + case ProjectInferencePipelineNewParamsDataBackendPostgresDataBackendBackendTypePostgres: + return true + } + return false +} + +type ProjectInferencePipelineNewParamsDataBackendPostgresDataBackendConfig struct { + // Name of the column with the ground truths. + GroundTruthColumnName param.Field[string] `json:"groundTruthColumnName"` + // Name of the column with human feedback. + HumanFeedbackColumnName param.Field[string] `json:"humanFeedbackColumnName"` + // Name of the column with the inference ids. This is useful if you want to update + // rows at a later point in time. If not provided, a unique id is generated by + // Openlayer. + InferenceIDColumnName param.Field[string] `json:"inferenceIdColumnName"` + // Name of the column with the latencies. + LatencyColumnName param.Field[string] `json:"latencyColumnName"` + // Name of the column with the timestamps. Timestamps must be in UNIX sec format. + // If not provided, the upload timestamp is used. + TimestampColumnName param.Field[string] `json:"timestampColumnName"` +} + +func (r ProjectInferencePipelineNewParamsDataBackendPostgresDataBackendConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -type ProjectInferencePipelineNewParamsDataBackendBackendTypeBackendType string +type ProjectInferencePipelineNewParamsDataBackendBackendType string const ( - ProjectInferencePipelineNewParamsDataBackendBackendTypeBackendTypeDefault ProjectInferencePipelineNewParamsDataBackendBackendTypeBackendType = "default" + ProjectInferencePipelineNewParamsDataBackendBackendTypeBigquery ProjectInferencePipelineNewParamsDataBackendBackendType = "bigquery" + ProjectInferencePipelineNewParamsDataBackendBackendTypeDefault ProjectInferencePipelineNewParamsDataBackendBackendType = "default" + ProjectInferencePipelineNewParamsDataBackendBackendTypeSnowflake ProjectInferencePipelineNewParamsDataBackendBackendType = "snowflake" + ProjectInferencePipelineNewParamsDataBackendBackendTypeDatabricksDtl ProjectInferencePipelineNewParamsDataBackendBackendType = "databricks_dtl" + ProjectInferencePipelineNewParamsDataBackendBackendTypeRedshift ProjectInferencePipelineNewParamsDataBackendBackendType = "redshift" + ProjectInferencePipelineNewParamsDataBackendBackendTypePostgres ProjectInferencePipelineNewParamsDataBackendBackendType = "postgres" ) -func (r ProjectInferencePipelineNewParamsDataBackendBackendTypeBackendType) IsKnown() bool { +func (r ProjectInferencePipelineNewParamsDataBackendBackendType) IsKnown() bool { switch r { - case ProjectInferencePipelineNewParamsDataBackendBackendTypeBackendTypeDefault: + case ProjectInferencePipelineNewParamsDataBackendBackendTypeBigquery, ProjectInferencePipelineNewParamsDataBackendBackendTypeDefault, ProjectInferencePipelineNewParamsDataBackendBackendTypeSnowflake, ProjectInferencePipelineNewParamsDataBackendBackendTypeDatabricksDtl, ProjectInferencePipelineNewParamsDataBackendBackendTypeRedshift, ProjectInferencePipelineNewParamsDataBackendBackendTypePostgres: return true } return false diff --git a/projectinferencepipeline_test.go b/projectinferencepipeline_test.go index 4c3e451..8484267 100644 --- a/projectinferencepipeline_test.go +++ b/projectinferencepipeline_test.go @@ -31,10 +31,10 @@ func TestProjectInferencePipelineNewWithOptionalParams(t *testing.T) { openlayer.ProjectInferencePipelineNewParams{ Description: openlayer.F("This pipeline is used for production."), Name: openlayer.F("production"), - DataBackend: openlayer.F[openlayer.ProjectInferencePipelineNewParamsDataBackendUnion](openlayer.ProjectInferencePipelineNewParamsDataBackendObject{ - BackendType: openlayer.F(openlayer.ProjectInferencePipelineNewParamsDataBackendObjectBackendTypeBigquery), + DataBackend: openlayer.F[openlayer.ProjectInferencePipelineNewParamsDataBackendUnion](openlayer.ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackend{ + BackendType: openlayer.F(openlayer.ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendBackendTypeBigquery), BigqueryConnectionID: openlayer.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), - Config: openlayer.F(openlayer.ProjectInferencePipelineNewParamsDataBackendObjectConfig{ + Config: openlayer.F(openlayer.ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendConfig{ GroundTruthColumnName: openlayer.F("ground_truth"), HumanFeedbackColumnName: openlayer.F("human_feedback"), InferenceIDColumnName: openlayer.F("id"), @@ -44,7 +44,7 @@ func TestProjectInferencePipelineNewWithOptionalParams(t *testing.T) { DatasetID: openlayer.F("my-dataset"), ProjectID: openlayer.F("my-project"), TableID: openlayer.F("my-table"), - PartitionType: openlayer.F(openlayer.ProjectInferencePipelineNewParamsDataBackendObjectPartitionTypeDay), + PartitionType: openlayer.F(openlayer.ProjectInferencePipelineNewParamsDataBackendBigQueryDataBackendPartitionTypeDay), }), Project: openlayer.F(openlayer.ProjectInferencePipelineNewParamsProject{ Name: openlayer.F("My Project"), diff --git a/workspaceinvite.go b/workspaceinvite.go index f657b9a..9f7038c 100644 --- a/workspaceinvite.go +++ b/workspaceinvite.go @@ -211,7 +211,6 @@ func (r workspaceInviteNewResponseItemsWorkspaceJSON) RawJSON() string { } type WorkspaceInviteListResponse struct { - Meta WorkspaceInviteListResponse_Meta `json:"_meta,required"` Items []WorkspaceInviteListResponseItem `json:"items,required"` JSON workspaceInviteListResponseJSON `json:"-"` } @@ -219,7 +218,6 @@ type WorkspaceInviteListResponse struct { // workspaceInviteListResponseJSON contains the JSON metadata for the struct // [WorkspaceInviteListResponse] type workspaceInviteListResponseJSON struct { - Meta apijson.Field Items apijson.Field raw string ExtraFields map[string]apijson.Field @@ -233,37 +231,6 @@ func (r workspaceInviteListResponseJSON) RawJSON() string { return r.raw } -type WorkspaceInviteListResponse_Meta struct { - // The current page. - Page int64 `json:"page,required"` - // The number of items per page. - PerPage int64 `json:"perPage,required"` - // The total number of items. - TotalItems int64 `json:"totalItems,required"` - // The total number of pages. - TotalPages int64 `json:"totalPages,required"` - JSON workspaceInviteListResponseMetaJSON `json:"-"` -} - -// workspaceInviteListResponseMetaJSON contains the JSON metadata for the struct -// [WorkspaceInviteListResponse_Meta] -type workspaceInviteListResponseMetaJSON struct { - Page apijson.Field - PerPage apijson.Field - TotalItems apijson.Field - TotalPages apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *WorkspaceInviteListResponse_Meta) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r workspaceInviteListResponseMetaJSON) RawJSON() string { - return r.raw -} - type WorkspaceInviteListResponseItem struct { // The invite id. ID string `json:"id,required" format:"uuid"`