com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-avs Show documentation
Show all versions of azure-resourcemanager-avs Show documentation
This package contains Microsoft Azure SDK for Avs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure VMware Solution API. Package tag package-2023-09-01.
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.avs.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.avs.models.WorkloadNetworkPublicIpProvisioningState;
import java.io.IOException;
/**
* NSX Public IP Block Properties.
*/
@Fluent
public final class WorkloadNetworkPublicIpProperties implements JsonSerializable {
/*
* Display name of the Public IP Block.
*/
private String displayName;
/*
* Number of Public IPs requested.
*/
private Long numberOfPublicIPs;
/*
* CIDR Block of the Public IP Block.
*/
private String publicIpBlock;
/*
* The provisioning state
*/
private WorkloadNetworkPublicIpProvisioningState provisioningState;
/**
* Creates an instance of WorkloadNetworkPublicIpProperties class.
*/
public WorkloadNetworkPublicIpProperties() {
}
/**
* Get the displayName property: Display name of the Public IP Block.
*
* @return the displayName value.
*/
public String displayName() {
return this.displayName;
}
/**
* Set the displayName property: Display name of the Public IP Block.
*
* @param displayName the displayName value to set.
* @return the WorkloadNetworkPublicIpProperties object itself.
*/
public WorkloadNetworkPublicIpProperties withDisplayName(String displayName) {
this.displayName = displayName;
return this;
}
/**
* Get the numberOfPublicIPs property: Number of Public IPs requested.
*
* @return the numberOfPublicIPs value.
*/
public Long numberOfPublicIPs() {
return this.numberOfPublicIPs;
}
/**
* Set the numberOfPublicIPs property: Number of Public IPs requested.
*
* @param numberOfPublicIPs the numberOfPublicIPs value to set.
* @return the WorkloadNetworkPublicIpProperties object itself.
*/
public WorkloadNetworkPublicIpProperties withNumberOfPublicIPs(Long numberOfPublicIPs) {
this.numberOfPublicIPs = numberOfPublicIPs;
return this;
}
/**
* Get the publicIpBlock property: CIDR Block of the Public IP Block.
*
* @return the publicIpBlock value.
*/
public String publicIpBlock() {
return this.publicIpBlock;
}
/**
* Get the provisioningState property: The provisioning state.
*
* @return the provisioningState value.
*/
public WorkloadNetworkPublicIpProvisioningState provisioningState() {
return this.provisioningState;
}
/**
* 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("displayName", this.displayName);
jsonWriter.writeNumberField("numberOfPublicIPs", this.numberOfPublicIPs);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of WorkloadNetworkPublicIpProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of WorkloadNetworkPublicIpProperties 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 WorkloadNetworkPublicIpProperties.
*/
public static WorkloadNetworkPublicIpProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
WorkloadNetworkPublicIpProperties deserializedWorkloadNetworkPublicIpProperties
= new WorkloadNetworkPublicIpProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("displayName".equals(fieldName)) {
deserializedWorkloadNetworkPublicIpProperties.displayName = reader.getString();
} else if ("numberOfPublicIPs".equals(fieldName)) {
deserializedWorkloadNetworkPublicIpProperties.numberOfPublicIPs
= reader.getNullable(JsonReader::getLong);
} else if ("publicIPBlock".equals(fieldName)) {
deserializedWorkloadNetworkPublicIpProperties.publicIpBlock = reader.getString();
} else if ("provisioningState".equals(fieldName)) {
deserializedWorkloadNetworkPublicIpProperties.provisioningState
= WorkloadNetworkPublicIpProvisioningState.fromString(reader.getString());
} else {
reader.skipChildren();
}
}
return deserializedWorkloadNetworkPublicIpProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy