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

com.github.joekerouac.common.tools.console.CommandResult Maven / Gradle / Ivy

The newest version!
// Generated by delombok at Fri Mar 14 11:41:38 CST 2025
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
 * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
 * to You 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.github.joekerouac.common.tools.console;

/**
 * command执行结果
 *
 * @since 1.0.0
 * @author JoeKerouac
 * @date 2022-10-14 14:37:00
 */
public class CommandResult {
    /**
     * 退出码,正常来说0是正常的,其他是异常
     */
    private int exitCode;
    /**
     * 本次执行的命令
     */
    private String command;
    /**
     * 正常消息
     */
    private String msg;
    /**
     * 错误消息
     */
    private String errMsg;

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public CommandResult() {
    }

    /**
     * 退出码,正常来说0是正常的,其他是异常
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int getExitCode() {
        return this.exitCode;
    }

    /**
     * 本次执行的命令
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getCommand() {
        return this.command;
    }

    /**
     * 正常消息
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getMsg() {
        return this.msg;
    }

    /**
     * 错误消息
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getErrMsg() {
        return this.errMsg;
    }

    /**
     * 退出码,正常来说0是正常的,其他是异常
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setExitCode(final int exitCode) {
        this.exitCode = exitCode;
    }

    /**
     * 本次执行的命令
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setCommand(final String command) {
        this.command = command;
    }

    /**
     * 正常消息
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setMsg(final String msg) {
        this.msg = msg;
    }

    /**
     * 错误消息
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setErrMsg(final String errMsg) {
        this.errMsg = errMsg;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public boolean equals(final java.lang.Object o) {
        if (o == this) return true;
        if (!(o instanceof CommandResult)) return false;
        final CommandResult other = (CommandResult) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (this.getExitCode() != other.getExitCode()) return false;
        final java.lang.Object this$command = this.getCommand();
        final java.lang.Object other$command = other.getCommand();
        if (this$command == null ? other$command != null : !this$command.equals(other$command)) return false;
        final java.lang.Object this$msg = this.getMsg();
        final java.lang.Object other$msg = other.getMsg();
        if (this$msg == null ? other$msg != null : !this$msg.equals(other$msg)) return false;
        final java.lang.Object this$errMsg = this.getErrMsg();
        final java.lang.Object other$errMsg = other.getErrMsg();
        if (this$errMsg == null ? other$errMsg != null : !this$errMsg.equals(other$errMsg)) return false;
        return true;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected boolean canEqual(final java.lang.Object other) {
        return other instanceof CommandResult;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        result = result * PRIME + this.getExitCode();
        final java.lang.Object $command = this.getCommand();
        result = result * PRIME + ($command == null ? 43 : $command.hashCode());
        final java.lang.Object $msg = this.getMsg();
        result = result * PRIME + ($msg == null ? 43 : $msg.hashCode());
        final java.lang.Object $errMsg = this.getErrMsg();
        result = result * PRIME + ($errMsg == null ? 43 : $errMsg.hashCode());
        return result;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "CommandResult(exitCode=" + this.getExitCode() + ", command=" + this.getCommand() + ", msg=" + this.getMsg() + ", errMsg=" + this.getErrMsg() + ")";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy