![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.automation.models.NonAzureQueryProperties Maven / Gradle / Ivy
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.automation.models;
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;
/**
* Non Azure query for the update configuration.
*/
@Fluent
public final class NonAzureQueryProperties implements JsonSerializable {
/*
* Log Analytics Saved Search name.
*/
private String functionAlias;
/*
* Workspace Id for Log Analytics in which the saved Search is resided.
*/
private String workspaceId;
/**
* Creates an instance of NonAzureQueryProperties class.
*/
public NonAzureQueryProperties() {
}
/**
* Get the functionAlias property: Log Analytics Saved Search name.
*
* @return the functionAlias value.
*/
public String functionAlias() {
return this.functionAlias;
}
/**
* Set the functionAlias property: Log Analytics Saved Search name.
*
* @param functionAlias the functionAlias value to set.
* @return the NonAzureQueryProperties object itself.
*/
public NonAzureQueryProperties withFunctionAlias(String functionAlias) {
this.functionAlias = functionAlias;
return this;
}
/**
* Get the workspaceId property: Workspace Id for Log Analytics in which the saved Search is resided.
*
* @return the workspaceId value.
*/
public String workspaceId() {
return this.workspaceId;
}
/**
* Set the workspaceId property: Workspace Id for Log Analytics in which the saved Search is resided.
*
* @param workspaceId the workspaceId value to set.
* @return the NonAzureQueryProperties object itself.
*/
public NonAzureQueryProperties withWorkspaceId(String workspaceId) {
this.workspaceId = workspaceId;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("functionAlias", this.functionAlias);
jsonWriter.writeStringField("workspaceId", this.workspaceId);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of NonAzureQueryProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of NonAzureQueryProperties 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 NonAzureQueryProperties.
*/
public static NonAzureQueryProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
NonAzureQueryProperties deserializedNonAzureQueryProperties = new NonAzureQueryProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("functionAlias".equals(fieldName)) {
deserializedNonAzureQueryProperties.functionAlias = reader.getString();
} else if ("workspaceId".equals(fieldName)) {
deserializedNonAzureQueryProperties.workspaceId = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedNonAzureQueryProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy