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

package com.azure.resourcemanager.avs.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum;
import com.azure.resourcemanager.avs.models.PortMirroringStatusEnum;
import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;

/** NSX Port Mirroring. */
@Fluent
public final class WorkloadNetworkPortMirroringInner extends ProxyResource {
    /*
     * Port Mirroring Properties.
     */
    @JsonProperty(value = "properties")
    private WorkloadNetworkPortMirroringProperties innerProperties;

    /** Creates an instance of WorkloadNetworkPortMirroringInner class. */
    public WorkloadNetworkPortMirroringInner() {
    }

    /**
     * Get the innerProperties property: Port Mirroring Properties.
     *
     * @return the innerProperties value.
     */
    private WorkloadNetworkPortMirroringProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the displayName property: Display name of the port mirroring profile.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Set the displayName property: Display name of the port mirroring profile.
     *
     * @param displayName the displayName value to set.
     * @return the WorkloadNetworkPortMirroringInner object itself.
     */
    public WorkloadNetworkPortMirroringInner withDisplayName(String displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkPortMirroringProperties();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

    /**
     * Get the direction property: Direction of port mirroring profile.
     *
     * @return the direction value.
     */
    public PortMirroringDirectionEnum direction() {
        return this.innerProperties() == null ? null : this.innerProperties().direction();
    }

    /**
     * Set the direction property: Direction of port mirroring profile.
     *
     * @param direction the direction value to set.
     * @return the WorkloadNetworkPortMirroringInner object itself.
     */
    public WorkloadNetworkPortMirroringInner withDirection(PortMirroringDirectionEnum direction) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkPortMirroringProperties();
        }
        this.innerProperties().withDirection(direction);
        return this;
    }

    /**
     * Get the source property: Source VM Group.
     *
     * @return the source value.
     */
    public String source() {
        return this.innerProperties() == null ? null : this.innerProperties().source();
    }

    /**
     * Set the source property: Source VM Group.
     *
     * @param source the source value to set.
     * @return the WorkloadNetworkPortMirroringInner object itself.
     */
    public WorkloadNetworkPortMirroringInner withSource(String source) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkPortMirroringProperties();
        }
        this.innerProperties().withSource(source);
        return this;
    }

    /**
     * Get the destination property: Destination VM Group.
     *
     * @return the destination value.
     */
    public String destination() {
        return this.innerProperties() == null ? null : this.innerProperties().destination();
    }

    /**
     * Set the destination property: Destination VM Group.
     *
     * @param destination the destination value to set.
     * @return the WorkloadNetworkPortMirroringInner object itself.
     */
    public WorkloadNetworkPortMirroringInner withDestination(String destination) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkPortMirroringProperties();
        }
        this.innerProperties().withDestination(destination);
        return this;
    }

    /**
     * Get the status property: Port Mirroring Status.
     *
     * @return the status value.
     */
    public PortMirroringStatusEnum status() {
        return this.innerProperties() == null ? null : this.innerProperties().status();
    }

    /**
     * Get the provisioningState property: The provisioning state.
     *
     * @return the provisioningState value.
     */
    public WorkloadNetworkPortMirroringProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the revision property: NSX revision number.
     *
     * @return the revision value.
     */
    public Long revision() {
        return this.innerProperties() == null ? null : this.innerProperties().revision();
    }

    /**
     * Set the revision property: NSX revision number.
     *
     * @param revision the revision value to set.
     * @return the WorkloadNetworkPortMirroringInner object itself.
     */
    public WorkloadNetworkPortMirroringInner withRevision(Long revision) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkPortMirroringProperties();
        }
        this.innerProperties().withRevision(revision);
        return this;
    }

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