@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRepositoryArn() == null) ? 0 : getRepositoryArn().hashCode()); hashCode = prime * hashCode + ((getRegistryId() == null) ? 0 : getRegistryId().hashCode()); hashCode = prime * hashCode + ((getRepositoryName() == null) ? 0 : getRepositoryName().hashCode()); hashCode = prime * hashCode + ((getRepositoryUri() == null) ? 0 : getRepositoryUri().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); return hashCode; }
/** * 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 (getRepositoryArn() != null) sb.append("RepositoryArn: ").append(getRepositoryArn()).append(","); if (getRegistryId() != null) sb.append("RegistryId: ").append(getRegistryId()).append(","); if (getRepositoryName() != null) sb.append("RepositoryName: ").append(getRepositoryName()).append(","); if (getRepositoryUri() != null) sb.append("RepositoryUri: ").append(getRepositoryUri()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()); sb.append("}"); return sb.toString(); }
if (other.getRepositoryName() != null && other.getRepositoryName().equals(this.getRepositoryName()) == false) return false; if (other.getRepositoryUri() == null ^ this.getRepositoryUri() == null) return false; if (other.getRepositoryUri() != null && other.getRepositoryUri().equals(this.getRepositoryUri()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
/** * Marshall the given parameter object. */ public void marshall(Repository repository, ProtocolMarshaller protocolMarshaller) { if (repository == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(repository.getRepositoryArn(), REPOSITORYARN_BINDING); protocolMarshaller.marshall(repository.getRegistryId(), REGISTRYID_BINDING); protocolMarshaller.marshall(repository.getRepositoryName(), REPOSITORYNAME_BINDING); protocolMarshaller.marshall(repository.getRepositoryUri(), REPOSITORYURI_BINDING); protocolMarshaller.marshall(repository.getCreatedAt(), CREATEDAT_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 + ((getRepositoryArn() == null) ? 0 : getRepositoryArn().hashCode()); hashCode = prime * hashCode + ((getRegistryId() == null) ? 0 : getRegistryId().hashCode()); hashCode = prime * hashCode + ((getRepositoryName() == null) ? 0 : getRepositoryName().hashCode()); hashCode = prime * hashCode + ((getRepositoryUri() == null) ? 0 : getRepositoryUri().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); return hashCode; }
/** * 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 (getRepositoryArn() != null) sb.append("RepositoryArn: ").append(getRepositoryArn()).append(","); if (getRegistryId() != null) sb.append("RegistryId: ").append(getRegistryId()).append(","); if (getRepositoryName() != null) sb.append("RepositoryName: ").append(getRepositoryName()).append(","); if (getRepositoryUri() != null) sb.append("RepositoryUri: ").append(getRepositoryUri()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()); sb.append("}"); return sb.toString(); }
if (other.getRepositoryName() != null && other.getRepositoryName().equals(this.getRepositoryName()) == false) return false; if (other.getRepositoryUri() == null ^ this.getRepositoryUri() == null) return false; if (other.getRepositoryUri() != null && other.getRepositoryUri().equals(this.getRepositoryUri()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
/** * Marshall the given parameter object. */ public void marshall(Repository repository, ProtocolMarshaller protocolMarshaller) { if (repository == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(repository.getRepositoryArn(), REPOSITORYARN_BINDING); protocolMarshaller.marshall(repository.getRegistryId(), REGISTRYID_BINDING); protocolMarshaller.marshall(repository.getRepositoryName(), REPOSITORYNAME_BINDING); protocolMarshaller.marshall(repository.getRepositoryUri(), REPOSITORYURI_BINDING); protocolMarshaller.marshall(repository.getCreatedAt(), CREATEDAT_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
public List<ContainerRepo> listRepositories(PageIterator pageIterator) { int pageSize = pageIterator.getPageSize(); if(pageSize > 100) throw(new IllegalArgumentException("Page Size cannot be greater than 100")); DescribeRepositoriesRequest request = new DescribeRepositoriesRequest(); request.setMaxResults(pageSize); request.setNextToken(pageIterator.getMarker()); DescribeRepositoriesResult result = _awsEcrClient.describeRepositories(request); pageIterator.setMarker(result.getNextToken()); List<Repository> ecrRepos = result.getRepositories(); List<ContainerRepo> containerRepos = new ArrayList<ContainerRepo>(); for(Repository ecrRepo : ecrRepos) { ContainerRepo repo = ContainerRepo .builder() .provider(RegistryProvider.ECR) .credId(_registryCred.getId()) .region(_registryCred.getRegion()) .name(ecrRepo.getRepositoryName()) .registryId(ecrRepo.getRegistryId()) .endpoint(URI.create(ecrRepo.getRepositoryUri()).getHost()) .build(); containerRepos.add(repo); } return containerRepos; }