software.amazon.awssdk.services.ecr.model.UploadLayerPartResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ecr Show documentation
Show all versions of ecr Show documentation
The AWS Java SDK for the Amazon EC2 Container Registry holds the client classes that are used for
communicating with the
Amazon EC2 Container Registry Service
/*
* Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, 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 software.amazon.awssdk.services.ecr.model;
import java.util.Optional;
import javax.annotation.Generated;
import software.amazon.awssdk.core.AmazonWebServiceResult;
import software.amazon.awssdk.core.ResponseMetadata;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public class UploadLayerPartResponse extends AmazonWebServiceResult implements
ToCopyableBuilder {
private final String registryId;
private final String repositoryName;
private final String uploadId;
private final Long lastByteReceived;
private UploadLayerPartResponse(BuilderImpl builder) {
this.registryId = builder.registryId;
this.repositoryName = builder.repositoryName;
this.uploadId = builder.uploadId;
this.lastByteReceived = builder.lastByteReceived;
}
/**
*
* The registry ID associated with the request.
*
*
* @return The registry ID associated with the request.
*/
public String registryId() {
return registryId;
}
/**
*
* The repository name associated with the request.
*
*
* @return The repository name associated with the request.
*/
public String repositoryName() {
return repositoryName;
}
/**
*
* The upload ID associated with the request.
*
*
* @return The upload ID associated with the request.
*/
public String uploadId() {
return uploadId;
}
/**
*
* The integer value of the last byte received in the request.
*
*
* @return The integer value of the last byte received in the request.
*/
public Long lastByteReceived() {
return lastByteReceived;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + ((registryId() == null) ? 0 : registryId().hashCode());
hashCode = 31 * hashCode + ((repositoryName() == null) ? 0 : repositoryName().hashCode());
hashCode = 31 * hashCode + ((uploadId() == null) ? 0 : uploadId().hashCode());
hashCode = 31 * hashCode + ((lastByteReceived() == null) ? 0 : lastByteReceived().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof UploadLayerPartResponse)) {
return false;
}
UploadLayerPartResponse other = (UploadLayerPartResponse) obj;
if (other.registryId() == null ^ this.registryId() == null) {
return false;
}
if (other.registryId() != null && !other.registryId().equals(this.registryId())) {
return false;
}
if (other.repositoryName() == null ^ this.repositoryName() == null) {
return false;
}
if (other.repositoryName() != null && !other.repositoryName().equals(this.repositoryName())) {
return false;
}
if (other.uploadId() == null ^ this.uploadId() == null) {
return false;
}
if (other.uploadId() != null && !other.uploadId().equals(this.uploadId())) {
return false;
}
if (other.lastByteReceived() == null ^ this.lastByteReceived() == null) {
return false;
}
if (other.lastByteReceived() != null && !other.lastByteReceived().equals(this.lastByteReceived())) {
return false;
}
return true;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("{");
if (registryId() != null) {
sb.append("RegistryId: ").append(registryId()).append(",");
}
if (repositoryName() != null) {
sb.append("RepositoryName: ").append(repositoryName()).append(",");
}
if (uploadId() != null) {
sb.append("UploadId: ").append(uploadId()).append(",");
}
if (lastByteReceived() != null) {
sb.append("LastByteReceived: ").append(lastByteReceived()).append(",");
}
if (sb.length() > 1) {
sb.setLength(sb.length() - 1);
}
sb.append("}");
return sb.toString();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "registryId":
return Optional.of(clazz.cast(registryId()));
case "repositoryName":
return Optional.of(clazz.cast(repositoryName()));
case "uploadId":
return Optional.of(clazz.cast(uploadId()));
case "lastByteReceived":
return Optional.of(clazz.cast(lastByteReceived()));
default:
return Optional.empty();
}
}
public interface Builder extends CopyableBuilder {
/**
*
* The registry ID associated with the request.
*
*
* @param registryId
* The registry ID associated with the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder registryId(String registryId);
/**
*
* The repository name associated with the request.
*
*
* @param repositoryName
* The repository name associated with the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder repositoryName(String repositoryName);
/**
*
* The upload ID associated with the request.
*
*
* @param uploadId
* The upload ID associated with the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder uploadId(String uploadId);
/**
*
* The integer value of the last byte received in the request.
*
*
* @param lastByteReceived
* The integer value of the last byte received in the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder lastByteReceived(Long lastByteReceived);
}
static final class BuilderImpl implements Builder {
private String registryId;
private String repositoryName;
private String uploadId;
private Long lastByteReceived;
private BuilderImpl() {
}
private BuilderImpl(UploadLayerPartResponse model) {
registryId(model.registryId);
repositoryName(model.repositoryName);
uploadId(model.uploadId);
lastByteReceived(model.lastByteReceived);
}
public final String getRegistryId() {
return registryId;
}
@Override
public final Builder registryId(String registryId) {
this.registryId = registryId;
return this;
}
public final void setRegistryId(String registryId) {
this.registryId = registryId;
}
public final String getRepositoryName() {
return repositoryName;
}
@Override
public final Builder repositoryName(String repositoryName) {
this.repositoryName = repositoryName;
return this;
}
public final void setRepositoryName(String repositoryName) {
this.repositoryName = repositoryName;
}
public final String getUploadId() {
return uploadId;
}
@Override
public final Builder uploadId(String uploadId) {
this.uploadId = uploadId;
return this;
}
public final void setUploadId(String uploadId) {
this.uploadId = uploadId;
}
public final Long getLastByteReceived() {
return lastByteReceived;
}
@Override
public final Builder lastByteReceived(Long lastByteReceived) {
this.lastByteReceived = lastByteReceived;
return this;
}
public final void setLastByteReceived(Long lastByteReceived) {
this.lastByteReceived = lastByteReceived;
}
@Override
public UploadLayerPartResponse build() {
return new UploadLayerPartResponse(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy