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

package com.azure.resourcemanager.logic.models;

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

/** The assembly properties definition. */
@Fluent
public final class AssemblyProperties extends ArtifactContentPropertiesDefinition {
    /*
     * The assembly name.
     */
    @JsonProperty(value = "assemblyName", required = true)
    private String assemblyName;

    /*
     * The assembly version.
     */
    @JsonProperty(value = "assemblyVersion")
    private String assemblyVersion;

    /*
     * The assembly culture.
     */
    @JsonProperty(value = "assemblyCulture")
    private String assemblyCulture;

    /*
     * The assembly public key token.
     */
    @JsonProperty(value = "assemblyPublicKeyToken")
    private String assemblyPublicKeyToken;

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

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

    /**
     * Set the assemblyName property: The assembly name.
     *
     * @param assemblyName the assemblyName value to set.
     * @return the AssemblyProperties object itself.
     */
    public AssemblyProperties withAssemblyName(String assemblyName) {
        this.assemblyName = assemblyName;
        return this;
    }

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

    /**
     * Set the assemblyVersion property: The assembly version.
     *
     * @param assemblyVersion the assemblyVersion value to set.
     * @return the AssemblyProperties object itself.
     */
    public AssemblyProperties withAssemblyVersion(String assemblyVersion) {
        this.assemblyVersion = assemblyVersion;
        return this;
    }

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

    /**
     * Set the assemblyCulture property: The assembly culture.
     *
     * @param assemblyCulture the assemblyCulture value to set.
     * @return the AssemblyProperties object itself.
     */
    public AssemblyProperties withAssemblyCulture(String assemblyCulture) {
        this.assemblyCulture = assemblyCulture;
        return this;
    }

    /**
     * Get the assemblyPublicKeyToken property: The assembly public key token.
     *
     * @return the assemblyPublicKeyToken value.
     */
    public String assemblyPublicKeyToken() {
        return this.assemblyPublicKeyToken;
    }

    /**
     * Set the assemblyPublicKeyToken property: The assembly public key token.
     *
     * @param assemblyPublicKeyToken the assemblyPublicKeyToken value to set.
     * @return the AssemblyProperties object itself.
     */
    public AssemblyProperties withAssemblyPublicKeyToken(String assemblyPublicKeyToken) {
        this.assemblyPublicKeyToken = assemblyPublicKeyToken;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AssemblyProperties withContent(Object content) {
        super.withContent(content);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AssemblyProperties withContentType(String contentType) {
        super.withContentType(contentType);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AssemblyProperties withContentLink(ContentLink contentLink) {
        super.withContentLink(contentLink);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AssemblyProperties withCreatedTime(OffsetDateTime createdTime) {
        super.withCreatedTime(createdTime);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AssemblyProperties withChangedTime(OffsetDateTime changedTime) {
        super.withChangedTime(changedTime);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AssemblyProperties withMetadata(Object metadata) {
        super.withMetadata(metadata);
        return this;
    }

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

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