2023-09-07 21:54:31 +00:00
|
|
|
package resources
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/databricks/cli/bundle/config/paths"
|
2023-10-16 06:56:06 +00:00
|
|
|
"github.com/databricks/databricks-sdk-go/marshal"
|
2023-09-07 21:54:31 +00:00
|
|
|
"github.com/databricks/databricks-sdk-go/service/serving"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ModelServingEndpoint struct {
|
|
|
|
// This represents the input args for terraform, and will get converted
|
|
|
|
// to a HCL representation for CRUD
|
|
|
|
*serving.CreateServingEndpoint
|
|
|
|
|
|
|
|
// This represents the id (ie serving_endpoint_id) that can be used
|
|
|
|
// as a reference in other resources. This value is returned by terraform.
|
|
|
|
ID string
|
|
|
|
|
2023-10-16 15:32:49 +00:00
|
|
|
// Path to config file where the resource is defined. All bundle resources
|
|
|
|
// include this for interpolation purposes.
|
2023-09-07 21:54:31 +00:00
|
|
|
paths.Paths
|
|
|
|
|
|
|
|
// This is a resource agnostic implementation of permissions for ACLs.
|
|
|
|
// Implementation could be different based on the resource type.
|
|
|
|
Permissions []Permission `json:"permissions,omitempty"`
|
|
|
|
}
|
2023-10-16 06:56:06 +00:00
|
|
|
|
|
|
|
func (s *ModelServingEndpoint) UnmarshalJSON(b []byte) error {
|
|
|
|
return marshal.Unmarshal(b, s)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s ModelServingEndpoint) MarshalJSON() ([]byte, error) {
|
|
|
|
return marshal.Marshal(s)
|
|
|
|
}
|