// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.automation.models.WorkerType;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Definition of hybrid runbook worker property. */
@Fluent
public final class HybridRunbookWorkerProperties {
    /*
     * Gets or sets the assigned machine IP address.
     */
    @JsonProperty(value = "ip")
    private String ip;

    /*
     * Gets or sets the registration time of the worker machine.
     */
    @JsonProperty(value = "registeredDateTime")
    private OffsetDateTime registeredDateTime;

    /*
     * Last Heartbeat from the Worker
     */
    @JsonProperty(value = "lastSeenDateTime")
    private OffsetDateTime lastSeenDateTime;

    /*
     * Azure Resource Manager Id for a virtual machine.
     */
    @JsonProperty(value = "vmResourceId")
    private String vmResourceId;

    /*
     * Type of the HybridWorker.
     */
    @JsonProperty(value = "workerType")
    private WorkerType workerType;

    /*
     * Name of the HybridWorker.
     */
    @JsonProperty(value = "workerName")
    private String workerName;

    /**
     * Get the ip property: Gets or sets the assigned machine IP address.
     *
     * @return the ip value.
     */
    public String ip() {
        return this.ip;
    }

    /**
     * Set the ip property: Gets or sets the assigned machine IP address.
     *
     * @param ip the ip value to set.
     * @return the HybridRunbookWorkerProperties object itself.
     */
    public HybridRunbookWorkerProperties withIp(String ip) {
        this.ip = ip;
        return this;
    }

    /**
     * Get the registeredDateTime property: Gets or sets the registration time of the worker machine.
     *
     * @return the registeredDateTime value.
     */
    public OffsetDateTime registeredDateTime() {
        return this.registeredDateTime;
    }

    /**
     * Set the registeredDateTime property: Gets or sets the registration time of the worker machine.
     *
     * @param registeredDateTime the registeredDateTime value to set.
     * @return the HybridRunbookWorkerProperties object itself.
     */
    public HybridRunbookWorkerProperties withRegisteredDateTime(OffsetDateTime registeredDateTime) {
        this.registeredDateTime = registeredDateTime;
        return this;
    }

    /**
     * Get the lastSeenDateTime property: Last Heartbeat from the Worker.
     *
     * @return the lastSeenDateTime value.
     */
    public OffsetDateTime lastSeenDateTime() {
        return this.lastSeenDateTime;
    }

    /**
     * Set the lastSeenDateTime property: Last Heartbeat from the Worker.
     *
     * @param lastSeenDateTime the lastSeenDateTime value to set.
     * @return the HybridRunbookWorkerProperties object itself.
     */
    public HybridRunbookWorkerProperties withLastSeenDateTime(OffsetDateTime lastSeenDateTime) {
        this.lastSeenDateTime = lastSeenDateTime;
        return this;
    }

    /**
     * Get the vmResourceId property: Azure Resource Manager Id for a virtual machine.
     *
     * @return the vmResourceId value.
     */
    public String vmResourceId() {
        return this.vmResourceId;
    }

    /**
     * Set the vmResourceId property: Azure Resource Manager Id for a virtual machine.
     *
     * @param vmResourceId the vmResourceId value to set.
     * @return the HybridRunbookWorkerProperties object itself.
     */
    public HybridRunbookWorkerProperties withVmResourceId(String vmResourceId) {
        this.vmResourceId = vmResourceId;
        return this;
    }

    /**
     * Get the workerType property: Type of the HybridWorker.
     *
     * @return the workerType value.
     */
    public WorkerType workerType() {
        return this.workerType;
    }

    /**
     * Set the workerType property: Type of the HybridWorker.
     *
     * @param workerType the workerType value to set.
     * @return the HybridRunbookWorkerProperties object itself.
     */
    public HybridRunbookWorkerProperties withWorkerType(WorkerType workerType) {
        this.workerType = workerType;
        return this;
    }

    /**
     * Get the workerName property: Name of the HybridWorker.
     *
     * @return the workerName value.
     */
    public String workerName() {
        return this.workerName;
    }

    /**
     * Set the workerName property: Name of the HybridWorker.
     *
     * @param workerName the workerName value to set.
     * @return the HybridRunbookWorkerProperties object itself.
     */
    public HybridRunbookWorkerProperties withWorkerName(String workerName) {
        this.workerName = workerName;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
