/**********************************************************************************
* Blueprint Reality Inc. CONFIDENTIAL
* 2021 Blueprint Reality Inc.
* All Rights Reserved.
*
* NOTICE:  All information contained herein is, and remains, the property of
* Blueprint Reality Inc. and its suppliers, if any.  The intellectual and
* technical concepts contained herein are proprietary to Blueprint Reality Inc.
* and its suppliers and may be covered by Patents, pending patents, and are
* protected by trade secret or copyright law.
*
* Dissemination of this information or reproduction of this material is strictly
* forbidden unless prior written permission is obtained from Blueprint Reality Inc.
***********************************************************************************/

using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Thrift;
using Thrift.Collections;
using System.Runtime.Serialization;
using Thrift.Protocol;
using Thrift.Transport;
using Thrift.Proxy;

namespace BlueprintReality.MixCast.Shared
{

  #if !SILVERLIGHT
  [Serializable]
  #endif
  public partial class ExperienceMetadata : TBase
  {
    private string _mixcastVersion;
    private string _experienceExePath;
    private long _mainWindowHandle;
    private long _mainProcessId;
    private string _projectId;
    private string _experienceTitle;
    private string _organizationName;
    private string _engineVersion;
    private ExpGraphicsType _graphicsType;
    private BlueprintReality.MixCast.Shared.TrackingSource _trackingType;
    private bool _alphaIsPremultiplied;
    private bool _colorSpaceIsLinear;
    private bool _canRenderOpaqueBg;
    private bool _canRenderTransparentBg;

    public string MixcastVersion
    {
      get
      {
        return _mixcastVersion;
      }
      set
      {
        __isset.mixcastVersion = true;
        this._mixcastVersion = value;
      }
    }

    public string ExperienceExePath
    {
      get
      {
        return _experienceExePath;
      }
      set
      {
        __isset.experienceExePath = true;
        this._experienceExePath = value;
      }
    }

    public long MainWindowHandle
    {
      get
      {
        return _mainWindowHandle;
      }
      set
      {
        __isset.mainWindowHandle = true;
        this._mainWindowHandle = value;
      }
    }

    public long MainProcessId
    {
      get
      {
        return _mainProcessId;
      }
      set
      {
        __isset.mainProcessId = true;
        this._mainProcessId = value;
      }
    }

    public string ProjectId
    {
      get
      {
        return _projectId;
      }
      set
      {
        __isset.projectId = true;
        this._projectId = value;
      }
    }

    public string ExperienceTitle
    {
      get
      {
        return _experienceTitle;
      }
      set
      {
        __isset.experienceTitle = true;
        this._experienceTitle = value;
      }
    }

    public string OrganizationName
    {
      get
      {
        return _organizationName;
      }
      set
      {
        __isset.organizationName = true;
        this._organizationName = value;
      }
    }

    public string EngineVersion
    {
      get
      {
        return _engineVersion;
      }
      set
      {
        __isset.engineVersion = true;
        this._engineVersion = value;
      }
    }

    /// <summary>
    /// 
    /// <seealso cref="ExpGraphicsType"/>
    /// </summary>
    public ExpGraphicsType GraphicsType
    {
      get
      {
        return _graphicsType;
      }
      set
      {
        __isset.graphicsType = true;
        this._graphicsType = value;
      }
    }

    /// <summary>
    /// 
    /// <seealso cref="BlueprintReality.MixCast.Shared.TrackingSource"/>
    /// </summary>
    public BlueprintReality.MixCast.Shared.TrackingSource TrackingType
    {
      get
      {
        return _trackingType;
      }
      set
      {
        __isset.trackingType = true;
        this._trackingType = value;
      }
    }

    public bool AlphaIsPremultiplied
    {
      get
      {
        return _alphaIsPremultiplied;
      }
      set
      {
        __isset.alphaIsPremultiplied = true;
        this._alphaIsPremultiplied = value;
      }
    }

    public bool ColorSpaceIsLinear
    {
      get
      {
        return _colorSpaceIsLinear;
      }
      set
      {
        __isset.colorSpaceIsLinear = true;
        this._colorSpaceIsLinear = value;
      }
    }

    public bool CanRenderOpaqueBg
    {
      get
      {
        return _canRenderOpaqueBg;
      }
      set
      {
        __isset.canRenderOpaqueBg = true;
        this._canRenderOpaqueBg = value;
      }
    }

    public bool CanRenderTransparentBg
    {
      get
      {
        return _canRenderTransparentBg;
      }
      set
      {
        __isset.canRenderTransparentBg = true;
        this._canRenderTransparentBg = value;
      }
    }


    public Isset __isset;
    #if !SILVERLIGHT
    [Serializable]
    #endif
    public struct Isset {
      public bool mixcastVersion;
      public bool experienceExePath;
      public bool mainWindowHandle;
      public bool mainProcessId;
      public bool projectId;
      public bool experienceTitle;
      public bool organizationName;
      public bool engineVersion;
      public bool graphicsType;
      public bool trackingType;
      public bool alphaIsPremultiplied;
      public bool colorSpaceIsLinear;
      public bool canRenderOpaqueBg;
      public bool canRenderTransparentBg;
    }

    public ExperienceMetadata() {
    }

    public void Read (TProtocol iprot)
    {
      iprot.IncrementRecursionDepth();
      try
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 4:
              if (field.Type == TType.String) {
                MixcastVersion = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 1:
              if (field.Type == TType.String) {
                ExperienceExePath = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 9:
              if (field.Type == TType.I64) {
                MainWindowHandle = iprot.ReadI64();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 10:
              if (field.Type == TType.I64) {
                MainProcessId = iprot.ReadI64();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 6:
              if (field.Type == TType.String) {
                ProjectId = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.String) {
                ExperienceTitle = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 3:
              if (field.Type == TType.String) {
                OrganizationName = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 5:
              if (field.Type == TType.String) {
                EngineVersion = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 13:
              if (field.Type == TType.I32) {
                GraphicsType = (ExpGraphicsType)iprot.ReadI32();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 14:
              if (field.Type == TType.I32) {
                TrackingType = (BlueprintReality.MixCast.Shared.TrackingSource)iprot.ReadI32();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 7:
              if (field.Type == TType.Bool) {
                AlphaIsPremultiplied = iprot.ReadBool();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 8:
              if (field.Type == TType.Bool) {
                ColorSpaceIsLinear = iprot.ReadBool();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 11:
              if (field.Type == TType.Bool) {
                CanRenderOpaqueBg = iprot.ReadBool();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 12:
              if (field.Type == TType.Bool) {
                CanRenderTransparentBg = iprot.ReadBool();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }
      finally
      {
        iprot.DecrementRecursionDepth();
      }
    }

    public void Write(TProtocol oprot) {
      oprot.IncrementRecursionDepth();
      try
      {
        TStruct struc = new TStruct("ExperienceMetadata");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (ExperienceExePath != null && __isset.experienceExePath) {
          field.Name = "experienceExePath";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(ExperienceExePath);
          oprot.WriteFieldEnd();
        }
        if (ExperienceTitle != null && __isset.experienceTitle) {
          field.Name = "experienceTitle";
          field.Type = TType.String;
          field.ID = 2;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(ExperienceTitle);
          oprot.WriteFieldEnd();
        }
        if (OrganizationName != null && __isset.organizationName) {
          field.Name = "organizationName";
          field.Type = TType.String;
          field.ID = 3;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(OrganizationName);
          oprot.WriteFieldEnd();
        }
        if (MixcastVersion != null && __isset.mixcastVersion) {
          field.Name = "mixcastVersion";
          field.Type = TType.String;
          field.ID = 4;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(MixcastVersion);
          oprot.WriteFieldEnd();
        }
        if (EngineVersion != null && __isset.engineVersion) {
          field.Name = "engineVersion";
          field.Type = TType.String;
          field.ID = 5;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(EngineVersion);
          oprot.WriteFieldEnd();
        }
        if (ProjectId != null && __isset.projectId) {
          field.Name = "projectId";
          field.Type = TType.String;
          field.ID = 6;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(ProjectId);
          oprot.WriteFieldEnd();
        }
        if (__isset.alphaIsPremultiplied) {
          field.Name = "alphaIsPremultiplied";
          field.Type = TType.Bool;
          field.ID = 7;
          oprot.WriteFieldBegin(field);
          oprot.WriteBool(AlphaIsPremultiplied);
          oprot.WriteFieldEnd();
        }
        if (__isset.colorSpaceIsLinear) {
          field.Name = "colorSpaceIsLinear";
          field.Type = TType.Bool;
          field.ID = 8;
          oprot.WriteFieldBegin(field);
          oprot.WriteBool(ColorSpaceIsLinear);
          oprot.WriteFieldEnd();
        }
        if (__isset.mainWindowHandle) {
          field.Name = "mainWindowHandle";
          field.Type = TType.I64;
          field.ID = 9;
          oprot.WriteFieldBegin(field);
          oprot.WriteI64(MainWindowHandle);
          oprot.WriteFieldEnd();
        }
        if (__isset.mainProcessId) {
          field.Name = "mainProcessId";
          field.Type = TType.I64;
          field.ID = 10;
          oprot.WriteFieldBegin(field);
          oprot.WriteI64(MainProcessId);
          oprot.WriteFieldEnd();
        }
        if (__isset.canRenderOpaqueBg) {
          field.Name = "canRenderOpaqueBg";
          field.Type = TType.Bool;
          field.ID = 11;
          oprot.WriteFieldBegin(field);
          oprot.WriteBool(CanRenderOpaqueBg);
          oprot.WriteFieldEnd();
        }
        if (__isset.canRenderTransparentBg) {
          field.Name = "canRenderTransparentBg";
          field.Type = TType.Bool;
          field.ID = 12;
          oprot.WriteFieldBegin(field);
          oprot.WriteBool(CanRenderTransparentBg);
          oprot.WriteFieldEnd();
        }
        if (__isset.graphicsType) {
          field.Name = "graphicsType";
          field.Type = TType.I32;
          field.ID = 13;
          oprot.WriteFieldBegin(field);
          oprot.WriteI32((int)GraphicsType);
          oprot.WriteFieldEnd();
        }
        if (__isset.trackingType) {
          field.Name = "trackingType";
          field.Type = TType.I32;
          field.ID = 14;
          oprot.WriteFieldBegin(field);
          oprot.WriteI32((int)TrackingType);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }
      finally
      {
        oprot.DecrementRecursionDepth();
      }
    }

    public override string ToString() {
      StringBuilder __sb = new StringBuilder("ExperienceMetadata(");
      bool __first = true;
      if (MixcastVersion != null && __isset.mixcastVersion) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("MixcastVersion: ");
        __sb.Append(MixcastVersion);
      }
      if (ExperienceExePath != null && __isset.experienceExePath) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("ExperienceExePath: ");
        __sb.Append(ExperienceExePath);
      }
      if (__isset.mainWindowHandle) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("MainWindowHandle: ");
        __sb.Append(MainWindowHandle);
      }
      if (__isset.mainProcessId) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("MainProcessId: ");
        __sb.Append(MainProcessId);
      }
      if (ProjectId != null && __isset.projectId) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("ProjectId: ");
        __sb.Append(ProjectId);
      }
      if (ExperienceTitle != null && __isset.experienceTitle) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("ExperienceTitle: ");
        __sb.Append(ExperienceTitle);
      }
      if (OrganizationName != null && __isset.organizationName) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("OrganizationName: ");
        __sb.Append(OrganizationName);
      }
      if (EngineVersion != null && __isset.engineVersion) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("EngineVersion: ");
        __sb.Append(EngineVersion);
      }
      if (__isset.graphicsType) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("GraphicsType: ");
        __sb.Append(GraphicsType);
      }
      if (__isset.trackingType) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("TrackingType: ");
        __sb.Append(TrackingType);
      }
      if (__isset.alphaIsPremultiplied) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("AlphaIsPremultiplied: ");
        __sb.Append(AlphaIsPremultiplied);
      }
      if (__isset.colorSpaceIsLinear) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("ColorSpaceIsLinear: ");
        __sb.Append(ColorSpaceIsLinear);
      }
      if (__isset.canRenderOpaqueBg) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("CanRenderOpaqueBg: ");
        __sb.Append(CanRenderOpaqueBg);
      }
      if (__isset.canRenderTransparentBg) {
        if(!__first) { __sb.Append(", "); }
        __first = false;
        __sb.Append("CanRenderTransparentBg: ");
        __sb.Append(CanRenderTransparentBg);
      }
      __sb.Append(")");
      return __sb.ToString();
    }

  }

}
