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

com.heanbian.block.zabbix.api.ZabbixHistoryGetRequest Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show newest version
package com.heanbian.block.zabbix.api;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ZabbixHistoryGetRequest {

	public ZabbixHistoryGetRequest() {
		this.setOutput("extend").setHistory(0).setSortfield("clock").setSortorder("DESC").setLimit("1");
	}

	private Map params = new HashMap<>();

	public Map getParams() {
		return params;
	}

	public ZabbixHistoryGetRequest setOutput(String... output) {
		this.params.put("output", Arrays.asList(output));
		return this;
	}

	public ZabbixHistoryGetRequest setHistory(int history) {
		this.params.put("history", history);
		return this;
	}

	public ZabbixHistoryGetRequest setItemids(String... itemids) {
		return this.setItemids(Arrays.asList(itemids));
	}

	public ZabbixHistoryGetRequest setItemids(List itemids) {
		this.params.put("itemids", itemids);
		return this;
	}

	public ZabbixHistoryGetRequest setSortfield(String sortfield) {
		this.params.put("sortfield", sortfield);
		return this;
	}

	public ZabbixHistoryGetRequest setSortorder(String sortorder) {
		this.params.put("sortorder", sortorder);
		return this;
	}

	public ZabbixHistoryGetRequest setLimit(String limit) {
		this.params.put("limit", limit);
		return this;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy