Class: TencentCloud::Cdn::V20180606::Compression
- Inherits:
-
TencentCloud::Common::AbstractModel
- Object
- TencentCloud::Common::AbstractModel
- TencentCloud::Cdn::V20180606::Compression
- Defined in:
- lib/v20180606/models.rb
Overview
智能压缩配置,默认对 js、html、css、xml、json、shtml、htm 后缀且大小为 256 ~ 2097152 字节的文件进行 GZIP 压缩
Instance Attribute Summary collapse
-
#CompressionRules ⇒ Object
on:开启 off:关闭 注意:此字段可能返回 null,表示取不到有效值。.
-
#Switch ⇒ Object
on:开启 off:关闭 注意:此字段可能返回 null,表示取不到有效值。.
Instance Method Summary collapse
- #deserialize(params) ⇒ Object
-
#initialize(switch = nil, compressionrules = nil) ⇒ Compression
constructor
A new instance of Compression.
Constructor Details
#initialize(switch = nil, compressionrules = nil) ⇒ Compression
Returns a new instance of Compression.
2734 2735 2736 2737 |
# File 'lib/v20180606/models.rb', line 2734 def initialize(switch=nil, compressionrules=nil) @Switch = switch @CompressionRules = compressionrules end |
Instance Attribute Details
#CompressionRules ⇒ Object
on:开启 off:关闭 注意:此字段可能返回 null,表示取不到有效值。
2732 2733 2734 |
# File 'lib/v20180606/models.rb', line 2732 def CompressionRules @CompressionRules end |
#Switch ⇒ Object
on:开启 off:关闭 注意:此字段可能返回 null,表示取不到有效值。
2732 2733 2734 |
# File 'lib/v20180606/models.rb', line 2732 def Switch @Switch end |
Instance Method Details
#deserialize(params) ⇒ Object
2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 |
# File 'lib/v20180606/models.rb', line 2739 def deserialize(params) @Switch = params['Switch'] unless params['CompressionRules'].nil? @CompressionRules = [] params['CompressionRules'].each do |i| compressionrule_tmp = CompressionRule.new compressionrule_tmp.deserialize(i) @CompressionRules << compressionrule_tmp end end end |