github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dms/v2/products/results.go (about)

     1  package products
     2  
     3  // GetResponse response
     4  type GetResponse struct {
     5  	Hourly  []Parameter `json:"Hourly"`
     6  	Monthly []Parameter `json:"Monthly"`
     7  }
     8  
     9  // Parameter for dms
    10  type Parameter struct {
    11  	Name    string  `json:"name"`
    12  	Version string  `json:"version"`
    13  	Values  []Value `json:"values"`
    14  }
    15  
    16  // Value for dms
    17  type Value struct {
    18  	Details          []Detail `json:"detail"`
    19  	Name             string   `json:"name"`
    20  	UnavailableZones []string `json:"unavailable_zones"`
    21  	AvailableZones   []string `json:"available_zones"`
    22  }
    23  
    24  // Detail for dms
    25  type Detail struct {
    26  	Storage          string        `json:"storage"`
    27  	ProductID        string        `json:"product_id"`
    28  	SpecCode         string        `json:"spec_code"`
    29  	VMSpecification  string        `json:"vm_specification"`
    30  	ProductInfos     []ProductInfo `json:"product_info"`
    31  	PartitionNum     string        `json:"partition_num"`
    32  	Bandwidth        string        `json:"bandwidth"`
    33  	Tps              string        `json:"tps"`
    34  	IOs              []IO          `json:"io"`
    35  	UnavailableZones []string      `json:"unavailable_zones"`
    36  	AvailableZones   []string      `json:"available_zones"`
    37  	EcsFlavorId      string        `json:"ecs_flavor_id"`
    38  	ArchType         string        `json:"arch_type"`
    39  }
    40  
    41  // ProductInfo for dms
    42  type ProductInfo struct {
    43  	Storage          string   `json:"storage"`
    44  	NodeNum          string   `json:"node_num"`
    45  	ProductID        string   `json:"product_id"`
    46  	SpecCode         string   `json:"spec_code"`
    47  	IOs              []IO     `json:"io"`
    48  	AvailableZones   []string `json:"available_zones"`
    49  	UnavailableZones []string `json:"unavailable_zones"`
    50  }
    51  
    52  type IO struct {
    53  	IOType           string   `json:"io_type"`
    54  	StorageSpecCode  string   `json:"storage_spec_code"`
    55  	AvailableZones   []string `json:"available_zones"`
    56  	UnavailableZones []string `json:"unavailable_zones"`
    57  	VolumeType       string   `json:"volume_type"`
    58  }
    59  
    60  // ListResp is the structure that represents the request response of List method.
    61  type ListResp struct {
    62  	// The engine type of the DMS products.
    63  	Engine string `json:"engine"`
    64  	// The supported product version types.
    65  	Versions []string `json:"versions"`
    66  	// The list of product details.
    67  	Products []Product `json:"products"`
    68  }
    69  
    70  // Product is the structure that represents the details of the product specification.
    71  type Product struct {
    72  	// product type. The current product types are stand-alone and cluster.
    73  	Type string `json:"type"`
    74  	// Product ID.
    75  	ProductId string `json:"product_id"`
    76  	// The underlying resource type.
    77  	EcsFlavorId string `json:"ecs_flavor_id"`
    78  	// Billing type.
    79  	BillingCode string `json:"billing_code"`
    80  	// List of supported CPU architectures.
    81  	ArchTypes []string `json:"arch_types"`
    82  	// List of supported billing modes.
    83  	//   monthly: yearly/monthly type.
    84  	//   hourly: On-demand type.
    85  	ChargingModes []string `json:"charging_mode"`
    86  	// List of supported disk IO types.
    87  	IOs []IOEntity `json:"ios"`
    88  	// A list of features supported by the current specification instance.
    89  	SupportFeatures []SupportFeatureEntity `json:"support_features"`
    90  	// Properties of the current specification instance.
    91  	Properties PropertiesEntity `json:"properties"`
    92  }
    93  
    94  // IOEntity is the structure that represents the disk IO type information.
    95  type IOEntity struct {
    96  	// Disk IO encoding.
    97  	IoSpec string `json:"io_spec"`
    98  	// Disk type.
    99  	Type string `json:"type"`
   100  	// Availability Zone.
   101  	AvailableZones []string `json:"available_zones"`
   102  	// Unavailable zone.
   103  	UnavailableZones []string `json:"unavailable_zones"`
   104  }
   105  
   106  // SupportFeatureEntity is the structure that represents the features supported by the instance.
   107  type SupportFeatureEntity struct {
   108  	// function name.
   109  	Name string `json:"name"`
   110  	// Description of the function properties supported by the instance.
   111  	Properties SupportFeaturePropertiesEntity `json:"properties"`
   112  }
   113  
   114  // SupportFeaturePropertiesEntity is the structure that represents the description of the functional properties
   115  // supported by the instance.
   116  type SupportFeaturePropertiesEntity struct {
   117  	// The maximum number of tasks for the dump function.
   118  	MaxTask string `json:"max_task"`
   119  	// Minimum number of tasks for dump function.
   120  	MinTask string `json:"min_task"`
   121  	// Maximum number of nodes for dump function.
   122  	MaxNode string `json:"max_node"`
   123  	// Minimum number of nodes for dump function.
   124  	MinNode string `json:"min_node"`
   125  }
   126  
   127  // PropertiesEntity is the structure that represents the properties of the current specification instance.
   128  type PropertiesEntity struct {
   129  	// Maximum number of partitions per broker.
   130  	MaxPartitionPerBroker string `json:"max_partition_per_broker"`
   131  	// The maximum number of brokers.
   132  	MaxBroker string `json:"max_broker"`
   133  	// Maximum storage per node. The unit is GB.
   134  	MaxStoragePerNode string `json:"max_storage_per_node"`
   135  	// Maximum number of consumers per broker.
   136  	MaxConsumerPerBroker string `json:"max_consumer_per_broker"`
   137  	// The minimum number of brokers.
   138  	MinBroker string `json:"min_broker"`
   139  	// Maximum bandwidth per broker.
   140  	MaxBandwidthPerBroker string `json:"max_bandwidth_per_broker"`
   141  	// Minimum storage per node. The unit is GB.
   142  	MinStoragePerNode string `json:"min_storage_per_node"`
   143  	// Maximum TPS per Broker.
   144  	MaxTpsPerBroker string `json:"max_tps_per_broker"`
   145  	// Product ID alias.
   146  	ProductAlias string `json:"product_alias"`
   147  }