public RedisCacheAttributes(RedisResource cache, string resourceGroupName)
 {
     Id = cache.Id;
     Location = cache.Location;
     Name = cache.Name;
     Type = cache.Type;
     HostName = cache.Properties.HostName;
     Port = cache.Properties.Port;
     ProvisioningState = cache.Properties.ProvisioningState;
     SslPort = cache.Properties.SslPort;
     MaxMemoryPolicy = cache.Properties.MaxMemoryPolicy;
     RedisVersion = cache.Properties.RedisVersion;
     Size = SizeConverter.GetSizeInUserSpecificFormat(cache.Properties.Sku.Family, cache.Properties.Sku.Capacity);
     Sku = cache.Properties.Sku.Name;
     ResourceGroupName = resourceGroupName;
 }
 public RedisCacheAttributes(RedisResource cache, string resourceGroupName)
 {
     Id = cache.Id;
     Location = cache.Location;
     Name = cache.Name;
     Type = cache.Type;
     HostName = cache.HostName;
     Port = cache.Port.HasValue ? cache.Port.Value : 0;
     ProvisioningState = cache.ProvisioningState;
     SslPort = cache.SslPort.HasValue ? cache.SslPort.Value : 0;
     RedisConfiguration = cache.RedisConfiguration;
     EnableNonSslPort = cache.EnableNonSslPort.Value;
     RedisVersion = cache.RedisVersion;
     Size = SizeConverter.GetSizeInUserSpecificFormat(cache.Sku.Family, cache.Sku.Capacity);
     Sku = cache.Sku.Name;
     ResourceGroupName = resourceGroupName;
     SubnetId = cache.SubnetId;
     StaticIP = cache.StaticIP;
     TenantSettings = cache.TenantSettings;
     ShardCount = cache.ShardCount;
 }