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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The CheckinManifestInfo model. */
@Fluent
public final class CheckinManifestInfoInner {
    /*
     * The isCheckedIn property.
     */
    @JsonProperty(value = "isCheckedIn", required = true)
    private boolean isCheckedIn;

    /*
     * The statusMessage property.
     */
    @JsonProperty(value = "statusMessage", required = true)
    private String statusMessage;

    /*
     * The pullRequest property.
     */
    @JsonProperty(value = "pullRequest")
    private String pullRequest;

    /*
     * The commitId property.
     */
    @JsonProperty(value = "commitId")
    private String commitId;

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

    /**
     * Get the isCheckedIn property: The isCheckedIn property.
     *
     * @return the isCheckedIn value.
     */
    public boolean isCheckedIn() {
        return this.isCheckedIn;
    }

    /**
     * Set the isCheckedIn property: The isCheckedIn property.
     *
     * @param isCheckedIn the isCheckedIn value to set.
     * @return the CheckinManifestInfoInner object itself.
     */
    public CheckinManifestInfoInner withIsCheckedIn(boolean isCheckedIn) {
        this.isCheckedIn = isCheckedIn;
        return this;
    }

    /**
     * Get the statusMessage property: The statusMessage property.
     *
     * @return the statusMessage value.
     */
    public String statusMessage() {
        return this.statusMessage;
    }

    /**
     * Set the statusMessage property: The statusMessage property.
     *
     * @param statusMessage the statusMessage value to set.
     * @return the CheckinManifestInfoInner object itself.
     */
    public CheckinManifestInfoInner withStatusMessage(String statusMessage) {
        this.statusMessage = statusMessage;
        return this;
    }

    /**
     * Get the pullRequest property: The pullRequest property.
     *
     * @return the pullRequest value.
     */
    public String pullRequest() {
        return this.pullRequest;
    }

    /**
     * Set the pullRequest property: The pullRequest property.
     *
     * @param pullRequest the pullRequest value to set.
     * @return the CheckinManifestInfoInner object itself.
     */
    public CheckinManifestInfoInner withPullRequest(String pullRequest) {
        this.pullRequest = pullRequest;
        return this;
    }

    /**
     * Get the commitId property: The commitId property.
     *
     * @return the commitId value.
     */
    public String commitId() {
        return this.commitId;
    }

    /**
     * Set the commitId property: The commitId property.
     *
     * @param commitId the commitId value to set.
     * @return the CheckinManifestInfoInner object itself.
     */
    public CheckinManifestInfoInner withCommitId(String commitId) {
        this.commitId = commitId;
        return this;
    }

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

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