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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.voiceservices.models.ProvisioningState;
import com.azure.resourcemanager.voiceservices.models.TestLinePurpose;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** A TestLine resource. */
@Fluent
public final class TestLineInner extends Resource {
    /*
     * The resource-specific properties for this resource.
     */
    @JsonProperty(value = "properties")
    private TestLineProperties innerProperties;

    /*
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

    /**
     * Get the innerProperties property: The resource-specific properties for this resource.
     *
     * @return the innerProperties value.
     */
    private TestLineProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /** {@inheritDoc} */
    @Override
    public TestLineInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public TestLineInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

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

    /**
     * Get the phoneNumber property: The phone number.
     *
     * @return the phoneNumber value.
     */
    public String phoneNumber() {
        return this.innerProperties() == null ? null : this.innerProperties().phoneNumber();
    }

    /**
     * Set the phoneNumber property: The phone number.
     *
     * @param phoneNumber the phoneNumber value to set.
     * @return the TestLineInner object itself.
     */
    public TestLineInner withPhoneNumber(String phoneNumber) {
        if (this.innerProperties() == null) {
            this.innerProperties = new TestLineProperties();
        }
        this.innerProperties().withPhoneNumber(phoneNumber);
        return this;
    }

    /**
     * Get the purpose property: Purpose of this test line, e.g. automated or manual testing.
     *
     * @return the purpose value.
     */
    public TestLinePurpose purpose() {
        return this.innerProperties() == null ? null : this.innerProperties().purpose();
    }

    /**
     * Set the purpose property: Purpose of this test line, e.g. automated or manual testing.
     *
     * @param purpose the purpose value to set.
     * @return the TestLineInner object itself.
     */
    public TestLineInner withPurpose(TestLinePurpose purpose) {
        if (this.innerProperties() == null) {
            this.innerProperties = new TestLineProperties();
        }
        this.innerProperties().withPurpose(purpose);
        return this;
    }

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