Class: TencentCloud::Iecp::V20210914::Service

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

Overview

服务配置

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, type = nil, ports = nil, labels = nil, namespace = nil, clusterip = nil) ⇒ Service

Returns a new instance of Service.



6456
6457
6458
6459
6460
6461
6462
6463
# File 'lib/v20210914/models.rb', line 6456

def initialize(name=nil, type=nil, ports=nil, labels=nil, namespace=nil, clusterip=nil)
  @Name = name
  @Type = type
  @Ports = ports
  @Labels = labels
  @Namespace = namespace
  @ClusterIP = clusterip
end

Instance Attribute Details

#ClusterIPObject

Parameters:

  • Name:

    名称

  • Type:

    类型 (ClusterIP|NodePort)

  • Ports:

    端口配置

  • Labels:

    标签

  • Namespace:

    命名空间默认default

  • ClusterIP:

    服务IP



6454
6455
6456
# File 'lib/v20210914/models.rb', line 6454

def ClusterIP
  @ClusterIP
end

#LabelsObject

Parameters:

  • Name:

    名称

  • Type:

    类型 (ClusterIP|NodePort)

  • Ports:

    端口配置

  • Labels:

    标签

  • Namespace:

    命名空间默认default

  • ClusterIP:

    服务IP



6454
6455
6456
# File 'lib/v20210914/models.rb', line 6454

def Labels
  @Labels
end

#NameObject

Parameters:

  • Name:

    名称

  • Type:

    类型 (ClusterIP|NodePort)

  • Ports:

    端口配置

  • Labels:

    标签

  • Namespace:

    命名空间默认default

  • ClusterIP:

    服务IP



6454
6455
6456
# File 'lib/v20210914/models.rb', line 6454

def Name
  @Name
end

#NamespaceObject

Parameters:

  • Name:

    名称

  • Type:

    类型 (ClusterIP|NodePort)

  • Ports:

    端口配置

  • Labels:

    标签

  • Namespace:

    命名空间默认default

  • ClusterIP:

    服务IP



6454
6455
6456
# File 'lib/v20210914/models.rb', line 6454

def Namespace
  @Namespace
end

#PortsObject

Parameters:

  • Name:

    名称

  • Type:

    类型 (ClusterIP|NodePort)

  • Ports:

    端口配置

  • Labels:

    标签

  • Namespace:

    命名空间默认default

  • ClusterIP:

    服务IP



6454
6455
6456
# File 'lib/v20210914/models.rb', line 6454

def Ports
  @Ports
end

#TypeObject

Parameters:

  • Name:

    名称

  • Type:

    类型 (ClusterIP|NodePort)

  • Ports:

    端口配置

  • Labels:

    标签

  • Namespace:

    命名空间默认default

  • ClusterIP:

    服务IP



6454
6455
6456
# File 'lib/v20210914/models.rb', line 6454

def Type
  @Type
end

Instance Method Details

#deserialize(params) ⇒ Object



6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
# File 'lib/v20210914/models.rb', line 6465

def deserialize(params)
  @Name = params['Name']
  @Type = params['Type']
  unless params['Ports'].nil?
    @Ports = []
    params['Ports'].each do |i|
      portconfig_tmp = PortConfig.new
      portconfig_tmp.deserialize(i)
      @Ports << portconfig_tmp
    end
  end
  unless params['Labels'].nil?
    @Labels = []
    params['Labels'].each do |i|
      label_tmp = Label.new
      label_tmp.deserialize(i)
      @Labels << label_tmp
    end
  end
  @Namespace = params['Namespace']
  @ClusterIP = params['ClusterIP']
end