nacx commented on this pull request.


> +import org.jclouds.json.SerializedNames;
+
+import com.google.auto.value.AutoValue;
+
+@AutoValue
+public abstract class LoadBalancerSKU {
+
+   public static enum LoadBalancerSKUName {
+      Basic, Standard, Unrecognized;
+
+      public static LoadBalancerSKUName fromValue(final String text) {
+         return (LoadBalancerSKUName) GetEnumValue.fromValueOrDefault(text, 
LoadBalancerSKUName.Unrecognized);
+      }
+   }
+
+   @Nullable

I don't think this is nullable. Can the only field in the object be null?

> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.azurecompute.arm.domain;
+
+import org.jclouds.azurecompute.arm.util.GetEnumValue;
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.json.SerializedNames;
+
+import com.google.auto.value.AutoValue;
+
+@AutoValue
+public abstract class LoadBalancerSKU {
+
+   public static enum LoadBalancerSKUName {

Just call it `Name` and reference it as `LoadBalancerSKU.Name`.

> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.azurecompute.arm.domain;
+
+import org.jclouds.azurecompute.arm.util.GetEnumValue;
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.json.SerializedNames;
+
+import com.google.auto.value.AutoValue;
+
+@AutoValue
+public abstract class PublicAddressSKU {
+
+   public static enum PublicIPAddressSkuName {

Same naming pattern as above.

> +import org.jclouds.json.SerializedNames;
+
+import com.google.auto.value.AutoValue;
+
+@AutoValue
+public abstract class PublicAddressSKU {
+
+   public static enum PublicIPAddressSkuName {
+      Basic, Standard, Unrecognized;
+
+      public static PublicIPAddressSkuName fromValue(final String text) {
+         return (PublicIPAddressSkuName) GetEnumValue.fromValueOrDefault(text, 
PublicIPAddressSkuName.Unrecognized);
+      }
+   }
+
+   @Nullable

Probably this is not nullable.

> @@ -68,7 +69,7 @@
    @MapBinder(BindToJsonPayload.class)
    LoadBalancer createOrUpdate(@PathParam("loadbalancername") String lbName,
          @PayloadParam("location") String location, @Nullable 
@PayloadParam("tags") Map<String, String> tags,
-         @PayloadParam("properties") LoadBalancerProperties properties);
+         @PayloadParam("properties") LoadBalancerProperties properties, 
@Nullable @PayloadParam("sku") LoadBalancerSKU sku);

Leave the properties parameter at the end. That is more aligned with the style 
of all other APIs and methods.

> @@ -66,9 +67,9 @@
    @MapBinder(BindToJsonPayload.class)
    @PUT
    PublicIPAddress createOrUpdate(@PathParam("publicipaddressname") String 
publicipaddressname,
-                                                 @PayloadParam("location") 
String location,
-                                                 @Nullable 
@PayloadParam("tags") Map<String, String> tags,
-                                                 @PayloadParam("properties") 
PublicIPAddressProperties properties);
+         @PayloadParam("location") String location, @Nullable 
@PayloadParam("tags") Map<String, String> tags,
+         @PayloadParam("properties") PublicIPAddressProperties properties,
+         @Nullable @PayloadParam("sku") PublicAddressSKU sku);

Same comment, keep the properties object at the end.

> @@ -0,0 +1,44 @@
+/*

You probably can embed this type in the LoadBalancer type. It only makes sense 
inside the LB and naming is more meaningful as you just do `LoadBalancer.SKU`. 
Up to you.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1264#pullrequestreview-185425295

Reply via email to