github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/resources/route_binding.go (about)

     1  package resources
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/types"
     5  	"code.cloudfoundry.org/jsonry"
     6  )
     7  
     8  type RouteBinding struct {
     9  	GUID                string               `jsonry:"guid,omitempty"`
    10  	RouteServiceURL     string               `jsonry:"route_service_url,omitempty"`
    11  	ServiceInstanceGUID string               `jsonry:"relationships.service_instance.data.guid,omitempty"`
    12  	RouteGUID           string               `jsonry:"relationships.route.data.guid,omitempty"`
    13  	LastOperation       LastOperation        `jsonry:"last_operation"`
    14  	Parameters          types.OptionalObject `jsonry:"parameters"`
    15  }
    16  
    17  func (s RouteBinding) MarshalJSON() ([]byte, error) {
    18  	return jsonry.Marshal(s)
    19  }
    20  
    21  func (s *RouteBinding) UnmarshalJSON(data []byte) error {
    22  	return jsonry.Unmarshal(data, s)
    23  }