public Recipes unmarshall(JsonUnmarshallerContext context) throws Exception { Recipes recipes = new Recipes(); if (context.testExpression("Setup", targetDepth)) { context.nextToken(); recipes.setSetup(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); recipes.setConfigure(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); recipes.setDeploy(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); recipes.setUndeploy(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); recipes.setShutdown(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSetup() == null) ? 0 : getSetup().hashCode()); hashCode = prime * hashCode + ((getConfigure() == null) ? 0 : getConfigure().hashCode()); hashCode = prime * hashCode + ((getDeploy() == null) ? 0 : getDeploy().hashCode()); hashCode = prime * hashCode + ((getUndeploy() == null) ? 0 : getUndeploy().hashCode()); hashCode = prime * hashCode + ((getShutdown() == null) ? 0 : getShutdown().hashCode()); return hashCode; }
Recipes customRecipes = new Recipes() .withConfigure(configureRecipes).withDeploy(deployRecipes) .withSetup(setupRecipes).withShutdown(shutdownRecipes) .withUndeploy(undeployRecipes); createLayerRequest.setCustomRecipes(customRecipes);
var Recipe = Backbone.Model.extend(); var Recipes = Backbone.Collection.extend({ model: Recipe, url: 'http://www.mocky.io/v2/56390090120000fa08a61a57', parse: function(response){ return response.results; } }); var recipes = new Recipes(); recipes.fetch().done(function(){ recipes.each(function(recipe){ /** Just demo of the fetched data */ $(document.body).append('<p>'+ recipe.get('name') +'</p>'); }); });
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLayerId() == null) ? 0 : getLayerId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getShortname() == null) ? 0 : getShortname().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getCloudWatchLogsConfiguration() == null) ? 0 : getCloudWatchLogsConfiguration().hashCode()); hashCode = prime * hashCode + ((getCustomInstanceProfileArn() == null) ? 0 : getCustomInstanceProfileArn().hashCode()); hashCode = prime * hashCode + ((getCustomJson() == null) ? 0 : getCustomJson().hashCode()); hashCode = prime * hashCode + ((getCustomSecurityGroupIds() == null) ? 0 : getCustomSecurityGroupIds().hashCode()); hashCode = prime * hashCode + ((getPackages() == null) ? 0 : getPackages().hashCode()); hashCode = prime * hashCode + ((getVolumeConfigurations() == null) ? 0 : getVolumeConfigurations().hashCode()); hashCode = prime * hashCode + ((getEnableAutoHealing() == null) ? 0 : getEnableAutoHealing().hashCode()); hashCode = prime * hashCode + ((getAutoAssignElasticIps() == null) ? 0 : getAutoAssignElasticIps().hashCode()); hashCode = prime * hashCode + ((getAutoAssignPublicIps() == null) ? 0 : getAutoAssignPublicIps().hashCode()); hashCode = prime * hashCode + ((getCustomRecipes() == null) ? 0 : getCustomRecipes().hashCode()); hashCode = prime * hashCode + ((getInstallUpdatesOnBoot() == null) ? 0 : getInstallUpdatesOnBoot().hashCode()); hashCode = prime * hashCode + ((getUseEbsOptimizedInstances() == null) ? 0 : getUseEbsOptimizedInstances().hashCode()); hashCode = prime * hashCode + ((getLifecycleEventConfiguration() == null) ? 0 : getLifecycleEventConfiguration().hashCode()); return hashCode; }
if (other.getDefaultRecipes() == null ^ this.getDefaultRecipes() == null) return false; if (other.getDefaultRecipes() != null && other.getDefaultRecipes().equals(this.getDefaultRecipes()) == false) return false; if (other.getCustomRecipes() == null ^ this.getCustomRecipes() == null) return false; if (other.getCustomRecipes() != null && other.getCustomRecipes().equals(this.getCustomRecipes()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
/** * <p> * An array of custom recipe names to be run following a <code>configure</code> event. * </p> * * @param configure * An array of custom recipe names to be run following a <code>configure</code> event. * @return Returns a reference to this object so that method calls can be chained together. */ public Recipes withConfigure(java.util.Collection<String> configure) { setConfigure(configure); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getShortname() == null) ? 0 : getShortname().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getCloudWatchLogsConfiguration() == null) ? 0 : getCloudWatchLogsConfiguration().hashCode()); hashCode = prime * hashCode + ((getCustomInstanceProfileArn() == null) ? 0 : getCustomInstanceProfileArn().hashCode()); hashCode = prime * hashCode + ((getCustomJson() == null) ? 0 : getCustomJson().hashCode()); hashCode = prime * hashCode + ((getCustomSecurityGroupIds() == null) ? 0 : getCustomSecurityGroupIds().hashCode()); hashCode = prime * hashCode + ((getPackages() == null) ? 0 : getPackages().hashCode()); hashCode = prime * hashCode + ((getVolumeConfigurations() == null) ? 0 : getVolumeConfigurations().hashCode()); hashCode = prime * hashCode + ((getEnableAutoHealing() == null) ? 0 : getEnableAutoHealing().hashCode()); hashCode = prime * hashCode + ((getAutoAssignElasticIps() == null) ? 0 : getAutoAssignElasticIps().hashCode()); hashCode = prime * hashCode + ((getAutoAssignPublicIps() == null) ? 0 : getAutoAssignPublicIps().hashCode()); hashCode = prime * hashCode + ((getCustomRecipes() == null) ? 0 : getCustomRecipes().hashCode()); hashCode = prime * hashCode + ((getInstallUpdatesOnBoot() == null) ? 0 : getInstallUpdatesOnBoot().hashCode()); hashCode = prime * hashCode + ((getUseEbsOptimizedInstances() == null) ? 0 : getUseEbsOptimizedInstances().hashCode()); hashCode = prime * hashCode + ((getLifecycleEventConfiguration() == null) ? 0 : getLifecycleEventConfiguration().hashCode()); return hashCode; }
if (other.getCustomRecipes() == null ^ this.getCustomRecipes() == null) return false; if (other.getCustomRecipes() != null && other.getCustomRecipes().equals(this.getCustomRecipes()) == false) return false; if (other.getInstallUpdatesOnBoot() == null ^ this.getInstallUpdatesOnBoot() == null)
/** * <p> * An array of custom recipe names to be run following a <code>configure</code> event. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setConfigure(java.util.Collection)} or {@link #withConfigure(java.util.Collection)} if you want to * override the existing values. * </p> * * @param configure * An array of custom recipe names to be run following a <code>configure</code> event. * @return Returns a reference to this object so that method calls can be chained together. */ public Recipes withConfigure(String... configure) { if (this.configure == null) { setConfigure(new com.amazonaws.internal.SdkInternalList<String>(configure.length)); } for (String ele : configure) { this.configure.add(ele); } return this; }
return false; Recipes other = (Recipes) obj; if (other.getSetup() == null ^ this.getSetup() == null) return false; if (other.getSetup() != null && other.getSetup().equals(this.getSetup()) == false) return false; if (other.getConfigure() == null ^ this.getConfigure() == null) return false; if (other.getConfigure() != null && other.getConfigure().equals(this.getConfigure()) == false) return false; if (other.getDeploy() == null ^ this.getDeploy() == null) return false; if (other.getDeploy() != null && other.getDeploy().equals(this.getDeploy()) == false) return false; if (other.getUndeploy() == null ^ this.getUndeploy() == null) return false; if (other.getUndeploy() != null && other.getUndeploy().equals(this.getUndeploy()) == false) return false; if (other.getShutdown() == null ^ this.getShutdown() == null) return false; if (other.getShutdown() != null && other.getShutdown().equals(this.getShutdown()) == false) return false; return true;
public Recipes unmarshall(JsonUnmarshallerContext context) throws Exception { Recipes recipes = new Recipes(); if (context.testExpression("Setup", targetDepth)) { context.nextToken(); recipes.setSetup(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); recipes.setConfigure(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); recipes.setDeploy(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); recipes.setUndeploy(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); recipes.setShutdown(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getLayerId() == null) ? 0 : getLayerId().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getShortname() == null) ? 0 : getShortname().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getCloudWatchLogsConfiguration() == null) ? 0 : getCloudWatchLogsConfiguration().hashCode()); hashCode = prime * hashCode + ((getCustomInstanceProfileArn() == null) ? 0 : getCustomInstanceProfileArn().hashCode()); hashCode = prime * hashCode + ((getCustomJson() == null) ? 0 : getCustomJson().hashCode()); hashCode = prime * hashCode + ((getCustomSecurityGroupIds() == null) ? 0 : getCustomSecurityGroupIds().hashCode()); hashCode = prime * hashCode + ((getDefaultSecurityGroupNames() == null) ? 0 : getDefaultSecurityGroupNames().hashCode()); hashCode = prime * hashCode + ((getPackages() == null) ? 0 : getPackages().hashCode()); hashCode = prime * hashCode + ((getVolumeConfigurations() == null) ? 0 : getVolumeConfigurations().hashCode()); hashCode = prime * hashCode + ((getEnableAutoHealing() == null) ? 0 : getEnableAutoHealing().hashCode()); hashCode = prime * hashCode + ((getAutoAssignElasticIps() == null) ? 0 : getAutoAssignElasticIps().hashCode()); hashCode = prime * hashCode + ((getAutoAssignPublicIps() == null) ? 0 : getAutoAssignPublicIps().hashCode()); hashCode = prime * hashCode + ((getDefaultRecipes() == null) ? 0 : getDefaultRecipes().hashCode()); hashCode = prime * hashCode + ((getCustomRecipes() == null) ? 0 : getCustomRecipes().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getInstallUpdatesOnBoot() == null) ? 0 : getInstallUpdatesOnBoot().hashCode()); hashCode = prime * hashCode + ((getUseEbsOptimizedInstances() == null) ? 0 : getUseEbsOptimizedInstances().hashCode()); hashCode = prime * hashCode + ((getLifecycleEventConfiguration() == null) ? 0 : getLifecycleEventConfiguration().hashCode()); return hashCode; }
if (other.getCustomRecipes() == null ^ this.getCustomRecipes() == null) return false; if (other.getCustomRecipes() != null && other.getCustomRecipes().equals(this.getCustomRecipes()) == false) return false; if (other.getInstallUpdatesOnBoot() == null ^ this.getInstallUpdatesOnBoot() == null)
/** * <p> * An array of custom recipe names to be run following a <code>configure</code> event. * </p> * * @param configure * An array of custom recipe names to be run following a <code>configure</code> event. * @return Returns a reference to this object so that method calls can be chained together. */ public Recipes withConfigure(java.util.Collection<String> configure) { setConfigure(configure); return this; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSetup() != null) sb.append("Setup: ").append(getSetup()).append(","); if (getConfigure() != null) sb.append("Configure: ").append(getConfigure()).append(","); if (getDeploy() != null) sb.append("Deploy: ").append(getDeploy()).append(","); if (getUndeploy() != null) sb.append("Undeploy: ").append(getUndeploy()).append(","); if (getShutdown() != null) sb.append("Shutdown: ").append(getShutdown()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getShortname() == null) ? 0 : getShortname().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getCloudWatchLogsConfiguration() == null) ? 0 : getCloudWatchLogsConfiguration().hashCode()); hashCode = prime * hashCode + ((getCustomInstanceProfileArn() == null) ? 0 : getCustomInstanceProfileArn().hashCode()); hashCode = prime * hashCode + ((getCustomJson() == null) ? 0 : getCustomJson().hashCode()); hashCode = prime * hashCode + ((getCustomSecurityGroupIds() == null) ? 0 : getCustomSecurityGroupIds().hashCode()); hashCode = prime * hashCode + ((getPackages() == null) ? 0 : getPackages().hashCode()); hashCode = prime * hashCode + ((getVolumeConfigurations() == null) ? 0 : getVolumeConfigurations().hashCode()); hashCode = prime * hashCode + ((getEnableAutoHealing() == null) ? 0 : getEnableAutoHealing().hashCode()); hashCode = prime * hashCode + ((getAutoAssignElasticIps() == null) ? 0 : getAutoAssignElasticIps().hashCode()); hashCode = prime * hashCode + ((getAutoAssignPublicIps() == null) ? 0 : getAutoAssignPublicIps().hashCode()); hashCode = prime * hashCode + ((getCustomRecipes() == null) ? 0 : getCustomRecipes().hashCode()); hashCode = prime * hashCode + ((getInstallUpdatesOnBoot() == null) ? 0 : getInstallUpdatesOnBoot().hashCode()); hashCode = prime * hashCode + ((getUseEbsOptimizedInstances() == null) ? 0 : getUseEbsOptimizedInstances().hashCode()); hashCode = prime * hashCode + ((getLifecycleEventConfiguration() == null) ? 0 : getLifecycleEventConfiguration().hashCode()); return hashCode; }
if (other.getCustomRecipes() == null ^ this.getCustomRecipes() == null) return false; if (other.getCustomRecipes() != null && other.getCustomRecipes().equals(this.getCustomRecipes()) == false) return false; if (other.getInstallUpdatesOnBoot() == null ^ this.getInstallUpdatesOnBoot() == null)
/** * <p> * An array of custom recipe names to be run following a <code>configure</code> event. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setConfigure(java.util.Collection)} or {@link #withConfigure(java.util.Collection)} if you want to * override the existing values. * </p> * * @param configure * An array of custom recipe names to be run following a <code>configure</code> event. * @return Returns a reference to this object so that method calls can be chained together. */ public Recipes withConfigure(String... configure) { if (this.configure == null) { setConfigure(new com.amazonaws.internal.SdkInternalList<String>(configure.length)); } for (String ele : configure) { this.configure.add(ele); } return this; }
/** * Marshall the given parameter object. */ public void marshall(Recipes recipes, ProtocolMarshaller protocolMarshaller) { if (recipes == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(recipes.getSetup(), SETUP_BINDING); protocolMarshaller.marshall(recipes.getConfigure(), CONFIGURE_BINDING); protocolMarshaller.marshall(recipes.getDeploy(), DEPLOY_BINDING); protocolMarshaller.marshall(recipes.getUndeploy(), UNDEPLOY_BINDING); protocolMarshaller.marshall(recipes.getShutdown(), SHUTDOWN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }