001/* 002 * VM-Operator 003 * Copyright (C) 2023 Michael N. Lipp 004 * 005 * This program is free software: you can redistribute it and/or modify 006 * it under the terms of the GNU Affero General Public License as 007 * published by the Free Software Foundation, either version 3 of the 008 * License, or (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU Affero General Public License for more details. 014 * 015 * You should have received a copy of the GNU Affero General Public License 016 * along with this program. If not, see <https://www.gnu.org/licenses/>. 017 */ 018 019package org.jdrupes.vmoperator.manager.events; 020 021import org.jgrapes.core.Channel; 022import org.jgrapes.core.Event; 023 024/** 025 * Modifies a VM. 026 */ 027@SuppressWarnings("PMD.DataClass") 028public class ModifyVm extends Event<Void> { 029 030 private final String name; 031 private final String path; 032 private final Object value; 033 034 /** 035 * Instantiates a new modify vm event. 036 * 037 * @param channels the channels 038 * @param name the name 039 */ 040 public ModifyVm(String name, String path, Object value, 041 Channel... channels) { 042 super(channels); 043 this.name = name; 044 this.path = path; 045 this.value = value; 046 } 047 048 /** 049 * Gets the name. 050 * 051 * @return the name 052 */ 053 public String name() { 054 return name; 055 } 056 057 /** 058 * Gets the path. 059 * 060 * @return the path 061 */ 062 public String path() { 063 return path; 064 } 065 066 /** 067 * Gets the value. 068 * 069 * @return the value 070 */ 071 public Object value() { 072 return value; 073 } 074 075}