nutanix_volumes 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +11 -0
- data/Gemfile +9 -0
- data/README.md +290 -0
- data/Rakefile +10 -0
- data/docs/AssociateCategory202Response.md +20 -0
- data/docs/AssociateCategory4XXResponse.md +20 -0
- data/docs/AttachIscsiClient202Response.md +20 -0
- data/docs/AttachIscsiClient4XXResponse.md +20 -0
- data/docs/AttachVm202Response.md +20 -0
- data/docs/AttachVm4XXResponse.md +20 -0
- data/docs/CommonV10ConfigEntityReference.md +24 -0
- data/docs/CommonV10ConfigEntityType.md +15 -0
- data/docs/CommonV10ConfigFQDN.md +18 -0
- data/docs/CommonV10ConfigFlag.md +20 -0
- data/docs/CommonV10ConfigIPAddressOrFQDN.md +22 -0
- data/docs/CommonV10ConfigIPv4Address.md +20 -0
- data/docs/CommonV10ConfigIPv6Address.md +20 -0
- data/docs/CommonV10ConfigKVPair.md +20 -0
- data/docs/CommonV10ConfigKVPairValue.md +59 -0
- data/docs/CommonV10ConfigMapOfStringWrapper.md +18 -0
- data/docs/CommonV10ConfigMessage.md +24 -0
- data/docs/CommonV10ConfigMessageSeverity.md +15 -0
- data/docs/CommonV10ConfigMetadata.md +26 -0
- data/docs/CommonV10ConfigTenantAwareModel.md +18 -0
- data/docs/CommonV10ResponseApiLink.md +20 -0
- data/docs/CommonV10ResponseApiResponseMetadata.md +26 -0
- data/docs/CommonV10ResponseExternalizableAbstractModel.md +22 -0
- data/docs/CommonV10StatsDownSamplingOperator.md +15 -0
- data/docs/CreateVolumeDisk202Response.md +20 -0
- data/docs/CreateVolumeDisk4XXResponse.md +20 -0
- data/docs/CreateVolumeGroup202Response.md +20 -0
- data/docs/CreateVolumeGroup4XXResponse.md +20 -0
- data/docs/DeleteVolumeDiskById202Response.md +20 -0
- data/docs/DeleteVolumeDiskById4XXResponse.md +20 -0
- data/docs/DeleteVolumeGroupById202Response.md +20 -0
- data/docs/DeleteVolumeGroupById4XXResponse.md +20 -0
- data/docs/DetachIscsiClient202Response.md +20 -0
- data/docs/DetachIscsiClient4XXResponse.md +20 -0
- data/docs/DetachVm202Response.md +20 -0
- data/docs/DetachVm4XXResponse.md +20 -0
- data/docs/DisassociateCategory202Response.md +20 -0
- data/docs/DisassociateCategory4XXResponse.md +20 -0
- data/docs/GetIscsiClientById200Response.md +20 -0
- data/docs/GetIscsiClientById4XXResponse.md +20 -0
- data/docs/GetVolumeDiskById200Response.md +20 -0
- data/docs/GetVolumeDiskById4XXResponse.md +20 -0
- data/docs/GetVolumeDiskStats200Response.md +20 -0
- data/docs/GetVolumeDiskStats4XXResponse.md +20 -0
- data/docs/GetVolumeGroupById200Response.md +20 -0
- data/docs/GetVolumeGroupById4XXResponse.md +20 -0
- data/docs/GetVolumeGroupMetadataById200Response.md +20 -0
- data/docs/GetVolumeGroupMetadataById4XXResponse.md +20 -0
- data/docs/GetVolumeGroupStats200Response.md +20 -0
- data/docs/GetVolumeGroupStats4XXResponse.md +20 -0
- data/docs/IscsiClientsApi.md +253 -0
- data/docs/ListCategoryAssociationsByVolumeGroupId200Response.md +20 -0
- data/docs/ListCategoryAssociationsByVolumeGroupId4XXResponse.md +20 -0
- data/docs/ListExternalIscsiAttachmentsByVolumeGroupId200Response.md +20 -0
- data/docs/ListExternalIscsiAttachmentsByVolumeGroupId4XXResponse.md +20 -0
- data/docs/ListIscsiClients200Response.md +20 -0
- data/docs/ListIscsiClients4XXResponse.md +20 -0
- data/docs/ListVmAttachmentsByVolumeGroupId200Response.md +20 -0
- data/docs/ListVmAttachmentsByVolumeGroupId4XXResponse.md +20 -0
- data/docs/ListVolumeDisksByVolumeGroupId200Response.md +20 -0
- data/docs/ListVolumeDisksByVolumeGroupId4XXResponse.md +20 -0
- data/docs/ListVolumeGroups200Response.md +20 -0
- data/docs/ListVolumeGroups4XXResponse.md +20 -0
- data/docs/PrismV40ConfigTaskReference.md +18 -0
- data/docs/RevertVolumeGroup202Response.md +20 -0
- data/docs/RevertVolumeGroup4XXResponse.md +20 -0
- data/docs/UpdateIscsiClientById202Response.md +20 -0
- data/docs/UpdateIscsiClientById4XXResponse.md +20 -0
- data/docs/UpdateVolumeDiskById202Response.md +20 -0
- data/docs/UpdateVolumeDiskById4XXResponse.md +20 -0
- data/docs/UpdateVolumeGroupById202Response.md +20 -0
- data/docs/UpdateVolumeGroupById4XXResponse.md +20 -0
- data/docs/VolumeGroupsApi.md +1887 -0
- data/docs/VolumesV40ConfigAssociateCategoryApiResponse.md +20 -0
- data/docs/VolumesV40ConfigAttachIscsiClientApiResponse.md +20 -0
- data/docs/VolumesV40ConfigAttachNvmfClientApiResponse.md +20 -0
- data/docs/VolumesV40ConfigAttachVmApiResponse.md +20 -0
- data/docs/VolumesV40ConfigAttachmentType.md +15 -0
- data/docs/VolumesV40ConfigAuthenticationType.md +15 -0
- data/docs/VolumesV40ConfigCategoryDetails.md +24 -0
- data/docs/VolumesV40ConfigCategoryEntityReferences.md +18 -0
- data/docs/VolumesV40ConfigCluster.md +20 -0
- data/docs/VolumesV40ConfigCreateVolumeDiskApiResponse.md +20 -0
- data/docs/VolumesV40ConfigCreateVolumeGroupApiResponse.md +20 -0
- data/docs/VolumesV40ConfigDeleteVolumeDiskApiResponse.md +20 -0
- data/docs/VolumesV40ConfigDeleteVolumeGroupApiResponse.md +20 -0
- data/docs/VolumesV40ConfigDetachIscsiClientApiResponse.md +20 -0
- data/docs/VolumesV40ConfigDetachNvmfClientApiResponse.md +20 -0
- data/docs/VolumesV40ConfigDetachVmApiResponse.md +20 -0
- data/docs/VolumesV40ConfigDisassociateCategoryApiResponse.md +20 -0
- data/docs/VolumesV40ConfigDiskStorageFeatures.md +18 -0
- data/docs/VolumesV40ConfigFlashMode.md +18 -0
- data/docs/VolumesV40ConfigGetIscsiClientApiResponse.md +20 -0
- data/docs/VolumesV40ConfigGetIscsiClientApiResponseData.md +49 -0
- data/docs/VolumesV40ConfigGetVolumeDiskApiResponse.md +20 -0
- data/docs/VolumesV40ConfigGetVolumeDiskApiResponseData.md +49 -0
- data/docs/VolumesV40ConfigGetVolumeGroupApiResponse.md +20 -0
- data/docs/VolumesV40ConfigGetVolumeGroupApiResponseData.md +49 -0
- data/docs/VolumesV40ConfigGetVolumeGroupMetadataApiResponse.md +20 -0
- data/docs/VolumesV40ConfigGetVolumeGroupMetadataApiResponseData.md +49 -0
- data/docs/VolumesV40ConfigIscsiClient.md +38 -0
- data/docs/VolumesV40ConfigIscsiClientAttachment.md +20 -0
- data/docs/VolumesV40ConfigIscsiFeatures.md +20 -0
- data/docs/VolumesV40ConfigListCategoryAssociationsApiResponse.md +20 -0
- data/docs/VolumesV40ConfigListCategoryAssociationsApiResponseData.md +49 -0
- data/docs/VolumesV40ConfigListExternalIscsiAttachmentsApiResponse.md +20 -0
- data/docs/VolumesV40ConfigListExternalIscsiAttachmentsApiResponseData.md +49 -0
- data/docs/VolumesV40ConfigListIscsiClientsApiResponse.md +20 -0
- data/docs/VolumesV40ConfigListIscsiClientsApiResponseData.md +49 -0
- data/docs/VolumesV40ConfigListVmAttachmentsApiResponse.md +20 -0
- data/docs/VolumesV40ConfigListVmAttachmentsApiResponseData.md +49 -0
- data/docs/VolumesV40ConfigListVolumeDisksApiResponse.md +20 -0
- data/docs/VolumesV40ConfigListVolumeDisksApiResponseData.md +49 -0
- data/docs/VolumesV40ConfigListVolumeGroupsApiResponse.md +20 -0
- data/docs/VolumesV40ConfigListVolumeGroupsApiResponseData.md +49 -0
- data/docs/VolumesV40ConfigMigrateVolumeGroupApiResponse.md +20 -0
- data/docs/VolumesV40ConfigNvmfClient.md +28 -0
- data/docs/VolumesV40ConfigNvmfClientAttachment.md +24 -0
- data/docs/VolumesV40ConfigPauseVolumeGroupSynchronousReplicationApiResponse.md +20 -0
- data/docs/VolumesV40ConfigProtocol.md +15 -0
- data/docs/VolumesV40ConfigResumeVolumeGroupSynchronousReplicationApiResponse.md +20 -0
- data/docs/VolumesV40ConfigResumeVolumeGroupSynchronousReplicationApiResponseData.md +47 -0
- data/docs/VolumesV40ConfigRevertSpec.md +18 -0
- data/docs/VolumesV40ConfigRevertVolumeGroupApiResponse.md +20 -0
- data/docs/VolumesV40ConfigSharingStatus.md +15 -0
- data/docs/VolumesV40ConfigStorageFeatures.md +18 -0
- data/docs/VolumesV40ConfigTargetParam.md +20 -0
- data/docs/VolumesV40ConfigUpdateIscsiClientApiResponse.md +20 -0
- data/docs/VolumesV40ConfigUpdateIscsiClientApiResponseData.md +49 -0
- data/docs/VolumesV40ConfigUpdateIscsiClientByIdApiResponse.md +20 -0
- data/docs/VolumesV40ConfigUpdateVolumeDiskApiResponse.md +20 -0
- data/docs/VolumesV40ConfigUpdateVolumeDiskByIdApiResponse.md +20 -0
- data/docs/VolumesV40ConfigUpdateVolumeGroupApiResponse.md +20 -0
- data/docs/VolumesV40ConfigUpdateVolumeGroupByIdApiResponse.md +20 -0
- data/docs/VolumesV40ConfigUpdateVolumeGroupMetadataApiResponse.md +20 -0
- data/docs/VolumesV40ConfigUpdateVolumeGroupMetadataInfoApiResponse.md +20 -0
- data/docs/VolumesV40ConfigUsageType.md +15 -0
- data/docs/VolumesV40ConfigVmAttachment.md +20 -0
- data/docs/VolumesV40ConfigVolumeDisk.md +34 -0
- data/docs/VolumesV40ConfigVolumeGroup.md +54 -0
- data/docs/VolumesV40ConfigVolumeGroupAttachmentSite.md +15 -0
- data/docs/VolumesV40ConfigVolumeGroupMetadata.md +20 -0
- data/docs/VolumesV40ErrorAppMessage.md +28 -0
- data/docs/VolumesV40ErrorErrorResponse.md +18 -0
- data/docs/VolumesV40ErrorErrorResponseError.md +49 -0
- data/docs/VolumesV40ErrorMessageSeverity.md +15 -0
- data/docs/VolumesV40ErrorSchemaValidationError.md +26 -0
- data/docs/VolumesV40ErrorSchemaValidationErrorMessage.md +22 -0
- data/docs/VolumesV40StatsGetVolumeDiskStatsApiResponse.md +20 -0
- data/docs/VolumesV40StatsGetVolumeDiskStatsApiResponseData.md +49 -0
- data/docs/VolumesV40StatsGetVolumeGroupStatsApiResponse.md +20 -0
- data/docs/VolumesV40StatsGetVolumeGroupStatsApiResponseData.md +49 -0
- data/docs/VolumesV40StatsTimeValuePair.md +20 -0
- data/docs/VolumesV40StatsVolumeDiskStats.md +44 -0
- data/docs/VolumesV40StatsVolumeGroupStats.md +44 -0
- data/git_push.sh +57 -0
- data/lib/nutanix_volumes/api/iscsi_clients_api.rb +270 -0
- data/lib/nutanix_volumes/api/volume_groups_api.rb +2003 -0
- data/lib/nutanix_volumes/api_client.rb +394 -0
- data/lib/nutanix_volumes/api_error.rb +58 -0
- data/lib/nutanix_volumes/configuration.rb +315 -0
- data/lib/nutanix_volumes/models/associate_category202_response.rb +224 -0
- data/lib/nutanix_volumes/models/associate_category4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/attach_iscsi_client202_response.rb +224 -0
- data/lib/nutanix_volumes/models/attach_iscsi_client4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/attach_vm202_response.rb +224 -0
- data/lib/nutanix_volumes/models/attach_vm4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/common_v10_config_entity_reference.rb +336 -0
- data/lib/nutanix_volumes/models/common_v10_config_entity_type.rb +68 -0
- data/lib/nutanix_volumes/models/common_v10_config_flag.rb +256 -0
- data/lib/nutanix_volumes/models/common_v10_config_fqdn.rb +237 -0
- data/lib/nutanix_volumes/models/common_v10_config_ip_address_or_fqdn.rb +233 -0
- data/lib/nutanix_volumes/models/common_v10_config_ipv4_address.rb +284 -0
- data/lib/nutanix_volumes/models/common_v10_config_ipv6_address.rb +284 -0
- data/lib/nutanix_volumes/models/common_v10_config_kv_pair.rb +253 -0
- data/lib/nutanix_volumes/models/common_v10_config_kv_pair_value.rb +111 -0
- data/lib/nutanix_volumes/models/common_v10_config_map_of_string_wrapper.rb +218 -0
- data/lib/nutanix_volumes/models/common_v10_config_message.rb +268 -0
- data/lib/nutanix_volumes/models/common_v10_config_message_severity.rb +43 -0
- data/lib/nutanix_volumes/models/common_v10_config_metadata.rb +366 -0
- data/lib/nutanix_volumes/models/common_v10_config_tenant_aware_model.rb +237 -0
- data/lib/nutanix_volumes/models/common_v10_response_api_link.rb +226 -0
- data/lib/nutanix_volumes/models/common_v10_response_api_response_metadata.rb +376 -0
- data/lib/nutanix_volumes/models/common_v10_response_externalizable_abstract_model.rb +312 -0
- data/lib/nutanix_volumes/models/common_v10_stats_down_sampling_operator.rb +46 -0
- data/lib/nutanix_volumes/models/create_volume_disk202_response.rb +224 -0
- data/lib/nutanix_volumes/models/create_volume_disk4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/create_volume_group202_response.rb +224 -0
- data/lib/nutanix_volumes/models/create_volume_group4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/delete_volume_disk_by_id202_response.rb +224 -0
- data/lib/nutanix_volumes/models/delete_volume_disk_by_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/delete_volume_group_by_id202_response.rb +224 -0
- data/lib/nutanix_volumes/models/delete_volume_group_by_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/detach_iscsi_client202_response.rb +224 -0
- data/lib/nutanix_volumes/models/detach_iscsi_client4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/detach_vm202_response.rb +224 -0
- data/lib/nutanix_volumes/models/detach_vm4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/disassociate_category202_response.rb +224 -0
- data/lib/nutanix_volumes/models/disassociate_category4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/get_iscsi_client_by_id200_response.rb +224 -0
- data/lib/nutanix_volumes/models/get_iscsi_client_by_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/get_volume_disk_by_id200_response.rb +224 -0
- data/lib/nutanix_volumes/models/get_volume_disk_by_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/get_volume_disk_stats200_response.rb +224 -0
- data/lib/nutanix_volumes/models/get_volume_disk_stats4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/get_volume_group_by_id200_response.rb +224 -0
- data/lib/nutanix_volumes/models/get_volume_group_by_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/get_volume_group_metadata_by_id200_response.rb +224 -0
- data/lib/nutanix_volumes/models/get_volume_group_metadata_by_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/get_volume_group_stats200_response.rb +224 -0
- data/lib/nutanix_volumes/models/get_volume_group_stats4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/list_category_associations_by_volume_group_id200_response.rb +226 -0
- data/lib/nutanix_volumes/models/list_category_associations_by_volume_group_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/list_external_iscsi_attachments_by_volume_group_id200_response.rb +226 -0
- data/lib/nutanix_volumes/models/list_external_iscsi_attachments_by_volume_group_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/list_iscsi_clients200_response.rb +226 -0
- data/lib/nutanix_volumes/models/list_iscsi_clients4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/list_vm_attachments_by_volume_group_id200_response.rb +226 -0
- data/lib/nutanix_volumes/models/list_vm_attachments_by_volume_group_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/list_volume_disks_by_volume_group_id200_response.rb +226 -0
- data/lib/nutanix_volumes/models/list_volume_disks_by_volume_group_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/list_volume_groups200_response.rb +226 -0
- data/lib/nutanix_volumes/models/list_volume_groups4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/prism_v40_config_task_reference.rb +237 -0
- data/lib/nutanix_volumes/models/revert_volume_group202_response.rb +224 -0
- data/lib/nutanix_volumes/models/revert_volume_group4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/update_iscsi_client_by_id202_response.rb +224 -0
- data/lib/nutanix_volumes/models/update_iscsi_client_by_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/update_volume_disk_by_id202_response.rb +224 -0
- data/lib/nutanix_volumes/models/update_volume_disk_by_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/update_volume_group_by_id202_response.rb +224 -0
- data/lib/nutanix_volumes/models/update_volume_group_by_id4_xx_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_associate_category_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_attach_iscsi_client_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_attach_nvmf_client_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_attach_vm_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_attachment_type.rb +43 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_authentication_type.rb +42 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_category_details.rb +344 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_category_entity_references.rb +246 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_cluster.rb +265 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_create_volume_disk_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_create_volume_group_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_delete_volume_disk_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_delete_volume_group_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_detach_iscsi_client_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_detach_nvmf_client_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_detach_vm_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_disassociate_category_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_disk_storage_features.rb +215 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_flash_mode.rb +218 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_get_iscsi_client_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_get_iscsi_client_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_get_volume_disk_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_get_volume_disk_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_get_volume_group_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_get_volume_group_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_get_volume_group_metadata_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_get_volume_group_metadata_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_iscsi_client.rb +508 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_iscsi_client_attachment.rb +268 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_iscsi_features.rb +275 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_list_category_associations_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_list_category_associations_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_list_external_iscsi_attachments_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_list_external_iscsi_attachments_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_list_iscsi_clients_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_list_iscsi_clients_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_list_vm_attachments_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_list_vm_attachments_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_list_volume_disks_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_list_volume_disks_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_list_volume_groups_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_list_volume_groups_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_migrate_volume_group_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_nvmf_client.rb +412 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_nvmf_client_attachment.rb +343 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_pause_volume_group_synchronous_replication_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_protocol.rb +43 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_resume_volume_group_synchronous_replication_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_resume_volume_group_synchronous_replication_api_response_data.rb +104 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_revert_spec.rb +244 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_revert_volume_group_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_sharing_status.rb +42 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_storage_features.rb +215 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_target_param.rb +273 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_update_iscsi_client_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_update_iscsi_client_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_update_iscsi_client_by_id_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_update_volume_disk_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_update_volume_disk_by_id_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_update_volume_group_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_update_volume_group_by_id_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_update_volume_group_metadata_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_update_volume_group_metadata_info_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_usage_type.rb +44 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_vm_attachment.rb +254 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_volume_disk.rb +466 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_volume_group.rb +657 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_volume_group_attachment_site.rb +42 -0
- data/lib/nutanix_volumes/models/volumes_v40_config_volume_group_metadata.rb +255 -0
- data/lib/nutanix_volumes/models/volumes_v40_error_app_message.rb +291 -0
- data/lib/nutanix_volumes/models/volumes_v40_error_error_response.rb +215 -0
- data/lib/nutanix_volumes/models/volumes_v40_error_error_response_error.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_error_message_severity.rb +43 -0
- data/lib/nutanix_volumes/models/volumes_v40_error_schema_validation_error.rb +258 -0
- data/lib/nutanix_volumes/models/volumes_v40_error_schema_validation_error_message.rb +236 -0
- data/lib/nutanix_volumes/models/volumes_v40_stats_get_volume_disk_stats_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_stats_get_volume_disk_stats_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_stats_get_volume_group_stats_api_response.rb +224 -0
- data/lib/nutanix_volumes/models/volumes_v40_stats_get_volume_group_stats_api_response_data.rb +105 -0
- data/lib/nutanix_volumes/models/volumes_v40_stats_time_value_pair.rb +225 -0
- data/lib/nutanix_volumes/models/volumes_v40_stats_volume_disk_stats.rb +743 -0
- data/lib/nutanix_volumes/models/volumes_v40_stats_volume_group_stats.rb +743 -0
- data/lib/nutanix_volumes/version.rb +15 -0
- data/lib/nutanix_volumes.rb +194 -0
- data/nutanix_volumes.gemspec +39 -0
- data/spec/api/iscsi_clients_api_spec.rb +79 -0
- data/spec/api/volume_groups_api_spec.rb +370 -0
- data/spec/models/associate_category202_response_spec.rb +42 -0
- data/spec/models/associate_category4_xx_response_spec.rb +42 -0
- data/spec/models/attach_iscsi_client202_response_spec.rb +42 -0
- data/spec/models/attach_iscsi_client4_xx_response_spec.rb +42 -0
- data/spec/models/attach_vm202_response_spec.rb +42 -0
- data/spec/models/attach_vm4_xx_response_spec.rb +42 -0
- data/spec/models/common_v10_config_entity_reference_spec.rb +54 -0
- data/spec/models/common_v10_config_entity_type_spec.rb +30 -0
- data/spec/models/common_v10_config_flag_spec.rb +42 -0
- data/spec/models/common_v10_config_fqdn_spec.rb +36 -0
- data/spec/models/common_v10_config_ip_address_or_fqdn_spec.rb +48 -0
- data/spec/models/common_v10_config_ipv4_address_spec.rb +42 -0
- data/spec/models/common_v10_config_ipv6_address_spec.rb +42 -0
- data/spec/models/common_v10_config_kv_pair_spec.rb +42 -0
- data/spec/models/common_v10_config_kv_pair_value_spec.rb +32 -0
- data/spec/models/common_v10_config_map_of_string_wrapper_spec.rb +36 -0
- data/spec/models/common_v10_config_message_severity_spec.rb +30 -0
- data/spec/models/common_v10_config_message_spec.rb +54 -0
- data/spec/models/common_v10_config_metadata_spec.rb +60 -0
- data/spec/models/common_v10_config_tenant_aware_model_spec.rb +36 -0
- data/spec/models/common_v10_response_api_link_spec.rb +42 -0
- data/spec/models/common_v10_response_api_response_metadata_spec.rb +60 -0
- data/spec/models/common_v10_response_externalizable_abstract_model_spec.rb +48 -0
- data/spec/models/common_v10_stats_down_sampling_operator_spec.rb +30 -0
- data/spec/models/create_volume_disk202_response_spec.rb +42 -0
- data/spec/models/create_volume_disk4_xx_response_spec.rb +42 -0
- data/spec/models/create_volume_group202_response_spec.rb +42 -0
- data/spec/models/create_volume_group4_xx_response_spec.rb +42 -0
- data/spec/models/delete_volume_disk_by_id202_response_spec.rb +42 -0
- data/spec/models/delete_volume_disk_by_id4_xx_response_spec.rb +42 -0
- data/spec/models/delete_volume_group_by_id202_response_spec.rb +42 -0
- data/spec/models/delete_volume_group_by_id4_xx_response_spec.rb +42 -0
- data/spec/models/detach_iscsi_client202_response_spec.rb +42 -0
- data/spec/models/detach_iscsi_client4_xx_response_spec.rb +42 -0
- data/spec/models/detach_vm202_response_spec.rb +42 -0
- data/spec/models/detach_vm4_xx_response_spec.rb +42 -0
- data/spec/models/disassociate_category202_response_spec.rb +42 -0
- data/spec/models/disassociate_category4_xx_response_spec.rb +42 -0
- data/spec/models/get_iscsi_client_by_id200_response_spec.rb +42 -0
- data/spec/models/get_iscsi_client_by_id4_xx_response_spec.rb +42 -0
- data/spec/models/get_volume_disk_by_id200_response_spec.rb +42 -0
- data/spec/models/get_volume_disk_by_id4_xx_response_spec.rb +42 -0
- data/spec/models/get_volume_disk_stats200_response_spec.rb +42 -0
- data/spec/models/get_volume_disk_stats4_xx_response_spec.rb +42 -0
- data/spec/models/get_volume_group_by_id200_response_spec.rb +42 -0
- data/spec/models/get_volume_group_by_id4_xx_response_spec.rb +42 -0
- data/spec/models/get_volume_group_metadata_by_id200_response_spec.rb +42 -0
- data/spec/models/get_volume_group_metadata_by_id4_xx_response_spec.rb +42 -0
- data/spec/models/get_volume_group_stats200_response_spec.rb +42 -0
- data/spec/models/get_volume_group_stats4_xx_response_spec.rb +42 -0
- data/spec/models/list_category_associations_by_volume_group_id200_response_spec.rb +42 -0
- data/spec/models/list_category_associations_by_volume_group_id4_xx_response_spec.rb +42 -0
- data/spec/models/list_external_iscsi_attachments_by_volume_group_id200_response_spec.rb +42 -0
- data/spec/models/list_external_iscsi_attachments_by_volume_group_id4_xx_response_spec.rb +42 -0
- data/spec/models/list_iscsi_clients200_response_spec.rb +42 -0
- data/spec/models/list_iscsi_clients4_xx_response_spec.rb +42 -0
- data/spec/models/list_vm_attachments_by_volume_group_id200_response_spec.rb +42 -0
- data/spec/models/list_vm_attachments_by_volume_group_id4_xx_response_spec.rb +42 -0
- data/spec/models/list_volume_disks_by_volume_group_id200_response_spec.rb +42 -0
- data/spec/models/list_volume_disks_by_volume_group_id4_xx_response_spec.rb +42 -0
- data/spec/models/list_volume_groups200_response_spec.rb +42 -0
- data/spec/models/list_volume_groups4_xx_response_spec.rb +42 -0
- data/spec/models/prism_v40_config_task_reference_spec.rb +36 -0
- data/spec/models/revert_volume_group202_response_spec.rb +42 -0
- data/spec/models/revert_volume_group4_xx_response_spec.rb +42 -0
- data/spec/models/update_iscsi_client_by_id202_response_spec.rb +42 -0
- data/spec/models/update_iscsi_client_by_id4_xx_response_spec.rb +42 -0
- data/spec/models/update_volume_disk_by_id202_response_spec.rb +42 -0
- data/spec/models/update_volume_disk_by_id4_xx_response_spec.rb +42 -0
- data/spec/models/update_volume_group_by_id202_response_spec.rb +42 -0
- data/spec/models/update_volume_group_by_id4_xx_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_associate_category_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_attach_iscsi_client_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_attach_nvmf_client_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_attach_vm_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_attachment_type_spec.rb +30 -0
- data/spec/models/volumes_v40_config_authentication_type_spec.rb +30 -0
- data/spec/models/volumes_v40_config_category_details_spec.rb +54 -0
- data/spec/models/volumes_v40_config_category_entity_references_spec.rb +36 -0
- data/spec/models/volumes_v40_config_cluster_spec.rb +42 -0
- data/spec/models/volumes_v40_config_create_volume_disk_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_create_volume_group_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_delete_volume_disk_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_delete_volume_group_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_detach_iscsi_client_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_detach_nvmf_client_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_detach_vm_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_disassociate_category_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_disk_storage_features_spec.rb +36 -0
- data/spec/models/volumes_v40_config_flash_mode_spec.rb +36 -0
- data/spec/models/volumes_v40_config_get_iscsi_client_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_config_get_iscsi_client_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_get_volume_disk_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_config_get_volume_disk_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_get_volume_group_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_config_get_volume_group_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_get_volume_group_metadata_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_config_get_volume_group_metadata_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_iscsi_client_attachment_spec.rb +42 -0
- data/spec/models/volumes_v40_config_iscsi_client_spec.rb +96 -0
- data/spec/models/volumes_v40_config_iscsi_features_spec.rb +42 -0
- data/spec/models/volumes_v40_config_list_category_associations_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_config_list_category_associations_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_list_external_iscsi_attachments_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_config_list_external_iscsi_attachments_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_list_iscsi_clients_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_config_list_iscsi_clients_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_list_vm_attachments_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_config_list_vm_attachments_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_list_volume_disks_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_config_list_volume_disks_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_list_volume_groups_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_config_list_volume_groups_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_migrate_volume_group_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_nvmf_client_attachment_spec.rb +54 -0
- data/spec/models/volumes_v40_config_nvmf_client_spec.rb +66 -0
- data/spec/models/volumes_v40_config_pause_volume_group_synchronous_replication_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_protocol_spec.rb +30 -0
- data/spec/models/volumes_v40_config_resume_volume_group_synchronous_replication_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_config_resume_volume_group_synchronous_replication_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_revert_spec_spec.rb +36 -0
- data/spec/models/volumes_v40_config_revert_volume_group_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_sharing_status_spec.rb +30 -0
- data/spec/models/volumes_v40_config_storage_features_spec.rb +36 -0
- data/spec/models/volumes_v40_config_target_param_spec.rb +42 -0
- data/spec/models/volumes_v40_config_update_iscsi_client_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_config_update_iscsi_client_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_update_iscsi_client_by_id_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_update_volume_disk_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_update_volume_disk_by_id_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_update_volume_group_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_update_volume_group_by_id_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_update_volume_group_metadata_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_update_volume_group_metadata_info_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_config_usage_type_spec.rb +30 -0
- data/spec/models/volumes_v40_config_vm_attachment_spec.rb +42 -0
- data/spec/models/volumes_v40_config_volume_disk_spec.rb +84 -0
- data/spec/models/volumes_v40_config_volume_group_attachment_site_spec.rb +30 -0
- data/spec/models/volumes_v40_config_volume_group_metadata_spec.rb +42 -0
- data/spec/models/volumes_v40_config_volume_group_spec.rb +144 -0
- data/spec/models/volumes_v40_error_app_message_spec.rb +66 -0
- data/spec/models/volumes_v40_error_error_response_error_spec.rb +32 -0
- data/spec/models/volumes_v40_error_error_response_spec.rb +36 -0
- data/spec/models/volumes_v40_error_message_severity_spec.rb +30 -0
- data/spec/models/volumes_v40_error_schema_validation_error_message_spec.rb +48 -0
- data/spec/models/volumes_v40_error_schema_validation_error_spec.rb +60 -0
- data/spec/models/volumes_v40_stats_get_volume_disk_stats_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_stats_get_volume_disk_stats_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_stats_get_volume_group_stats_api_response_data_spec.rb +32 -0
- data/spec/models/volumes_v40_stats_get_volume_group_stats_api_response_spec.rb +42 -0
- data/spec/models/volumes_v40_stats_time_value_pair_spec.rb +42 -0
- data/spec/models/volumes_v40_stats_volume_disk_stats_spec.rb +114 -0
- data/spec/models/volumes_v40_stats_volume_group_stats_spec.rb +114 -0
- data/spec/spec_helper.rb +111 -0
- data/swagger-volumes-v4.0-all.yaml +8140 -0
- metadata +714 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Nutanix Volumes APIs
|
|
3
|
+
|
|
4
|
+
#Configure volumes.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 4.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module NutanixVolumes
|
|
17
|
+
# The metadata associated with an API response. This value is always present and minimally contains the self-link for the API request that produced this response. It also contains pagination data for the paginated requests.
|
|
18
|
+
class CommonV10ResponseApiResponseMetadata
|
|
19
|
+
# An array of flags that may indicate the status of the response. For example, a flag with the name 'isPaginated' and value 'false', indicates that the response is not paginated.
|
|
20
|
+
attr_accessor :flags
|
|
21
|
+
|
|
22
|
+
# An array of HATEOAS style links for the response that may also include pagination links for list operations.
|
|
23
|
+
attr_accessor :links
|
|
24
|
+
|
|
25
|
+
# The total number of entities that are available on the server for this type.
|
|
26
|
+
attr_accessor :total_available_results
|
|
27
|
+
|
|
28
|
+
# Information, Warning or Error messages that might provide additional contextual information related to the operation.
|
|
29
|
+
attr_accessor :messages
|
|
30
|
+
|
|
31
|
+
# An array of entity-specific metadata
|
|
32
|
+
attr_accessor :extra_info
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'flags' => :'flags',
|
|
38
|
+
:'links' => :'links',
|
|
39
|
+
:'total_available_results' => :'totalAvailableResults',
|
|
40
|
+
:'messages' => :'messages',
|
|
41
|
+
:'extra_info' => :'extraInfo'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'flags' => :'Array<CommonV10ConfigFlag>',
|
|
54
|
+
:'links' => :'Array<CommonV10ResponseApiLink>',
|
|
55
|
+
:'total_available_results' => :'Integer',
|
|
56
|
+
:'messages' => :'Array<CommonV10ConfigMessage>',
|
|
57
|
+
:'extra_info' => :'Array<CommonV10ConfigKVPair>'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# List of attributes with nullable: true
|
|
62
|
+
def self.openapi_nullable
|
|
63
|
+
Set.new([
|
|
64
|
+
])
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Initializes the object
|
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
if (!attributes.is_a?(Hash))
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `NutanixVolumes::CommonV10ResponseApiResponseMetadata` initialize method"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixVolumes::CommonV10ResponseApiResponseMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'flags')
|
|
83
|
+
if (value = attributes[:'flags']).is_a?(Array)
|
|
84
|
+
self.flags = value
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'links')
|
|
89
|
+
if (value = attributes[:'links']).is_a?(Array)
|
|
90
|
+
self.links = value
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'total_available_results')
|
|
95
|
+
self.total_available_results = attributes[:'total_available_results']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'messages')
|
|
99
|
+
if (value = attributes[:'messages']).is_a?(Array)
|
|
100
|
+
self.messages = value
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'extra_info')
|
|
105
|
+
if (value = attributes[:'extra_info']).is_a?(Array)
|
|
106
|
+
self.extra_info = value
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
|
+
# @return Array for valid properties with the reasons
|
|
113
|
+
def list_invalid_properties
|
|
114
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
115
|
+
invalid_properties = Array.new
|
|
116
|
+
if !@flags.nil? && @flags.length > 20
|
|
117
|
+
invalid_properties.push('invalid value for "flags", number of items must be less than or equal to 20.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if !@flags.nil? && @flags.length < 0
|
|
121
|
+
invalid_properties.push('invalid value for "flags", number of items must be greater than or equal to 0.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if !@links.nil? && @links.length > 20
|
|
125
|
+
invalid_properties.push('invalid value for "links", number of items must be less than or equal to 20.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if !@links.nil? && @links.length < 0
|
|
129
|
+
invalid_properties.push('invalid value for "links", number of items must be greater than or equal to 0.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if !@messages.nil? && @messages.length > 20
|
|
133
|
+
invalid_properties.push('invalid value for "messages", number of items must be less than or equal to 20.')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if !@messages.nil? && @messages.length < 0
|
|
137
|
+
invalid_properties.push('invalid value for "messages", number of items must be greater than or equal to 0.')
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if !@extra_info.nil? && @extra_info.length > 20
|
|
141
|
+
invalid_properties.push('invalid value for "extra_info", number of items must be less than or equal to 20.')
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if !@extra_info.nil? && @extra_info.length < 0
|
|
145
|
+
invalid_properties.push('invalid value for "extra_info", number of items must be greater than or equal to 0.')
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
invalid_properties
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Check to see if the all the properties in the model are valid
|
|
152
|
+
# @return true if the model is valid
|
|
153
|
+
def valid?
|
|
154
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
155
|
+
return false if !@flags.nil? && @flags.length > 20
|
|
156
|
+
return false if !@flags.nil? && @flags.length < 0
|
|
157
|
+
return false if !@links.nil? && @links.length > 20
|
|
158
|
+
return false if !@links.nil? && @links.length < 0
|
|
159
|
+
return false if !@messages.nil? && @messages.length > 20
|
|
160
|
+
return false if !@messages.nil? && @messages.length < 0
|
|
161
|
+
return false if !@extra_info.nil? && @extra_info.length > 20
|
|
162
|
+
return false if !@extra_info.nil? && @extra_info.length < 0
|
|
163
|
+
true
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Custom attribute writer method with validation
|
|
167
|
+
# @param [Object] flags Value to be assigned
|
|
168
|
+
def flags=(flags)
|
|
169
|
+
if flags.nil?
|
|
170
|
+
fail ArgumentError, 'flags cannot be nil'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if flags.length > 20
|
|
174
|
+
fail ArgumentError, 'invalid value for "flags", number of items must be less than or equal to 20.'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if flags.length < 0
|
|
178
|
+
fail ArgumentError, 'invalid value for "flags", number of items must be greater than or equal to 0.'
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
@flags = flags
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Custom attribute writer method with validation
|
|
185
|
+
# @param [Object] links Value to be assigned
|
|
186
|
+
def links=(links)
|
|
187
|
+
if links.nil?
|
|
188
|
+
fail ArgumentError, 'links cannot be nil'
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if links.length > 20
|
|
192
|
+
fail ArgumentError, 'invalid value for "links", number of items must be less than or equal to 20.'
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if links.length < 0
|
|
196
|
+
fail ArgumentError, 'invalid value for "links", number of items must be greater than or equal to 0.'
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
@links = links
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Custom attribute writer method with validation
|
|
203
|
+
# @param [Object] messages Value to be assigned
|
|
204
|
+
def messages=(messages)
|
|
205
|
+
if messages.nil?
|
|
206
|
+
fail ArgumentError, 'messages cannot be nil'
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
if messages.length > 20
|
|
210
|
+
fail ArgumentError, 'invalid value for "messages", number of items must be less than or equal to 20.'
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if messages.length < 0
|
|
214
|
+
fail ArgumentError, 'invalid value for "messages", number of items must be greater than or equal to 0.'
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
@messages = messages
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Custom attribute writer method with validation
|
|
221
|
+
# @param [Object] extra_info Value to be assigned
|
|
222
|
+
def extra_info=(extra_info)
|
|
223
|
+
if extra_info.nil?
|
|
224
|
+
fail ArgumentError, 'extra_info cannot be nil'
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if extra_info.length > 20
|
|
228
|
+
fail ArgumentError, 'invalid value for "extra_info", number of items must be less than or equal to 20.'
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if extra_info.length < 0
|
|
232
|
+
fail ArgumentError, 'invalid value for "extra_info", number of items must be greater than or equal to 0.'
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
@extra_info = extra_info
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Checks equality by comparing each attribute.
|
|
239
|
+
# @param [Object] Object to be compared
|
|
240
|
+
def ==(o)
|
|
241
|
+
return true if self.equal?(o)
|
|
242
|
+
self.class == o.class &&
|
|
243
|
+
flags == o.flags &&
|
|
244
|
+
links == o.links &&
|
|
245
|
+
total_available_results == o.total_available_results &&
|
|
246
|
+
messages == o.messages &&
|
|
247
|
+
extra_info == o.extra_info
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# @see the `==` method
|
|
251
|
+
# @param [Object] Object to be compared
|
|
252
|
+
def eql?(o)
|
|
253
|
+
self == o
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Calculates hash code according to all attributes.
|
|
257
|
+
# @return [Integer] Hash code
|
|
258
|
+
def hash
|
|
259
|
+
[flags, links, total_available_results, messages, extra_info].hash
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Builds the object from hash
|
|
263
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
264
|
+
# @return [Object] Returns the model itself
|
|
265
|
+
def self.build_from_hash(attributes)
|
|
266
|
+
return nil unless attributes.is_a?(Hash)
|
|
267
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
268
|
+
transformed_hash = {}
|
|
269
|
+
openapi_types.each_pair do |key, type|
|
|
270
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
271
|
+
transformed_hash["#{key}"] = nil
|
|
272
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
273
|
+
# check to ensure the input is an array given that the attribute
|
|
274
|
+
# is documented as an array but the input is not
|
|
275
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
276
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
277
|
+
end
|
|
278
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
279
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
280
|
+
end
|
|
281
|
+
end
|
|
282
|
+
new(transformed_hash)
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Deserializes the data based on type
|
|
286
|
+
# @param string type Data type
|
|
287
|
+
# @param string value Value to be deserialized
|
|
288
|
+
# @return [Object] Deserialized data
|
|
289
|
+
def self._deserialize(type, value)
|
|
290
|
+
case type.to_sym
|
|
291
|
+
when :Time
|
|
292
|
+
Time.parse(value)
|
|
293
|
+
when :Date
|
|
294
|
+
Date.parse(value)
|
|
295
|
+
when :String
|
|
296
|
+
value.to_s
|
|
297
|
+
when :Integer
|
|
298
|
+
value.to_i
|
|
299
|
+
when :Float
|
|
300
|
+
value.to_f
|
|
301
|
+
when :Boolean
|
|
302
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
303
|
+
true
|
|
304
|
+
else
|
|
305
|
+
false
|
|
306
|
+
end
|
|
307
|
+
when :Object
|
|
308
|
+
# generic object (usually a Hash), return directly
|
|
309
|
+
value
|
|
310
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
311
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
312
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
313
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
314
|
+
k_type = Regexp.last_match[:k_type]
|
|
315
|
+
v_type = Regexp.last_match[:v_type]
|
|
316
|
+
{}.tap do |hash|
|
|
317
|
+
value.each do |k, v|
|
|
318
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
319
|
+
end
|
|
320
|
+
end
|
|
321
|
+
else # model
|
|
322
|
+
# models (e.g. Pet) or oneOf
|
|
323
|
+
klass = NutanixVolumes.const_get(type)
|
|
324
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
325
|
+
end
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# Returns the string representation of the object
|
|
329
|
+
# @return [String] String presentation of the object
|
|
330
|
+
def to_s
|
|
331
|
+
to_hash.to_s
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
335
|
+
# @return [Hash] Returns the object in the form of hash
|
|
336
|
+
def to_body
|
|
337
|
+
to_hash
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# Returns the object in the form of hash
|
|
341
|
+
# @return [Hash] Returns the object in the form of hash
|
|
342
|
+
def to_hash
|
|
343
|
+
hash = {}
|
|
344
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
345
|
+
value = self.send(attr)
|
|
346
|
+
if value.nil?
|
|
347
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
348
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
hash[param] = _to_hash(value)
|
|
352
|
+
end
|
|
353
|
+
hash
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# Outputs non-array value in the form of hash
|
|
357
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
358
|
+
# @param [Object] value Any valid value
|
|
359
|
+
# @return [Hash] Returns the value in the form of hash
|
|
360
|
+
def _to_hash(value)
|
|
361
|
+
if value.is_a?(Array)
|
|
362
|
+
value.compact.map { |v| _to_hash(v) }
|
|
363
|
+
elsif value.is_a?(Hash)
|
|
364
|
+
{}.tap do |hash|
|
|
365
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
366
|
+
end
|
|
367
|
+
elsif value.respond_to? :to_hash
|
|
368
|
+
value.to_hash
|
|
369
|
+
else
|
|
370
|
+
value
|
|
371
|
+
end
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
end
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Nutanix Volumes APIs
|
|
3
|
+
|
|
4
|
+
#Configure volumes.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 4.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module NutanixVolumes
|
|
17
|
+
# A model that represents an object instance that is accessible through an API endpoint. Instances of this type get an extId field that contains the globally unique identifier for that instance. Externally accessible instances are always tenant aware and, therefore, extend the TenantAwareModel
|
|
18
|
+
class CommonV10ResponseExternalizableAbstractModel
|
|
19
|
+
# A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
|
|
20
|
+
attr_accessor :tenant_id
|
|
21
|
+
|
|
22
|
+
# A globally unique identifier of an instance that is suitable for external consumption.
|
|
23
|
+
attr_accessor :ext_id
|
|
24
|
+
|
|
25
|
+
# A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
|
|
26
|
+
attr_accessor :links
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'tenant_id' => :'tenantId',
|
|
32
|
+
:'ext_id' => :'extId',
|
|
33
|
+
:'links' => :'links'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'tenant_id' => :'String',
|
|
46
|
+
:'ext_id' => :'String',
|
|
47
|
+
:'links' => :'Array<CommonV10ResponseApiLink>'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
:'ext_id',
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
59
|
+
def self.openapi_all_of
|
|
60
|
+
[
|
|
61
|
+
:'CommonV10ConfigTenantAwareModel'
|
|
62
|
+
]
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
if (!attributes.is_a?(Hash))
|
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `NutanixVolumes::CommonV10ResponseExternalizableAbstractModel` initialize method"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixVolumes::CommonV10ResponseExternalizableAbstractModel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
76
|
+
end
|
|
77
|
+
h[k.to_sym] = v
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'tenant_id')
|
|
81
|
+
self.tenant_id = attributes[:'tenant_id']
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'ext_id')
|
|
85
|
+
self.ext_id = attributes[:'ext_id']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'links')
|
|
89
|
+
if (value = attributes[:'links']).is_a?(Array)
|
|
90
|
+
self.links = value
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
|
+
invalid_properties = Array.new
|
|
100
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
|
|
101
|
+
if !@tenant_id.nil? && @tenant_id !~ pattern
|
|
102
|
+
invalid_properties.push("invalid value for \"tenant_id\", must conform to the pattern #{pattern}.")
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
|
|
106
|
+
if !@ext_id.nil? && @ext_id !~ pattern
|
|
107
|
+
invalid_properties.push("invalid value for \"ext_id\", must conform to the pattern #{pattern}.")
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if !@links.nil? && @links.length > 20
|
|
111
|
+
invalid_properties.push('invalid value for "links", number of items must be less than or equal to 20.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if !@links.nil? && @links.length < 0
|
|
115
|
+
invalid_properties.push('invalid value for "links", number of items must be greater than or equal to 0.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
invalid_properties
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Check to see if the all the properties in the model are valid
|
|
122
|
+
# @return true if the model is valid
|
|
123
|
+
def valid?
|
|
124
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
125
|
+
return false if !@tenant_id.nil? && @tenant_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
|
|
126
|
+
return false if !@ext_id.nil? && @ext_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
|
|
127
|
+
return false if !@links.nil? && @links.length > 20
|
|
128
|
+
return false if !@links.nil? && @links.length < 0
|
|
129
|
+
true
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Custom attribute writer method with validation
|
|
133
|
+
# @param [Object] tenant_id Value to be assigned
|
|
134
|
+
def tenant_id=(tenant_id)
|
|
135
|
+
if tenant_id.nil?
|
|
136
|
+
fail ArgumentError, 'tenant_id cannot be nil'
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
|
|
140
|
+
if tenant_id !~ pattern
|
|
141
|
+
fail ArgumentError, "invalid value for \"tenant_id\", must conform to the pattern #{pattern}."
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
@tenant_id = tenant_id
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Custom attribute writer method with validation
|
|
148
|
+
# @param [Object] ext_id Value to be assigned
|
|
149
|
+
def ext_id=(ext_id)
|
|
150
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
|
|
151
|
+
if !ext_id.nil? && ext_id !~ pattern
|
|
152
|
+
fail ArgumentError, "invalid value for \"ext_id\", must conform to the pattern #{pattern}."
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
@ext_id = ext_id
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Custom attribute writer method with validation
|
|
159
|
+
# @param [Object] links Value to be assigned
|
|
160
|
+
def links=(links)
|
|
161
|
+
if links.nil?
|
|
162
|
+
fail ArgumentError, 'links cannot be nil'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if links.length > 20
|
|
166
|
+
fail ArgumentError, 'invalid value for "links", number of items must be less than or equal to 20.'
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if links.length < 0
|
|
170
|
+
fail ArgumentError, 'invalid value for "links", number of items must be greater than or equal to 0.'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
@links = links
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Checks equality by comparing each attribute.
|
|
177
|
+
# @param [Object] Object to be compared
|
|
178
|
+
def ==(o)
|
|
179
|
+
return true if self.equal?(o)
|
|
180
|
+
self.class == o.class &&
|
|
181
|
+
tenant_id == o.tenant_id &&
|
|
182
|
+
ext_id == o.ext_id &&
|
|
183
|
+
links == o.links
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# @see the `==` method
|
|
187
|
+
# @param [Object] Object to be compared
|
|
188
|
+
def eql?(o)
|
|
189
|
+
self == o
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Calculates hash code according to all attributes.
|
|
193
|
+
# @return [Integer] Hash code
|
|
194
|
+
def hash
|
|
195
|
+
[tenant_id, ext_id, links].hash
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Builds the object from hash
|
|
199
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
200
|
+
# @return [Object] Returns the model itself
|
|
201
|
+
def self.build_from_hash(attributes)
|
|
202
|
+
return nil unless attributes.is_a?(Hash)
|
|
203
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
204
|
+
transformed_hash = {}
|
|
205
|
+
openapi_types.each_pair do |key, type|
|
|
206
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
207
|
+
transformed_hash["#{key}"] = nil
|
|
208
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
209
|
+
# check to ensure the input is an array given that the attribute
|
|
210
|
+
# is documented as an array but the input is not
|
|
211
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
212
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
213
|
+
end
|
|
214
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
215
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
new(transformed_hash)
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Deserializes the data based on type
|
|
222
|
+
# @param string type Data type
|
|
223
|
+
# @param string value Value to be deserialized
|
|
224
|
+
# @return [Object] Deserialized data
|
|
225
|
+
def self._deserialize(type, value)
|
|
226
|
+
case type.to_sym
|
|
227
|
+
when :Time
|
|
228
|
+
Time.parse(value)
|
|
229
|
+
when :Date
|
|
230
|
+
Date.parse(value)
|
|
231
|
+
when :String
|
|
232
|
+
value.to_s
|
|
233
|
+
when :Integer
|
|
234
|
+
value.to_i
|
|
235
|
+
when :Float
|
|
236
|
+
value.to_f
|
|
237
|
+
when :Boolean
|
|
238
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
239
|
+
true
|
|
240
|
+
else
|
|
241
|
+
false
|
|
242
|
+
end
|
|
243
|
+
when :Object
|
|
244
|
+
# generic object (usually a Hash), return directly
|
|
245
|
+
value
|
|
246
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
247
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
248
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
249
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
250
|
+
k_type = Regexp.last_match[:k_type]
|
|
251
|
+
v_type = Regexp.last_match[:v_type]
|
|
252
|
+
{}.tap do |hash|
|
|
253
|
+
value.each do |k, v|
|
|
254
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
else # model
|
|
258
|
+
# models (e.g. Pet) or oneOf
|
|
259
|
+
klass = NutanixVolumes.const_get(type)
|
|
260
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Returns the string representation of the object
|
|
265
|
+
# @return [String] String presentation of the object
|
|
266
|
+
def to_s
|
|
267
|
+
to_hash.to_s
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
271
|
+
# @return [Hash] Returns the object in the form of hash
|
|
272
|
+
def to_body
|
|
273
|
+
to_hash
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Returns the object in the form of hash
|
|
277
|
+
# @return [Hash] Returns the object in the form of hash
|
|
278
|
+
def to_hash
|
|
279
|
+
hash = {}
|
|
280
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
281
|
+
value = self.send(attr)
|
|
282
|
+
if value.nil?
|
|
283
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
284
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
hash[param] = _to_hash(value)
|
|
288
|
+
end
|
|
289
|
+
hash
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Outputs non-array value in the form of hash
|
|
293
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
294
|
+
# @param [Object] value Any valid value
|
|
295
|
+
# @return [Hash] Returns the value in the form of hash
|
|
296
|
+
def _to_hash(value)
|
|
297
|
+
if value.is_a?(Array)
|
|
298
|
+
value.compact.map { |v| _to_hash(v) }
|
|
299
|
+
elsif value.is_a?(Hash)
|
|
300
|
+
{}.tap do |hash|
|
|
301
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
302
|
+
end
|
|
303
|
+
elsif value.respond_to? :to_hash
|
|
304
|
+
value.to_hash
|
|
305
|
+
else
|
|
306
|
+
value
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
end
|