@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; }
public Layer unmarshall(JsonUnmarshallerContext context) throws Exception { Layer layer = new Layer(); if (context.testExpression("Arn", targetDepth)) { context.nextToken(); layer.setArn(context.getUnmarshaller(String.class).unmarshall(context)); layer.setStackId(context.getUnmarshaller(String.class).unmarshall(context)); layer.setLayerId(context.getUnmarshaller(String.class).unmarshall(context)); layer.setType(context.getUnmarshaller(String.class).unmarshall(context)); layer.setName(context.getUnmarshaller(String.class).unmarshall(context)); layer.setShortname(context.getUnmarshaller(String.class).unmarshall(context)); layer.setAttributes(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context.getUnmarshaller(String.class)) .unmarshall(context)); layer.setCloudWatchLogsConfiguration(CloudWatchLogsConfigurationJsonUnmarshaller.getInstance().unmarshall(context)); layer.setCustomInstanceProfileArn(context.getUnmarshaller(String.class).unmarshall(context)); layer.setCustomJson(context.getUnmarshaller(String.class).unmarshall(context)); layer.setCustomSecurityGroupIds(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); layer.setDefaultSecurityGroupNames(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
public Layer unmarshall(JsonUnmarshallerContext context) throws Exception { Layer layer = new Layer(); if (context.testExpression("Arn", targetDepth)) { context.nextToken(); layer.setArn(context.getUnmarshaller(String.class).unmarshall(context)); layer.setStackId(context.getUnmarshaller(String.class).unmarshall(context)); layer.setLayerId(context.getUnmarshaller(String.class).unmarshall(context)); layer.setType(context.getUnmarshaller(String.class).unmarshall(context)); layer.setName(context.getUnmarshaller(String.class).unmarshall(context)); layer.setShortname(context.getUnmarshaller(String.class).unmarshall(context)); layer.setAttributes(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context.getUnmarshaller(String.class)) .unmarshall(context)); layer.setCloudWatchLogsConfiguration(CloudWatchLogsConfigurationJsonUnmarshaller.getInstance().unmarshall(context)); layer.setCustomInstanceProfileArn(context.getUnmarshaller(String.class).unmarshall(context)); layer.setCustomJson(context.getUnmarshaller(String.class).unmarshall(context)); layer.setCustomSecurityGroupIds(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); layer.setDefaultSecurityGroupNames(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
return false; Layer other = (Layer) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getStackId() == null ^ this.getStackId() == null) return false; if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == false) return false; if (other.getLayerId() == null ^ this.getLayerId() == null) return false; if (other.getLayerId() != null && other.getLayerId().equals(this.getLayerId()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getShortname() == null ^ this.getShortname() == null) return false; if (other.getShortname() != null && other.getShortname().equals(this.getShortname()) == false) return false; if (other.getAttributes() == null ^ this.getAttributes() == null) return false; if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getStackId() != null) sb.append("StackId: ").append(getStackId()).append(","); if (getLayerId() != null) sb.append("LayerId: ").append(getLayerId()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getShortname() != null) sb.append("Shortname: ").append(getShortname()).append(","); if (getAttributes() != null) sb.append("Attributes: ").append(getAttributes()).append(","); if (getCloudWatchLogsConfiguration() != null) sb.append("CloudWatchLogsConfiguration: ").append(getCloudWatchLogsConfiguration()).append(","); if (getCustomInstanceProfileArn() != null) sb.append("CustomInstanceProfileArn: ").append(getCustomInstanceProfileArn()).append(","); if (getCustomJson() != null) sb.append("CustomJson: ").append(getCustomJson()).append(","); if (getCustomSecurityGroupIds() != null) sb.append("CustomSecurityGroupIds: ").append(getCustomSecurityGroupIds()).append(","); if (getDefaultSecurityGroupNames() != null) sb.append("DefaultSecurityGroupNames: ").append(getDefaultSecurityGroupNames()).append(","); if (getPackages() != null) sb.append("Packages: ").append(getPackages()).append(","); if (getVolumeConfigurations() != null)
protocolMarshaller.marshall(layer.getArn(), ARN_BINDING); protocolMarshaller.marshall(layer.getStackId(), STACKID_BINDING); protocolMarshaller.marshall(layer.getLayerId(), LAYERID_BINDING); protocolMarshaller.marshall(layer.getType(), TYPE_BINDING); protocolMarshaller.marshall(layer.getName(), NAME_BINDING); protocolMarshaller.marshall(layer.getShortname(), SHORTNAME_BINDING); protocolMarshaller.marshall(layer.getAttributes(), ATTRIBUTES_BINDING); protocolMarshaller.marshall(layer.getCloudWatchLogsConfiguration(), CLOUDWATCHLOGSCONFIGURATION_BINDING); protocolMarshaller.marshall(layer.getCustomInstanceProfileArn(), CUSTOMINSTANCEPROFILEARN_BINDING); protocolMarshaller.marshall(layer.getCustomJson(), CUSTOMJSON_BINDING); protocolMarshaller.marshall(layer.getCustomSecurityGroupIds(), CUSTOMSECURITYGROUPIDS_BINDING); protocolMarshaller.marshall(layer.getDefaultSecurityGroupNames(), DEFAULTSECURITYGROUPNAMES_BINDING); protocolMarshaller.marshall(layer.getPackages(), PACKAGES_BINDING); protocolMarshaller.marshall(layer.getVolumeConfigurations(), VOLUMECONFIGURATIONS_BINDING); protocolMarshaller.marshall(layer.getEnableAutoHealing(), ENABLEAUTOHEALING_BINDING); protocolMarshaller.marshall(layer.getAutoAssignElasticIps(), AUTOASSIGNELASTICIPS_BINDING); protocolMarshaller.marshall(layer.getAutoAssignPublicIps(), AUTOASSIGNPUBLICIPS_BINDING); protocolMarshaller.marshall(layer.getDefaultRecipes(), DEFAULTRECIPES_BINDING); protocolMarshaller.marshall(layer.getCustomRecipes(), CUSTOMRECIPES_BINDING); protocolMarshaller.marshall(layer.getCreatedAt(), CREATEDAT_BINDING); protocolMarshaller.marshall(layer.getInstallUpdatesOnBoot(), INSTALLUPDATESONBOOT_BINDING); protocolMarshaller.marshall(layer.getUseEbsOptimizedInstances(), USEEBSOPTIMIZEDINSTANCES_BINDING); protocolMarshaller.marshall(layer.getLifecycleEventConfiguration(), LIFECYCLEEVENTCONFIGURATION_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
@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; }
return false; Layer other = (Layer) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getStackId() == null ^ this.getStackId() == null) return false; if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == false) return false; if (other.getLayerId() == null ^ this.getLayerId() == null) return false; if (other.getLayerId() != null && other.getLayerId().equals(this.getLayerId()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getShortname() == null ^ this.getShortname() == null) return false; if (other.getShortname() != null && other.getShortname().equals(this.getShortname()) == false) return false; if (other.getAttributes() == null ^ this.getAttributes() == null) return false; if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getStackId() != null) sb.append("StackId: ").append(getStackId()).append(","); if (getLayerId() != null) sb.append("LayerId: ").append(getLayerId()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getShortname() != null) sb.append("Shortname: ").append(getShortname()).append(","); if (getAttributes() != null) sb.append("Attributes: ").append(getAttributes()).append(","); if (getCloudWatchLogsConfiguration() != null) sb.append("CloudWatchLogsConfiguration: ").append(getCloudWatchLogsConfiguration()).append(","); if (getCustomInstanceProfileArn() != null) sb.append("CustomInstanceProfileArn: ").append(getCustomInstanceProfileArn()).append(","); if (getCustomJson() != null) sb.append("CustomJson: ").append(getCustomJson()).append(","); if (getCustomSecurityGroupIds() != null) sb.append("CustomSecurityGroupIds: ").append(getCustomSecurityGroupIds()).append(","); if (getDefaultSecurityGroupNames() != null) sb.append("DefaultSecurityGroupNames: ").append(getDefaultSecurityGroupNames()).append(","); if (getPackages() != null) sb.append("Packages: ").append(getPackages()).append(","); if (getVolumeConfigurations() != null)
protocolMarshaller.marshall(layer.getArn(), ARN_BINDING); protocolMarshaller.marshall(layer.getStackId(), STACKID_BINDING); protocolMarshaller.marshall(layer.getLayerId(), LAYERID_BINDING); protocolMarshaller.marshall(layer.getType(), TYPE_BINDING); protocolMarshaller.marshall(layer.getName(), NAME_BINDING); protocolMarshaller.marshall(layer.getShortname(), SHORTNAME_BINDING); protocolMarshaller.marshall(layer.getAttributes(), ATTRIBUTES_BINDING); protocolMarshaller.marshall(layer.getCloudWatchLogsConfiguration(), CLOUDWATCHLOGSCONFIGURATION_BINDING); protocolMarshaller.marshall(layer.getCustomInstanceProfileArn(), CUSTOMINSTANCEPROFILEARN_BINDING); protocolMarshaller.marshall(layer.getCustomJson(), CUSTOMJSON_BINDING); protocolMarshaller.marshall(layer.getCustomSecurityGroupIds(), CUSTOMSECURITYGROUPIDS_BINDING); protocolMarshaller.marshall(layer.getDefaultSecurityGroupNames(), DEFAULTSECURITYGROUPNAMES_BINDING); protocolMarshaller.marshall(layer.getPackages(), PACKAGES_BINDING); protocolMarshaller.marshall(layer.getVolumeConfigurations(), VOLUMECONFIGURATIONS_BINDING); protocolMarshaller.marshall(layer.getEnableAutoHealing(), ENABLEAUTOHEALING_BINDING); protocolMarshaller.marshall(layer.getAutoAssignElasticIps(), AUTOASSIGNELASTICIPS_BINDING); protocolMarshaller.marshall(layer.getAutoAssignPublicIps(), AUTOASSIGNPUBLICIPS_BINDING); protocolMarshaller.marshall(layer.getDefaultRecipes(), DEFAULTRECIPES_BINDING); protocolMarshaller.marshall(layer.getCustomRecipes(), CUSTOMRECIPES_BINDING); protocolMarshaller.marshall(layer.getCreatedAt(), CREATEDAT_BINDING); protocolMarshaller.marshall(layer.getInstallUpdatesOnBoot(), INSTALLUPDATESONBOOT_BINDING); protocolMarshaller.marshall(layer.getUseEbsOptimizedInstances(), USEEBSOPTIMIZEDINSTANCES_BINDING); protocolMarshaller.marshall(layer.getLifecycleEventConfiguration(), LIFECYCLEEVENTCONFIGURATION_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);