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

quark.mock.MockResponse Maven / Gradle / Ivy

There is a newer version: 2.0.37
Show newest version
/* Quark 1.0.452 run at 2016-11-11 16:09:46.008093 */
package quark.mock;

public class MockResponse implements quark.HTTPResponse, io.datawire.quark.runtime.QObject {
    public static quark.reflect.Class quark_mock_MockResponse_ref = datawire_mdk_md.Root.quark_mock_MockResponse_md;
    public Integer code;
    public String body;
    public java.util.HashMap headers = io.datawire.quark.runtime.Builtins.map(new Object[]{});
    public MockResponse() {}
    public Integer getCode() {
        return this.code;
    }
    public void setCode(Integer code) {
        (this).code = code;
    }
    public String getBody() {
        return this.body;
    }
    public void setBody(String body) {
        (this).body = body;
    }
    public void setHeader(String key, String value) {
        (this.headers).put((key), (value));
    }
    public String getHeader(String key) {
        return (this.headers).get(key);
    }
    public java.util.ArrayList getHeaders() {
        return new java.util.ArrayList((this.headers).keySet());
    }
    public String _getClass() {
        return "quark.mock.MockResponse";
    }
    public Object _getField(String name) {
        if ((name)==("code") || ((Object)(name) != null && ((Object) (name)).equals("code"))) {
            return (this).code;
        }
        if ((name)==("body") || ((Object)(name) != null && ((Object) (name)).equals("body"))) {
            return (this).body;
        }
        if ((name)==("headers") || ((Object)(name) != null && ((Object) (name)).equals("headers"))) {
            return (this).headers;
        }
        return null;
    }
    public void _setField(String name, Object value) {
        if ((name)==("code") || ((Object)(name) != null && ((Object) (name)).equals("code"))) {
            (this).code = (Integer) (value);
        }
        if ((name)==("body") || ((Object)(name) != null && ((Object) (name)).equals("body"))) {
            (this).body = (String) (value);
        }
        if ((name)==("headers") || ((Object)(name) != null && ((Object) (name)).equals("headers"))) {
            (this).headers = (java.util.HashMap) (value);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy