github.com/lukasheimann/cloudfoundrycli@v7.1.0+incompatible/resources/service_plan_resource.go (about) 1 package resources 2 3 import "code.cloudfoundry.org/jsonry" 4 5 type ServicePlanCost struct { 6 Amount float64 `json:"amount"` 7 Currency string `json:"currency"` 8 Unit string `json:"unit"` 9 } 10 11 type ServicePlan struct { 12 // GUID is a unique service plan identifier. 13 GUID string `json:"guid"` 14 // Name is the name of the service plan. 15 Name string `json:"name"` 16 // Description of the Service Plan. 17 Description string `json:"description"` 18 // Whether the Service Plan is available 19 Available bool `json:"available"` 20 // VisibilityType can be "public", "admin", "organization" or "space" 21 VisibilityType ServicePlanVisibilityType `json:"visibility_type"` 22 // Free shows whether or not the Service Plan is free of charge. 23 Free bool `json:"free"` 24 // Cost shows the cost of a paid service plan 25 Costs []ServicePlanCost `json:"costs"` 26 // ServicePlanGUID is the GUID of the service offering 27 ServiceOfferingGUID string `jsonry:"relationships.service_offering.data.guid"` 28 // SpaceGUID is the space that a plan from a space-scoped broker relates to 29 SpaceGUID string `jsonry:"relationships.space.data.guid"` 30 31 Metadata *Metadata `json:"metadata"` 32 } 33 34 func (p *ServicePlan) UnmarshalJSON(data []byte) error { 35 return jsonry.Unmarshal(data, p) 36 }