com.azure.resourcemanager.hdinsight.models.ApplicationGetHttpsEndpoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-hdinsight Show documentation
Show all versions of azure-resourcemanager-hdinsight Show documentation
This package contains Microsoft Azure SDK for HDInsight Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HDInsight Management Client. Package tag package-2024-08-preview.
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.hdinsight.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;
/**
* Gets the application HTTP endpoints.
*/
@Fluent
public final class ApplicationGetHttpsEndpoint implements JsonSerializable {
/*
* The list of access modes for the application.
*/
private List accessModes;
/*
* The location of the endpoint.
*/
private String location;
/*
* The destination port to connect to.
*/
private Integer destinationPort;
/*
* The public port to connect to.
*/
private Integer publicPort;
/*
* The private ip address of the endpoint.
*/
private String privateIpAddress;
/*
* The subdomain suffix of the application.
*/
private String subDomainSuffix;
/*
* The value indicates whether to disable GatewayAuth.
*/
private Boolean disableGatewayAuth;
/**
* Creates an instance of ApplicationGetHttpsEndpoint class.
*/
public ApplicationGetHttpsEndpoint() {
}
/**
* Get the accessModes property: The list of access modes for the application.
*
* @return the accessModes value.
*/
public List accessModes() {
return this.accessModes;
}
/**
* Set the accessModes property: The list of access modes for the application.
*
* @param accessModes the accessModes value to set.
* @return the ApplicationGetHttpsEndpoint object itself.
*/
public ApplicationGetHttpsEndpoint withAccessModes(List accessModes) {
this.accessModes = accessModes;
return this;
}
/**
* Get the location property: The location of the endpoint.
*
* @return the location value.
*/
public String location() {
return this.location;
}
/**
* Get the destinationPort property: The destination port to connect to.
*
* @return the destinationPort value.
*/
public Integer destinationPort() {
return this.destinationPort;
}
/**
* Set the destinationPort property: The destination port to connect to.
*
* @param destinationPort the destinationPort value to set.
* @return the ApplicationGetHttpsEndpoint object itself.
*/
public ApplicationGetHttpsEndpoint withDestinationPort(Integer destinationPort) {
this.destinationPort = destinationPort;
return this;
}
/**
* Get the publicPort property: The public port to connect to.
*
* @return the publicPort value.
*/
public Integer publicPort() {
return this.publicPort;
}
/**
* Get the privateIpAddress property: The private ip address of the endpoint.
*
* @return the privateIpAddress value.
*/
public String privateIpAddress() {
return this.privateIpAddress;
}
/**
* Set the privateIpAddress property: The private ip address of the endpoint.
*
* @param privateIpAddress the privateIpAddress value to set.
* @return the ApplicationGetHttpsEndpoint object itself.
*/
public ApplicationGetHttpsEndpoint withPrivateIpAddress(String privateIpAddress) {
this.privateIpAddress = privateIpAddress;
return this;
}
/**
* Get the subDomainSuffix property: The subdomain suffix of the application.
*
* @return the subDomainSuffix value.
*/
public String subDomainSuffix() {
return this.subDomainSuffix;
}
/**
* Set the subDomainSuffix property: The subdomain suffix of the application.
*
* @param subDomainSuffix the subDomainSuffix value to set.
* @return the ApplicationGetHttpsEndpoint object itself.
*/
public ApplicationGetHttpsEndpoint withSubDomainSuffix(String subDomainSuffix) {
this.subDomainSuffix = subDomainSuffix;
return this;
}
/**
* Get the disableGatewayAuth property: The value indicates whether to disable GatewayAuth.
*
* @return the disableGatewayAuth value.
*/
public Boolean disableGatewayAuth() {
return this.disableGatewayAuth;
}
/**
* Set the disableGatewayAuth property: The value indicates whether to disable GatewayAuth.
*
* @param disableGatewayAuth the disableGatewayAuth value to set.
* @return the ApplicationGetHttpsEndpoint object itself.
*/
public ApplicationGetHttpsEndpoint withDisableGatewayAuth(Boolean disableGatewayAuth) {
this.disableGatewayAuth = disableGatewayAuth;
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.writeArrayField("accessModes", this.accessModes, (writer, element) -> writer.writeString(element));
jsonWriter.writeNumberField("destinationPort", this.destinationPort);
jsonWriter.writeStringField("privateIPAddress", this.privateIpAddress);
jsonWriter.writeStringField("subDomainSuffix", this.subDomainSuffix);
jsonWriter.writeBooleanField("disableGatewayAuth", this.disableGatewayAuth);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ApplicationGetHttpsEndpoint from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ApplicationGetHttpsEndpoint 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 ApplicationGetHttpsEndpoint.
*/
public static ApplicationGetHttpsEndpoint fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ApplicationGetHttpsEndpoint deserializedApplicationGetHttpsEndpoint = new ApplicationGetHttpsEndpoint();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("accessModes".equals(fieldName)) {
List accessModes = reader.readArray(reader1 -> reader1.getString());
deserializedApplicationGetHttpsEndpoint.accessModes = accessModes;
} else if ("location".equals(fieldName)) {
deserializedApplicationGetHttpsEndpoint.location = reader.getString();
} else if ("destinationPort".equals(fieldName)) {
deserializedApplicationGetHttpsEndpoint.destinationPort = reader.getNullable(JsonReader::getInt);
} else if ("publicPort".equals(fieldName)) {
deserializedApplicationGetHttpsEndpoint.publicPort = reader.getNullable(JsonReader::getInt);
} else if ("privateIPAddress".equals(fieldName)) {
deserializedApplicationGetHttpsEndpoint.privateIpAddress = reader.getString();
} else if ("subDomainSuffix".equals(fieldName)) {
deserializedApplicationGetHttpsEndpoint.subDomainSuffix = reader.getString();
} else if ("disableGatewayAuth".equals(fieldName)) {
deserializedApplicationGetHttpsEndpoint.disableGatewayAuth
= reader.getNullable(JsonReader::getBoolean);
} else {
reader.skipChildren();
}
}
return deserializedApplicationGetHttpsEndpoint;
});
}
}