com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequestResource 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.recoveryservicesbackup.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Base class for validate operation request.
*/
@Fluent
public final class ValidateOperationRequestResource {
/*
* Recovery point ID.
*/
@JsonProperty(value = "id", required = true)
private String id;
/*
* ValidateOperationRequestResource properties
*/
@JsonProperty(value = "properties", required = true)
private ValidateOperationRequest properties;
/**
* Creates an instance of ValidateOperationRequestResource class.
*/
public ValidateOperationRequestResource() {
}
/**
* Get the id property: Recovery point ID.
*
* @return the id value.
*/
public String id() {
return this.id;
}
/**
* Set the id property: Recovery point ID.
*
* @param id the id value to set.
* @return the ValidateOperationRequestResource object itself.
*/
public ValidateOperationRequestResource withId(String id) {
this.id = id;
return this;
}
/**
* Get the properties property: ValidateOperationRequestResource properties.
*
* @return the properties value.
*/
public ValidateOperationRequest properties() {
return this.properties;
}
/**
* Set the properties property: ValidateOperationRequestResource properties.
*
* @param properties the properties value to set.
* @return the ValidateOperationRequestResource object itself.
*/
public ValidateOperationRequestResource withProperties(ValidateOperationRequest properties) {
this.properties = properties;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (id() == null) {
throw LOGGER.logExceptionAsError(
new IllegalArgumentException("Missing required property id in model ValidateOperationRequestResource"));
}
if (properties() == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
"Missing required property properties in model ValidateOperationRequestResource"));
} else {
properties().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(ValidateOperationRequestResource.class);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy