<?php
declare(strict_types=1);

// THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY.

namespace Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Output;

use Automattic\WooCommerce\Internal\Api\Schema\ObjectType;
use Automattic\WooCommerce\Internal\Api\Schema\Type;

class ProductAttribute {
	private static ?ObjectType $instance = null;

	public static function get(): ObjectType {
		if ( null === self::$instance ) {
			self::$instance = new ObjectType(
				array(
					'name'        => 'ProductAttribute',
					'description' => __( 'A product attribute.', 'woocommerce' ),
					'fields'      => fn() => array(
						'name'        => array(
							'type'        => Type::nonNull( Type::string() ),
							'description' => __( 'The attribute display name.', 'woocommerce' ),
						),
						'slug'        => array(
							'type'        => Type::nonNull( Type::string() ),
							'description' => __( 'The attribute taxonomy or key name.', 'woocommerce' ),
						),
						'options'     => array(
							'type'        => Type::nonNull( Type::listOf( Type::nonNull( Type::string() ) ) ),
							'description' => __( 'The available attribute values.', 'woocommerce' ),
						),
						'position'    => array(
							'type'        => Type::nonNull( Type::int() ),
							'description' => __( 'The display order position.', 'woocommerce' ),
						),
						'visible'     => array(
							'type'        => Type::nonNull( Type::boolean() ),
							'description' => __( 'Whether the attribute is visible on the product page.', 'woocommerce' ),
						),
						'variation'   => array(
							'type'        => Type::nonNull( Type::boolean() ),
							'description' => __( 'Whether the attribute is used for variations.', 'woocommerce' ),
						),
						'is_taxonomy' => array(
							'type'        => Type::nonNull( Type::boolean() ),
							'description' => __( 'Whether the attribute is a global taxonomy attribute.', 'woocommerce' ),
						),
					),
				)
			);
		}
		return self::$instance;
	}
}
