// 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.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** The Swagger XML. */
@Fluent
public final class SwaggerXml {
    /*
     * The xml element or attribute name.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * The xml namespace.
     */
    @JsonProperty(value = "namespace")
    private String namespace;

    /*
     * The name prefix.
     */
    @JsonProperty(value = "prefix")
    private String prefix;

    /*
     * Indicates whether the property should be an attribute instead of an element.
     */
    @JsonProperty(value = "attribute")
    private Boolean attribute;

    /*
     * Indicates whether the array elements are wrapped in a container element.
     */
    @JsonProperty(value = "wrapped")
    private Boolean wrapped;

    /*
     * The vendor extensions.
     */
    @JsonProperty(value = "extensions")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, Object> extensions;

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

    /**
     * Get the name property: The xml element or attribute name.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: The xml element or attribute name.
     *
     * @param name the name value to set.
     * @return the SwaggerXml object itself.
     */
    public SwaggerXml withName(String name) {
        this.name = name;
        return this;
    }

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

    /**
     * Set the namespace property: The xml namespace.
     *
     * @param namespace the namespace value to set.
     * @return the SwaggerXml object itself.
     */
    public SwaggerXml withNamespace(String namespace) {
        this.namespace = namespace;
        return this;
    }

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

    /**
     * Set the prefix property: The name prefix.
     *
     * @param prefix the prefix value to set.
     * @return the SwaggerXml object itself.
     */
    public SwaggerXml withPrefix(String prefix) {
        this.prefix = prefix;
        return this;
    }

    /**
     * Get the attribute property: Indicates whether the property should be an attribute instead of an element.
     *
     * @return the attribute value.
     */
    public Boolean attribute() {
        return this.attribute;
    }

    /**
     * Set the attribute property: Indicates whether the property should be an attribute instead of an element.
     *
     * @param attribute the attribute value to set.
     * @return the SwaggerXml object itself.
     */
    public SwaggerXml withAttribute(Boolean attribute) {
        this.attribute = attribute;
        return this;
    }

    /**
     * Get the wrapped property: Indicates whether the array elements are wrapped in a container element.
     *
     * @return the wrapped value.
     */
    public Boolean wrapped() {
        return this.wrapped;
    }

    /**
     * Set the wrapped property: Indicates whether the array elements are wrapped in a container element.
     *
     * @param wrapped the wrapped value to set.
     * @return the SwaggerXml object itself.
     */
    public SwaggerXml withWrapped(Boolean wrapped) {
        this.wrapped = wrapped;
        return this;
    }

    /**
     * Get the extensions property: The vendor extensions.
     *
     * @return the extensions value.
     */
    public Map<String, Object> extensions() {
        return this.extensions;
    }

    /**
     * Set the extensions property: The vendor extensions.
     *
     * @param extensions the extensions value to set.
     * @return the SwaggerXml object itself.
     */
    public SwaggerXml withExtensions(Map<String, Object> extensions) {
        this.extensions = extensions;
        return this;
    }

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