code: func (vol *VolumeResource) MarshalJSON() ([]byte, error) {
  	if vol == nil {
  		return nil, nil
  	}
  	return json.Marshal(volumeResourceJSON{
  		vol.Name,
  		vol.VolumeConfig,
  		vol.GetCreatedAt(),
  		func() *VolumeStatus { desiredState := VolumeStatus(vol.GetDesiredStatus()); return &desiredState }(),
  		func() *VolumeStatus { knownState := VolumeStatus(vol.GetKnownStatus()); return &knownState }(),
  	})
  }
docs: // MarshalJSON marshals VolumeResource object using duplicate struct VolumeResourceJSON