
com.azure.resourcemanager.deviceupdate.models.PrivateEndpointUpdate 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.deviceupdate.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;
/**
* Private endpoint update details.
*/
@Fluent
public final class PrivateEndpointUpdate implements JsonSerializable {
/*
* Remote endpoint resource ID.
*/
private String id;
/*
* ARM location of the remote private endpoint.
*/
private String location;
/*
* Original subscription ID needed by Microsoft.Network.
*/
private String immutableSubscriptionId;
/*
* Original resource ID needed by Microsoft.Network.
*/
private String immutableResourceId;
/*
* Virtual network traffic tag.
*/
private String vnetTrafficTag;
/**
* Creates an instance of PrivateEndpointUpdate class.
*/
public PrivateEndpointUpdate() {
}
/**
* Get the id property: Remote endpoint resource ID.
*
* @return the id value.
*/
public String id() {
return this.id;
}
/**
* Set the id property: Remote endpoint resource ID.
*
* @param id the id value to set.
* @return the PrivateEndpointUpdate object itself.
*/
public PrivateEndpointUpdate withId(String id) {
this.id = id;
return this;
}
/**
* Get the location property: ARM location of the remote private endpoint.
*
* @return the location value.
*/
public String location() {
return this.location;
}
/**
* Set the location property: ARM location of the remote private endpoint.
*
* @param location the location value to set.
* @return the PrivateEndpointUpdate object itself.
*/
public PrivateEndpointUpdate withLocation(String location) {
this.location = location;
return this;
}
/**
* Get the immutableSubscriptionId property: Original subscription ID needed by Microsoft.Network.
*
* @return the immutableSubscriptionId value.
*/
public String immutableSubscriptionId() {
return this.immutableSubscriptionId;
}
/**
* Set the immutableSubscriptionId property: Original subscription ID needed by Microsoft.Network.
*
* @param immutableSubscriptionId the immutableSubscriptionId value to set.
* @return the PrivateEndpointUpdate object itself.
*/
public PrivateEndpointUpdate withImmutableSubscriptionId(String immutableSubscriptionId) {
this.immutableSubscriptionId = immutableSubscriptionId;
return this;
}
/**
* Get the immutableResourceId property: Original resource ID needed by Microsoft.Network.
*
* @return the immutableResourceId value.
*/
public String immutableResourceId() {
return this.immutableResourceId;
}
/**
* Set the immutableResourceId property: Original resource ID needed by Microsoft.Network.
*
* @param immutableResourceId the immutableResourceId value to set.
* @return the PrivateEndpointUpdate object itself.
*/
public PrivateEndpointUpdate withImmutableResourceId(String immutableResourceId) {
this.immutableResourceId = immutableResourceId;
return this;
}
/**
* Get the vnetTrafficTag property: Virtual network traffic tag.
*
* @return the vnetTrafficTag value.
*/
public String vnetTrafficTag() {
return this.vnetTrafficTag;
}
/**
* Set the vnetTrafficTag property: Virtual network traffic tag.
*
* @param vnetTrafficTag the vnetTrafficTag value to set.
* @return the PrivateEndpointUpdate object itself.
*/
public PrivateEndpointUpdate withVnetTrafficTag(String vnetTrafficTag) {
this.vnetTrafficTag = vnetTrafficTag;
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("id", this.id);
jsonWriter.writeStringField("location", this.location);
jsonWriter.writeStringField("immutableSubscriptionId", this.immutableSubscriptionId);
jsonWriter.writeStringField("immutableResourceId", this.immutableResourceId);
jsonWriter.writeStringField("vnetTrafficTag", this.vnetTrafficTag);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of PrivateEndpointUpdate from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of PrivateEndpointUpdate 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 PrivateEndpointUpdate.
*/
public static PrivateEndpointUpdate fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
PrivateEndpointUpdate deserializedPrivateEndpointUpdate = new PrivateEndpointUpdate();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("id".equals(fieldName)) {
deserializedPrivateEndpointUpdate.id = reader.getString();
} else if ("location".equals(fieldName)) {
deserializedPrivateEndpointUpdate.location = reader.getString();
} else if ("immutableSubscriptionId".equals(fieldName)) {
deserializedPrivateEndpointUpdate.immutableSubscriptionId = reader.getString();
} else if ("immutableResourceId".equals(fieldName)) {
deserializedPrivateEndpointUpdate.immutableResourceId = reader.getString();
} else if ("vnetTrafficTag".equals(fieldName)) {
deserializedPrivateEndpointUpdate.vnetTrafficTag = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedPrivateEndpointUpdate;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy