com.azure.resourcemanager.databricks.models.GroupIdInformationProperties 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.databricks.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;
import java.util.List;
/**
* The properties for a group information object.
*/
@Fluent
public final class GroupIdInformationProperties implements JsonSerializable {
/*
* The group id
*/
private String groupId;
/*
* The required members for a specific group id
*/
private List requiredMembers;
/*
* The required DNS zones for a specific group id
*/
private List requiredZoneNames;
/**
* Creates an instance of GroupIdInformationProperties class.
*/
public GroupIdInformationProperties() {
}
/**
* Get the groupId property: The group id.
*
* @return the groupId value.
*/
public String groupId() {
return this.groupId;
}
/**
* Set the groupId property: The group id.
*
* @param groupId the groupId value to set.
* @return the GroupIdInformationProperties object itself.
*/
public GroupIdInformationProperties withGroupId(String groupId) {
this.groupId = groupId;
return this;
}
/**
* Get the requiredMembers property: The required members for a specific group id.
*
* @return the requiredMembers value.
*/
public List requiredMembers() {
return this.requiredMembers;
}
/**
* Set the requiredMembers property: The required members for a specific group id.
*
* @param requiredMembers the requiredMembers value to set.
* @return the GroupIdInformationProperties object itself.
*/
public GroupIdInformationProperties withRequiredMembers(List requiredMembers) {
this.requiredMembers = requiredMembers;
return this;
}
/**
* Get the requiredZoneNames property: The required DNS zones for a specific group id.
*
* @return the requiredZoneNames value.
*/
public List requiredZoneNames() {
return this.requiredZoneNames;
}
/**
* Set the requiredZoneNames property: The required DNS zones for a specific group id.
*
* @param requiredZoneNames the requiredZoneNames value to set.
* @return the GroupIdInformationProperties object itself.
*/
public GroupIdInformationProperties withRequiredZoneNames(List requiredZoneNames) {
this.requiredZoneNames = requiredZoneNames;
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("groupId", this.groupId);
jsonWriter.writeArrayField("requiredMembers", this.requiredMembers,
(writer, element) -> writer.writeString(element));
jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames,
(writer, element) -> writer.writeString(element));
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of GroupIdInformationProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of GroupIdInformationProperties 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 GroupIdInformationProperties.
*/
public static GroupIdInformationProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
GroupIdInformationProperties deserializedGroupIdInformationProperties = new GroupIdInformationProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("groupId".equals(fieldName)) {
deserializedGroupIdInformationProperties.groupId = reader.getString();
} else if ("requiredMembers".equals(fieldName)) {
List requiredMembers = reader.readArray(reader1 -> reader1.getString());
deserializedGroupIdInformationProperties.requiredMembers = requiredMembers;
} else if ("requiredZoneNames".equals(fieldName)) {
List requiredZoneNames = reader.readArray(reader1 -> reader1.getString());
deserializedGroupIdInformationProperties.requiredZoneNames = requiredZoneNames;
} else {
reader.skipChildren();
}
}
return deserializedGroupIdInformationProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy