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

io.trino.verifier.VerifierQueryEventEntity Maven / Gradle / Ivy

There is a newer version: 451
Show newest version
/*
 * Licensed 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 io.trino.verifier;

import java.util.Optional;
import java.util.OptionalDouble;

import static java.util.Objects.requireNonNull;

public class VerifierQueryEventEntity
{
    private final String suite;
    private final Optional runId;
    private final Optional source;
    private final Optional name;
    private final boolean failed;

    private final Optional testCatalog;
    private final Optional testSchema;
    private final Optional testSetupQueryIdsJson;
    private final Optional testQueryId;
    private final Optional testTeardownQueryIdsJson;
    private final OptionalDouble testCpuTimeSeconds;
    private final OptionalDouble testWallTimeSeconds;

    private final Optional controlCatalog;
    private final Optional controlSchema;
    private final Optional controlSetupQueryIdsJson;
    private final Optional controlQueryId;
    private final Optional controlTeardownQueryIdsJson;
    private final OptionalDouble controlCpuTimeSeconds;
    private final OptionalDouble controlWallTimeSeconds;

    private final Optional errorMessage;

    public VerifierQueryEventEntity(
            String suite,
            Optional runId,
            Optional source,
            Optional name,
            boolean failed,
            Optional testCatalog,
            Optional testSchema,
            Optional testSetupQueryIdsJson,
            Optional testQueryId,
            Optional testTeardownQueryIdsJson,
            OptionalDouble testCpuTimeSeconds,
            OptionalDouble testWallTimeSeconds,
            Optional controlCatalog,
            Optional controlSchema,
            Optional controlSetupQueryIdsJson,
            Optional controlQueryId,
            Optional controlTeardownQueryIdsJson,
            OptionalDouble controlCpuTimeSeconds,
            OptionalDouble controlWallTimeSeconds,
            Optional errorMessage)
    {
        this.suite = requireNonNull(suite, "suite is null");
        this.runId = requireNonNull(runId, "runId is null");
        this.source = requireNonNull(source, "source is null");
        this.name = requireNonNull(name, "name is null");
        this.failed = failed;
        this.testCatalog = requireNonNull(testCatalog, "testCatalog is null");
        this.testSchema = requireNonNull(testSchema, "testSchema is null");
        this.testSetupQueryIdsJson = requireNonNull(testSetupQueryIdsJson, "testSetupQueryIdsJson is null");
        this.testQueryId = requireNonNull(testQueryId, "testQueryId is null");
        this.testTeardownQueryIdsJson = requireNonNull(testTeardownQueryIdsJson, "testTeardownQueryIdsJson is null");
        this.testCpuTimeSeconds = requireNonNull(testCpuTimeSeconds, "testCpuTimeSeconds is null");
        this.testWallTimeSeconds = requireNonNull(testWallTimeSeconds, "testWallTimeSeconds is null");
        this.controlCatalog = requireNonNull(controlCatalog, "controlCatalog is null");
        this.controlSchema = requireNonNull(controlSchema, "controlSchema is null");
        this.controlSetupQueryIdsJson = requireNonNull(controlSetupQueryIdsJson, "controlSetupQueryIdsJson is null");
        this.controlQueryId = requireNonNull(controlQueryId, "controlQueryId is null");
        this.controlTeardownQueryIdsJson = requireNonNull(controlTeardownQueryIdsJson, "controlTeardownQueryIdsJson is null");
        this.controlCpuTimeSeconds = requireNonNull(controlCpuTimeSeconds, "controlCpuTimeSeconds is null");
        this.controlWallTimeSeconds = requireNonNull(controlWallTimeSeconds, "controlWallTimeSeconds is null");
        this.errorMessage = requireNonNull(errorMessage, "errorMessage is null");
    }

    public String getSuite()
    {
        return suite;
    }

    public Optional getRunId()
    {
        return runId;
    }

    public Optional getSource()
    {
        return source;
    }

    public Optional getName()
    {
        return name;
    }

    public boolean isFailed()
    {
        return failed;
    }

    public Optional getTestCatalog()
    {
        return testCatalog;
    }

    public Optional getTestSchema()
    {
        return testSchema;
    }

    public Optional getTestSetupQueryIdsJson()
    {
        return testSetupQueryIdsJson;
    }

    public Optional getTestQueryId()
    {
        return testQueryId;
    }

    public Optional getTestTeardownQueryIdsJson()
    {
        return testTeardownQueryIdsJson;
    }

    public OptionalDouble getTestCpuTimeSeconds()
    {
        return testCpuTimeSeconds;
    }

    public OptionalDouble getTestWallTimeSeconds()
    {
        return testWallTimeSeconds;
    }

    public Optional getControlCatalog()
    {
        return controlCatalog;
    }

    public Optional getControlSchema()
    {
        return controlSchema;
    }

    public Optional getControlSetupQueryIdsJson()
    {
        return controlSetupQueryIdsJson;
    }

    public Optional getControlQueryId()
    {
        return controlQueryId;
    }

    public Optional getControlTeardownQueryIdsJson()
    {
        return controlTeardownQueryIdsJson;
    }

    public OptionalDouble getControlCpuTimeSeconds()
    {
        return controlCpuTimeSeconds;
    }

    public OptionalDouble getControlWallTimeSeconds()
    {
        return controlWallTimeSeconds;
    }

    public Optional getErrorMessage()
    {
        return errorMessage;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy