
com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-netapp Show documentation
Show all versions of azure-resourcemanager-netapp Show documentation
This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-preview-2024-07-01-preview.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.netapp.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Resource name availability request content. */
@Fluent
public final class ResourceNameAvailabilityRequest {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceNameAvailabilityRequest.class);
/*
* Resource name to verify.
*/
@JsonProperty(value = "name", required = true)
private String name;
/*
* Resource type used for verification.
*/
@JsonProperty(value = "type", required = true)
private CheckNameResourceTypes type;
/*
* Resource group name.
*/
@JsonProperty(value = "resourceGroup", required = true)
private String resourceGroup;
/**
* Get the name property: Resource name to verify.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Set the name property: Resource name to verify.
*
* @param name the name value to set.
* @return the ResourceNameAvailabilityRequest object itself.
*/
public ResourceNameAvailabilityRequest withName(String name) {
this.name = name;
return this;
}
/**
* Get the type property: Resource type used for verification.
*
* @return the type value.
*/
public CheckNameResourceTypes type() {
return this.type;
}
/**
* Set the type property: Resource type used for verification.
*
* @param type the type value to set.
* @return the ResourceNameAvailabilityRequest object itself.
*/
public ResourceNameAvailabilityRequest withType(CheckNameResourceTypes type) {
this.type = type;
return this;
}
/**
* Get the resourceGroup property: Resource group name.
*
* @return the resourceGroup value.
*/
public String resourceGroup() {
return this.resourceGroup;
}
/**
* Set the resourceGroup property: Resource group name.
*
* @param resourceGroup the resourceGroup value to set.
* @return the ResourceNameAvailabilityRequest object itself.
*/
public ResourceNameAvailabilityRequest withResourceGroup(String resourceGroup) {
this.resourceGroup = resourceGroup;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (name() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property name in model ResourceNameAvailabilityRequest"));
}
if (type() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property type in model ResourceNameAvailabilityRequest"));
}
if (resourceGroup() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property resourceGroup in model ResourceNameAvailabilityRequest"));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy