All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.automation.models.AgentRegistrationRegenerateKeyParameter Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for Automation Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Automation Client. Package tag package-2019-06.

There is a newer version: 1.0.0
Show 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.automation.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;

/** The parameters supplied to the regenerate keys operation. */
@Fluent
public final class AgentRegistrationRegenerateKeyParameter {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(AgentRegistrationRegenerateKeyParameter.class);

    /*
     * Gets or sets the agent registration key name - primary or secondary.
     */
    @JsonProperty(value = "keyName", required = true)
    private AgentRegistrationKeyName keyName;

    /**
     * Get the keyName property: Gets or sets the agent registration key name - primary or secondary.
     *
     * @return the keyName value.
     */
    public AgentRegistrationKeyName keyName() {
        return this.keyName;
    }

    /**
     * Set the keyName property: Gets or sets the agent registration key name - primary or secondary.
     *
     * @param keyName the keyName value to set.
     * @return the AgentRegistrationRegenerateKeyParameter object itself.
     */
    public AgentRegistrationRegenerateKeyParameter withKeyName(AgentRegistrationKeyName keyName) {
        this.keyName = keyName;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (keyName() == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property keyName in model AgentRegistrationRegenerateKeyParameter"));
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy