Class: TencentCloud::Dbbrain::V20210527::MongoDBIndex

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

Overview

Mongodb索引项

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(clusterid = nil, collection = nil, db = nil, level = nil, score = nil, indexestobuild = nil, indexestodrop = nil) ⇒ MongoDBIndex

Returns a new instance of MongoDBIndex.



6218
6219
6220
6221
6222
6223
6224
6225
6226
# File 'lib/v20210527/models.rb', line 6218

def initialize(clusterid=nil, collection=nil, db=nil, level=nil, score=nil, indexestobuild=nil, indexestodrop=nil)
  @ClusterId = clusterid
  @Collection = collection
  @Db = db
  @Level = level
  @Score = score
  @IndexesToBuild = indexestobuild
  @IndexesToDrop = indexestodrop
end

Instance Attribute Details

#ClusterIdObject

Parameters:

  • ClusterId:

    实例id。

  • Collection:

    表名。

  • Db:

    库名。

  • Level:

    优化级别,1-4,优先级从高到低。

  • Score:

    得分。

  • IndexesToBuild:

    推荐索引列表。

  • IndexesToDrop:

    无效索引列表。



6216
6217
6218
# File 'lib/v20210527/models.rb', line 6216

def ClusterId
  @ClusterId
end

#CollectionObject

Parameters:

  • ClusterId:

    实例id。

  • Collection:

    表名。

  • Db:

    库名。

  • Level:

    优化级别,1-4,优先级从高到低。

  • Score:

    得分。

  • IndexesToBuild:

    推荐索引列表。

  • IndexesToDrop:

    无效索引列表。



6216
6217
6218
# File 'lib/v20210527/models.rb', line 6216

def Collection
  @Collection
end

#DbObject

Parameters:

  • ClusterId:

    实例id。

  • Collection:

    表名。

  • Db:

    库名。

  • Level:

    优化级别,1-4,优先级从高到低。

  • Score:

    得分。

  • IndexesToBuild:

    推荐索引列表。

  • IndexesToDrop:

    无效索引列表。



6216
6217
6218
# File 'lib/v20210527/models.rb', line 6216

def Db
  @Db
end

#IndexesToBuildObject

Parameters:

  • ClusterId:

    实例id。

  • Collection:

    表名。

  • Db:

    库名。

  • Level:

    优化级别,1-4,优先级从高到低。

  • Score:

    得分。

  • IndexesToBuild:

    推荐索引列表。

  • IndexesToDrop:

    无效索引列表。



6216
6217
6218
# File 'lib/v20210527/models.rb', line 6216

def IndexesToBuild
  @IndexesToBuild
end

#IndexesToDropObject

Parameters:

  • ClusterId:

    实例id。

  • Collection:

    表名。

  • Db:

    库名。

  • Level:

    优化级别,1-4,优先级从高到低。

  • Score:

    得分。

  • IndexesToBuild:

    推荐索引列表。

  • IndexesToDrop:

    无效索引列表。



6216
6217
6218
# File 'lib/v20210527/models.rb', line 6216

def IndexesToDrop
  @IndexesToDrop
end

#LevelObject

Parameters:

  • ClusterId:

    实例id。

  • Collection:

    表名。

  • Db:

    库名。

  • Level:

    优化级别,1-4,优先级从高到低。

  • Score:

    得分。

  • IndexesToBuild:

    推荐索引列表。

  • IndexesToDrop:

    无效索引列表。



6216
6217
6218
# File 'lib/v20210527/models.rb', line 6216

def Level
  @Level
end

#ScoreObject

Parameters:

  • ClusterId:

    实例id。

  • Collection:

    表名。

  • Db:

    库名。

  • Level:

    优化级别,1-4,优先级从高到低。

  • Score:

    得分。

  • IndexesToBuild:

    推荐索引列表。

  • IndexesToDrop:

    无效索引列表。



6216
6217
6218
# File 'lib/v20210527/models.rb', line 6216

def Score
  @Score
end

Instance Method Details

#deserialize(params) ⇒ Object



6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
# File 'lib/v20210527/models.rb', line 6228

def deserialize(params)
  @ClusterId = params['ClusterId']
  @Collection = params['Collection']
  @Db = params['Db']
  @Level = params['Level']
  @Score = params['Score']
  unless params['IndexesToBuild'].nil?
    @IndexesToBuild = []
    params['IndexesToBuild'].each do |i|
      indexestobuild_tmp = IndexesToBuild.new
      indexestobuild_tmp.deserialize(i)
      @IndexesToBuild << indexestobuild_tmp
    end
  end
  unless params['IndexesToDrop'].nil?
    @IndexesToDrop = []
    params['IndexesToDrop'].each do |i|
      indexestodrop_tmp = IndexesToDrop.new
      indexestodrop_tmp.deserialize(i)
      @IndexesToDrop << indexestodrop_tmp
    end
  end
end