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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.chaos.models.CapabilityTypePropertiesRuntimeProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Model that represents a Capability Type resource. */
@Fluent
public final class CapabilityTypeInner extends ProxyResource {
    /*
     * The system metadata properties of the capability type resource.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

    /*
     * Location of the Capability Type resource.
     */
    @JsonProperty(value = "location")
    private String location;

    /*
     * The properties of the capability type resource.
     */
    @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
    private CapabilityTypeProperties innerProperties;

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

    /**
     * Get the systemData property: The system metadata properties of the capability type resource.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the location property: Location of the Capability Type resource.
     *
     * @return the location value.
     */
    public String location() {
        return this.location;
    }

    /**
     * Set the location property: Location of the Capability Type resource.
     *
     * @param location the location value to set.
     * @return the CapabilityTypeInner object itself.
     */
    public CapabilityTypeInner withLocation(String location) {
        this.location = location;
        return this;
    }

    /**
     * Get the innerProperties property: The properties of the capability type resource.
     *
     * @return the innerProperties value.
     */
    private CapabilityTypeProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the publisher property: String of the Publisher that this Capability Type extends.
     *
     * @return the publisher value.
     */
    public String publisher() {
        return this.innerProperties() == null ? null : this.innerProperties().publisher();
    }

    /**
     * Get the targetType property: String of the Target Type that this Capability Type extends.
     *
     * @return the targetType value.
     */
    public String targetType() {
        return this.innerProperties() == null ? null : this.innerProperties().targetType();
    }

    /**
     * Get the displayName property: Localized string of the display name.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Get the description property: Localized string of the description.
     *
     * @return the description value.
     */
    public String description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Get the parametersSchema property: URL to retrieve JSON schema of the Capability Type parameters.
     *
     * @return the parametersSchema value.
     */
    public String parametersSchema() {
        return this.innerProperties() == null ? null : this.innerProperties().parametersSchema();
    }

    /**
     * Get the urn property: String of the URN for this Capability Type.
     *
     * @return the urn value.
     */
    public String urn() {
        return this.innerProperties() == null ? null : this.innerProperties().urn();
    }

    /**
     * Get the kind property: String of the kind of this Capability Type.
     *
     * @return the kind value.
     */
    public String kind() {
        return this.innerProperties() == null ? null : this.innerProperties().kind();
    }

    /**
     * Get the azureRbacActions property: Control plane actions necessary to execute capability type.
     *
     * @return the azureRbacActions value.
     */
    public List<String> azureRbacActions() {
        return this.innerProperties() == null ? null : this.innerProperties().azureRbacActions();
    }

    /**
     * Set the azureRbacActions property: Control plane actions necessary to execute capability type.
     *
     * @param azureRbacActions the azureRbacActions value to set.
     * @return the CapabilityTypeInner object itself.
     */
    public CapabilityTypeInner withAzureRbacActions(List<String> azureRbacActions) {
        if (this.innerProperties() == null) {
            this.innerProperties = new CapabilityTypeProperties();
        }
        this.innerProperties().withAzureRbacActions(azureRbacActions);
        return this;
    }

    /**
     * Get the azureRbacDataActions property: Data plane actions necessary to execute capability type.
     *
     * @return the azureRbacDataActions value.
     */
    public List<String> azureRbacDataActions() {
        return this.innerProperties() == null ? null : this.innerProperties().azureRbacDataActions();
    }

    /**
     * Set the azureRbacDataActions property: Data plane actions necessary to execute capability type.
     *
     * @param azureRbacDataActions the azureRbacDataActions value to set.
     * @return the CapabilityTypeInner object itself.
     */
    public CapabilityTypeInner withAzureRbacDataActions(List<String> azureRbacDataActions) {
        if (this.innerProperties() == null) {
            this.innerProperties = new CapabilityTypeProperties();
        }
        this.innerProperties().withAzureRbacDataActions(azureRbacDataActions);
        return this;
    }

    /**
     * Get the runtimeProperties property: Runtime properties of this Capability Type.
     *
     * @return the runtimeProperties value.
     */
    public CapabilityTypePropertiesRuntimeProperties runtimeProperties() {
        return this.innerProperties() == null ? null : this.innerProperties().runtimeProperties();
    }

    /**
     * Set the runtimeProperties property: Runtime properties of this Capability Type.
     *
     * @param runtimeProperties the runtimeProperties value to set.
     * @return the CapabilityTypeInner object itself.
     */
    public CapabilityTypeInner withRuntimeProperties(CapabilityTypePropertiesRuntimeProperties runtimeProperties) {
        if (this.innerProperties() == null) {
            this.innerProperties = new CapabilityTypeProperties();
        }
        this.innerProperties().withRuntimeProperties(runtimeProperties);
        return this;
    }

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