All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testifyproject.github.dockerjava.api.model.Device Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package org.testifyproject.testifyproject.github.dockerjava.api.model;

import static org.testifyproject.testifyproject.google.org.testifyproject.testifyprojectmon.base.Preconditions.checkNotNull;

import org.testifyproject.apache.org.testifyproject.testifyprojectmons.lang.builder.EqualsBuilder;
import org.testifyproject.apache.org.testifyproject.testifyprojectmons.lang.builder.HashCodeBuilder;

import org.testifyproject.testifyproject.fasterxml.jackson.annotation.JsonInclude;
import org.testifyproject.testifyproject.fasterxml.jackson.annotation.JsonInclude.Include;
import org.testifyproject.testifyproject.fasterxml.jackson.annotation.JsonProperty;

@JsonInclude(Include.NON_NULL)
public class Device {

    @JsonProperty("CgroupPermissions")
    private String cGroupPermissions = "";

    @JsonProperty("PathOnHost")
    private String pathOnHost = null;

    @JsonProperty("PathInContainer")
    private String pathInContainer = null;

    public Device() {
    }

    public Device(String cGroupPermissions, String pathInContainer, String pathOnHost) {
        checkNotNull(cGroupPermissions, "cGroupPermissions is null");
        checkNotNull(pathInContainer, "pathInContainer is null");
        checkNotNull(pathOnHost, "pathOnHost is null");
        this.cGroupPermissions = cGroupPermissions;
        this.pathInContainer = pathInContainer;
        this.pathOnHost = pathOnHost;
    }

    public String getcGroupPermissions() {
        return cGroupPermissions;
    }

    public String getPathInContainer() {
        return pathInContainer;
    }

    public String getPathOnHost() {
        return pathOnHost;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Device) {
            Device other = (Device) obj;
            return new EqualsBuilder().append(cGroupPermissions, other.getcGroupPermissions())
                    .append(pathInContainer, other.getPathInContainer()).append(pathOnHost, other.getPathOnHost())
                    .isEquals();
        } else {
            return super.equals(obj);
        }
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder().append(cGroupPermissions).append(pathInContainer).append(pathOnHost).toHashCode();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy