generated/api/Models/CommvaultPowershellIdentity.json.cs

// Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.4, generator: @autorest/powershell@3.0.415)
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Commvault.Powershell.Models
{
    using static Commvault.Powershell.Runtime.Extensions;

    public partial class CommvaultPowerShellIdentity
    {

        /// <summary>
        /// <c>AfterFromJson</c> will be called after the json deserialization has finished, allowing customization of the object
        /// before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="json">The JsonNode that should be deserialized into this object.</param>

        partial void AfterFromJson(Commvault.Powershell.Runtime.Json.JsonObject json);

        /// <summary>
        /// <c>AfterToJson</c> will be called after the json erialization has finished, allowing customization of the <see cref="Commvault.Powershell.Runtime.Json.JsonObject"
        /// /> before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="container">The JSON container that the serialization result will be placed in.</param>

        partial void AfterToJson(ref Commvault.Powershell.Runtime.Json.JsonObject container);

        /// <summary>
        /// <c>BeforeFromJson</c> will be called before the json deserialization has commenced, allowing complete customization of
        /// the object before it is deserialized.
        /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="json">The JsonNode that should be deserialized into this object.</param>
        /// <param name="returnNow">Determines if the rest of the deserialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeFromJson(Commvault.Powershell.Runtime.Json.JsonObject json, ref bool returnNow);

        /// <summary>
        /// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the
        /// object before it is serialized.
        /// If you wish to disable the default serialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="container">The JSON container that the serialization result will be placed in.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeToJson(ref Commvault.Powershell.Runtime.Json.JsonObject container, ref bool returnNow);

        /// <summary>
        /// Deserializes a Commvault.Powershell.Runtime.Json.JsonObject into a new instance of <see cref="CommvaultPowerShellIdentity" />.
        /// </summary>
        /// <param name="json">A Commvault.Powershell.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CommvaultPowerShellIdentity(Commvault.Powershell.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;
            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            {_planId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("planId"), out var __jsonPlanId) ? (long?)__jsonPlanId : PlanId;}
            {_backupDestinationId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("BackupDestinationId"), out var __jsonBackupDestinationId) ? (long?)__jsonBackupDestinationId : BackupDestinationId;}
            {_regionList = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("regionList"), out var __jsonRegionList) ? (string)__jsonRegionList : (string)RegionList;}
            {_regionId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("regionId"), out var __jsonRegionId) ? (long?)__jsonRegionId : RegionId;}
            {_recoveryGroupId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("recoveryGroupId"), out var __jsonRecoveryGroupId) ? (long?)__jsonRecoveryGroupId : RecoveryGroupId;}
            {_entityId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("entityId"), out var __jsonEntityId) ? (long?)__jsonEntityId : EntityId;}
            {_userId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("userId"), out var __jsonUserId) ? (long?)__jsonUserId : UserId;}
            {_companyId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("companyId"), out var __jsonCompanyId) ? (long?)__jsonCompanyId : CompanyId;}
            {_userGroupId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("userGroupId"), out var __jsonUserGroupId) ? (long?)__jsonUserGroupId : UserGroupId;}
            {_storagePoolId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("storagePoolId"), out var __jsonStoragePoolId) ? (long?)__jsonStoragePoolId : StoragePoolId;}
            {_backupLocationId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("backupLocationId"), out var __jsonBackupLocationId) ? (long?)__jsonBackupLocationId : BackupLocationId;}
            {_accessPathId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("accessPathId"), out var __jsonAccessPathId) ? (long?)__jsonAccessPathId : AccessPathId;}
            {_serverGroupId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("serverGroupId"), out var __jsonServerGroupId) ? (long?)__jsonServerGroupId : ServerGroupId;}
            {_serverId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("serverId"), out var __jsonServerId) ? (long?)__jsonServerId : ServerId;}
            {_agentId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("agentId"), out var __jsonAgentId) ? (long?)__jsonAgentId : AgentId;}
            {_subclientId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("subclientId"), out var __jsonSubclientId) ? (long?)__jsonSubclientId : SubclientId;}
            {_cloudStorageId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("cloudStorageId"), out var __jsonCloudStorageId) ? (long?)__jsonCloudStorageId : CloudStorageId;}
            {_metadataCacheId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("metadataCacheId"), out var __jsonMetadataCacheId) ? (long?)__jsonMetadataCacheId : MetadataCacheId;}
            {_bucketId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("bucketId"), out var __jsonBucketId) ? (long?)__jsonBucketId : BucketId;}
            {_hyperScaleStorageId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("hyperScaleStorageId"), out var __jsonHyperScaleStorageId) ? (long?)__jsonHyperScaleStorageId : HyperScaleStorageId;}
            {_nodeId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("nodeId"), out var __jsonNodeId) ? (long?)__jsonNodeId : NodeId;}
            {_roleId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("roleId"), out var __jsonRoleId) ? (long?)__jsonRoleId : RoleId;}
            {_libraryId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("libraryId"), out var __jsonLibraryId) ? (long?)__jsonLibraryId : LibraryId;}
            {_driveId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("driveId"), out var __jsonDriveId) ? (long?)__jsonDriveId : DriveId;}
            {_instanceId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("instanceId"), out var __jsonInstanceId) ? (long?)__jsonInstanceId : InstanceId;}
            {_replicationGroupId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("replicationGroupId"), out var __jsonReplicationGroupId) ? (long?)__jsonReplicationGroupId : ReplicationGroupId;}
            {_failoverGroupId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("failoverGroupId"), out var __jsonFailoverGroupId) ? (long?)__jsonFailoverGroupId : FailoverGroupId;}
            {_scheduleId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("scheduleId"), out var __jsonScheduleId) ? (long?)__jsonScheduleId : ScheduleId;}
            {_drOperation = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("drOperation"), out var __jsonDrOperation) ? (string)__jsonDrOperation : (string)DrOperation;}
            {_vMGroupId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("VmGroupId"), out var __jsonVMGroupId) ? (long?)__jsonVMGroupId : VMGroupId;}
            {_vMGuid = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("vmGuid"), out var __jsonVMGuid) ? (string)__jsonVMGuid : (string)VMGuid;}
            {_vMUuid = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("vmUUID"), out var __jsonVMUuid) ? (string)__jsonVMUuid : (string)VMUuid;}
            {_mediaAgentId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("mediaAgentId"), out var __jsonMediaAgentId) ? (long?)__jsonMediaAgentId : MediaAgentId;}
            {_hypervisorId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("hypervisorId"), out var __jsonHypervisorId) ? (long?)__jsonHypervisorId : HypervisorId;}
            {_topologyId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("topologyId"), out var __jsonTopologyId) ? (string)__jsonTopologyId : (string)TopologyId;}
            {_ruleId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("ruleId"), out var __jsonRuleId) ? (long?)__jsonRuleId : RuleId;}
            {_entityType = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("entityType"), out var __jsonEntityType) ? (string)__jsonEntityType : (string)EntityType;}
            {_blackoutWindowId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("blackoutWindowId"), out var __jsonBlackoutWindowId) ? (long?)__jsonBlackoutWindowId : BlackoutWindowId;}
            {_hfsShareId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("HFSShareId"), out var __jsonHfsShareId) ? (long?)__jsonHfsShareId : HfsShareId;}
            {_clusterId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("clusterId"), out var __jsonClusterId) ? (long?)__jsonClusterId : ClusterId;}
            {_modifierName = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("ModifierName"), out var __jsonModifierName) ? (string)__jsonModifierName : (string)ModifierName;}
            {_globalSearchEntity = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("globalSearchEntity"), out var __jsonGlobalSearchEntity) ? (string)__jsonGlobalSearchEntity : (string)GlobalSearchEntity;}
            {_rpsId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("rpsId"), out var __jsonRpsId) ? (string)__jsonRpsId : (string)RpsId;}
            {_name = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
            {_credentialName = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("credentialName"), out var __jsonCredentialName) ? (string)__jsonCredentialName : (string)CredentialName;}
            {_credentialId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("credentialId"), out var __jsonCredentialId) ? (string)__jsonCredentialId : (string)CredentialId;}
            {_recoveryTargetId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("recoveryTargetId"), out var __jsonRecoveryTargetId) ? (long?)__jsonRecoveryTargetId : RecoveryTargetId;}
            {_domainId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("domainId"), out var __jsonDomainId) ? (long?)__jsonDomainId : DomainId;}
            {_requestId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("requestId"), out var __jsonRequestId) ? (long?)__jsonRequestId : RequestId;}
            {_kmsId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("kmsId"), out var __jsonKmsId) ? (long?)__jsonKmsId : KmsId;}
            {_pairId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("pairId"), out var __jsonPairId) ? (long?)__jsonPairId : PairId;}
            {_id = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("id"), out var __jsonId) ? (long?)__jsonId : Id;}
            {_schedulePolicyId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("schedulePolicyId"), out var __jsonSchedulePolicyId) ? (long?)__jsonSchedulePolicyId : SchedulePolicyId;}
            {_inventoryId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("inventoryId"), out var __jsonInventoryId) ? (long?)__jsonInventoryId : InventoryId;}
            {_indexServerClientId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("indexServerClientId"), out var __jsonIndexServerClientId) ? (long?)__jsonIndexServerClientId : IndexServerClientId;}
            {_assetId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("assetId"), out var __jsonAssetId) ? (string)__jsonAssetId : (string)AssetId;}
            {_tagId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("tagId"), out var __jsonTagId) ? (long?)__jsonTagId : TagId;}
            {_arrayId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("arrayId"), out var __jsonArrayId) ? (long?)__jsonArrayId : ArrayId;}
            {_jobId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("jobId"), out var __jsonJobId) ? (long?)__jsonJobId : JobId;}
            {_vendorId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("vendorId"), out var __jsonVendorId) ? (long?)__jsonVendorId : VendorId;}
            {_clientId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("clientId"), out var __jsonClientId) ? (long?)__jsonClientId : ClientId;}
            {_tagValue = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("tagValue"), out var __jsonTagValue) ? (string)__jsonTagValue : (string)TagValue;}
            {_copyId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("copyId"), out var __jsonCopyId) ? (long?)__jsonCopyId : CopyId;}
            {_appId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("appId"), out var __jsonAppId) ? (long?)__jsonAppId : AppId;}
            {_nameSpace = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("nameSpace"), out var __jsonNameSpace) ? (string)__jsonNameSpace : (string)NameSpace;}
            {_applicationGroupId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("applicationGroupId"), out var __jsonApplicationGroupId) ? (long?)__jsonApplicationGroupId : ApplicationGroupId;}
            {_appGuid = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonString>("appGUID"), out var __jsonAppGuid) ? (string)__jsonAppGuid : (string)AppGuid;}
            {_backupDestionationId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("backupDestionationId"), out var __jsonBackupDestionationId) ? (long?)__jsonBackupDestionationId : BackupDestionationId;}
            {_cloneId = If( json?.PropertyT<Commvault.Powershell.Runtime.Json.JsonNumber>("cloneId"), out var __jsonCloneId) ? (long?)__jsonCloneId : CloneId;}
            AfterFromJson(json);
        }

        /// <summary>
        /// Deserializes a <see cref="Commvault.Powershell.Runtime.Json.JsonNode"/> into an instance of Commvault.Powershell.Models.ICommvaultPowerShellIdentity.
        /// </summary>
        /// <param name="node">a <see cref="Commvault.Powershell.Runtime.Json.JsonNode" /> to deserialize from.</param>
        /// <returns>an instance of Commvault.Powershell.Models.ICommvaultPowerShellIdentity.</returns>
        public static Commvault.Powershell.Models.ICommvaultPowerShellIdentity FromJson(Commvault.Powershell.Runtime.Json.JsonNode node)
        {
            return node is Commvault.Powershell.Runtime.Json.JsonObject json ? new CommvaultPowerShellIdentity(json) : null;
        }

        /// <summary>
        /// Serializes this instance of <see cref="CommvaultPowerShellIdentity" /> into a <see cref="Commvault.Powershell.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Commvault.Powershell.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Commvault.Powershell.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="CommvaultPowerShellIdentity" /> as a <see cref="Commvault.Powershell.Runtime.Json.JsonNode" />.
        /// </returns>
        public Commvault.Powershell.Runtime.Json.JsonNode ToJson(Commvault.Powershell.Runtime.Json.JsonObject container, Commvault.Powershell.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Commvault.Powershell.Runtime.Json.JsonObject();

            bool returnNow = false;
            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return container;
            }
            AddIf( null != this._planId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._planId) : null, "planId" ,container.Add );
            AddIf( null != this._backupDestinationId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._backupDestinationId) : null, "BackupDestinationId" ,container.Add );
            AddIf( null != (((object)this._regionList)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._regionList.ToString()) : null, "regionList" ,container.Add );
            AddIf( null != this._regionId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._regionId) : null, "regionId" ,container.Add );
            AddIf( null != this._recoveryGroupId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._recoveryGroupId) : null, "recoveryGroupId" ,container.Add );
            AddIf( null != this._entityId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._entityId) : null, "entityId" ,container.Add );
            AddIf( null != this._userId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._userId) : null, "userId" ,container.Add );
            AddIf( null != this._companyId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._companyId) : null, "companyId" ,container.Add );
            AddIf( null != this._userGroupId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._userGroupId) : null, "userGroupId" ,container.Add );
            AddIf( null != this._storagePoolId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._storagePoolId) : null, "storagePoolId" ,container.Add );
            AddIf( null != this._backupLocationId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._backupLocationId) : null, "backupLocationId" ,container.Add );
            AddIf( null != this._accessPathId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._accessPathId) : null, "accessPathId" ,container.Add );
            AddIf( null != this._serverGroupId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._serverGroupId) : null, "serverGroupId" ,container.Add );
            AddIf( null != this._serverId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._serverId) : null, "serverId" ,container.Add );
            AddIf( null != this._agentId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._agentId) : null, "agentId" ,container.Add );
            AddIf( null != this._subclientId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._subclientId) : null, "subclientId" ,container.Add );
            AddIf( null != this._cloudStorageId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._cloudStorageId) : null, "cloudStorageId" ,container.Add );
            AddIf( null != this._metadataCacheId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._metadataCacheId) : null, "metadataCacheId" ,container.Add );
            AddIf( null != this._bucketId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._bucketId) : null, "bucketId" ,container.Add );
            AddIf( null != this._hyperScaleStorageId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._hyperScaleStorageId) : null, "hyperScaleStorageId" ,container.Add );
            AddIf( null != this._nodeId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._nodeId) : null, "nodeId" ,container.Add );
            AddIf( null != this._roleId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._roleId) : null, "roleId" ,container.Add );
            AddIf( null != this._libraryId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._libraryId) : null, "libraryId" ,container.Add );
            AddIf( null != this._driveId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._driveId) : null, "driveId" ,container.Add );
            AddIf( null != this._instanceId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._instanceId) : null, "instanceId" ,container.Add );
            AddIf( null != this._replicationGroupId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._replicationGroupId) : null, "replicationGroupId" ,container.Add );
            AddIf( null != this._failoverGroupId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._failoverGroupId) : null, "failoverGroupId" ,container.Add );
            AddIf( null != this._scheduleId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._scheduleId) : null, "scheduleId" ,container.Add );
            AddIf( null != (((object)this._drOperation)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._drOperation.ToString()) : null, "drOperation" ,container.Add );
            AddIf( null != this._vMGroupId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._vMGroupId) : null, "VmGroupId" ,container.Add );
            AddIf( null != (((object)this._vMGuid)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._vMGuid.ToString()) : null, "vmGuid" ,container.Add );
            AddIf( null != (((object)this._vMUuid)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._vMUuid.ToString()) : null, "vmUUID" ,container.Add );
            AddIf( null != this._mediaAgentId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._mediaAgentId) : null, "mediaAgentId" ,container.Add );
            AddIf( null != this._hypervisorId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._hypervisorId) : null, "hypervisorId" ,container.Add );
            AddIf( null != (((object)this._topologyId)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._topologyId.ToString()) : null, "topologyId" ,container.Add );
            AddIf( null != this._ruleId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._ruleId) : null, "ruleId" ,container.Add );
            AddIf( null != (((object)this._entityType)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._entityType.ToString()) : null, "entityType" ,container.Add );
            AddIf( null != this._blackoutWindowId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._blackoutWindowId) : null, "blackoutWindowId" ,container.Add );
            AddIf( null != this._hfsShareId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._hfsShareId) : null, "HFSShareId" ,container.Add );
            AddIf( null != this._clusterId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._clusterId) : null, "clusterId" ,container.Add );
            AddIf( null != (((object)this._modifierName)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._modifierName.ToString()) : null, "ModifierName" ,container.Add );
            AddIf( null != (((object)this._globalSearchEntity)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._globalSearchEntity.ToString()) : null, "globalSearchEntity" ,container.Add );
            AddIf( null != (((object)this._rpsId)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._rpsId.ToString()) : null, "rpsId" ,container.Add );
            AddIf( null != (((object)this._name)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
            AddIf( null != (((object)this._credentialName)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._credentialName.ToString()) : null, "credentialName" ,container.Add );
            AddIf( null != (((object)this._credentialId)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._credentialId.ToString()) : null, "credentialId" ,container.Add );
            AddIf( null != this._recoveryTargetId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._recoveryTargetId) : null, "recoveryTargetId" ,container.Add );
            AddIf( null != this._domainId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._domainId) : null, "domainId" ,container.Add );
            AddIf( null != this._requestId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._requestId) : null, "requestId" ,container.Add );
            AddIf( null != this._kmsId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._kmsId) : null, "kmsId" ,container.Add );
            AddIf( null != this._pairId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._pairId) : null, "pairId" ,container.Add );
            AddIf( null != this._id ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._id) : null, "id" ,container.Add );
            AddIf( null != this._schedulePolicyId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._schedulePolicyId) : null, "schedulePolicyId" ,container.Add );
            AddIf( null != this._inventoryId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._inventoryId) : null, "inventoryId" ,container.Add );
            AddIf( null != this._indexServerClientId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._indexServerClientId) : null, "indexServerClientId" ,container.Add );
            AddIf( null != (((object)this._assetId)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._assetId.ToString()) : null, "assetId" ,container.Add );
            AddIf( null != this._tagId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._tagId) : null, "tagId" ,container.Add );
            AddIf( null != this._arrayId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._arrayId) : null, "arrayId" ,container.Add );
            AddIf( null != this._jobId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._jobId) : null, "jobId" ,container.Add );
            AddIf( null != this._vendorId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._vendorId) : null, "vendorId" ,container.Add );
            AddIf( null != this._clientId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._clientId) : null, "clientId" ,container.Add );
            AddIf( null != (((object)this._tagValue)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._tagValue.ToString()) : null, "tagValue" ,container.Add );
            AddIf( null != this._copyId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._copyId) : null, "copyId" ,container.Add );
            AddIf( null != this._appId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._appId) : null, "appId" ,container.Add );
            AddIf( null != (((object)this._nameSpace)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._nameSpace.ToString()) : null, "nameSpace" ,container.Add );
            AddIf( null != this._applicationGroupId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._applicationGroupId) : null, "applicationGroupId" ,container.Add );
            AddIf( null != (((object)this._appGuid)?.ToString()) ? (Commvault.Powershell.Runtime.Json.JsonNode) new Commvault.Powershell.Runtime.Json.JsonString(this._appGuid.ToString()) : null, "appGUID" ,container.Add );
            AddIf( null != this._backupDestionationId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._backupDestionationId) : null, "backupDestionationId" ,container.Add );
            AddIf( null != this._cloneId ? (Commvault.Powershell.Runtime.Json.JsonNode)new Commvault.Powershell.Runtime.Json.JsonNumber((long)this._cloneId) : null, "cloneId" ,container.Add );
            AfterToJson(ref container);
            return container;
        }
    }
}