com.azure.resourcemanager.securityinsights.models.InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-securityinsights Show documentation
Show all versions of azure-resourcemanager-securityinsights Show documentation
This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-09.
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.resourcemanager.securityinsights.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;
/**
* The InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem model.
*/
@Fluent
public final class InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem
implements JsonSerializable {
/*
* Insight Link Definition Projected Name.
*/
private String projectedName;
/*
* Insight Link Definition Query.
*/
private String query;
/**
* Creates an instance of InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem class.
*/
public InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem() {
}
/**
* Get the projectedName property: Insight Link Definition Projected Name.
*
* @return the projectedName value.
*/
public String projectedName() {
return this.projectedName;
}
/**
* Set the projectedName property: Insight Link Definition Projected Name.
*
* @param projectedName the projectedName value to set.
* @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem object itself.
*/
public InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem
withProjectedName(String projectedName) {
this.projectedName = projectedName;
return this;
}
/**
* Get the query property: Insight Link Definition Query.
*
* @return the query value.
*/
public String query() {
return this.query;
}
/**
* Set the query property: Insight Link Definition Query.
*
* @param query the query value to set.
* @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem object itself.
*/
public InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem withQuery(String query) {
this.query = query;
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("projectedName", this.projectedName);
jsonWriter.writeStringField("Query", this.query);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem from the
* JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem 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
* InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.
*/
public static InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem
fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem deserializedInsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem
= new InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("projectedName".equals(fieldName)) {
deserializedInsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.projectedName
= reader.getString();
} else if ("Query".equals(fieldName)) {
deserializedInsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.query
= reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedInsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem;
});
}
}