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

org.eclipse.hawkbit.ddi.json.model.DdiArtifactHash Maven / Gradle / Ivy

There is a newer version: 0.6.1
Show newest version
/**
 * Copyright (c) 2015 Bosch Software Innovations GmbH and others
 *
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 */
package org.eclipse.hawkbit.ddi.json.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * Hashes for given Artifact.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class DdiArtifactHash {

    @JsonProperty
    @Schema(example = "2d86c2a659e364e9abba49ea6ffcd53dd5559f05")
    private String sha1;

    @JsonProperty
    @Schema(example = "0d1b08c34858921bc7c662b228acb7ba")
    private String md5;

    @JsonProperty
    @JsonInclude(Include.NON_NULL)
    @Schema(example = "a03b221c6c6eae7122ca51695d456d5222e524889136394944b2f9763b483615")
    private String sha256;

    /**
     * Default constructor.
     */
    public DdiArtifactHash() {
        // needed for json create
    }

    /**
     * Public constructor.
     *
     * @param sha1
     *         sha1 hash of the artifact
     * @param md5
     *         md5 hash of the artifact
     * @param sha256
     *         sha256 hash of the artifact
     */
    public DdiArtifactHash(final String sha1, final String md5, final String sha256) {
        this.sha1 = sha1;
        this.md5 = md5;
        this.sha256 = sha256;
    }

    /**
     * @return the sha1
     */
    public String getSha1() {
        return sha1;
    }

    /**
     * @return the md5
     */
    public String getMd5() {
        return md5;
    }

    /**
     * @return the sha256
     */
    public String getSha256() {
        return sha256;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy