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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Deleted API Management Service information. */
@Fluent
public final class DeletedServiceContractInner extends ProxyResource {
    /*
     * Deleted API Management Service details.
     */
    @JsonProperty(value = "properties")
    private DeletedServiceContractProperties innerProperties;

    /*
     * API Management Service Master Location.
     */
    @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY)
    private String location;

    /**
     * Get the innerProperties property: Deleted API Management Service details.
     *
     * @return the innerProperties value.
     */
    private DeletedServiceContractProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the location property: API Management Service Master Location.
     *
     * @return the location value.
     */
    public String location() {
        return this.location;
    }

    /**
     * Get the serviceId property: Fully-qualified API Management Service Resource ID.
     *
     * @return the serviceId value.
     */
    public String serviceId() {
        return this.innerProperties() == null ? null : this.innerProperties().serviceId();
    }

    /**
     * Set the serviceId property: Fully-qualified API Management Service Resource ID.
     *
     * @param serviceId the serviceId value to set.
     * @return the DeletedServiceContractInner object itself.
     */
    public DeletedServiceContractInner withServiceId(String serviceId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DeletedServiceContractProperties();
        }
        this.innerProperties().withServiceId(serviceId);
        return this;
    }

    /**
     * Get the scheduledPurgeDate property: UTC Date and Time when the service will be automatically purged. The date
     * conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
     *
     * @return the scheduledPurgeDate value.
     */
    public OffsetDateTime scheduledPurgeDate() {
        return this.innerProperties() == null ? null : this.innerProperties().scheduledPurgeDate();
    }

    /**
     * Set the scheduledPurgeDate property: UTC Date and Time when the service will be automatically purged. The date
     * conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
     *
     * @param scheduledPurgeDate the scheduledPurgeDate value to set.
     * @return the DeletedServiceContractInner object itself.
     */
    public DeletedServiceContractInner withScheduledPurgeDate(OffsetDateTime scheduledPurgeDate) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DeletedServiceContractProperties();
        }
        this.innerProperties().withScheduledPurgeDate(scheduledPurgeDate);
        return this;
    }

    /**
     * Get the deletionDate property: UTC Timestamp when the service was soft-deleted. The date conforms to the
     * following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
     *
     * @return the deletionDate value.
     */
    public OffsetDateTime deletionDate() {
        return this.innerProperties() == null ? null : this.innerProperties().deletionDate();
    }

    /**
     * Set the deletionDate property: UTC Timestamp when the service was soft-deleted. The date conforms to the
     * following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
     *
     * @param deletionDate the deletionDate value to set.
     * @return the DeletedServiceContractInner object itself.
     */
    public DeletedServiceContractInner withDeletionDate(OffsetDateTime deletionDate) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DeletedServiceContractProperties();
        }
        this.innerProperties().withDeletionDate(deletionDate);
        return this;
    }

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