com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkScopeValidationDetailsInner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-hybridcompute Show documentation
Show all versions of azure-resourcemanager-hybridcompute Show documentation
This package contains Microsoft Azure SDK for HybridCompute Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Hybrid Compute Management Client. Package tag package-preview-2024-07.
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.hybridcompute.fluent.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 com.azure.resourcemanager.hybridcompute.models.ConnectionDetail;
import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType;
import java.io.IOException;
import java.util.List;
/**
* The PrivateLinkScopeValidationDetails model.
*/
@Fluent
public final class PrivateLinkScopeValidationDetailsInner
implements JsonSerializable {
/*
* Azure resource Id
*/
private String id;
/*
* Indicates whether machines associated with the private link scope can also use public Azure Arc service
* endpoints.
*/
private PublicNetworkAccessType publicNetworkAccess;
/*
* List of Private Endpoint Connection details.
*/
private List connectionDetails;
/**
* Creates an instance of PrivateLinkScopeValidationDetailsInner class.
*/
public PrivateLinkScopeValidationDetailsInner() {
}
/**
* Get the id property: Azure resource Id.
*
* @return the id value.
*/
public String id() {
return this.id;
}
/**
* Get the publicNetworkAccess property: Indicates whether machines associated with the private link scope can also
* use public Azure Arc service endpoints.
*
* @return the publicNetworkAccess value.
*/
public PublicNetworkAccessType publicNetworkAccess() {
return this.publicNetworkAccess;
}
/**
* Set the publicNetworkAccess property: Indicates whether machines associated with the private link scope can also
* use public Azure Arc service endpoints.
*
* @param publicNetworkAccess the publicNetworkAccess value to set.
* @return the PrivateLinkScopeValidationDetailsInner object itself.
*/
public PrivateLinkScopeValidationDetailsInner withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) {
this.publicNetworkAccess = publicNetworkAccess;
return this;
}
/**
* Get the connectionDetails property: List of Private Endpoint Connection details.
*
* @return the connectionDetails value.
*/
public List connectionDetails() {
return this.connectionDetails;
}
/**
* Set the connectionDetails property: List of Private Endpoint Connection details.
*
* @param connectionDetails the connectionDetails value to set.
* @return the PrivateLinkScopeValidationDetailsInner object itself.
*/
public PrivateLinkScopeValidationDetailsInner withConnectionDetails(List connectionDetails) {
this.connectionDetails = connectionDetails;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (connectionDetails() != null) {
connectionDetails().forEach(e -> e.validate());
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("publicNetworkAccess",
this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString());
jsonWriter.writeArrayField("connectionDetails", this.connectionDetails,
(writer, element) -> writer.writeJson(element));
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of PrivateLinkScopeValidationDetailsInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of PrivateLinkScopeValidationDetailsInner 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 PrivateLinkScopeValidationDetailsInner.
*/
public static PrivateLinkScopeValidationDetailsInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
PrivateLinkScopeValidationDetailsInner deserializedPrivateLinkScopeValidationDetailsInner
= new PrivateLinkScopeValidationDetailsInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("id".equals(fieldName)) {
deserializedPrivateLinkScopeValidationDetailsInner.id = reader.getString();
} else if ("publicNetworkAccess".equals(fieldName)) {
deserializedPrivateLinkScopeValidationDetailsInner.publicNetworkAccess
= PublicNetworkAccessType.fromString(reader.getString());
} else if ("connectionDetails".equals(fieldName)) {
List connectionDetails
= reader.readArray(reader1 -> ConnectionDetail.fromJson(reader1));
deserializedPrivateLinkScopeValidationDetailsInner.connectionDetails = connectionDetails;
} else {
reader.skipChildren();
}
}
return deserializedPrivateLinkScopeValidationDetailsInner;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy