// 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.models;

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

/** Issue contract Base Properties. */
@Fluent
public class IssueContractBaseProperties {
    /*
     * Date and time when the issue was created.
     */
    @JsonProperty(value = "createdDate")
    private OffsetDateTime createdDate;

    /*
     * Status of the issue.
     */
    @JsonProperty(value = "state")
    private State state;

    /*
     * A resource identifier for the API the issue was created for.
     */
    @JsonProperty(value = "apiId")
    private String apiId;

    /**
     * Get the createdDate property: Date and time when the issue was created.
     *
     * @return the createdDate value.
     */
    public OffsetDateTime createdDate() {
        return this.createdDate;
    }

    /**
     * Set the createdDate property: Date and time when the issue was created.
     *
     * @param createdDate the createdDate value to set.
     * @return the IssueContractBaseProperties object itself.
     */
    public IssueContractBaseProperties withCreatedDate(OffsetDateTime createdDate) {
        this.createdDate = createdDate;
        return this;
    }

    /**
     * Get the state property: Status of the issue.
     *
     * @return the state value.
     */
    public State state() {
        return this.state;
    }

    /**
     * Set the state property: Status of the issue.
     *
     * @param state the state value to set.
     * @return the IssueContractBaseProperties object itself.
     */
    public IssueContractBaseProperties withState(State state) {
        this.state = state;
        return this;
    }

    /**
     * Get the apiId property: A resource identifier for the API the issue was created for.
     *
     * @return the apiId value.
     */
    public String apiId() {
        return this.apiId;
    }

    /**
     * Set the apiId property: A resource identifier for the API the issue was created for.
     *
     * @param apiId the apiId value to set.
     * @return the IssueContractBaseProperties object itself.
     */
    public IssueContractBaseProperties withApiId(String apiId) {
        this.apiId = apiId;
        return this;
    }

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