//------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace Brutal.GltfApi {
using System.Linq;
using System.Runtime.Serialization;
using System.Text.Json.Serialization;
///
/// Object part of the GLTF file schema
/// Image data used to create a texture. Image **MAY** be referenced by an URI (or IRI) or a buffer view index.
///
public partial class Image {
///
/// Backing field for Uri.
///
private string m_uri;
///
/// Backing field for MimeType.
///
private string m_mimeType;
///
/// Backing field for BufferView.
///
private System.Nullable m_bufferView;
///
/// Backing field for Name.
///
private string m_name;
///
/// Backing field for Extensions.
///
private System.Collections.Generic.Dictionary m_extensions;
///
/// Backing field for Extras.
///
private Extras m_extras;
///
/// The URI (or IRI) of the image.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("uri")]
public string Uri {
get {
return this.m_uri;
}
set {
this.m_uri = value;
}
}
///
/// The image's media type. This field **MUST** be defined when `bufferView` is defined.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("mimeType")]
public string MimeType {
get {
return this.m_mimeType;
}
set {
this.m_mimeType = value;
}
}
///
/// The index of the bufferView that contains the image. This field **MUST NOT** be defined when `uri` is defined.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("bufferView")]
public System.Nullable BufferView {
get {
return this.m_bufferView;
}
set {
if ((value < 0)) {
throw new System.ArgumentOutOfRangeException("BufferView", value, "Expected value to be greater than or equal to 0");
}
this.m_bufferView = value;
}
}
///
/// The user-defined name of this object.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("name")]
public string Name {
get {
return this.m_name;
}
set {
this.m_name = value;
}
}
///
/// JSON object with extension-specific objects.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")]
public System.Collections.Generic.Dictionary Extensions {
get {
return this.m_extensions;
}
set {
this.m_extensions = value;
}
}
///
/// Application-specific data.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")]
public Extras Extras {
get {
return this.m_extras;
}
set {
this.m_extras = value;
}
}
///
/// This method is used to determine if the Uri property should be serialized.
///
public bool ShouldSerializeUri() {
return ((m_uri == null)
== false);
}
///
/// This method is used to determine if the MimeType property should be serialized.
///
public bool ShouldSerializeMimeType() {
return ((m_mimeType == null)
== false);
}
///
/// This method is used to determine if the BufferView property should be serialized.
///
public bool ShouldSerializeBufferView() {
return ((m_bufferView == null)
== false);
}
///
/// This method is used to determine if the Name property should be serialized.
///
public bool ShouldSerializeName() {
return ((m_name == null)
== false);
}
///
/// This method is used to determine if the Extensions property should be serialized.
///
public bool ShouldSerializeExtensions() {
return ((m_extensions == null)
== false);
}
///
/// This method is used to determine if the Extras property should be serialized.
///
public bool ShouldSerializeExtras() {
return ((m_extras == null)
== false);
}
}
}