jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zack Shoylev <notificati...@github.com>
Subject Re: [jclouds-labs-openstack] Initial support for OpenStack Poppy Service API (#178)
Date Sat, 07 Feb 2015 02:42:35 GMT
I have a small counter-argument about the toBuilder that I have been struggling with: 
You have 2 types of domain objects: write and read. For example:
Flavor flavor = api.list().first(); // <-- Only generated by parsing service gson
api.create(CreateFlavor.builder().name("2").build()); // <-- Always generated by the user
using the builder
Specifically, you can't meaningfully do
Flavor flavor = api.list().first();
api.create(flavor.toBuilder().name("some new name").build()); // as the service will return
additional properties and the two domain objects are conceptually different.

Which is why I think this might be confusing. If you managed to follow that reasoning, I'd
like to hear some thoughts on it :) 

We should probably just provide it as it's an easy convenience method that might be useful
in some cases?

Reply to this email directly or view it on GitHub:
View raw message