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

/** Issue Attachment Contract details. */
@Fluent
public final class IssueAttachmentContractInner extends ProxyResource {
    /*
     * Properties of the Issue Attachment.
     */
    @JsonProperty(value = "properties")
    private IssueAttachmentContractProperties innerProperties;

    /**
     * Get the innerProperties property: Properties of the Issue Attachment.
     *
     * @return the innerProperties value.
     */
    private IssueAttachmentContractProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the title property: Filename by which the binary data will be saved.
     *
     * @return the title value.
     */
    public String title() {
        return this.innerProperties() == null ? null : this.innerProperties().title();
    }

    /**
     * Set the title property: Filename by which the binary data will be saved.
     *
     * @param title the title value to set.
     * @return the IssueAttachmentContractInner object itself.
     */
    public IssueAttachmentContractInner withTitle(String title) {
        if (this.innerProperties() == null) {
            this.innerProperties = new IssueAttachmentContractProperties();
        }
        this.innerProperties().withTitle(title);
        return this;
    }

    /**
     * Get the contentFormat property: Either 'link' if content is provided via an HTTP link or the MIME type of the
     * Base64-encoded binary data provided in the 'content' property.
     *
     * @return the contentFormat value.
     */
    public String contentFormat() {
        return this.innerProperties() == null ? null : this.innerProperties().contentFormat();
    }

    /**
     * Set the contentFormat property: Either 'link' if content is provided via an HTTP link or the MIME type of the
     * Base64-encoded binary data provided in the 'content' property.
     *
     * @param contentFormat the contentFormat value to set.
     * @return the IssueAttachmentContractInner object itself.
     */
    public IssueAttachmentContractInner withContentFormat(String contentFormat) {
        if (this.innerProperties() == null) {
            this.innerProperties = new IssueAttachmentContractProperties();
        }
        this.innerProperties().withContentFormat(contentFormat);
        return this;
    }

    /**
     * Get the content property: An HTTP link or Base64-encoded binary data.
     *
     * @return the content value.
     */
    public String content() {
        return this.innerProperties() == null ? null : this.innerProperties().content();
    }

    /**
     * Set the content property: An HTTP link or Base64-encoded binary data.
     *
     * @param content the content value to set.
     * @return the IssueAttachmentContractInner object itself.
     */
    public IssueAttachmentContractInner withContent(String content) {
        if (this.innerProperties() == null) {
            this.innerProperties = new IssueAttachmentContractProperties();
        }
        this.innerProperties().withContent(content);
        return this;
    }

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