com.azure.resourcemanager.hybridcompute.models.LocationData 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.
// 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.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Metadata pertaining to the geographic location of the resource.
*/
@Fluent
public final class LocationData {
/*
* A canonical name for the geographic or physical location.
*/
@JsonProperty(value = "name", required = true)
private String name;
/*
* The city or locality where the resource is located.
*/
@JsonProperty(value = "city")
private String city;
/*
* The district, state, or province where the resource is located.
*/
@JsonProperty(value = "district")
private String district;
/*
* The country or region where the resource is located
*/
@JsonProperty(value = "countryOrRegion")
private String countryOrRegion;
/**
* Creates an instance of LocationData class.
*/
public LocationData() {
}
/**
* Get the name property: A canonical name for the geographic or physical location.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Set the name property: A canonical name for the geographic or physical location.
*
* @param name the name value to set.
* @return the LocationData object itself.
*/
public LocationData withName(String name) {
this.name = name;
return this;
}
/**
* Get the city property: The city or locality where the resource is located.
*
* @return the city value.
*/
public String city() {
return this.city;
}
/**
* Set the city property: The city or locality where the resource is located.
*
* @param city the city value to set.
* @return the LocationData object itself.
*/
public LocationData withCity(String city) {
this.city = city;
return this;
}
/**
* Get the district property: The district, state, or province where the resource is located.
*
* @return the district value.
*/
public String district() {
return this.district;
}
/**
* Set the district property: The district, state, or province where the resource is located.
*
* @param district the district value to set.
* @return the LocationData object itself.
*/
public LocationData withDistrict(String district) {
this.district = district;
return this;
}
/**
* Get the countryOrRegion property: The country or region where the resource is located.
*
* @return the countryOrRegion value.
*/
public String countryOrRegion() {
return this.countryOrRegion;
}
/**
* Set the countryOrRegion property: The country or region where the resource is located.
*
* @param countryOrRegion the countryOrRegion value to set.
* @return the LocationData object itself.
*/
public LocationData withCountryOrRegion(String countryOrRegion) {
this.countryOrRegion = countryOrRegion;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (name() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException("Missing required property name in model LocationData"));
}
}
private static final ClientLogger LOGGER = new ClientLogger(LocationData.class);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy