Class: TencentCloud::Cdn::V20180606::Compression

Inherits:
TencentCloud::Common::AbstractModel
  • Object
show all
Defined in:
lib/v20180606/models.rb

Overview

智能压缩配置,默认对 js、html、css、xml、json、shtml、htm 后缀且大小为 256 ~ 2097152 字节的文件进行 GZIP 压缩

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#CompressionRulesObject

on:开启 off:关闭 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Switch:

    智能压缩配置开关,取值有:

  • CompressionRules:

    压缩规则数组



2732
2733
2734
# File 'lib/v20180606/models.rb', line 2732

def CompressionRules
  @CompressionRules
end

#SwitchObject

on:开启 off:关闭 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Switch:

    智能压缩配置开关,取值有:

  • CompressionRules:

    压缩规则数组



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