public Source unmarshall(JsonUnmarshallerContext context) throws Exception { Source source = new Source(); if (context.testExpression("Type", targetDepth)) { context.nextToken(); source.setType(context.getUnmarshaller(String.class).unmarshall(context)); source.setUrl(context.getUnmarshaller(String.class).unmarshall(context)); source.setUsername(context.getUnmarshaller(String.class).unmarshall(context)); source.setPassword(context.getUnmarshaller(String.class).unmarshall(context)); source.setSshKey(context.getUnmarshaller(String.class).unmarshall(context)); source.setRevision(context.getUnmarshaller(String.class).unmarshall(context));
/** * <p> * The repository type. * </p> * * @param type * The repository type. * @see SourceType */ public void setType(SourceType type) { withType(type); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getUrl() == null) ? 0 : getUrl().hashCode()); hashCode = prime * hashCode + ((getUsername() == null) ? 0 : getUsername().hashCode()); hashCode = prime * hashCode + ((getPassword() == null) ? 0 : getPassword().hashCode()); hashCode = prime * hashCode + ((getSshKey() == null) ? 0 : getSshKey().hashCode()); hashCode = prime * hashCode + ((getRevision() == null) ? 0 : getRevision().hashCode()); return hashCode; }
.withAttributes(attributes); if (repoType != null && repoUrl != null) { Source appSource = new Source().withType(repoType).withUrl(repoUrl) .withSshKey(repoSshKey).withRevision(repoRevision) .withPassword(repoPassword).withUsername(repoUsername); updateAppRequest.setAppSource(appSource);
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAppId() == null) ? 0 : getAppId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getDataSources() == null) ? 0 : getDataSources().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getAppSource() == null) ? 0 : getAppSource().hashCode()); hashCode = prime * hashCode + ((getDomains() == null) ? 0 : getDomains().hashCode()); hashCode = prime * hashCode + ((getEnableSsl() == null) ? 0 : getEnableSsl().hashCode()); hashCode = prime * hashCode + ((getSslConfiguration() == null) ? 0 : getSslConfiguration().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getEnvironment() == null) ? 0 : getEnvironment().hashCode()); return hashCode; }
if (other.getAppSource() == null ^ this.getAppSource() == null) return false; if (other.getAppSource() != null && other.getAppSource().equals(this.getAppSource()) == false) return false; if (other.getDomains() == null ^ this.getDomains() == null)
Source appSource = new Source().withType(repoType).withUrl(repoUrl) .withSshKey(repoSshKey).withRevision(repoRevision) .withPassword(repoPassword).withUsername(repoUsername); createAppRequest.setAppSource(appSource);
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getShortname() == null) ? 0 : getShortname().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getDataSources() == null) ? 0 : getDataSources().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getAppSource() == null) ? 0 : getAppSource().hashCode()); hashCode = prime * hashCode + ((getDomains() == null) ? 0 : getDomains().hashCode()); hashCode = prime * hashCode + ((getEnableSsl() == null) ? 0 : getEnableSsl().hashCode()); hashCode = prime * hashCode + ((getSslConfiguration() == null) ? 0 : getSslConfiguration().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getEnvironment() == null) ? 0 : getEnvironment().hashCode()); return hashCode; }
if (other.getAppSource() == null ^ this.getAppSource() == null) return false; if (other.getAppSource() != null && other.getAppSource().equals(this.getAppSource()) == false) return false; if (other.getDomains() == null ^ this.getDomains() == null)
return false; Source other = (Source) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getUrl() == null ^ this.getUrl() == null) return false; if (other.getUrl() != null && other.getUrl().equals(this.getUrl()) == false) return false; if (other.getUsername() == null ^ this.getUsername() == null) return false; if (other.getUsername() != null && other.getUsername().equals(this.getUsername()) == false) return false; if (other.getPassword() == null ^ this.getPassword() == null) return false; if (other.getPassword() != null && other.getPassword().equals(this.getPassword()) == false) return false; if (other.getSshKey() == null ^ this.getSshKey() == null) return false; if (other.getSshKey() != null && other.getSshKey().equals(this.getSshKey()) == false) return false; if (other.getRevision() == null ^ this.getRevision() == null) return false; if (other.getRevision() != null && other.getRevision().equals(this.getRevision()) == false) return false; return true;
Source customCookBookSource = new Source().withType(repoType) .withUrl(repoUrl).withSshKey(repoSshKey) .withRevision(repoRevision).withPassword(repoPassword) .withUsername(repoUsername); createStackRequest .setCustomCookbooksSource(customCookBookSource);
public Source unmarshall(JsonUnmarshallerContext context) throws Exception { Source source = new Source(); if (context.testExpression("Type", targetDepth)) { context.nextToken(); source.setType(context.getUnmarshaller(String.class).unmarshall(context)); source.setUrl(context.getUnmarshaller(String.class).unmarshall(context)); source.setUsername(context.getUnmarshaller(String.class).unmarshall(context)); source.setPassword(context.getUnmarshaller(String.class).unmarshall(context)); source.setSshKey(context.getUnmarshaller(String.class).unmarshall(context)); source.setRevision(context.getUnmarshaller(String.class).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAppId() == null) ? 0 : getAppId().hashCode()); hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getShortname() == null) ? 0 : getShortname().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getDataSources() == null) ? 0 : getDataSources().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getAppSource() == null) ? 0 : getAppSource().hashCode()); hashCode = prime * hashCode + ((getDomains() == null) ? 0 : getDomains().hashCode()); hashCode = prime * hashCode + ((getEnableSsl() == null) ? 0 : getEnableSsl().hashCode()); hashCode = prime * hashCode + ((getSslConfiguration() == null) ? 0 : getSslConfiguration().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getEnvironment() == null) ? 0 : getEnvironment().hashCode()); return hashCode; }
if (other.getAppSource() == null ^ this.getAppSource() == null) return false; if (other.getAppSource() != null && other.getAppSource().equals(this.getAppSource()) == false) return false; if (other.getDomains() == null ^ this.getDomains() == null)
/** * <p> * The repository type. * </p> * * @param type * The repository type. * @see SourceType */ public void setType(SourceType type) { withType(type); }
/** * 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 (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getUrl() != null) sb.append("Url: ").append(getUrl()).append(","); if (getUsername() != null) sb.append("Username: ").append(getUsername()).append(","); if (getPassword() != null) sb.append("Password: ").append(getPassword()).append(","); if (getSshKey() != null) sb.append("SshKey: ").append(getSshKey()).append(","); if (getRevision() != null) sb.append("Revision: ").append(getRevision()); 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 + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getServiceRoleArn() == null) ? 0 : getServiceRoleArn().hashCode()); hashCode = prime * hashCode + ((getDefaultInstanceProfileArn() == null) ? 0 : getDefaultInstanceProfileArn().hashCode()); hashCode = prime * hashCode + ((getDefaultOs() == null) ? 0 : getDefaultOs().hashCode()); hashCode = prime * hashCode + ((getHostnameTheme() == null) ? 0 : getHostnameTheme().hashCode()); hashCode = prime * hashCode + ((getDefaultAvailabilityZone() == null) ? 0 : getDefaultAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getDefaultSubnetId() == null) ? 0 : getDefaultSubnetId().hashCode()); hashCode = prime * hashCode + ((getCustomJson() == null) ? 0 : getCustomJson().hashCode()); hashCode = prime * hashCode + ((getConfigurationManager() == null) ? 0 : getConfigurationManager().hashCode()); hashCode = prime * hashCode + ((getChefConfiguration() == null) ? 0 : getChefConfiguration().hashCode()); hashCode = prime * hashCode + ((getUseCustomCookbooks() == null) ? 0 : getUseCustomCookbooks().hashCode()); hashCode = prime * hashCode + ((getCustomCookbooksSource() == null) ? 0 : getCustomCookbooksSource().hashCode()); hashCode = prime * hashCode + ((getDefaultSshKeyName() == null) ? 0 : getDefaultSshKeyName().hashCode()); hashCode = prime * hashCode + ((getDefaultRootDeviceType() == null) ? 0 : getDefaultRootDeviceType().hashCode()); hashCode = prime * hashCode + ((getUseOpsworksSecurityGroups() == null) ? 0 : getUseOpsworksSecurityGroups().hashCode()); hashCode = prime * hashCode + ((getAgentVersion() == null) ? 0 : getAgentVersion().hashCode()); return hashCode; }
if (other.getCustomCookbooksSource() == null ^ this.getCustomCookbooksSource() == null) return false; if (other.getCustomCookbooksSource() != null && other.getCustomCookbooksSource().equals(this.getCustomCookbooksSource()) == false) return false; if (other.getDefaultSshKeyName() == null ^ this.getDefaultSshKeyName() == null)
/** * Marshall the given parameter object. */ public void marshall(Source source, ProtocolMarshaller protocolMarshaller) { if (source == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(source.getType(), TYPE_BINDING); protocolMarshaller.marshall(source.getUrl(), URL_BINDING); protocolMarshaller.marshall(source.getUsername(), USERNAME_BINDING); protocolMarshaller.marshall(source.getPassword(), PASSWORD_BINDING); protocolMarshaller.marshall(source.getSshKey(), SSHKEY_BINDING); protocolMarshaller.marshall(source.getRevision(), REVISION_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 + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getServiceRoleArn() == null) ? 0 : getServiceRoleArn().hashCode()); hashCode = prime * hashCode + ((getDefaultInstanceProfileArn() == null) ? 0 : getDefaultInstanceProfileArn().hashCode()); hashCode = prime * hashCode + ((getDefaultOs() == null) ? 0 : getDefaultOs().hashCode()); hashCode = prime * hashCode + ((getHostnameTheme() == null) ? 0 : getHostnameTheme().hashCode()); hashCode = prime * hashCode + ((getDefaultAvailabilityZone() == null) ? 0 : getDefaultAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getDefaultSubnetId() == null) ? 0 : getDefaultSubnetId().hashCode()); hashCode = prime * hashCode + ((getCustomJson() == null) ? 0 : getCustomJson().hashCode()); hashCode = prime * hashCode + ((getConfigurationManager() == null) ? 0 : getConfigurationManager().hashCode()); hashCode = prime * hashCode + ((getChefConfiguration() == null) ? 0 : getChefConfiguration().hashCode()); hashCode = prime * hashCode + ((getUseCustomCookbooks() == null) ? 0 : getUseCustomCookbooks().hashCode()); hashCode = prime * hashCode + ((getUseOpsworksSecurityGroups() == null) ? 0 : getUseOpsworksSecurityGroups().hashCode()); hashCode = prime * hashCode + ((getCustomCookbooksSource() == null) ? 0 : getCustomCookbooksSource().hashCode()); hashCode = prime * hashCode + ((getDefaultSshKeyName() == null) ? 0 : getDefaultSshKeyName().hashCode()); hashCode = prime * hashCode + ((getDefaultRootDeviceType() == null) ? 0 : getDefaultRootDeviceType().hashCode()); hashCode = prime * hashCode + ((getAgentVersion() == null) ? 0 : getAgentVersion().hashCode()); return hashCode; }