// ToRawInfo returns a description of CallbackOrReference suitable for JSON or YAML export.
978419
func (m *CallbackOrReference) ToRawInfo() interface{} {
	// ONE OF WRAPPER
	// CallbackOrReference
	// {Name:callback Type:Callback StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v0 := m.GetCallback()
	if v0 != nil {
		return v0.ToRawInfo()
	}
	// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v1 := m.GetReference()
	if v1 != nil {
		return v1.ToRawInfo()
	}
	return nil
}
1333619
func (m *Response) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	if m.Headers != nil {
		info = append(info, yaml.MapItem{Key: "headers", Value: m.Headers.ToRawInfo()})
	}
	// &{Name:headers Type:HeadersOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Content != nil {
		info = append(info, yaml.MapItem{Key: "content", Value: m.Content.ToRawInfo()})
	}
	// &{Name:content Type:MediaTypes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Links != nil {
		info = append(info, yaml.MapItem{Key: "links", Value: m.Links.ToRawInfo()})
	}
	// &{Name:links Type:LinksOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.SpecificationExtension != nil {
		for _, item := range m.SpecificationExtension {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
	return info
}
1219287
func (m *RequestBodyOrReference) ToRawInfo() interface{} {
	// ONE OF WRAPPER
	// RequestBodyOrReference
	// {Name:requestBody Type:RequestBody StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v0 := m.GetRequestBody()
	if v0 != nil {
		return v0.ToRawInfo()
	}
	// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v1 := m.GetReference()
	if v1 != nil {
		return v1.ToRawInfo()
	}
	return nil
}
13843
func (m *ParameterOrReference) ToRawInfo() interface{} {
	// ONE OF WRAPPER
	// ParameterOrReference
	// {Name:parameter Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v0 := m.GetParameter()
	if v0 != nil {
		return v0.ToRawInfo()
	}
	// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v1 := m.GetReference()
	if v1 != nil {
		return v1.ToRawInfo()
	}
	return nil
}
827647
func (m *NamedMethod) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m.Name != "" {
		info = append(info, yaml.MapItem{Key: "name", Value: m.Name})
	}
	// &{Name:value Type:Method StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
	return info
}
129364
func APIInfo(ctx context.ProviderCallContext, controllerUUID, modelUUID, caCert string, apiPort int, env Environ) (*api.Info, error) {
	instanceIds, err := env.ControllerInstances(ctx, controllerUUID)
	if err != nil {
		return nil, err
	}
	logger.Debugf("ControllerInstances returned: %v", instanceIds)
	addrs, err := waitAnyInstanceAddresses(env, ctx, instanceIds)
	if err != nil {
		return nil, err
	}
	apiAddrs := network.HostPortsToStrings(
		network.AddressesWithPort(addrs, apiPort),
	)
	modelTag := names.NewModelTag(modelUUID)
	apiInfo := &api.Info{Addrs: apiAddrs, CACert: caCert, ModelTag: modelTag}
	return apiInfo, nil
}
649993
func (m *AdditionalPropertiesItem) ToRawInfo() interface{} {
	// ONE OF WRAPPER
	// AdditionalPropertiesItem
	// {Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v0 := m.GetSchema()
	if v0 != nil {
		return v0.ToRawInfo()
	}
	// {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if v1, ok := m.GetOneof().(*AdditionalPropertiesItem_Boolean); ok {
		return v1.Boolean
	}
	return nil
}
1247372
func (m *Info) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "title", Value: m.Title})
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "version", Value: m.Version})
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	}
	if m.TermsOfService != "" {
		info = append(info, yaml.MapItem{Key: "termsOfService", Value: m.TermsOfService})
	}
	if m.Contact != nil {
		info = append(info, yaml.MapItem{Key: "contact", Value: m.Contact.ToRawInfo()})
	}
	// &{Name:contact Type:Contact StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.License != nil {
		info = append(info, yaml.MapItem{Key: "license", Value: m.License.ToRawInfo()})
	}
	// &{Name:license Type:License StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.VendorExtension != nil {
		for _, item := range m.VendorExtension {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
	return info
}
447369
func (m *HeaderOrReference) ToRawInfo() interface{} {
	// ONE OF WRAPPER
	// HeaderOrReference
	// {Name:header Type:Header StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v0 := m.GetHeader()
	if v0 != nil {
		return v0.ToRawInfo()
	}
	// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v1 := m.GetReference()
	if v1 != nil {
		return v1.ToRawInfo()
	}
	return nil
}
680069
func (m *Parameter) ToRawInfo() interface{} {
	// ONE OF WRAPPER
	// Parameter
	// {Name:bodyParameter Type:BodyParameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v0 := m.GetBodyParameter()
	if v0 != nil {
		return v0.ToRawInfo()
	}
	// {Name:nonBodyParameter Type:NonBodyParameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v1 := m.GetNonBodyParameter()
	if v1 != nil {
		return v1.ToRawInfo()
	}
	return nil
}
1265402
func (c *Client) ModelInfo() (params.UndertakerModelInfoResult, error) {
	result := params.UndertakerModelInfoResult{}
	err := c.entityFacadeCall("ModelInfo", &result)
	return result, errors.Trace(err)
}
1362177
func (m *ParametersOrReferences) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.AdditionalProperties != nil {
		for _, item := range m.AdditionalProperties {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:additionalProperties Type:NamedParameterOrReference StringEnumValues:[] MapType:ParameterOrReference Repeated:true Pattern: Implicit:true Description:}
	return info
}
1152149
func (m *ResponseValue) ToRawInfo() interface{} {
	// ONE OF WRAPPER
	// ResponseValue
	// {Name:response Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v0 := m.GetResponse()
	if v0 != nil {
		return v0.ToRawInfo()
	}
	// {Name:jsonReference Type:JsonReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v1 := m.GetJsonReference()
	if v1 != nil {
		return v1.ToRawInfo()
	}
	return nil
}
1094756
func (m *ResponseOrReference) ToRawInfo() interface{} {
	// ONE OF WRAPPER
	// ResponseOrReference
	// {Name:response Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v0 := m.GetResponse()
	if v0 != nil {
		return v0.ToRawInfo()
	}
	// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v1 := m.GetReference()
	if v1 != nil {
		return v1.ToRawInfo()
	}
	return nil
}
470154
func (m *Method) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m.Id != "" {
		info = append(info, yaml.MapItem{Key: "id", Value: m.Id})
	}
	if m.Path != "" {
		info = append(info, yaml.MapItem{Key: "path", Value: m.Path})
	}
	if m.HttpMethod != "" {
		info = append(info, yaml.MapItem{Key: "httpMethod", Value: m.HttpMethod})
	}
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	}
	if m.Parameters != nil {
		info = append(info, yaml.MapItem{Key: "parameters", Value: m.Parameters.ToRawInfo()})
	}
	// &{Name:parameters Type:Parameters StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if len(m.ParameterOrder) != 0 {
		info = append(info, yaml.MapItem{Key: "parameterOrder", Value: m.ParameterOrder})
	}
	if m.Request != nil {
		info = append(info, yaml.MapItem{Key: "request", Value: m.Request.ToRawInfo()})
	}
	// &{Name:request Type:Request StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Response != nil {
		info = append(info, yaml.MapItem{Key: "response", Value: m.Response.ToRawInfo()})
	}
	// &{Name:response Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if len(m.Scopes) != 0 {
		info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes})
	}
	if m.SupportsMediaDownload != false {
		info = append(info, yaml.MapItem{Key: "supportsMediaDownload", Value: m.SupportsMediaDownload})
	}
	if m.SupportsMediaUpload != false {
		info = append(info, yaml.MapItem{Key: "supportsMediaUpload", Value: m.SupportsMediaUpload})
	}
	if m.UseMediaDownloadService != false {
		info = append(info, yaml.MapItem{Key: "useMediaDownloadService", Value: m.UseMediaDownloadService})
	}
	if m.MediaUpload != nil {
		info = append(info, yaml.MapItem{Key: "mediaUpload", Value: m.MediaUpload.ToRawInfo()})
	}
	// &{Name:mediaUpload Type:MediaUpload StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.SupportsSubscription != false {
		info = append(info, yaml.MapItem{Key: "supportsSubscription", Value: m.SupportsSubscription})
	}
	if m.FlatPath != "" {
		info = append(info, yaml.MapItem{Key: "flatPath", Value: m.FlatPath})
	}
	if m.EtagRequired != false {
		info = append(info, yaml.MapItem{Key: "etagRequired", Value: m.EtagRequired})
	}
	return info
}
557553
func (m *ItemsItem) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if len(m.Schema) != 0 {
		items := make([]interface{}, 0)
		for _, item := range m.Schema {
			items = append(items, item.ToRawInfo())
		}
		info = append(info, yaml.MapItem{Key: "schema", Value: items})
	}
	// &{Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
	return info
}
18921
func (trc *TumblrRestClient) BlogInfo(blogname string) BlogInfoResponse {
	requestUrl := fmt.Sprintf("/v2/blog/%s/info", blogname)
	options := map[string]string{"api_key": trc.request.apiKey}
	data := trc.request.Get(requestUrl, options)
	var result BlogInfoResponse
	json.Unmarshal(data.Response, &result)
	return result
}