public PSSqlContainerGetPropertiesResource(SqlContainerGetPropertiesResource sqlContainerGetPropertiesResource)
 {
     Id                       = sqlContainerGetPropertiesResource.Id;
     IndexingPolicy           = new PSIndexingPolicy(sqlContainerGetPropertiesResource.IndexingPolicy);
     PartitionKey             = new PSContainerPartitionKey(sqlContainerGetPropertiesResource.PartitionKey);
     DefaultTtl               = sqlContainerGetPropertiesResource.DefaultTtl;
     UniqueKeyPolicy          = new PSUniqueKeyPolicy(sqlContainerGetPropertiesResource.UniqueKeyPolicy);
     ConflictResolutionPolicy = new PSConflictResolutionPolicy(sqlContainerGetPropertiesResource.ConflictResolutionPolicy);
     _rid                     = sqlContainerGetPropertiesResource._rid;
     _ts                      = sqlContainerGetPropertiesResource._ts;
     _etag                    = sqlContainerGetPropertiesResource._etag;
 }
Пример #2
0
 public PSGremlinGraphGetPropertiesResource(GremlinGraphGetPropertiesResource gremlinGraphGetPropertiesResource)
 {
     Id                       = gremlinGraphGetPropertiesResource.Id;
     IndexingPolicy           = new PSIndexingPolicy(gremlinGraphGetPropertiesResource.IndexingPolicy);
     PartitionKey             = new PSContainerPartitionKey(gremlinGraphGetPropertiesResource.PartitionKey);
     DefaultTtl               = gremlinGraphGetPropertiesResource.DefaultTtl;
     UniqueKeyPolicy          = new PSUniqueKeyPolicy(gremlinGraphGetPropertiesResource.UniqueKeyPolicy);
     ConflictResolutionPolicy = new PSConflictResolutionPolicy(gremlinGraphGetPropertiesResource.ConflictResolutionPolicy);
     _rid                     = gremlinGraphGetPropertiesResource._rid;
     _ts                      = gremlinGraphGetPropertiesResource._ts;
     _etag                    = gremlinGraphGetPropertiesResource._etag;
 }
Пример #3
0
        public PSSqlContainerGetPropertiesResource(SqlContainerGetPropertiesResource sqlContainerGetPropertiesResource)
        {
            if (sqlContainerGetPropertiesResource == null)
            {
                return;
            }

            Id                       = sqlContainerGetPropertiesResource.Id;
            IndexingPolicy           = new PSIndexingPolicy(sqlContainerGetPropertiesResource.IndexingPolicy);
            PartitionKey             = new PSContainerPartitionKey(sqlContainerGetPropertiesResource.PartitionKey);
            DefaultTtl               = sqlContainerGetPropertiesResource.DefaultTtl;
            UniqueKeyPolicy          = new PSUniqueKeyPolicy(sqlContainerGetPropertiesResource.UniqueKeyPolicy);
            ConflictResolutionPolicy = new PSConflictResolutionPolicy(sqlContainerGetPropertiesResource.ConflictResolutionPolicy);
            AnalyticalStorageTtl     = (int?)sqlContainerGetPropertiesResource.AnalyticalStorageTtl;
            _rid                     = sqlContainerGetPropertiesResource._rid;
            _ts                      = sqlContainerGetPropertiesResource._ts;
            _etag                    = sqlContainerGetPropertiesResource._etag;
        }
        public static ConflictResolutionPolicy ToSDKModel(PSConflictResolutionPolicy pSConflictResolutionPolicy)
        {
            if (pSConflictResolutionPolicy == null)
            {
                return(null);
            }

            ConflictResolutionPolicy conflictResolutionPolicy = new ConflictResolutionPolicy
            {
                Mode = pSConflictResolutionPolicy.Mode
            };

            if (pSConflictResolutionPolicy.Mode.Equals(ConflictResolutionMode.LastWriterWins, StringComparison.OrdinalIgnoreCase))
            {
                conflictResolutionPolicy.ConflictResolutionPath = pSConflictResolutionPolicy.ConflictResolutionPath;
            }
            else if (pSConflictResolutionPolicy.Mode.Equals(ConflictResolutionMode.Custom, StringComparison.OrdinalIgnoreCase))
            {
                conflictResolutionPolicy.ConflictResolutionProcedure = pSConflictResolutionPolicy.ConflictResolutionProcedure;
            }

            return(conflictResolutionPolicy);
        }