forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
service_instance.go
45 lines (39 loc) · 1.23 KB
/
service_instance.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package models
type LastOperationFields struct {
Type string
State string
Description string
CreatedAt string
UpdatedAt string
}
type ServiceInstanceCreateRequest struct {
Name string `json:"name"`
SpaceGuid string `json:"space_guid"`
PlanGuid string `json:"service_plan_guid,omitempty"`
Params map[string]interface{} `json:"parameters,omitempty"`
Tags []string `json:"tags,omitempty"`
}
type ServiceInstanceUpdateRequest struct {
PlanGuid string `json:"service_plan_guid,omitempty"`
Params map[string]interface{} `json:"parameters,omitempty"`
Tags []string `json:"tags"`
}
type ServiceInstanceFields struct {
Guid string
Name string
LastOperation LastOperationFields
SysLogDrainUrl string
ApplicationNames []string
Params map[string]interface{}
DashboardUrl string
}
type ServiceInstance struct {
ServiceInstanceFields
ServiceBindings []ServiceBindingFields
ServiceKeys []ServiceKeyFields
ServicePlan ServicePlanFields
ServiceOffering ServiceOfferingFields
}
func (inst ServiceInstance) IsUserProvided() bool {
return inst.ServicePlan.Guid == ""
}