@@ -165,7 +165,7 @@ type Instance struct {
165165 // Number of virtual CPUs
166166 Vcpus int64 `json:"vcpus"`
167167 // Volumes attached to the instance
168- Volumes []VolumeAttachment `json:"volumes"`
168+ Volumes []VolumeMount `json:"volumes"`
169169 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
170170 JSON struct {
171171 ID respjson.Field
@@ -240,7 +240,7 @@ func (r *InstanceNetwork) UnmarshalJSON(data []byte) error {
240240 return apijson .UnmarshalRoot (data , r )
241241}
242242
243- type VolumeAttachment struct {
243+ type VolumeMount struct {
244244 // Path where volume is mounted in the guest
245245 MountPath string `json:"mount_path,required"`
246246 // Volume identifier
@@ -265,22 +265,22 @@ type VolumeAttachment struct {
265265}
266266
267267// Returns the unmodified JSON received from the API
268- func (r VolumeAttachment ) RawJSON () string { return r .JSON .raw }
269- func (r * VolumeAttachment ) UnmarshalJSON (data []byte ) error {
268+ func (r VolumeMount ) RawJSON () string { return r .JSON .raw }
269+ func (r * VolumeMount ) UnmarshalJSON (data []byte ) error {
270270 return apijson .UnmarshalRoot (data , r )
271271}
272272
273- // ToParam converts this VolumeAttachment to a VolumeAttachmentParam .
273+ // ToParam converts this VolumeMount to a VolumeMountParam .
274274//
275275// Warning: the fields of the param type will not be present. ToParam should only
276276// be used at the last possible moment before sending a request. Test for this with
277- // VolumeAttachmentParam .Overrides()
278- func (r VolumeAttachment ) ToParam () VolumeAttachmentParam {
279- return param.Override [VolumeAttachmentParam ](json .RawMessage (r .RawJSON ()))
277+ // VolumeMountParam .Overrides()
278+ func (r VolumeMount ) ToParam () VolumeMountParam {
279+ return param.Override [VolumeMountParam ](json .RawMessage (r .RawJSON ()))
280280}
281281
282282// The properties MountPath, VolumeID are required.
283- type VolumeAttachmentParam struct {
283+ type VolumeMountParam struct {
284284 // Path where volume is mounted in the guest
285285 MountPath string `json:"mount_path,required"`
286286 // Volume identifier
@@ -295,11 +295,11 @@ type VolumeAttachmentParam struct {
295295 paramObj
296296}
297297
298- func (r VolumeAttachmentParam ) MarshalJSON () (data []byte , err error ) {
299- type shadow VolumeAttachmentParam
298+ func (r VolumeMountParam ) MarshalJSON () (data []byte , err error ) {
299+ type shadow VolumeMountParam
300300 return param .MarshalObject (r , (* shadow )(& r ))
301301}
302- func (r * VolumeAttachmentParam ) UnmarshalJSON (data []byte ) error {
302+ func (r * VolumeMountParam ) UnmarshalJSON (data []byte ) error {
303303 return apijson .UnmarshalRoot (data , r )
304304}
305305
@@ -322,7 +322,7 @@ type InstanceNewParams struct {
322322 // Network configuration for the instance
323323 Network InstanceNewParamsNetwork `json:"network,omitzero"`
324324 // Volumes to attach to the instance at creation time
325- Volumes []VolumeAttachmentParam `json:"volumes,omitzero"`
325+ Volumes []VolumeMountParam `json:"volumes,omitzero"`
326326 paramObj
327327}
328328
0 commit comments