/*
 * Copyright (C) 2018 EPAM Systems
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License 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 com.epam.ta.reportportal.commons;

public class BinaryDataMetaInfo {

	private final String fileId;

	private final String thumbnailFileId;

	private final String contentType;

	/**
	 * Object to hold information about saved file.
	 *
	 * @param fileId
	 * @param thumbnailFileId
	 */
	public BinaryDataMetaInfo(String fileId, String thumbnailFileId, String contentType) {
		this.fileId = fileId;
		this.thumbnailFileId = thumbnailFileId;
		this.contentType = contentType;
	}

	public String getFileId() {
		return fileId;
	}

	public String getThumbnailFileId() {
		return thumbnailFileId;
	}

	public String getContentType() {
		return contentType;
	}

	public static final class BinaryDataMetaInfoBuilder {
		private String fileId;
		private String thumbnailFileId;
		private String contentType;

		private BinaryDataMetaInfoBuilder() {
		}

		public static BinaryDataMetaInfoBuilder aBinaryDataMetaInfo() {
			return new BinaryDataMetaInfoBuilder();
		}

		public BinaryDataMetaInfoBuilder withFileId(String fileId) {
			this.fileId = fileId;
			return this;
		}

		public BinaryDataMetaInfoBuilder withThumbnailFileId(String thumbnailFileId) {
			this.thumbnailFileId = thumbnailFileId;
			return this;
		}

		public BinaryDataMetaInfoBuilder withContentType(String contentType) {
			this.contentType = contentType;
			return this;
		}

		public BinaryDataMetaInfo build() {
			return new BinaryDataMetaInfo(fileId, thumbnailFileId, contentType);
		}
	}
}

@@ -673,30 +673,24 @@
 %7B%0A%0A%09private 
-final 
 String fileI
@@ -698,30 +698,24 @@
 ;%0A%0A%09private 
-final 
 String thumb
@@ -736,22 +736,16 @@
 private 
-final 
 String c
@@ -757,16 +757,49 @@
 tType;%0A%0A
+%09public BinaryDataMetaInfo() %7B%7D%0A%0A
 %09/**%0A%09 *
@@ -1260,32 +1260,292 @@
 ontentType;%0A%09%7D%0A%0A
+%09public void setFileId(String fileId) %7B%0A%09%09this.fileId = fileId;%0A%09%7D%0A%0A%09public void setThumbnailFileId(String thumbnailFileId) %7B%0A%09%09this.thumbnailFileId = thumbnailFileId;%0A%09%7D%0A%0A%09public void setContentType(String contentType) %7B%0A%09%09this.contentType = contentType;%0A%09%7D%0A%0A
 %09public static f

add default constructor to BinaryDataMetaInfo for Jackson deserialization