github.com/vmware/govmomi@v0.37.2/internal/methods.go (about)

     1  /*
     2  Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package internal
    18  
    19  import (
    20  	"context"
    21  
    22  	"github.com/vmware/govmomi/vim25/soap"
    23  )
    24  
    25  type RetrieveDynamicTypeManagerBody struct {
    26  	Req    *RetrieveDynamicTypeManagerRequest  `xml:"urn:vim25 RetrieveDynamicTypeManager"`
    27  	Res    *RetrieveDynamicTypeManagerResponse `xml:"urn:vim25 RetrieveDynamicTypeManagerResponse"`
    28  	Fault_ *soap.Fault
    29  }
    30  
    31  func (b *RetrieveDynamicTypeManagerBody) Fault() *soap.Fault { return b.Fault_ }
    32  
    33  func RetrieveDynamicTypeManager(ctx context.Context, r soap.RoundTripper, req *RetrieveDynamicTypeManagerRequest) (*RetrieveDynamicTypeManagerResponse, error) {
    34  	var reqBody, resBody RetrieveDynamicTypeManagerBody
    35  
    36  	reqBody.Req = req
    37  
    38  	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    39  		return nil, err
    40  	}
    41  
    42  	return resBody.Res, nil
    43  }
    44  
    45  type RetrieveManagedMethodExecuterBody struct {
    46  	Req    *RetrieveManagedMethodExecuterRequest  `xml:"urn:vim25 RetrieveManagedMethodExecuter"`
    47  	Res    *RetrieveManagedMethodExecuterResponse `xml:"urn:vim25 RetrieveManagedMethodExecuterResponse"`
    48  	Fault_ *soap.Fault
    49  }
    50  
    51  func (b *RetrieveManagedMethodExecuterBody) Fault() *soap.Fault { return b.Fault_ }
    52  
    53  func RetrieveManagedMethodExecuter(ctx context.Context, r soap.RoundTripper, req *RetrieveManagedMethodExecuterRequest) (*RetrieveManagedMethodExecuterResponse, error) {
    54  	var reqBody, resBody RetrieveManagedMethodExecuterBody
    55  
    56  	reqBody.Req = req
    57  
    58  	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    59  		return nil, err
    60  	}
    61  
    62  	return resBody.Res, nil
    63  }
    64  
    65  type DynamicTypeMgrQueryMoInstancesBody struct {
    66  	Req    *DynamicTypeMgrQueryMoInstancesRequest  `xml:"urn:vim25 DynamicTypeMgrQueryMoInstances"`
    67  	Res    *DynamicTypeMgrQueryMoInstancesResponse `xml:"urn:vim25 DynamicTypeMgrQueryMoInstancesResponse"`
    68  	Fault_ *soap.Fault
    69  }
    70  
    71  func (b *DynamicTypeMgrQueryMoInstancesBody) Fault() *soap.Fault { return b.Fault_ }
    72  
    73  func DynamicTypeMgrQueryMoInstances(ctx context.Context, r soap.RoundTripper, req *DynamicTypeMgrQueryMoInstancesRequest) (*DynamicTypeMgrQueryMoInstancesResponse, error) {
    74  	var reqBody, resBody DynamicTypeMgrQueryMoInstancesBody
    75  
    76  	reqBody.Req = req
    77  
    78  	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    79  		return nil, err
    80  	}
    81  
    82  	return resBody.Res, nil
    83  }
    84  
    85  type DynamicTypeMgrQueryTypeInfoBody struct {
    86  	Req    *DynamicTypeMgrQueryTypeInfoRequest  `xml:"urn:vim25 DynamicTypeMgrQueryTypeInfo"`
    87  	Res    *DynamicTypeMgrQueryTypeInfoResponse `xml:"urn:vim25 DynamicTypeMgrQueryTypeInfoResponse"`
    88  	Fault_ *soap.Fault
    89  }
    90  
    91  func (b *DynamicTypeMgrQueryTypeInfoBody) Fault() *soap.Fault { return b.Fault_ }
    92  
    93  func DynamicTypeMgrQueryTypeInfo(ctx context.Context, r soap.RoundTripper, req *DynamicTypeMgrQueryTypeInfoRequest) (*DynamicTypeMgrQueryTypeInfoResponse, error) {
    94  	var reqBody, resBody DynamicTypeMgrQueryTypeInfoBody
    95  
    96  	reqBody.Req = req
    97  
    98  	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
    99  		return nil, err
   100  	}
   101  
   102  	return resBody.Res, nil
   103  }
   104  
   105  type ExecuteSoapBody struct {
   106  	Req    *ExecuteSoapRequest  `xml:"urn:vim25 ExecuteSoap"`
   107  	Res    *ExecuteSoapResponse `xml:"urn:vim25 ExecuteSoapResponse"`
   108  	Fault_ *soap.Fault
   109  }
   110  
   111  func (b *ExecuteSoapBody) Fault() *soap.Fault { return b.Fault_ }
   112  
   113  func ExecuteSoap(ctx context.Context, r soap.RoundTripper, req *ExecuteSoapRequest) (*ExecuteSoapResponse, error) {
   114  	var reqBody, resBody ExecuteSoapBody
   115  
   116  	reqBody.Req = req
   117  
   118  	if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
   119  		return nil, err
   120  	}
   121  
   122  	return resBody.Res, nil
   123  }