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

com.azure.messaging.eventgrid.systemevents.MachineLearningServicesRunStatusChangedEventData Maven / Gradle / Ivy

The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.messaging.eventgrid.systemevents;

import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;

/**
 * Schema of the Data property of an EventGridEvent for a Microsoft.MachineLearningServices.RunStatusChanged event.
 */
@Fluent
public final class MachineLearningServicesRunStatusChangedEventData
    implements JsonSerializable {
    /*
     * The ID of the experiment that the Machine Learning Run belongs to.
     */
    private String experimentId;

    /*
     * The name of the experiment that the Machine Learning Run belongs to.
     */
    private String experimentName;

    /*
     * The ID of the Machine Learning Run.
     */
    private String runId;

    /*
     * The Run Type of the Machine Learning Run.
     */
    private String runType;

    /*
     * The tags of the Machine Learning Run.
     */
    private Object runTags;

    /*
     * The properties of the Machine Learning Run.
     */
    private Object runProperties;

    /*
     * The status of the Machine Learning Run.
     */
    private String runStatus;

    /**
     * Creates an instance of MachineLearningServicesRunStatusChangedEventData class.
     */
    public MachineLearningServicesRunStatusChangedEventData() {
    }

    /**
     * Get the experimentId property: The ID of the experiment that the Machine Learning Run belongs to.
     * 
     * @return the experimentId value.
     */
    public String getExperimentId() {
        return this.experimentId;
    }

    /**
     * Set the experimentId property: The ID of the experiment that the Machine Learning Run belongs to.
     * 
     * @param experimentId the experimentId value to set.
     * @return the MachineLearningServicesRunStatusChangedEventData object itself.
     */
    public MachineLearningServicesRunStatusChangedEventData setExperimentId(String experimentId) {
        this.experimentId = experimentId;
        return this;
    }

    /**
     * Get the experimentName property: The name of the experiment that the Machine Learning Run belongs to.
     * 
     * @return the experimentName value.
     */
    public String getExperimentName() {
        return this.experimentName;
    }

    /**
     * Set the experimentName property: The name of the experiment that the Machine Learning Run belongs to.
     * 
     * @param experimentName the experimentName value to set.
     * @return the MachineLearningServicesRunStatusChangedEventData object itself.
     */
    public MachineLearningServicesRunStatusChangedEventData setExperimentName(String experimentName) {
        this.experimentName = experimentName;
        return this;
    }

    /**
     * Get the runId property: The ID of the Machine Learning Run.
     * 
     * @return the runId value.
     */
    public String getRunId() {
        return this.runId;
    }

    /**
     * Set the runId property: The ID of the Machine Learning Run.
     * 
     * @param runId the runId value to set.
     * @return the MachineLearningServicesRunStatusChangedEventData object itself.
     */
    public MachineLearningServicesRunStatusChangedEventData setRunId(String runId) {
        this.runId = runId;
        return this;
    }

    /**
     * Get the runType property: The Run Type of the Machine Learning Run.
     * 
     * @return the runType value.
     */
    public String getRunType() {
        return this.runType;
    }

    /**
     * Set the runType property: The Run Type of the Machine Learning Run.
     * 
     * @param runType the runType value to set.
     * @return the MachineLearningServicesRunStatusChangedEventData object itself.
     */
    public MachineLearningServicesRunStatusChangedEventData setRunType(String runType) {
        this.runType = runType;
        return this;
    }

    /**
     * Get the runTags property: The tags of the Machine Learning Run.
     * 
     * @return the runTags value.
     */
    public Object getRunTags() {
        return this.runTags;
    }

    /**
     * Set the runTags property: The tags of the Machine Learning Run.
     * 
     * @param runTags the runTags value to set.
     * @return the MachineLearningServicesRunStatusChangedEventData object itself.
     */
    public MachineLearningServicesRunStatusChangedEventData setRunTags(Object runTags) {
        this.runTags = runTags;
        return this;
    }

    /**
     * Get the runProperties property: The properties of the Machine Learning Run.
     * 
     * @return the runProperties value.
     */
    public Object getRunProperties() {
        return this.runProperties;
    }

    /**
     * Set the runProperties property: The properties of the Machine Learning Run.
     * 
     * @param runProperties the runProperties value to set.
     * @return the MachineLearningServicesRunStatusChangedEventData object itself.
     */
    public MachineLearningServicesRunStatusChangedEventData setRunProperties(Object runProperties) {
        this.runProperties = runProperties;
        return this;
    }

    /**
     * Get the runStatus property: The status of the Machine Learning Run.
     * 
     * @return the runStatus value.
     */
    public String getRunStatus() {
        return this.runStatus;
    }

    /**
     * Set the runStatus property: The status of the Machine Learning Run.
     * 
     * @param runStatus the runStatus value to set.
     * @return the MachineLearningServicesRunStatusChangedEventData object itself.
     */
    public MachineLearningServicesRunStatusChangedEventData setRunStatus(String runStatus) {
        this.runStatus = runStatus;
        return this;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
        jsonWriter.writeStartObject();
        jsonWriter.writeStringField("experimentId", this.experimentId);
        jsonWriter.writeStringField("experimentName", this.experimentName);
        jsonWriter.writeStringField("runId", this.runId);
        jsonWriter.writeStringField("runType", this.runType);
        jsonWriter.writeUntypedField("runTags", this.runTags);
        jsonWriter.writeUntypedField("runProperties", this.runProperties);
        jsonWriter.writeStringField("runStatus", this.runStatus);
        return jsonWriter.writeEndObject();
    }

    /**
     * Reads an instance of MachineLearningServicesRunStatusChangedEventData from the JsonReader.
     * 
     * @param jsonReader The JsonReader being read.
     * @return An instance of MachineLearningServicesRunStatusChangedEventData if the JsonReader was pointing to an
     * instance of it, or null if it was pointing to JSON null.
     * @throws IOException If an error occurs while reading the MachineLearningServicesRunStatusChangedEventData.
     */
    public static MachineLearningServicesRunStatusChangedEventData fromJson(JsonReader jsonReader) throws IOException {
        return jsonReader.readObject(reader -> {
            MachineLearningServicesRunStatusChangedEventData deserializedMachineLearningServicesRunStatusChangedEventData
                = new MachineLearningServicesRunStatusChangedEventData();
            while (reader.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = reader.getFieldName();
                reader.nextToken();

                if ("experimentId".equals(fieldName)) {
                    deserializedMachineLearningServicesRunStatusChangedEventData.experimentId = reader.getString();
                } else if ("experimentName".equals(fieldName)) {
                    deserializedMachineLearningServicesRunStatusChangedEventData.experimentName = reader.getString();
                } else if ("runId".equals(fieldName)) {
                    deserializedMachineLearningServicesRunStatusChangedEventData.runId = reader.getString();
                } else if ("runType".equals(fieldName)) {
                    deserializedMachineLearningServicesRunStatusChangedEventData.runType = reader.getString();
                } else if ("runTags".equals(fieldName)) {
                    deserializedMachineLearningServicesRunStatusChangedEventData.runTags = reader.readUntyped();
                } else if ("runProperties".equals(fieldName)) {
                    deserializedMachineLearningServicesRunStatusChangedEventData.runProperties = reader.readUntyped();
                } else if ("runStatus".equals(fieldName)) {
                    deserializedMachineLearningServicesRunStatusChangedEventData.runStatus = reader.getString();
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedMachineLearningServicesRunStatusChangedEventData;
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy