github.com/vmware/govmomi@v0.43.0/cns/types/types.go (about)

     1  /*
     2  Copyright (c) 2019 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 types
    18  
    19  import (
    20  	"reflect"
    21  	"time"
    22  
    23  	"github.com/vmware/govmomi/vim25/types"
    24  	vsanfstypes "github.com/vmware/govmomi/vsan/vsanfs/types"
    25  )
    26  
    27  type CnsCreateVolumeRequestType struct {
    28  	This        types.ManagedObjectReference `xml:"_this"`
    29  	CreateSpecs []CnsVolumeCreateSpec        `xml:"createSpecs,omitempty"`
    30  }
    31  
    32  func init() {
    33  	types.Add("CnsCreateVolumeRequestType", reflect.TypeOf((*CnsCreateVolumeRequestType)(nil)).Elem())
    34  }
    35  
    36  type CnsCreateVolume CnsCreateVolumeRequestType
    37  
    38  func init() {
    39  	types.Add("CnsCreateVolume", reflect.TypeOf((*CnsCreateVolume)(nil)).Elem())
    40  }
    41  
    42  type CnsCreateVolumeResponse struct {
    43  	Returnval types.ManagedObjectReference `xml:"returnval"`
    44  }
    45  
    46  type CnsEntityMetadata struct {
    47  	types.DynamicData
    48  
    49  	EntityName string           `xml:"entityName"`
    50  	Labels     []types.KeyValue `xml:"labels,omitempty"`
    51  	Delete     bool             `xml:"delete,omitempty"`
    52  	ClusterID  string           `xml:"clusterId,omitempty"`
    53  }
    54  
    55  func init() {
    56  	types.Add("CnsEntityMetadata", reflect.TypeOf((*CnsEntityMetadata)(nil)).Elem())
    57  }
    58  
    59  type CnsKubernetesEntityReference struct {
    60  	EntityType string `xml:"entityType"`
    61  	EntityName string `xml:"entityName"`
    62  	Namespace  string `xml:"namespace,omitempty"`
    63  	ClusterID  string `xml:"clusterId,omitempty"`
    64  }
    65  
    66  type CnsKubernetesEntityMetadata struct {
    67  	CnsEntityMetadata
    68  
    69  	EntityType     string                         `xml:"entityType"`
    70  	Namespace      string                         `xml:"namespace,omitempty"`
    71  	ReferredEntity []CnsKubernetesEntityReference `xml:"referredEntity,omitempty"`
    72  }
    73  
    74  func init() {
    75  	types.Add("CnsKubernetesEntityMetadata", reflect.TypeOf((*CnsKubernetesEntityMetadata)(nil)).Elem())
    76  }
    77  
    78  type CnsVolumeMetadata struct {
    79  	types.DynamicData
    80  
    81  	ContainerCluster      CnsContainerCluster     `xml:"containerCluster"`
    82  	EntityMetadata        []BaseCnsEntityMetadata `xml:"entityMetadata,typeattr,omitempty"`
    83  	ContainerClusterArray []CnsContainerCluster   `xml:"containerClusterArray,omitempty"`
    84  }
    85  
    86  func init() {
    87  	types.Add("CnsVolumeMetadata", reflect.TypeOf((*CnsVolumeMetadata)(nil)).Elem())
    88  }
    89  
    90  type CnsVolumeCreateSpec struct {
    91  	types.DynamicData
    92  	Name                 string                                `xml:"name"`
    93  	VolumeType           string                                `xml:"volumeType"`
    94  	Datastores           []types.ManagedObjectReference        `xml:"datastores,omitempty"`
    95  	Metadata             CnsVolumeMetadata                     `xml:"metadata,omitempty"`
    96  	BackingObjectDetails BaseCnsBackingObjectDetails           `xml:"backingObjectDetails,typeattr"`
    97  	Profile              []types.BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
    98  	CreateSpec           BaseCnsBaseCreateSpec                 `xml:"createSpec,omitempty,typeattr"`
    99  	VolumeSource         BaseCnsVolumeSource                   `xml:"volumeSource,omitempty,typeattr"`
   100  }
   101  
   102  func init() {
   103  	types.Add("CnsVolumeCreateSpec", reflect.TypeOf((*CnsVolumeCreateSpec)(nil)).Elem())
   104  }
   105  
   106  type CnsUpdateVolumeMetadataRequestType struct {
   107  	This        types.ManagedObjectReference  `xml:"_this"`
   108  	UpdateSpecs []CnsVolumeMetadataUpdateSpec `xml:"updateSpecs,omitempty"`
   109  }
   110  
   111  func init() {
   112  	types.Add("CnsUpdateVolumeMetadataRequestType", reflect.TypeOf((*CnsUpdateVolumeMetadataRequestType)(nil)).Elem())
   113  }
   114  
   115  type CnsUpdateVolumeMetadata CnsUpdateVolumeMetadataRequestType
   116  
   117  func init() {
   118  	types.Add("CnsUpdateVolumeMetadata", reflect.TypeOf((*CnsUpdateVolumeMetadata)(nil)).Elem())
   119  }
   120  
   121  type CnsUpdateVolumeMetadataResponse struct {
   122  	Returnval types.ManagedObjectReference `xml:"returnval"`
   123  }
   124  
   125  type CnsVolumeMetadataUpdateSpec struct {
   126  	types.DynamicData
   127  
   128  	VolumeId CnsVolumeId       `xml:"volumeId"`
   129  	Metadata CnsVolumeMetadata `xml:"metadata,omitempty"`
   130  }
   131  
   132  func init() {
   133  	types.Add("CnsVolumeMetadataUpdateSpec", reflect.TypeOf((*CnsVolumeMetadataUpdateSpec)(nil)).Elem())
   134  }
   135  
   136  type CnsDeleteVolumeRequestType struct {
   137  	This       types.ManagedObjectReference `xml:"_this"`
   138  	VolumeIds  []CnsVolumeId                `xml:"volumeIds"`
   139  	DeleteDisk bool                         `xml:"deleteDisk"`
   140  }
   141  
   142  func init() {
   143  	types.Add("CnsDeleteVolumeRequestType", reflect.TypeOf((*CnsDeleteVolumeRequestType)(nil)).Elem())
   144  }
   145  
   146  type CnsDeleteVolume CnsDeleteVolumeRequestType
   147  
   148  func init() {
   149  	types.Add("CnsDeleteVolume", reflect.TypeOf((*CnsDeleteVolume)(nil)).Elem())
   150  }
   151  
   152  type CnsDeleteVolumeResponse struct {
   153  	Returnval types.ManagedObjectReference `xml:"returnval"`
   154  }
   155  
   156  type CnsExtendVolumeRequestType struct {
   157  	This        types.ManagedObjectReference `xml:"_this"`
   158  	ExtendSpecs []CnsVolumeExtendSpec        `xml:"extendSpecs,omitempty"`
   159  }
   160  
   161  func init() {
   162  	types.Add("CnsExtendVolumeRequestType", reflect.TypeOf((*CnsExtendVolumeRequestType)(nil)).Elem())
   163  }
   164  
   165  type CnsExtendVolume CnsExtendVolumeRequestType
   166  
   167  func init() {
   168  	types.Add("CnsExtendVolume", reflect.TypeOf((*CnsExtendVolume)(nil)).Elem())
   169  }
   170  
   171  type CnsExtendVolumeResponse struct {
   172  	Returnval types.ManagedObjectReference `xml:"returnval"`
   173  }
   174  
   175  type CnsVolumeExtendSpec struct {
   176  	types.DynamicData
   177  
   178  	VolumeId     CnsVolumeId `xml:"volumeId"`
   179  	CapacityInMb int64       `xml:"capacityInMb"`
   180  }
   181  
   182  func init() {
   183  	types.Add("CnsVolumeExtendSpec", reflect.TypeOf((*CnsVolumeExtendSpec)(nil)).Elem())
   184  }
   185  
   186  type CnsAttachVolumeRequestType struct {
   187  	This        types.ManagedObjectReference `xml:"_this"`
   188  	AttachSpecs []CnsVolumeAttachDetachSpec  `xml:"attachSpecs,omitempty"`
   189  }
   190  
   191  func init() {
   192  	types.Add("CnsAttachVolumeRequestType", reflect.TypeOf((*CnsAttachVolumeRequestType)(nil)).Elem())
   193  }
   194  
   195  type CnsAttachVolume CnsAttachVolumeRequestType
   196  
   197  func init() {
   198  	types.Add("CnsAttachVolume", reflect.TypeOf((*CnsAttachVolume)(nil)).Elem())
   199  }
   200  
   201  type CnsAttachVolumeResponse struct {
   202  	Returnval types.ManagedObjectReference `xml:"returnval"`
   203  }
   204  
   205  type CnsDetachVolumeRequestType struct {
   206  	This        types.ManagedObjectReference `xml:"_this"`
   207  	DetachSpecs []CnsVolumeAttachDetachSpec  `xml:"detachSpecs,omitempty"`
   208  }
   209  
   210  func init() {
   211  	types.Add("CnsDetachVolumeRequestType", reflect.TypeOf((*CnsDetachVolumeRequestType)(nil)).Elem())
   212  }
   213  
   214  type CnsDetachVolume CnsDetachVolumeRequestType
   215  
   216  func init() {
   217  	types.Add("CnsDetachVolume", reflect.TypeOf((*CnsDetachVolume)(nil)).Elem())
   218  }
   219  
   220  type CnsDetachVolumeResponse struct {
   221  	Returnval types.ManagedObjectReference `xml:"returnval"`
   222  }
   223  
   224  type CnsVolumeAttachDetachSpec struct {
   225  	types.DynamicData
   226  
   227  	VolumeId CnsVolumeId                  `xml:"volumeId"`
   228  	Vm       types.ManagedObjectReference `xml:"vm"`
   229  }
   230  
   231  func init() {
   232  	types.Add("CnsVolumeAttachDetachSpec", reflect.TypeOf((*CnsVolumeAttachDetachSpec)(nil)).Elem())
   233  }
   234  
   235  type CnsQueryVolume CnsQueryVolumeRequestType
   236  
   237  func init() {
   238  	types.Add("CnsQueryVolume", reflect.TypeOf((*CnsQueryVolume)(nil)).Elem())
   239  }
   240  
   241  type CnsQueryVolumeRequestType struct {
   242  	This   types.ManagedObjectReference `xml:"_this"`
   243  	Filter CnsQueryFilter               `xml:"filter"`
   244  }
   245  
   246  func init() {
   247  	types.Add("CnsQueryVolumeRequestType", reflect.TypeOf((*CnsQueryVolumeRequestType)(nil)).Elem())
   248  }
   249  
   250  type CnsQueryVolumeResponse struct {
   251  	Returnval CnsQueryResult `xml:"returnval"`
   252  }
   253  
   254  type CnsQueryVolumeInfo CnsQueryVolumeInfoRequestType
   255  
   256  func init() {
   257  	types.Add("CnsQueryVolumeInfo", reflect.TypeOf((*CnsQueryVolumeInfo)(nil)).Elem())
   258  }
   259  
   260  type CnsQueryVolumeInfoRequestType struct {
   261  	This      types.ManagedObjectReference `xml:"_this"`
   262  	VolumeIds []CnsVolumeId                `xml:"volumes"`
   263  }
   264  
   265  type CnsQueryVolumeInfoResponse struct {
   266  	Returnval types.ManagedObjectReference `xml:"returnval"`
   267  }
   268  
   269  type CnsQueryAllVolume CnsQueryAllVolumeRequestType
   270  
   271  func init() {
   272  	types.Add("CnsQueryAllVolume", reflect.TypeOf((*CnsQueryAllVolume)(nil)).Elem())
   273  }
   274  
   275  type CnsQueryAllVolumeRequestType struct {
   276  	This      types.ManagedObjectReference `xml:"_this"`
   277  	Filter    CnsQueryFilter               `xml:"filter"`
   278  	Selection CnsQuerySelection            `xml:"selection"`
   279  }
   280  
   281  func init() {
   282  	types.Add("CnsQueryAllVolumeRequestType", reflect.TypeOf((*CnsQueryVolumeRequestType)(nil)).Elem())
   283  }
   284  
   285  type CnsQueryAllVolumeResponse struct {
   286  	Returnval CnsQueryResult `xml:"returnval"`
   287  }
   288  
   289  type CnsContainerCluster struct {
   290  	types.DynamicData
   291  
   292  	ClusterType         string `xml:"clusterType"`
   293  	ClusterId           string `xml:"clusterId"`
   294  	VSphereUser         string `xml:"vSphereUser"`
   295  	ClusterFlavor       string `xml:"clusterFlavor,omitempty"`
   296  	ClusterDistribution string `xml:"clusterDistribution,omitempty"`
   297  }
   298  
   299  func init() {
   300  	types.Add("CnsContainerCluster", reflect.TypeOf((*CnsContainerCluster)(nil)).Elem())
   301  }
   302  
   303  type CnsVolume struct {
   304  	types.DynamicData
   305  
   306  	VolumeId                     CnsVolumeId                 `xml:"volumeId"`
   307  	DatastoreUrl                 string                      `xml:"datastoreUrl,omitempty"`
   308  	Name                         string                      `xml:"name,omitempty"`
   309  	VolumeType                   string                      `xml:"volumeType,omitempty"`
   310  	StoragePolicyId              string                      `xml:"storagePolicyId,omitempty"`
   311  	Metadata                     CnsVolumeMetadata           `xml:"metadata,omitempty"`
   312  	BackingObjectDetails         BaseCnsBackingObjectDetails `xml:"backingObjectDetails,omitempty"`
   313  	ComplianceStatus             string                      `xml:"complianceStatus,omitempty"`
   314  	DatastoreAccessibilityStatus string                      `xml:"datastoreAccessibilityStatus,omitempty"`
   315  	HealthStatus                 string                      `xml:"healthStatus,omitempty"`
   316  }
   317  
   318  func init() {
   319  	types.Add("CnsVolume", reflect.TypeOf((*CnsVolume)(nil)).Elem())
   320  }
   321  
   322  type CnsVolumeOperationResult struct {
   323  	types.DynamicData
   324  
   325  	VolumeId CnsVolumeId                 `xml:"volumeId,omitempty"`
   326  	Fault    *types.LocalizedMethodFault `xml:"fault,omitempty"`
   327  }
   328  
   329  func init() {
   330  	types.Add("CnsVolumeOperationResult", reflect.TypeOf((*CnsVolumeOperationResult)(nil)).Elem())
   331  }
   332  
   333  type CnsVolumeOperationBatchResult struct {
   334  	types.DynamicData
   335  
   336  	VolumeResults []BaseCnsVolumeOperationResult `xml:"volumeResults,omitempty,typeattr"`
   337  }
   338  
   339  func init() {
   340  	types.Add("CnsVolumeOperationBatchResult", reflect.TypeOf((*CnsVolumeOperationBatchResult)(nil)).Elem())
   341  }
   342  
   343  type CnsPlacementResult struct {
   344  	Datastore       types.ManagedObjectReference  `xml:"datastore,omitempty"`
   345  	PlacementFaults []*types.LocalizedMethodFault `xml:"placementFaults,omitempty"`
   346  }
   347  
   348  func init() {
   349  	types.Add("CnsPlacementResult", reflect.TypeOf((*CnsPlacementResult)(nil)).Elem())
   350  }
   351  
   352  type CnsVolumeCreateResult struct {
   353  	CnsVolumeOperationResult
   354  	Name             string               `xml:"name,omitempty"`
   355  	PlacementResults []CnsPlacementResult `xml:"placementResults,omitempty"`
   356  }
   357  
   358  func init() {
   359  	types.Add("CnsVolumeCreateResult", reflect.TypeOf((*CnsVolumeCreateResult)(nil)).Elem())
   360  }
   361  
   362  type CnsVolumeAttachResult struct {
   363  	CnsVolumeOperationResult
   364  
   365  	DiskUUID string `xml:"diskUUID,omitempty"`
   366  }
   367  
   368  func init() {
   369  	types.Add("CnsVolumeAttachResult", reflect.TypeOf((*CnsVolumeAttachResult)(nil)).Elem())
   370  }
   371  
   372  type CnsVolumeId struct {
   373  	types.DynamicData
   374  
   375  	Id string `xml:"id"`
   376  }
   377  
   378  func init() {
   379  	types.Add("CnsVolumeId", reflect.TypeOf((*CnsVolumeId)(nil)).Elem())
   380  }
   381  
   382  type CnsBackingObjectDetails struct {
   383  	types.DynamicData
   384  
   385  	CapacityInMb int64 `xml:"capacityInMb,omitempty"`
   386  }
   387  
   388  func init() {
   389  	types.Add("CnsBackingObjectDetails", reflect.TypeOf((*CnsBackingObjectDetails)(nil)).Elem())
   390  }
   391  
   392  type CnsBlockBackingDetails struct {
   393  	CnsBackingObjectDetails
   394  
   395  	BackingDiskId                  string `xml:"backingDiskId,omitempty"`
   396  	BackingDiskUrlPath             string `xml:"backingDiskUrlPath,omitempty"`
   397  	BackingDiskObjectId            string `xml:"backingDiskObjectId,omitempty"`
   398  	AggregatedSnapshotCapacityInMb int64  `xml:"aggregatedSnapshotCapacityInMb,omitempty"`
   399  	BackingDiskPath                string `xml:"backingDiskPath,omitempty"`
   400  }
   401  
   402  func init() {
   403  	types.Add("CnsBlockBackingDetails", reflect.TypeOf((*CnsBlockBackingDetails)(nil)).Elem())
   404  }
   405  
   406  type CnsFileBackingDetails struct {
   407  	CnsBackingObjectDetails
   408  
   409  	BackingFileId string `xml:"backingFileId,omitempty"`
   410  }
   411  
   412  func init() {
   413  	types.Add("CnsFileBackingDetails", reflect.TypeOf((*CnsFileBackingDetails)(nil)).Elem())
   414  }
   415  
   416  type CnsVsanFileShareBackingDetails struct {
   417  	CnsFileBackingDetails
   418  
   419  	Name         string           `xml:"name,omitempty"`
   420  	AccessPoints []types.KeyValue `xml:"accessPoints,omitempty"`
   421  }
   422  
   423  func init() {
   424  	types.Add("CnsVsanFileShareBackingDetails", reflect.TypeOf((*CnsVsanFileShareBackingDetails)(nil)).Elem())
   425  }
   426  
   427  type CnsBaseCreateSpec struct {
   428  	types.DynamicData
   429  }
   430  
   431  func init() {
   432  	types.Add("CnsBaseCreateSpec", reflect.TypeOf((*CnsBaseCreateSpec)(nil)).Elem())
   433  }
   434  
   435  type CnsFileCreateSpec struct {
   436  	CnsBaseCreateSpec
   437  }
   438  
   439  func init() {
   440  	types.Add("CnsFileCreateSpec", reflect.TypeOf((*CnsFileCreateSpec)(nil)).Elem())
   441  }
   442  
   443  type CnsVSANFileCreateSpec struct {
   444  	CnsFileCreateSpec
   445  	SoftQuotaInMb int64                                    `xml:"softQuotaInMb,omitempty"`
   446  	Permission    []vsanfstypes.VsanFileShareNetPermission `xml:"permission,omitempty,typeattr"`
   447  }
   448  
   449  func init() {
   450  	types.Add("CnsVSANFileCreateSpec", reflect.TypeOf((*CnsVSANFileCreateSpec)(nil)).Elem())
   451  }
   452  
   453  type CnsQueryFilter struct {
   454  	types.DynamicData
   455  
   456  	VolumeIds                    []CnsVolumeId                  `xml:"volumeIds,omitempty"`
   457  	Names                        []string                       `xml:"names,omitempty"`
   458  	ContainerClusterIds          []string                       `xml:"containerClusterIds,omitempty"`
   459  	StoragePolicyId              string                         `xml:"storagePolicyId,omitempty"`
   460  	Datastores                   []types.ManagedObjectReference `xml:"datastores,omitempty"`
   461  	Labels                       []types.KeyValue               `xml:"labels,omitempty"`
   462  	ComplianceStatus             string                         `xml:"complianceStatus,omitempty"`
   463  	DatastoreAccessibilityStatus string                         `xml:"datastoreAccessibilityStatus,omitempty"`
   464  	Cursor                       *CnsCursor                     `xml:"cursor,omitempty"`
   465  	HealthStatus                 string                         `xml:"healthStatus,omitempty"`
   466  }
   467  
   468  func init() {
   469  	types.Add("CnsQueryFilter", reflect.TypeOf((*CnsQueryFilter)(nil)).Elem())
   470  }
   471  
   472  type CnsQuerySelection struct {
   473  	types.DynamicData
   474  
   475  	Names []string `xml:"names,omitempty"`
   476  }
   477  
   478  type CnsQueryResult struct {
   479  	types.DynamicData
   480  
   481  	Volumes []CnsVolume `xml:"volumes,omitempty"`
   482  	Cursor  CnsCursor   `xml:"cursor"`
   483  }
   484  
   485  func init() {
   486  	types.Add("CnsQueryResult", reflect.TypeOf((*CnsQueryResult)(nil)).Elem())
   487  }
   488  
   489  type CnsVolumeInfo struct {
   490  	types.DynamicData
   491  }
   492  
   493  func init() {
   494  	types.Add("CnsVolumeInfo", reflect.TypeOf((*CnsVolumeInfo)(nil)).Elem())
   495  }
   496  
   497  type CnsBlockVolumeInfo struct {
   498  	CnsVolumeInfo
   499  
   500  	VStorageObject types.VStorageObject `xml:"vStorageObject"`
   501  }
   502  
   503  func init() {
   504  	types.Add("CnsBlockVolumeInfo", reflect.TypeOf((*CnsBlockVolumeInfo)(nil)).Elem())
   505  }
   506  
   507  type CnsQueryVolumeInfoResult struct {
   508  	CnsVolumeOperationResult
   509  
   510  	VolumeInfo BaseCnsVolumeInfo `xml:"volumeInfo,typeattr,omitempty"`
   511  }
   512  
   513  func init() {
   514  	types.Add("CnsQueryVolumeInfoResult", reflect.TypeOf((*CnsQueryVolumeInfoResult)(nil)).Elem())
   515  }
   516  
   517  type CnsRelocateVolumeRequestType struct {
   518  	This          types.ManagedObjectReference `xml:"_this"`
   519  	RelocateSpecs []BaseCnsVolumeRelocateSpec  `xml:"relocateSpecs,typeattr"`
   520  }
   521  
   522  func init() {
   523  	types.Add("CnsRelocateVolumeRequestType", reflect.TypeOf((*CnsRelocateVolumeRequestType)(nil)).Elem())
   524  }
   525  
   526  type CnsRelocateVolume CnsRelocateVolumeRequestType
   527  
   528  func init() {
   529  	types.Add("CnsRelocateVolume", reflect.TypeOf((*CnsRelocateVolume)(nil)).Elem())
   530  }
   531  
   532  type CnsRelocateVolumeResponse struct {
   533  	Returnval types.ManagedObjectReference `xml:"returnval"`
   534  }
   535  
   536  type CnsVolumeRelocateSpec struct {
   537  	types.DynamicData
   538  
   539  	VolumeId       CnsVolumeId                           `xml:"volumeId"`
   540  	Datastore      types.ManagedObjectReference          `xml:"datastore"`
   541  	Profile        []types.BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
   542  	ServiceLocator *types.ServiceLocator                 `xml:"serviceLocator,omitempty"`
   543  }
   544  
   545  func init() {
   546  	types.Add("CnsVolumeRelocateSpec", reflect.TypeOf((*CnsVolumeRelocateSpec)(nil)).Elem())
   547  }
   548  
   549  type CnsBlockVolumeRelocateSpec struct {
   550  	CnsVolumeRelocateSpec
   551  }
   552  
   553  func NewCnsBlockVolumeRelocateSpec(volumeId string, datastore types.ManagedObjectReference, profile ...types.BaseVirtualMachineProfileSpec) CnsBlockVolumeRelocateSpec {
   554  	cnsVolumeID := CnsVolumeId{
   555  		Id: volumeId,
   556  	}
   557  	volumeSpec := CnsVolumeRelocateSpec{
   558  		VolumeId:  cnsVolumeID,
   559  		Datastore: datastore,
   560  		Profile:   profile,
   561  	}
   562  	blockVolSpec := CnsBlockVolumeRelocateSpec{
   563  		CnsVolumeRelocateSpec: volumeSpec,
   564  	}
   565  	return blockVolSpec
   566  }
   567  
   568  func init() {
   569  	types.Add("CnsBlockVolumeRelocateSpec", reflect.TypeOf((*CnsBlockVolumeRelocateSpec)(nil)).Elem())
   570  }
   571  
   572  type CnsCursor struct {
   573  	types.DynamicData
   574  
   575  	Offset       int64 `xml:"offset"`
   576  	Limit        int64 `xml:"limit"`
   577  	TotalRecords int64 `xml:"totalRecords,omitempty"`
   578  }
   579  
   580  func init() {
   581  	types.Add("CnsCursor", reflect.TypeOf((*CnsCursor)(nil)).Elem())
   582  }
   583  
   584  type CnsFault struct {
   585  	types.BaseMethodFault `xml:"fault,typeattr"`
   586  
   587  	Reason string `xml:"reason,omitempty"`
   588  }
   589  
   590  func init() {
   591  	types.Add("CnsFault", reflect.TypeOf((*CnsFault)(nil)).Elem())
   592  }
   593  
   594  type CnsVolumeNotFoundFault struct {
   595  	CnsFault
   596  
   597  	VolumeId CnsVolumeId `xml:"volumeId"`
   598  }
   599  
   600  func init() {
   601  	types.Add("CnsVolumeNotFoundFault", reflect.TypeOf((*CnsVolumeNotFoundFault)(nil)).Elem())
   602  }
   603  
   604  type CnsAlreadyRegisteredFault struct {
   605  	CnsFault `xml:"fault,typeattr"`
   606  
   607  	VolumeId CnsVolumeId `xml:"volumeId,omitempty"`
   608  }
   609  
   610  func init() {
   611  	types.Add("CnsAlreadyRegisteredFault", reflect.TypeOf((*CnsAlreadyRegisteredFault)(nil)).Elem())
   612  }
   613  
   614  type CnsSnapshotNotFoundFault struct {
   615  	CnsFault
   616  
   617  	VolumeId   CnsVolumeId   `xml:"volumeId,omitempty"`
   618  	SnapshotId CnsSnapshotId `xml:"SnapshotId"`
   619  }
   620  
   621  func init() {
   622  	types.Add("CnsSnapshotNotFoundFault", reflect.TypeOf((*CnsSnapshotNotFoundFault)(nil)).Elem())
   623  }
   624  
   625  type CnsSnapshotCreatedFault struct {
   626  	CnsFault
   627  
   628  	VolumeId   CnsVolumeId                  `xml:"volumeId"`
   629  	SnapshotId CnsSnapshotId                `xml:"SnapshotId"`
   630  	Datastore  types.ManagedObjectReference `xml:"datastore"`
   631  }
   632  
   633  func init() {
   634  	types.Add("CnsSnapshotCreatedFault", reflect.TypeOf((*CnsSnapshotCreatedFault)(nil)).Elem())
   635  }
   636  
   637  type CnsConfigureVolumeACLs CnsConfigureVolumeACLsRequestType
   638  
   639  func init() {
   640  	types.Add("vsan:CnsConfigureVolumeACLs", reflect.TypeOf((*CnsConfigureVolumeACLs)(nil)).Elem())
   641  }
   642  
   643  type CnsConfigureVolumeACLsRequestType struct {
   644  	This           types.ManagedObjectReference `xml:"_this"`
   645  	ACLConfigSpecs []CnsVolumeACLConfigureSpec  `xml:"ACLConfigSpecs"`
   646  }
   647  
   648  func init() {
   649  	types.Add("vsan:CnsConfigureVolumeACLsRequestType", reflect.TypeOf((*CnsConfigureVolumeACLsRequestType)(nil)).Elem())
   650  }
   651  
   652  type CnsConfigureVolumeACLsResponse struct {
   653  	Returnval types.ManagedObjectReference `xml:"returnval"`
   654  }
   655  
   656  type CnsVolumeACLConfigureSpec struct {
   657  	types.DynamicData
   658  
   659  	VolumeId              CnsVolumeId               `xml:"volumeId"`
   660  	AccessControlSpecList []CnsNFSAccessControlSpec `xml:"accessControlSpecList,typeattr"`
   661  }
   662  
   663  type CnsNFSAccessControlSpec struct {
   664  	types.DynamicData
   665  	Permission []vsanfstypes.VsanFileShareNetPermission `xml:"netPermission,omitempty,typeattr"`
   666  	Delete     bool                                     `xml:"delete,omitempty"`
   667  }
   668  
   669  func init() {
   670  	types.Add("CnsNFSAccessControlSpec", reflect.TypeOf((*CnsNFSAccessControlSpec)(nil)).Elem())
   671  }
   672  
   673  type CnsQueryAsync CnsQueryAsyncRequestType
   674  
   675  func init() {
   676  	types.Add("CnsQueryAsync", reflect.TypeOf((*CnsQueryAsync)(nil)).Elem())
   677  }
   678  
   679  type CnsQueryAsyncRequestType struct {
   680  	This      types.ManagedObjectReference `xml:"_this"`
   681  	Filter    CnsQueryFilter               `xml:"filter"`
   682  	Selection *CnsQuerySelection           `xml:"selection,omitempty"`
   683  }
   684  
   685  func init() {
   686  	types.Add("CnsQueryAsyncRequestType", reflect.TypeOf((*CnsQueryAsyncRequestType)(nil)).Elem())
   687  }
   688  
   689  type CnsQueryAsyncResponse struct {
   690  	Returnval types.ManagedObjectReference `xml:"returnval"`
   691  }
   692  
   693  type CnsAsyncQueryResult struct {
   694  	CnsVolumeOperationResult
   695  
   696  	QueryResult CnsQueryResult `xml:"queryResult,omitempty"`
   697  }
   698  
   699  func init() {
   700  	types.Add("CnsAsyncQueryResult", reflect.TypeOf((*CnsAsyncQueryResult)(nil)).Elem())
   701  }
   702  
   703  // Cns Snapshot Types
   704  
   705  type CnsCreateSnapshotsRequestType struct {
   706  	This          types.ManagedObjectReference `xml:"_this"`
   707  	SnapshotSpecs []CnsSnapshotCreateSpec      `xml:"snapshotSpecs,omitempty"`
   708  }
   709  
   710  func init() {
   711  	types.Add("CnsCreateSnapshotsRequestType", reflect.TypeOf((*CnsCreateSnapshotsRequestType)(nil)).Elem())
   712  }
   713  
   714  type CnsCreateSnapshots CnsCreateSnapshotsRequestType
   715  
   716  func init() {
   717  	types.Add("CnsCreateSnapshots", reflect.TypeOf((*CnsCreateSnapshots)(nil)).Elem())
   718  }
   719  
   720  type CnsCreateSnapshotsResponse struct {
   721  	Returnval types.ManagedObjectReference `xml:"returnval"`
   722  }
   723  
   724  type CnsSnapshotCreateSpec struct {
   725  	types.DynamicData
   726  
   727  	VolumeId    CnsVolumeId `xml:"volumeId"`
   728  	Description string      `xml:"description"`
   729  }
   730  
   731  func init() {
   732  	types.Add("CnsSnapshotCreateSpec", reflect.TypeOf((*CnsSnapshotCreateSpec)(nil)).Elem())
   733  }
   734  
   735  type CnsDeleteSnapshotsRequestType struct {
   736  	This                types.ManagedObjectReference `xml:"_this"`
   737  	SnapshotDeleteSpecs []CnsSnapshotDeleteSpec      `xml:"snapshotDeleteSpecs,omitempty"`
   738  }
   739  
   740  func init() {
   741  	types.Add("CnsDeleteSnapshotsRequestType", reflect.TypeOf((*CnsDeleteSnapshotsRequestType)(nil)).Elem())
   742  }
   743  
   744  type CnsDeleteSnapshots CnsDeleteSnapshotsRequestType
   745  
   746  func init() {
   747  	types.Add("CnsDeleteSnapshots", reflect.TypeOf((*CnsDeleteSnapshots)(nil)).Elem())
   748  }
   749  
   750  type CnsDeleteSnapshotsResponse struct {
   751  	Returnval types.ManagedObjectReference `xml:"returnval"`
   752  }
   753  
   754  type CnsSnapshotId struct {
   755  	types.DynamicData
   756  
   757  	Id string `xml:"id"`
   758  }
   759  
   760  func init() {
   761  	types.Add("CnsSnapshotId", reflect.TypeOf((*CnsSnapshotId)(nil)).Elem())
   762  }
   763  
   764  type CnsSnapshotDeleteSpec struct {
   765  	types.DynamicData
   766  
   767  	VolumeId   CnsVolumeId   `xml:"volumeId"`
   768  	SnapshotId CnsSnapshotId `xml:"snapshotId"`
   769  }
   770  
   771  func init() {
   772  	types.Add("CnsSnapshotDeleteSpec", reflect.TypeOf((*CnsSnapshotDeleteSpec)(nil)).Elem())
   773  }
   774  
   775  type CnsSnapshot struct {
   776  	types.DynamicData
   777  
   778  	SnapshotId  CnsSnapshotId `xml:"snapshotId"`
   779  	VolumeId    CnsVolumeId   `xml:"volumeId"`
   780  	Description string        `xml:"description,omitempty"`
   781  	CreateTime  time.Time     `xml:"createTime"`
   782  }
   783  
   784  func init() {
   785  	types.Add("CnsSnapshot", reflect.TypeOf((*CnsSnapshot)(nil)).Elem())
   786  }
   787  
   788  type CnsSnapshotOperationResult struct {
   789  	CnsVolumeOperationResult
   790  }
   791  
   792  func init() {
   793  	types.Add("CnsSnapshotOperationResult", reflect.TypeOf((*CnsSnapshotOperationResult)(nil)).Elem())
   794  }
   795  
   796  type CnsSnapshotCreateResult struct {
   797  	CnsSnapshotOperationResult
   798  	Snapshot                       CnsSnapshot `xml:"snapshot,omitempty"`
   799  	AggregatedSnapshotCapacityInMb int64       `xml:"aggregatedSnapshotCapacityInMb,omitempty"`
   800  }
   801  
   802  func init() {
   803  	types.Add("CnsSnapshotCreateResult", reflect.TypeOf((*CnsSnapshotCreateResult)(nil)).Elem())
   804  }
   805  
   806  type CnsSnapshotDeleteResult struct {
   807  	CnsSnapshotOperationResult
   808  	SnapshotId                     CnsSnapshotId `xml:"snapshotId,omitempty"`
   809  	AggregatedSnapshotCapacityInMb int64         `xml:"aggregatedSnapshotCapacityInMb,omitempty"`
   810  }
   811  
   812  func init() {
   813  	types.Add("CnsSnapshotDeleteResult", reflect.TypeOf((*CnsSnapshotDeleteResult)(nil)).Elem())
   814  }
   815  
   816  type CnsVolumeSource struct {
   817  	types.DynamicData
   818  }
   819  
   820  func init() {
   821  	types.Add("CnsVolumeSource", reflect.TypeOf((*CnsVolumeSource)(nil)).Elem())
   822  }
   823  
   824  type CnsSnapshotVolumeSource struct {
   825  	CnsVolumeSource
   826  
   827  	VolumeId   CnsVolumeId   `xml:"volumeId,omitempty"`
   828  	SnapshotId CnsSnapshotId `xml:"snapshotId,omitempty"`
   829  }
   830  
   831  func init() {
   832  	types.Add("CnsSnapshotVolumeSource", reflect.TypeOf((*CnsSnapshotVolumeSource)(nil)).Elem())
   833  }
   834  
   835  // CNS QuerySnapshots related types
   836  
   837  type CnsQuerySnapshotsRequestType struct {
   838  	This                types.ManagedObjectReference `xml:"_this"`
   839  	SnapshotQueryFilter CnsSnapshotQueryFilter       `xml:"snapshotQueryFilter"`
   840  }
   841  
   842  func init() {
   843  	types.Add("CnsQuerySnapshotsRequestType", reflect.TypeOf((*CnsQuerySnapshotsRequestType)(nil)).Elem())
   844  }
   845  
   846  type CnsQuerySnapshots CnsQuerySnapshotsRequestType
   847  
   848  func init() {
   849  	types.Add("CnsQuerySnapshots", reflect.TypeOf((*CnsQuerySnapshots)(nil)).Elem())
   850  }
   851  
   852  type CnsQuerySnapshotsResponse struct {
   853  	Returnval types.ManagedObjectReference `xml:"returnval"`
   854  }
   855  
   856  type CnsSnapshotQueryResult struct {
   857  	types.DynamicData
   858  
   859  	Entries []CnsSnapshotQueryResultEntry `xml:"entries,omitempty"`
   860  	Cursor  CnsCursor                     `xml:"cursor"`
   861  }
   862  
   863  func init() {
   864  	types.Add("CnsSnapshotQueryResult", reflect.TypeOf((*CnsSnapshotQueryResult)(nil)).Elem())
   865  }
   866  
   867  type CnsSnapshotQueryResultEntry struct {
   868  	types.DynamicData
   869  
   870  	Snapshot CnsSnapshot                 `xml:"snapshot,omitempty"`
   871  	Error    *types.LocalizedMethodFault `xml:"error,omitempty"`
   872  }
   873  
   874  func init() {
   875  	types.Add("CnsSnapshotQueryResultEntry", reflect.TypeOf((*CnsSnapshotQueryResultEntry)(nil)).Elem())
   876  }
   877  
   878  type CnsSnapshotQueryFilter struct {
   879  	types.DynamicData
   880  
   881  	SnapshotQuerySpecs []CnsSnapshotQuerySpec `xml:"snapshotQuerySpecs,omitempty"`
   882  	Cursor             *CnsCursor             `xml:"cursor,omitempty"`
   883  }
   884  
   885  func init() {
   886  	types.Add("CnsSnapshotQueryFilter", reflect.TypeOf((*CnsSnapshotQueryFilter)(nil)).Elem())
   887  }
   888  
   889  type CnsSnapshotQuerySpec struct {
   890  	types.DynamicData
   891  
   892  	VolumeId   CnsVolumeId    `xml:"volumeId"`
   893  	SnapshotId *CnsSnapshotId `xml:"snapshotId,omitempty"`
   894  }
   895  
   896  func init() {
   897  	types.Add("CnsSnapshotQuerySpec", reflect.TypeOf((*CnsSnapshotQuerySpec)(nil)).Elem())
   898  }
   899  
   900  type CnsReconfigVolumePolicy CnsReconfigVolumePolicyRequestType
   901  
   902  func init() {
   903  	types.Add("vsan:CnsReconfigVolumePolicy", reflect.TypeOf((*CnsReconfigVolumePolicy)(nil)).Elem())
   904  }
   905  
   906  type CnsReconfigVolumePolicyRequestType struct {
   907  	This                      types.ManagedObjectReference  `xml:"_this"`
   908  	VolumePolicyReconfigSpecs []CnsVolumePolicyReconfigSpec `xml:"volumePolicyReconfigSpecs,omitempty"`
   909  }
   910  
   911  func init() {
   912  	types.Add("vsan:CnsReconfigVolumePolicyRequestType", reflect.TypeOf((*CnsReconfigVolumePolicyRequestType)(nil)).Elem())
   913  }
   914  
   915  type CnsReconfigVolumePolicyResponse struct {
   916  	Returnval types.ManagedObjectReference `xml:"returnval"`
   917  }
   918  
   919  type CnsVolumePolicyReconfigSpec struct {
   920  	types.DynamicData
   921  
   922  	VolumeId CnsVolumeId                           `xml:"volumeId"`
   923  	Profile  []types.BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
   924  }
   925  
   926  func init() {
   927  	types.Add("vsan:CnsVolumePolicyReconfigSpec", reflect.TypeOf((*CnsVolumePolicyReconfigSpec)(nil)).Elem())
   928  }
   929  
   930  type CnsSyncDatastore CnsSyncDatastoreRequestType
   931  
   932  func init() {
   933  	types.Add("vsan:CnsSyncDatastore", reflect.TypeOf((*CnsSyncDatastore)(nil)).Elem())
   934  }
   935  
   936  type CnsSyncDatastoreRequestType struct {
   937  	This         types.ManagedObjectReference `xml:"_this"`
   938  	DatastoreUrl string                       `xml:"datastoreUrl,omitempty"`
   939  	FullSync     *bool                        `xml:"fullSync"`
   940  }
   941  
   942  func init() {
   943  	types.Add("vsan:CnsSyncDatastoreRequestType", reflect.TypeOf((*CnsSyncDatastoreRequestType)(nil)).Elem())
   944  }
   945  
   946  type CnsSyncDatastoreResponse struct {
   947  	Returnval types.ManagedObjectReference `xml:"returnval"`
   948  }