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

com.dell.cpsd.vcenter.capabilities.api.RemoteCommandExecutionRequestMessage Maven / Gradle / Ivy

Go to download

This repository contains the source code for the virtualization capabilities API. This repository is used to define a data contract in JSON that is agnostic of the Adapter.

The newest version!

package com.dell.cpsd.vcenter.capabilities.api;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import com.dell.cpsd.common.rabbitmq.annotation.Message;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;


/**
 * Request Message that contains remote bash commands to be executed using JSCH
 * 
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Message(value = "com.dell.cpsd.vcenter.remote.command.execution.request", version = "1.0")
@JsonPropertyOrder({
    "messageProperties",
    "remoteHost",
    "componentEndpointIds",
    "vmPasswordUpdateRequest",
    "remoteCommand",
    "osType"
})
public class RemoteCommandExecutionRequestMessage implements Serializable
{

    /**
     * AMQP properties properties
     * 

* AMQP properties. * (Required) * */ @JsonProperty("messageProperties") @JsonPropertyDescription("AMQP properties.") private MessageProperties messageProperties; /** * * (Required) * */ @JsonProperty("remoteHost") private String remoteHost; /** * * Corresponds to the "componentEndpointIds" property. * (Required) * */ @JsonProperty("componentEndpointIds") private ComponentEndpointIds componentEndpointIds; @JsonProperty("vmPasswordUpdateRequest") private VmPasswordUpdateRequest vmPasswordUpdateRequest; /** * * (Required) * */ @JsonProperty("remoteCommand") private RemoteCommandExecutionRequestMessage.RemoteCommand remoteCommand; @JsonProperty("osType") private RemoteCommandExecutionRequestMessage.OsType osType; @JsonIgnore private Map additionalProperties = new HashMap(); private final static long serialVersionUID = 8134738396524292621L; /** * No args constructor for use in serialization * */ public RemoteCommandExecutionRequestMessage() { } /** * * @param messageProperties * @param remoteHost * @param componentEndpointIds * @param osType * @param vmPasswordUpdateRequest * @param remoteCommand */ public RemoteCommandExecutionRequestMessage(MessageProperties messageProperties, String remoteHost, ComponentEndpointIds componentEndpointIds, VmPasswordUpdateRequest vmPasswordUpdateRequest, RemoteCommandExecutionRequestMessage.RemoteCommand remoteCommand, RemoteCommandExecutionRequestMessage.OsType osType) { super(); this.messageProperties = messageProperties; this.remoteHost = remoteHost; this.componentEndpointIds = componentEndpointIds; this.vmPasswordUpdateRequest = vmPasswordUpdateRequest; this.remoteCommand = remoteCommand; this.osType = osType; } /** * AMQP properties properties *

* AMQP properties. * (Required) * */ @JsonProperty("messageProperties") public MessageProperties getMessageProperties() { return messageProperties; } /** * AMQP properties properties *

* AMQP properties. * (Required) * */ @JsonProperty("messageProperties") public void setMessageProperties(MessageProperties messageProperties) { this.messageProperties = messageProperties; } /** * * (Required) * */ @JsonProperty("remoteHost") public String getRemoteHost() { return remoteHost; } /** * * (Required) * */ @JsonProperty("remoteHost") public void setRemoteHost(String remoteHost) { this.remoteHost = remoteHost; } /** * * Corresponds to the "componentEndpointIds" property. * (Required) * */ @JsonProperty("componentEndpointIds") public ComponentEndpointIds getComponentEndpointIds() { return componentEndpointIds; } /** * * Corresponds to the "componentEndpointIds" property. * (Required) * */ @JsonProperty("componentEndpointIds") public void setComponentEndpointIds(ComponentEndpointIds componentEndpointIds) { this.componentEndpointIds = componentEndpointIds; } @JsonProperty("vmPasswordUpdateRequest") public VmPasswordUpdateRequest getVmPasswordUpdateRequest() { return vmPasswordUpdateRequest; } @JsonProperty("vmPasswordUpdateRequest") public void setVmPasswordUpdateRequest(VmPasswordUpdateRequest vmPasswordUpdateRequest) { this.vmPasswordUpdateRequest = vmPasswordUpdateRequest; } /** * * (Required) * */ @JsonProperty("remoteCommand") public RemoteCommandExecutionRequestMessage.RemoteCommand getRemoteCommand() { return remoteCommand; } /** * * (Required) * */ @JsonProperty("remoteCommand") public void setRemoteCommand(RemoteCommandExecutionRequestMessage.RemoteCommand remoteCommand) { this.remoteCommand = remoteCommand; } @JsonProperty("osType") public RemoteCommandExecutionRequestMessage.OsType getOsType() { return osType; } @JsonProperty("osType") public void setOsType(RemoteCommandExecutionRequestMessage.OsType osType) { this.osType = osType; } @Override public String toString() { return ToStringBuilder.reflectionToString(this); } @JsonAnyGetter public Map getAdditionalProperties() { return this.additionalProperties; } @JsonAnySetter public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } @Override public int hashCode() { return new HashCodeBuilder().append(messageProperties).append(remoteHost).append(componentEndpointIds).append(vmPasswordUpdateRequest).append(remoteCommand).append(osType).append(additionalProperties).toHashCode(); } @Override public boolean equals(Object other) { if (other == this) { return true; } if ((other instanceof RemoteCommandExecutionRequestMessage) == false) { return false; } RemoteCommandExecutionRequestMessage rhs = ((RemoteCommandExecutionRequestMessage) other); return new EqualsBuilder().append(messageProperties, rhs.messageProperties).append(remoteHost, rhs.remoteHost).append(componentEndpointIds, rhs.componentEndpointIds).append(vmPasswordUpdateRequest, rhs.vmPasswordUpdateRequest).append(remoteCommand, rhs.remoteCommand).append(osType, rhs.osType).append(additionalProperties, rhs.additionalProperties).isEquals(); } public enum OsType { LINUX("LINUX"), WINDOWS("WINDOWS"); private final String value; private final static Map CONSTANTS = new HashMap(); static { for (RemoteCommandExecutionRequestMessage.OsType c: values()) { CONSTANTS.put(c.value, c); } } private OsType(String value) { this.value = value; } @Override public String toString() { return this.value; } @JsonValue public String value() { return this.value; } @JsonCreator public static RemoteCommandExecutionRequestMessage.OsType fromValue(String value) { RemoteCommandExecutionRequestMessage.OsType constant = CONSTANTS.get(value); if (constant == null) { throw new IllegalArgumentException(value); } else { return constant; } } } public enum RemoteCommand { CHANGE_PASSWORD("CHANGE_PASSWORD"), INSTALL_PACKAGE_MDM("INSTALL_PACKAGE_MDM"), INSTALL_PACKAGE_SDS("INSTALL_PACKAGE_SDS"), INSTALL_PACKAGE_SDS_LIA("INSTALL_PACKAGE_SDS_LIA"), IMPORT_FILE("IMPORT_FILE"), UPLOAD_FILE("UPLOAD_FILE"), DOWNLOAD_FILE("DOWNLOAD_FILE"), PERFORMANCE_TUNING_SVM("PERFORMANCE_TUNING_SVM"); private final String value; private final static Map CONSTANTS = new HashMap(); static { for (RemoteCommandExecutionRequestMessage.RemoteCommand c: values()) { CONSTANTS.put(c.value, c); } } private RemoteCommand(String value) { this.value = value; } @Override public String toString() { return this.value; } @JsonValue public String value() { return this.value; } @JsonCreator public static RemoteCommandExecutionRequestMessage.RemoteCommand fromValue(String value) { RemoteCommandExecutionRequestMessage.RemoteCommand constant = CONSTANTS.get(value); if (constant == null) { throw new IllegalArgumentException(value); } else { return constant; } } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy