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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState;
import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId;
import com.azure.resourcemanager.mobilenetwork.models.SimState;
import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties;
import com.azure.resourcemanager.mobilenetwork.models.SiteProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** SIM resource. */
@Fluent
public final class SimInner extends ProxyResource {
    /*
     * SIM Properties.
     */
    @JsonProperty(value = "properties", required = true)
    private SimPropertiesFormat innerProperties = new SimPropertiesFormat();

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

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

    /**
     * Get the innerProperties property: SIM Properties.
     *
     * @return the innerProperties value.
     */
    private SimPropertiesFormat 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;
    }

    /**
     * Get the authenticationKey property: The Ki value for the SIM.
     *
     * @return the authenticationKey value.
     */
    public String authenticationKey() {
        return this.innerProperties() == null ? null : this.innerProperties().authenticationKey();
    }

    /**
     * Set the authenticationKey property: The Ki value for the SIM.
     *
     * @param authenticationKey the authenticationKey value to set.
     * @return the SimInner object itself.
     */
    public SimInner withAuthenticationKey(String authenticationKey) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SimPropertiesFormat();
        }
        this.innerProperties().withAuthenticationKey(authenticationKey);
        return this;
    }

    /**
     * Get the operatorKeyCode property: The Opc value for the SIM.
     *
     * @return the operatorKeyCode value.
     */
    public String operatorKeyCode() {
        return this.innerProperties() == null ? null : this.innerProperties().operatorKeyCode();
    }

    /**
     * Set the operatorKeyCode property: The Opc value for the SIM.
     *
     * @param operatorKeyCode the operatorKeyCode value to set.
     * @return the SimInner object itself.
     */
    public SimInner withOperatorKeyCode(String operatorKeyCode) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SimPropertiesFormat();
        }
        this.innerProperties().withOperatorKeyCode(operatorKeyCode);
        return this;
    }

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

    /**
     * Get the simState property: The state of the SIM resource.
     *
     * @return the simState value.
     */
    public SimState simState() {
        return this.innerProperties() == null ? null : this.innerProperties().simState();
    }

    /**
     * Get the siteProvisioningState property: A dictionary of sites to the provisioning state of this SIM on that site.
     *
     * @return the siteProvisioningState value.
     */
    public Map<String, SiteProvisioningState> siteProvisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().siteProvisioningState();
    }

    /**
     * Get the internationalMobileSubscriberIdentity property: The international mobile subscriber identity (IMSI) for
     * the SIM.
     *
     * @return the internationalMobileSubscriberIdentity value.
     */
    public String internationalMobileSubscriberIdentity() {
        return this.innerProperties() == null ? null : this.innerProperties().internationalMobileSubscriberIdentity();
    }

    /**
     * Set the internationalMobileSubscriberIdentity property: The international mobile subscriber identity (IMSI) for
     * the SIM.
     *
     * @param internationalMobileSubscriberIdentity the internationalMobileSubscriberIdentity value to set.
     * @return the SimInner object itself.
     */
    public SimInner withInternationalMobileSubscriberIdentity(String internationalMobileSubscriberIdentity) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SimPropertiesFormat();
        }
        this.innerProperties().withInternationalMobileSubscriberIdentity(internationalMobileSubscriberIdentity);
        return this;
    }

    /**
     * Get the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the SIM.
     *
     * @return the integratedCircuitCardIdentifier value.
     */
    public String integratedCircuitCardIdentifier() {
        return this.innerProperties() == null ? null : this.innerProperties().integratedCircuitCardIdentifier();
    }

    /**
     * Set the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the SIM.
     *
     * @param integratedCircuitCardIdentifier the integratedCircuitCardIdentifier value to set.
     * @return the SimInner object itself.
     */
    public SimInner withIntegratedCircuitCardIdentifier(String integratedCircuitCardIdentifier) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SimPropertiesFormat();
        }
        this.innerProperties().withIntegratedCircuitCardIdentifier(integratedCircuitCardIdentifier);
        return this;
    }

    /**
     * Get the deviceType property: An optional free-form text field that can be used to record the device type this SIM
     * is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on
     * this value.
     *
     * @return the deviceType value.
     */
    public String deviceType() {
        return this.innerProperties() == null ? null : this.innerProperties().deviceType();
    }

    /**
     * Set the deviceType property: An optional free-form text field that can be used to record the device type this SIM
     * is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on
     * this value.
     *
     * @param deviceType the deviceType value to set.
     * @return the SimInner object itself.
     */
    public SimInner withDeviceType(String deviceType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SimPropertiesFormat();
        }
        this.innerProperties().withDeviceType(deviceType);
        return this;
    }

    /**
     * Get the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same location as the
     * SIM.
     *
     * @return the simPolicy value.
     */
    public SimPolicyResourceId simPolicy() {
        return this.innerProperties() == null ? null : this.innerProperties().simPolicy();
    }

    /**
     * Set the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same location as the
     * SIM.
     *
     * @param simPolicy the simPolicy value to set.
     * @return the SimInner object itself.
     */
    public SimInner withSimPolicy(SimPolicyResourceId simPolicy) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SimPropertiesFormat();
        }
        this.innerProperties().withSimPolicy(simPolicy);
        return this;
    }

    /**
     * Get the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each address is
     * assigned at a defined network scope, made up of {attached data network, slice}.
     *
     * @return the staticIpConfiguration value.
     */
    public List<SimStaticIpProperties> staticIpConfiguration() {
        return this.innerProperties() == null ? null : this.innerProperties().staticIpConfiguration();
    }

    /**
     * Set the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each address is
     * assigned at a defined network scope, made up of {attached data network, slice}.
     *
     * @param staticIpConfiguration the staticIpConfiguration value to set.
     * @return the SimInner object itself.
     */
    public SimInner withStaticIpConfiguration(List<SimStaticIpProperties> staticIpConfiguration) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SimPropertiesFormat();
        }
        this.innerProperties().withStaticIpConfiguration(staticIpConfiguration);
        return this;
    }

    /**
     * Get the vendorName property: The name of the SIM vendor who provided this SIM, if any.
     *
     * @return the vendorName value.
     */
    public String vendorName() {
        return this.innerProperties() == null ? null : this.innerProperties().vendorName();
    }

    /**
     * Get the vendorKeyFingerprint property: The public key fingerprint of the SIM vendor who provided this SIM, if
     * any.
     *
     * @return the vendorKeyFingerprint value.
     */
    public String vendorKeyFingerprint() {
        return this.innerProperties() == null ? null : this.innerProperties().vendorKeyFingerprint();
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (innerProperties() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property innerProperties in model SimInner"));
        } else {
            innerProperties().validate();
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(SimInner.class);
}
