github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/dcs/v1/products/results.go (about)

     1  package products
     2  
     3  import (
     4  	"github.com/huaweicloud/golangsdk"
     5  )
     6  
     7  // GetResponse response
     8  type GetResponse struct {
     9  	Products []Product `json:"products"`
    10  }
    11  
    12  // Product for dcs
    13  type Product struct {
    14  	ProductID        string `json:"product_id"`
    15  	SpecCode         string `json:"spec_code"`
    16  	CacheMode        string `json:"cache_mode"`
    17  	Engine           string `json:"engine"`
    18  	EngineVersion    string `json:"engine_versions"`
    19  	SpecDetails      string `json:"spec_details"`
    20  	SpecDetails2     string `json:"spec_details2"`
    21  	Currency         string `json:"currency"`
    22  	ChargingType     string `json:"charging_type"`
    23  	ProductType      string `json:"product_type"`
    24  	ProdType         string `json:"prod_type"`
    25  	CPUType          string `json:"cpu_type"`
    26  	StorageType      string `json:"storage_type"`
    27  	ServiceTypeCode  string `json:"cloud_service_type_code"`
    28  	ResourceTypeCode string `json:"cloud_resource_type_code"`
    29  }
    30  
    31  // GetResult contains the body of getting detailed
    32  type GetResult struct {
    33  	golangsdk.Result
    34  }
    35  
    36  // Extract from GetResult
    37  func (r GetResult) Extract() (*GetResponse, error) {
    38  	var s GetResponse
    39  	err := r.Result.ExtractInto(&s)
    40  	return &s, err
    41  }