// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.agrifood.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** FarmBeats ARM Resource properties. */
@Fluent
public final class FarmBeatsUpdateProperties {
    /*
     * Sensor integration request model.
     */
    @JsonProperty(value = "sensorIntegration")
    private SensorIntegration sensorIntegration;

    /*
     * Property to allow or block public traffic for an Azure FarmBeats resource.
     */
    @JsonProperty(value = "publicNetworkAccess")
    private PublicNetworkAccess publicNetworkAccess;

    /**
     * Get the sensorIntegration property: Sensor integration request model.
     *
     * @return the sensorIntegration value.
     */
    public SensorIntegration sensorIntegration() {
        return this.sensorIntegration;
    }

    /**
     * Set the sensorIntegration property: Sensor integration request model.
     *
     * @param sensorIntegration the sensorIntegration value to set.
     * @return the FarmBeatsUpdateProperties object itself.
     */
    public FarmBeatsUpdateProperties withSensorIntegration(SensorIntegration sensorIntegration) {
        this.sensorIntegration = sensorIntegration;
        return this;
    }

    /**
     * Get the publicNetworkAccess property: Property to allow or block public traffic for an Azure FarmBeats resource.
     *
     * @return the publicNetworkAccess value.
     */
    public PublicNetworkAccess publicNetworkAccess() {
        return this.publicNetworkAccess;
    }

    /**
     * Set the publicNetworkAccess property: Property to allow or block public traffic for an Azure FarmBeats resource.
     *
     * @param publicNetworkAccess the publicNetworkAccess value to set.
     * @return the FarmBeatsUpdateProperties object itself.
     */
    public FarmBeatsUpdateProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
        this.publicNetworkAccess = publicNetworkAccess;
        return this;
    }

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