package com.utopiaindustries.qualitychecker.utils;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.utopiaindustries.qualitychecker.utils.jackson.ZonedDateTimeDeserializer;

import java.time.ZonedDateTime;


@JsonIgnoreProperties( ignoreUnknown = true )
@JsonNaming( PropertyNamingStrategy.SnakeCaseStrategy.class )
public class ReleaseAsset {
	private String id;
	private String name;
	private long size;
	private long downloadCount;
	@JsonDeserialize( using = ZonedDateTimeDeserializer.class )
	private ZonedDateTime createdAt;
	private String uuid;
	private String browserDownloadUrl;

	public ReleaseAsset() {
	}

	public String getId() {
		return id;
	}

	public void setId( String id ) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName( String name ) {
		this.name = name;
	}

	public long getSize() {
		return size;
	}

	public void setSize( long size ) {
		this.size = size;
	}

	public long getDownloadCount() {
		return downloadCount;
	}

	public void setDownloadCount( long downloadCount ) {
		this.downloadCount = downloadCount;
	}

	public ZonedDateTime getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt( ZonedDateTime createdAt ) {
		this.createdAt = createdAt;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid( String uuid ) {
		this.uuid = uuid;
	}

	public String getBrowserDownloadUrl() {
		return browserDownloadUrl;
	}

	public void setBrowserDownloadUrl( String browserDownloadUrl ) {
		this.browserDownloadUrl = browserDownloadUrl;
	}

	@Override
	public String toString() {
		return "ReleaseAsset{" +
				"id='" + id + '\'' +
				", name='" + name + '\'' +
				", size=" + size +
				", downloadCount=" + downloadCount +
				", createdAt=" + createdAt +
				", uuid='" + uuid + '\'' +
				", browserDownloadUrl='" + browserDownloadUrl + '\'' +
				'}';
	}
}
