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

     1  package domains
     2  
     3  import (
     4  	"github.com/huaweicloud/golangsdk"
     5  )
     6  
     7  // GetResponse response
     8  type GetResponse struct {
     9  	Domains []Domain `json:"domains"`
    10  }
    11  
    12  type Domain struct {
    13  	//Domain ID
    14  	Id string `json:"id"`
    15  	//Domain Name
    16  	Name string `json:"name"`
    17  	//Domain Description
    18  	Description string `json:"description"`
    19  }
    20  
    21  // GetResult contains the body of getting detailed
    22  type GetResult struct {
    23  	golangsdk.Result
    24  }
    25  
    26  // Extract from GetResult
    27  func (r GetResult) Extract() (*GetResponse, error) {
    28  	var s GetResponse
    29  	err := r.Result.ExtractInto(&s)
    30  	return &s, err
    31  }