github.com/vmware/govmomi@v0.51.0/simulator/internal/types.go (about) 1 // © Broadcom. All Rights Reserved. 2 // The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. 3 // SPDX-License-Identifier: Apache-2.0 4 5 package internal 6 7 import ( 8 "reflect" 9 10 "github.com/vmware/govmomi/vim25/soap" 11 "github.com/vmware/govmomi/vim25/types" 12 ) 13 14 // Minimal set of internal types and methods: 15 // - Fetch() - used by ovftool to collect various managed object properties 16 // - RetrieveInternalContent() - used by ovftool to obtain a reference to NfcService (which it does not use by default) 17 18 func init() { 19 types.Add("Fetch", reflect.TypeOf((*Fetch)(nil)).Elem()) 20 } 21 22 type Fetch struct { 23 This types.ManagedObjectReference `xml:"_this"` 24 Prop string `xml:"prop"` 25 } 26 27 type FetchResponse struct { 28 Returnval types.AnyType `xml:"returnval,omitempty,typeattr"` 29 } 30 31 type FetchBody struct { 32 Req *Fetch `xml:"Fetch,omitempty"` 33 Res *FetchResponse `xml:"FetchResponse,omitempty"` 34 Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` 35 } 36 37 func (b *FetchBody) Fault() *soap.Fault { return b.Fault_ } 38 39 func init() { 40 types.Add("RetrieveInternalContent", reflect.TypeOf((*RetrieveInternalContent)(nil)).Elem()) 41 } 42 43 type RetrieveInternalContent struct { 44 This types.ManagedObjectReference `xml:"_this"` 45 } 46 47 type RetrieveInternalContentResponse struct { 48 Returnval InternalServiceInstanceContent `xml:"returnval"` 49 } 50 51 type RetrieveInternalContentBody struct { 52 Res *RetrieveInternalContentResponse `xml:"RetrieveInternalContentResponse,omitempty"` 53 Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` 54 } 55 56 func (b *RetrieveInternalContentBody) Fault() *soap.Fault { return b.Fault_ } 57 58 type InternalServiceInstanceContent struct { 59 types.DynamicData 60 61 NfcService types.ManagedObjectReference `xml:"nfcService"` 62 }