github.com/IBM-Cloud/bluemix-go@v0.0.0-20240423071914-9e96525baef4/models/resource_service_alias.go (about) 1 package models 2 3 import ( 4 "github.com/IBM-Cloud/bluemix-go/crn" 5 ) 6 7 type ServiceAlias struct { 8 ID string `json:"id"` 9 Name string `json:"name"` 10 ServiceInstanceID string `json:"resource_instance_id"` 11 ScopeCRN crn.CRN `json:"scope_crn"` 12 CRN crn.CRN `json:"crn"` 13 Tags []string `json:"tags,omitempty"` 14 Parameters map[string]interface{} `json:"parameters,omitempty"` // TODO: check whether the response contains the field 15 State string `json:"state"` 16 } 17 18 func (a ServiceAlias) ScopeSpaceID() string { 19 if a.ScopeCRN.ResourceType == crn.ResourceTypeCFSpace { 20 return a.ScopeCRN.Resource 21 } 22 return "" 23 }