ibm_cloud_power 1.1.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +68 -3
- data/docs/CloneTaskReference.md +10 -9
- data/docs/CloneTaskStatus.md +14 -13
- data/docs/ClonedVolume.md +10 -9
- data/docs/ClonedVolumeDetail.md +10 -9
- data/docs/CloudConnection.md +32 -31
- data/docs/CloudConnectionCreate.md +14 -13
- data/docs/CloudConnectionCreateResponse.md +44 -0
- data/docs/CloudConnectionEndpointClassic.md +10 -9
- data/docs/CloudConnectionEndpointGRE.md +10 -9
- data/docs/CloudConnectionEndpointVPC.md +10 -9
- data/docs/CloudConnectionGRETunnel.md +12 -11
- data/docs/CloudConnectionSpeed.md +4 -5
- data/docs/CloudConnectionUpdate.md +18 -17
- data/docs/CloudConnectionVPC.md +10 -9
- data/docs/CloudConnectionVirtualPrivateClouds.md +8 -7
- data/docs/CloudConnectionVirtualPrivateCloudsVirtualPrivateCloudsInner.md +24 -0
- data/docs/CloudConnections.md +8 -7
- data/docs/CloudInstance.md +28 -27
- data/docs/CloudInstanceCreate.md +20 -19
- data/docs/CloudInstanceReference.md +22 -21
- data/docs/CloudInstanceUpdate.md +16 -15
- data/docs/CloudInstanceUsageLimits.md +28 -27
- data/docs/CreateCosImageImportJob.md +38 -0
- data/docs/CreateDataVolume.md +26 -19
- data/docs/CreateImage.md +32 -27
- data/docs/DeadPeerDetection.md +22 -0
- data/docs/Error.md +10 -9
- data/docs/Event.md +24 -23
- data/docs/EventUser.md +12 -11
- data/docs/Events.md +8 -7
- data/docs/ExportImage.md +14 -13
- data/docs/IKEPolicies.md +18 -0
- data/docs/IKEPolicy.md +30 -0
- data/docs/IKEPolicyCreate.md +30 -0
- data/docs/IKEPolicyOptions.md +24 -0
- data/docs/IKEPolicyRef.md +20 -0
- data/docs/IKEPolicyTemplate.md +26 -0
- data/docs/IKEPolicyUpdate.md +30 -0
- data/docs/IPAddressRange.md +10 -9
- data/docs/IPSecPolicies.md +18 -0
- data/docs/IPSecPolicy.md +30 -0
- data/docs/IPSecPolicyCreate.md +28 -0
- data/docs/IPSecPolicyOptions.md +22 -0
- data/docs/IPSecPolicyRef.md +20 -0
- data/docs/IPSecPolicyTemplate.md +24 -0
- data/docs/IPSecPolicyUpdate.md +28 -0
- data/docs/Image.md +32 -31
- data/docs/ImageReference.md +26 -25
- data/docs/ImageSpecifications.md +20 -19
- data/docs/ImageVolume.md +14 -13
- data/docs/Images.md +8 -7
- data/docs/Job.md +24 -0
- data/docs/JobReference.md +20 -0
- data/docs/Jobs.md +18 -0
- data/docs/MaximumStorageAllocation.md +12 -11
- data/docs/MinMaxDefault.md +12 -11
- data/docs/MultiVolumesCreate.md +28 -21
- data/docs/Network.md +28 -27
- data/docs/NetworkCreate.md +20 -19
- data/docs/NetworkID.md +18 -0
- data/docs/NetworkIDs.md +18 -0
- data/docs/NetworkIpAddressMetrics.md +14 -13
- data/docs/NetworkPort.md +22 -21
- data/docs/NetworkPortCreate.md +10 -9
- data/docs/NetworkPortPvmInstance.md +10 -9
- data/docs/NetworkPortUpdate.md +10 -9
- data/docs/NetworkPorts.md +8 -7
- data/docs/NetworkReference.md +18 -17
- data/docs/NetworkUpdate.md +14 -13
- data/docs/Networks.md +8 -7
- data/docs/Operation.md +22 -0
- data/docs/Operations.md +12 -11
- data/docs/Options.md +18 -0
- data/docs/PCloudCloudConnectionsApi.md +229 -94
- data/docs/PCloudEventsApi.md +60 -27
- data/docs/PCloudImagesApi.md +513 -101
- data/docs/PCloudInstancesApi.md +83 -33
- data/docs/PCloudJobsApi.md +208 -0
- data/docs/PCloudNetworksApi.md +287 -118
- data/docs/PCloudPVMInstancesApi.md +628 -208
- data/docs/PCloudPlacementGroupsApi.md +177 -76
- data/docs/PCloudSAPApi.md +86 -36
- data/docs/PCloudSnapshotsApi.md +112 -45
- data/docs/PCloudStorageCapacityApi.md +112 -45
- data/docs/PCloudSystemPoolsApi.md +29 -13
- data/docs/PCloudTasksApi.md +55 -22
- data/docs/PCloudTenantsApi.md +57 -24
- data/docs/PCloudTenantsSSHKeysApi.md +143 -59
- data/docs/PCloudVPNConnectionsApi.md +817 -0
- data/docs/PCloudVPNPoliciesApi.md +677 -0
- data/docs/PCloudVolumesApi.md +629 -256
- data/docs/PVMInstance.md +72 -69
- data/docs/PVMInstanceAction.md +8 -7
- data/docs/PVMInstanceAddNetwork.md +10 -9
- data/docs/PVMInstanceCapture.md +20 -19
- data/docs/PVMInstanceClone.md +22 -21
- data/docs/PVMInstanceConsole.md +8 -7
- data/docs/PVMInstanceCreate.md +50 -45
- data/docs/PVMInstanceFault.md +14 -13
- data/docs/PVMInstanceHealth.md +12 -11
- data/docs/PVMInstanceMultiCreate.md +12 -11
- data/docs/PVMInstanceNetwork.md +24 -23
- data/docs/PVMInstanceNetworks.md +8 -7
- data/docs/PVMInstanceOperation.md +10 -9
- data/docs/PVMInstanceReference.md +68 -61
- data/docs/PVMInstanceRemoveNetwork.md +8 -7
- data/docs/PVMInstanceUpdate.md +26 -23
- data/docs/PVMInstanceUpdateResponse.md +18 -17
- data/docs/PVMInstanceVolumeUpdate.md +8 -7
- data/docs/PVMInstances.md +8 -7
- data/docs/PeerSubnetUpdate.md +18 -0
- data/docs/PeerSubnets.md +18 -0
- data/docs/PeeringNetwork.md +12 -11
- data/docs/PinPolicy.md +4 -5
- data/docs/PlacementGroup.md +14 -13
- data/docs/PlacementGroupCreate.md +10 -9
- data/docs/PlacementGroupServer.md +8 -7
- data/docs/PlacementGroups.md +8 -7
- data/docs/SAPCreate.md +30 -23
- data/docs/SAPProfile.md +16 -15
- data/docs/SAPProfileReference.md +10 -9
- data/docs/SAPProfiles.md +8 -7
- data/docs/SRC.md +10 -9
- data/docs/SSHKey.md +12 -11
- data/docs/SSHKeys.md +8 -7
- data/docs/Snapshot.md +26 -25
- data/docs/SnapshotCreate.md +12 -11
- data/docs/SnapshotCreateResponse.md +8 -7
- data/docs/SnapshotRestore.md +8 -7
- data/docs/SnapshotUpdate.md +10 -9
- data/docs/Snapshots.md +8 -7
- data/docs/SoftwareLicenses.md +16 -15
- data/docs/Status.md +22 -0
- data/docs/StockImage.md +12 -11
- data/docs/StorageAffinity.md +26 -0
- data/docs/StoragePoolCapacity.md +14 -13
- data/docs/StoragePoolsCapacity.md +10 -9
- data/docs/StorageTypeCapacity.md +12 -11
- data/docs/StorageTypesCapacity.md +10 -9
- data/docs/System.md +12 -11
- data/docs/SystemPool.md +22 -21
- data/docs/Task.md +24 -23
- data/docs/TaskReference.md +10 -9
- data/docs/Tenant.md +20 -19
- data/docs/TenantUpdate.md +10 -9
- data/docs/UpdateVolume.md +14 -13
- data/docs/VPNConnection.md +40 -0
- data/docs/VPNConnectionCreate.md +30 -0
- data/docs/VPNConnectionCreateResponse.md +42 -0
- data/docs/VPNConnectionUpdate.md +24 -0
- data/docs/VPNConnections.md +18 -0
- data/docs/VPNaaSOptions.md +26 -0
- data/docs/VirtualCores.md +12 -11
- data/docs/Volume.md +36 -33
- data/docs/VolumeInfo.md +10 -9
- data/docs/VolumeReference.md +38 -35
- data/docs/Volumes.md +8 -7
- data/docs/VolumesClone.md +22 -21
- data/docs/VolumesCloneAsyncRequest.md +10 -9
- data/docs/VolumesCloneCancel.md +8 -7
- data/docs/VolumesCloneCreate.md +10 -9
- data/docs/VolumesCloneDetail.md +24 -23
- data/docs/VolumesCloneExecute.md +10 -9
- data/docs/VolumesCloneRequest.md +10 -9
- data/docs/VolumesCloneResponse.md +8 -7
- data/docs/VolumesClones.md +8 -7
- data/git_push.sh +3 -4
- data/ibm_cloud_power.gemspec +3 -3
- data/lib/ibm_cloud_power/api/p_cloud_cloud_connections_api.rb +43 -29
- data/lib/ibm_cloud_power/api/p_cloud_events_api.rb +9 -7
- data/lib/ibm_cloud_power/api/p_cloud_images_api.rb +325 -32
- data/lib/ibm_cloud_power/api/p_cloud_instances_api.rb +17 -11
- data/lib/ibm_cloud_power/api/p_cloud_jobs_api.rb +234 -0
- data/lib/ibm_cloud_power/api/p_cloud_networks_api.rb +57 -35
- data/lib/ibm_cloud_power/api/p_cloud_placement_groups_api.rb +45 -30
- data/lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb +256 -64
- data/lib/ibm_cloud_power/api/p_cloud_sap_api.rb +17 -11
- data/lib/ibm_cloud_power/api/p_cloud_snapshots_api.rb +21 -14
- data/lib/ibm_cloud_power/api/p_cloud_storage_capacity_api.rb +17 -13
- data/lib/ibm_cloud_power/api/p_cloud_system_pools_api.rb +5 -4
- data/lib/ibm_cloud_power/api/p_cloud_tasks_api.rb +9 -7
- data/lib/ibm_cloud_power/api/p_cloud_tenants_api.rb +13 -8
- data/lib/ibm_cloud_power/api/p_cloud_tenants_ssh_keys_api.rb +29 -18
- data/lib/ibm_cloud_power/api/p_cloud_volumes_api.rb +125 -76
- data/lib/ibm_cloud_power/api/p_cloud_vpn_connections_api.rb +898 -0
- data/lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb +732 -0
- data/lib/ibm_cloud_power/api_client.rb +56 -52
- data/lib/ibm_cloud_power/api_error.rb +1 -1
- data/lib/ibm_cloud_power/configuration.rb +43 -12
- data/lib/ibm_cloud_power/models/clone_task_reference.rb +19 -8
- data/lib/ibm_cloud_power/models/clone_task_status.rb +19 -8
- data/lib/ibm_cloud_power/models/cloned_volume.rb +19 -8
- data/lib/ibm_cloud_power/models/cloned_volume_detail.rb +19 -8
- data/lib/ibm_cloud_power/models/cloud_connection.rb +20 -9
- data/lib/ibm_cloud_power/models/cloud_connection_create.rb +53 -8
- data/lib/ibm_cloud_power/models/cloud_connection_create_response.rb +406 -0
- data/lib/ibm_cloud_power/models/cloud_connection_endpoint_classic.rb +19 -8
- data/lib/ibm_cloud_power/models/cloud_connection_endpoint_gre.rb +19 -8
- data/lib/ibm_cloud_power/models/cloud_connection_endpoint_vpc.rb +19 -8
- data/lib/ibm_cloud_power/models/cloud_connection_gre_tunnel.rb +19 -8
- data/lib/ibm_cloud_power/models/cloud_connection_speed.rb +2 -1
- data/lib/ibm_cloud_power/models/cloud_connection_update.rb +53 -8
- data/lib/ibm_cloud_power/models/cloud_connection_virtual_private_clouds.rb +20 -9
- data/lib/ibm_cloud_power/models/cloud_connection_virtual_private_clouds_virtual_private_clouds_inner.rb +270 -0
- data/lib/ibm_cloud_power/models/cloud_connection_vpc.rb +19 -8
- data/lib/ibm_cloud_power/models/cloud_connections.rb +19 -8
- data/lib/ibm_cloud_power/models/cloud_instance.rb +19 -8
- data/lib/ibm_cloud_power/models/cloud_instance_create.rb +19 -8
- data/lib/ibm_cloud_power/models/cloud_instance_reference.rb +19 -8
- data/lib/ibm_cloud_power/models/cloud_instance_update.rb +19 -8
- data/lib/ibm_cloud_power/models/cloud_instance_usage_limits.rb +19 -8
- data/lib/ibm_cloud_power/models/create_cos_image_import_job.rb +387 -0
- data/lib/ibm_cloud_power/models/create_data_volume.rb +59 -14
- data/lib/ibm_cloud_power/models/create_image.rb +39 -9
- data/lib/ibm_cloud_power/models/dead_peer_detection.rb +350 -0
- data/lib/ibm_cloud_power/models/error.rb +32 -21
- data/lib/ibm_cloud_power/models/event.rb +20 -9
- data/lib/ibm_cloud_power/models/event_user.rb +19 -8
- data/lib/ibm_cloud_power/models/events.rb +19 -8
- data/lib/ibm_cloud_power/models/export_image.rb +19 -8
- data/lib/ibm_cloud_power/models/ike_policies.rb +227 -0
- data/lib/ibm_cloud_power/models/ike_policy.rb +414 -0
- data/lib/ibm_cloud_power/models/ike_policy_create.rb +414 -0
- data/lib/ibm_cloud_power/models/ike_policy_options.rb +274 -0
- data/lib/ibm_cloud_power/models/ike_policy_ref.rb +241 -0
- data/lib/ibm_cloud_power/models/ike_policy_template.rb +313 -0
- data/lib/ibm_cloud_power/models/ike_policy_update.rb +375 -0
- data/lib/ibm_cloud_power/models/image.rb +21 -10
- data/lib/ibm_cloud_power/models/image_reference.rb +21 -10
- data/lib/ibm_cloud_power/models/image_specifications.rb +19 -8
- data/lib/ibm_cloud_power/models/image_volume.rb +19 -8
- data/lib/ibm_cloud_power/models/images.rb +19 -8
- data/lib/ibm_cloud_power/models/ip_address_range.rb +19 -8
- data/lib/ibm_cloud_power/models/ip_sec_policies.rb +227 -0
- data/lib/ibm_cloud_power/models/ip_sec_policy.rb +402 -0
- data/lib/ibm_cloud_power/models/ip_sec_policy_create.rb +387 -0
- data/lib/ibm_cloud_power/models/ip_sec_policy_options.rb +258 -0
- data/lib/ibm_cloud_power/models/ip_sec_policy_ref.rb +241 -0
- data/lib/ibm_cloud_power/models/ip_sec_policy_template.rb +298 -0
- data/lib/ibm_cloud_power/models/ip_sec_policy_update.rb +353 -0
- data/lib/ibm_cloud_power/models/job.rb +263 -0
- data/lib/ibm_cloud_power/models/job_reference.rb +240 -0
- data/lib/ibm_cloud_power/models/jobs.rb +227 -0
- data/lib/ibm_cloud_power/models/maximum_storage_allocation.rb +20 -9
- data/lib/ibm_cloud_power/models/min_max_default.rb +19 -8
- data/lib/ibm_cloud_power/models/multi_volumes_create.rb +57 -12
- data/lib/ibm_cloud_power/models/network.rb +19 -8
- data/lib/ibm_cloud_power/models/network_create.rb +19 -8
- data/lib/ibm_cloud_power/models/network_id.rb +225 -0
- data/lib/ibm_cloud_power/models/network_ids.rb +222 -0
- data/lib/ibm_cloud_power/models/network_ip_address_metrics.rb +19 -8
- data/lib/ibm_cloud_power/models/network_port.rb +19 -8
- data/lib/ibm_cloud_power/models/network_port_create.rb +19 -8
- data/lib/ibm_cloud_power/models/network_port_pvm_instance.rb +19 -8
- data/lib/ibm_cloud_power/models/network_port_update.rb +19 -8
- data/lib/ibm_cloud_power/models/network_ports.rb +19 -8
- data/lib/ibm_cloud_power/models/network_reference.rb +19 -8
- data/lib/ibm_cloud_power/models/network_update.rb +19 -8
- data/lib/ibm_cloud_power/models/networks.rb +19 -8
- data/lib/ibm_cloud_power/models/operation.rb +255 -0
- data/lib/ibm_cloud_power/models/operations.rb +19 -8
- data/lib/ibm_cloud_power/models/options.rb +224 -0
- data/lib/ibm_cloud_power/models/peer_subnet_update.rb +225 -0
- data/lib/ibm_cloud_power/models/peer_subnets.rb +222 -0
- data/lib/ibm_cloud_power/models/peering_network.rb +19 -8
- data/lib/ibm_cloud_power/models/pin_policy.rb +2 -1
- data/lib/ibm_cloud_power/models/placement_group.rb +19 -8
- data/lib/ibm_cloud_power/models/placement_group_create.rb +19 -8
- data/lib/ibm_cloud_power/models/placement_group_server.rb +19 -8
- data/lib/ibm_cloud_power/models/placement_groups.rb +19 -8
- data/lib/ibm_cloud_power/models/pvm_instance.rb +57 -34
- data/lib/ibm_cloud_power/models/pvm_instance_action.rb +19 -8
- data/lib/ibm_cloud_power/models/pvm_instance_add_network.rb +19 -8
- data/lib/ibm_cloud_power/models/pvm_instance_capture.rb +27 -16
- data/lib/ibm_cloud_power/models/pvm_instance_clone.rb +28 -17
- data/lib/ibm_cloud_power/models/pvm_instance_console.rb +19 -8
- data/lib/ibm_cloud_power/models/pvm_instance_create.rb +54 -24
- data/lib/ibm_cloud_power/models/pvm_instance_fault.rb +20 -9
- data/lib/ibm_cloud_power/models/pvm_instance_health.rb +19 -8
- data/lib/ibm_cloud_power/models/pvm_instance_multi_create.rb +19 -8
- data/lib/ibm_cloud_power/models/pvm_instance_network.rb +19 -8
- data/lib/ibm_cloud_power/models/pvm_instance_networks.rb +19 -8
- data/lib/ibm_cloud_power/models/pvm_instance_operation.rb +19 -8
- data/lib/ibm_cloud_power/models/pvm_instance_reference.rb +55 -12
- data/lib/ibm_cloud_power/models/pvm_instance_remove_network.rb +19 -8
- data/lib/ibm_cloud_power/models/pvm_instance_update.rb +32 -9
- data/lib/ibm_cloud_power/models/pvm_instance_update_response.rb +19 -8
- data/lib/ibm_cloud_power/models/pvm_instance_volume_update.rb +19 -8
- data/lib/ibm_cloud_power/models/pvm_instances.rb +19 -8
- data/lib/ibm_cloud_power/models/sap_create.rb +56 -16
- data/lib/ibm_cloud_power/models/sap_profile.rb +18 -7
- data/lib/ibm_cloud_power/models/sap_profile_reference.rb +19 -8
- data/lib/ibm_cloud_power/models/sap_profiles.rb +19 -8
- data/lib/ibm_cloud_power/models/snapshot.rb +21 -10
- data/lib/ibm_cloud_power/models/snapshot_create.rb +27 -16
- data/lib/ibm_cloud_power/models/snapshot_create_response.rb +19 -8
- data/lib/ibm_cloud_power/models/snapshot_restore.rb +19 -8
- data/lib/ibm_cloud_power/models/snapshot_update.rb +19 -8
- data/lib/ibm_cloud_power/models/snapshots.rb +19 -8
- data/lib/ibm_cloud_power/models/software_licenses.rb +19 -8
- data/lib/ibm_cloud_power/models/src.rb +19 -8
- data/lib/ibm_cloud_power/models/ssh_key.rb +20 -9
- data/lib/ibm_cloud_power/models/ssh_keys.rb +19 -8
- data/lib/ibm_cloud_power/models/status.rb +250 -0
- data/lib/ibm_cloud_power/models/stock_image.rb +19 -8
- data/lib/ibm_cloud_power/models/storage_affinity.rb +298 -0
- data/lib/ibm_cloud_power/models/storage_pool_capacity.rb +20 -9
- data/lib/ibm_cloud_power/models/storage_pools_capacity.rb +19 -8
- data/lib/ibm_cloud_power/models/storage_type_capacity.rb +19 -8
- data/lib/ibm_cloud_power/models/storage_types_capacity.rb +19 -8
- data/lib/ibm_cloud_power/models/system.rb +19 -8
- data/lib/ibm_cloud_power/models/system_pool.rb +19 -8
- data/lib/ibm_cloud_power/models/task.rb +21 -10
- data/lib/ibm_cloud_power/models/task_reference.rb +19 -8
- data/lib/ibm_cloud_power/models/tenant.rb +20 -9
- data/lib/ibm_cloud_power/models/tenant_update.rb +19 -8
- data/lib/ibm_cloud_power/models/update_volume.rb +19 -8
- data/lib/ibm_cloud_power/models/virtual_cores.rb +19 -8
- data/lib/ibm_cloud_power/models/volume.rb +39 -18
- data/lib/ibm_cloud_power/models/volume_info.rb +19 -8
- data/lib/ibm_cloud_power/models/volume_reference.rb +39 -18
- data/lib/ibm_cloud_power/models/volumes.rb +19 -8
- data/lib/ibm_cloud_power/models/volumes_clone.rb +21 -10
- data/lib/ibm_cloud_power/models/volumes_clone_async_request.rb +30 -19
- data/lib/ibm_cloud_power/models/volumes_clone_cancel.rb +19 -8
- data/lib/ibm_cloud_power/models/volumes_clone_create.rb +30 -19
- data/lib/ibm_cloud_power/models/volumes_clone_detail.rb +21 -10
- data/lib/ibm_cloud_power/models/volumes_clone_execute.rb +19 -8
- data/lib/ibm_cloud_power/models/volumes_clone_request.rb +30 -19
- data/lib/ibm_cloud_power/models/volumes_clone_response.rb +19 -8
- data/lib/ibm_cloud_power/models/volumes_clones.rb +19 -8
- data/lib/ibm_cloud_power/models/vp_naa_s_options.rb +280 -0
- data/lib/ibm_cloud_power/models/vpn_connection.rb +437 -0
- data/lib/ibm_cloud_power/models/vpn_connection_create.rb +353 -0
- data/lib/ibm_cloud_power/models/vpn_connection_create_response.rb +453 -0
- data/lib/ibm_cloud_power/models/vpn_connection_update.rb +251 -0
- data/lib/ibm_cloud_power/models/vpn_connections.rb +222 -0
- data/lib/ibm_cloud_power/version.rb +2 -2
- data/lib/ibm_cloud_power.rb +39 -2
- data/spec/api/p_cloud_jobs_api_spec.rb +73 -0
- data/spec/api/p_cloud_vpn_connections_api_spec.rb +194 -0
- data/spec/api/p_cloud_vpn_policies_api_spec.rb +165 -0
- data/spec/api_client_spec.rb +3 -3
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/cloud_connection_create_response_spec.rb +112 -0
- data/spec/models/cloud_connection_virtual_private_clouds_virtual_private_clouds_inner_spec.rb +52 -0
- data/spec/models/create_cos_image_import_job_spec.rb +102 -0
- data/spec/models/dead_peer_detection_spec.rb +50 -0
- data/spec/models/ike_policies_spec.rb +34 -0
- data/spec/models/ike_policy_create_spec.rb +86 -0
- data/spec/models/ike_policy_options_spec.rb +52 -0
- data/spec/models/ike_policy_ref_spec.rb +40 -0
- data/spec/models/ike_policy_spec.rb +86 -0
- data/spec/models/ike_policy_template_spec.rb +58 -0
- data/spec/models/ike_policy_update_spec.rb +86 -0
- data/spec/models/ip_sec_policies_spec.rb +34 -0
- data/spec/models/ip_sec_policy_create_spec.rb +76 -0
- data/spec/models/ip_sec_policy_options_spec.rb +46 -0
- data/spec/models/ip_sec_policy_ref_spec.rb +40 -0
- data/spec/models/ip_sec_policy_spec.rb +82 -0
- data/spec/models/ip_sec_policy_template_spec.rb +52 -0
- data/spec/models/ip_sec_policy_update_spec.rb +76 -0
- data/spec/models/job_reference_spec.rb +40 -0
- data/spec/models/job_spec.rb +52 -0
- data/spec/models/jobs_spec.rb +34 -0
- data/spec/models/network_id_spec.rb +34 -0
- data/spec/models/network_ids_spec.rb +34 -0
- data/spec/models/operation_spec.rb +46 -0
- data/spec/models/options_spec.rb +34 -0
- data/spec/models/peer_subnet_update_spec.rb +34 -0
- data/spec/models/peer_subnets_spec.rb +34 -0
- data/spec/models/status_spec.rb +46 -0
- data/spec/models/storage_affinity_spec.rb +62 -0
- data/spec/models/vp_naa_s_options_spec.rb +58 -0
- data/spec/models/vpn_connection_create_response_spec.rb +114 -0
- data/spec/models/vpn_connection_create_spec.rb +74 -0
- data/spec/models/vpn_connection_spec.rb +108 -0
- data/spec/models/vpn_connection_update_spec.rb +52 -0
- data/spec/models/vpn_connections_spec.rb +34 -0
- data/spec/spec_helper.rb +1 -1
- metadata +259 -107
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: kylej@us.ibm.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
14
14
|
require 'json'
|
15
15
|
require 'logger'
|
16
16
|
require 'tempfile'
|
17
|
+
require 'time'
|
17
18
|
require 'typhoeus'
|
18
19
|
|
19
20
|
module IbmCloudPower
|
@@ -86,12 +87,13 @@ module IbmCloudPower
|
|
86
87
|
# @option opts [Object] :body HTTP body (JSON/XML)
|
87
88
|
# @return [Typhoeus::Request] A Typhoeus Request
|
88
89
|
def build_request(http_method, path, opts = {})
|
89
|
-
url = build_request_url(path)
|
90
|
+
url = build_request_url(path, opts)
|
90
91
|
http_method = http_method.to_sym.downcase
|
91
92
|
|
92
93
|
header_params = @default_headers.merge(opts[:header_params] || {})
|
93
94
|
query_params = opts[:query_params] || {}
|
94
95
|
form_params = opts[:form_params] || {}
|
96
|
+
follow_location = opts[:follow_location] || true
|
95
97
|
|
96
98
|
|
97
99
|
# set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
|
@@ -107,7 +109,8 @@ module IbmCloudPower
|
|
107
109
|
:ssl_verifyhost => _verify_ssl_host,
|
108
110
|
:sslcert => @config.cert_file,
|
109
111
|
:sslkey => @config.key_file,
|
110
|
-
:verbose => @config.debugging
|
112
|
+
:verbose => @config.debugging,
|
113
|
+
:followlocation => follow_location
|
111
114
|
}
|
112
115
|
|
113
116
|
# set custom cert, if provided
|
@@ -154,6 +157,44 @@ module IbmCloudPower
|
|
154
157
|
data
|
155
158
|
end
|
156
159
|
|
160
|
+
# Save response body into a file in (the defined) temporary folder, using the filename
|
161
|
+
# from the "Content-Disposition" header if provided, otherwise a random filename.
|
162
|
+
# The response body is written to the file in chunks in order to handle files which
|
163
|
+
# size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
|
164
|
+
# process can use.
|
165
|
+
#
|
166
|
+
# @see Configuration#temp_folder_path
|
167
|
+
def download_file(request)
|
168
|
+
tempfile = nil
|
169
|
+
encoding = nil
|
170
|
+
request.on_headers do |response|
|
171
|
+
content_disposition = response.headers['Content-Disposition']
|
172
|
+
if content_disposition && content_disposition =~ /filename=/i
|
173
|
+
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
174
|
+
prefix = sanitize_filename(filename)
|
175
|
+
else
|
176
|
+
prefix = 'download-'
|
177
|
+
end
|
178
|
+
prefix = prefix + '-' unless prefix.end_with?('-')
|
179
|
+
encoding = response.body.encoding
|
180
|
+
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
181
|
+
@tempfile = tempfile
|
182
|
+
end
|
183
|
+
request.on_body do |chunk|
|
184
|
+
chunk.force_encoding(encoding)
|
185
|
+
tempfile.write(chunk)
|
186
|
+
end
|
187
|
+
request.on_complete do |response|
|
188
|
+
if tempfile
|
189
|
+
tempfile.close
|
190
|
+
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
191
|
+
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
192
|
+
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
193
|
+
"explicitly with `tempfile.delete`"
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
157
198
|
# Check if the given MIME is a JSON MIME.
|
158
199
|
# JSON MIME examples:
|
159
200
|
# application/json
|
@@ -190,7 +231,7 @@ module IbmCloudPower
|
|
190
231
|
begin
|
191
232
|
data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
|
192
233
|
rescue JSON::ParserError => e
|
193
|
-
if %w(String Date
|
234
|
+
if %w(String Date Time).include?(return_type)
|
194
235
|
data = body
|
195
236
|
else
|
196
237
|
raise e
|
@@ -215,9 +256,9 @@ module IbmCloudPower
|
|
215
256
|
data.to_f
|
216
257
|
when 'Boolean'
|
217
258
|
data == true
|
218
|
-
when '
|
259
|
+
when 'Time'
|
219
260
|
# parse date time (expecting ISO 8601 format)
|
220
|
-
|
261
|
+
Time.parse data
|
221
262
|
when 'Date'
|
222
263
|
# parse date time (expecting ISO 8601 format)
|
223
264
|
Date.parse data
|
@@ -235,46 +276,9 @@ module IbmCloudPower
|
|
235
276
|
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
236
277
|
end
|
237
278
|
else
|
238
|
-
# models
|
239
|
-
IbmCloudPower.const_get(return_type)
|
240
|
-
|
241
|
-
end
|
242
|
-
|
243
|
-
# Save response body into a file in (the defined) temporary folder, using the filename
|
244
|
-
# from the "Content-Disposition" header if provided, otherwise a random filename.
|
245
|
-
# The response body is written to the file in chunks in order to handle files which
|
246
|
-
# size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
|
247
|
-
# process can use.
|
248
|
-
#
|
249
|
-
# @see Configuration#temp_folder_path
|
250
|
-
def download_file(request)
|
251
|
-
tempfile = nil
|
252
|
-
encoding = nil
|
253
|
-
request.on_headers do |response|
|
254
|
-
content_disposition = response.headers['Content-Disposition']
|
255
|
-
if content_disposition && content_disposition =~ /filename=/i
|
256
|
-
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
257
|
-
prefix = sanitize_filename(filename)
|
258
|
-
else
|
259
|
-
prefix = 'download-'
|
260
|
-
end
|
261
|
-
prefix = prefix + '-' unless prefix.end_with?('-')
|
262
|
-
encoding = response.body.encoding
|
263
|
-
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
264
|
-
@tempfile = tempfile
|
265
|
-
end
|
266
|
-
request.on_body do |chunk|
|
267
|
-
chunk.force_encoding(encoding)
|
268
|
-
tempfile.write(chunk)
|
269
|
-
end
|
270
|
-
request.on_complete do |response|
|
271
|
-
if tempfile
|
272
|
-
tempfile.close
|
273
|
-
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
274
|
-
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
275
|
-
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
276
|
-
"explicitly with `tempfile.delete`"
|
277
|
-
end
|
279
|
+
# models (e.g. Pet) or oneOf
|
280
|
+
klass = IbmCloudPower.const_get(return_type)
|
281
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
|
278
282
|
end
|
279
283
|
end
|
280
284
|
|
@@ -287,13 +291,13 @@ module IbmCloudPower
|
|
287
291
|
filename.gsub(/.*[\/\\]/, '')
|
288
292
|
end
|
289
293
|
|
290
|
-
def build_request_url(path)
|
294
|
+
def build_request_url(path, opts = {})
|
291
295
|
# Add leading and trailing slashes to path
|
292
296
|
path = "/#{path}".gsub(/\/+/, '/')
|
293
|
-
@config.base_url + path
|
297
|
+
@config.base_url(opts[:operation]) + path
|
294
298
|
end
|
295
299
|
|
296
|
-
# Update
|
300
|
+
# Update header and query params based on authentication settings.
|
297
301
|
#
|
298
302
|
# @param [Hash] header_params Header parameters
|
299
303
|
# @param [Hash] query_params Query parameters
|
@@ -305,7 +309,7 @@ module IbmCloudPower
|
|
305
309
|
case auth_setting[:in]
|
306
310
|
when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
|
307
311
|
when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
|
308
|
-
else fail ArgumentError, 'Authentication token must be in `query`
|
312
|
+
else fail ArgumentError, 'Authentication token must be in `query` or `header`'
|
309
313
|
end
|
310
314
|
end
|
311
315
|
end
|
@@ -332,8 +336,8 @@ module IbmCloudPower
|
|
332
336
|
# @param [Array] content_types array for Content-Type
|
333
337
|
# @return [String] the Content-Type header (e.g. application/json)
|
334
338
|
def select_header_content_type(content_types)
|
335
|
-
#
|
336
|
-
return
|
339
|
+
# return nil by default
|
340
|
+
return if content_types.nil? || content_types.empty?
|
337
341
|
# use JSON when present, otherwise use the first one
|
338
342
|
json_content_type = content_types.find { |s| json_mime?(s) }
|
339
343
|
json_content_type || content_types.first
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: kylej@us.ibm.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,6 +21,18 @@ module IbmCloudPower
|
|
21
21
|
# Defines url base path
|
22
22
|
attr_accessor :base_path
|
23
23
|
|
24
|
+
# Define server configuration index
|
25
|
+
attr_accessor :server_index
|
26
|
+
|
27
|
+
# Define server operation configuration index
|
28
|
+
attr_accessor :server_operation_index
|
29
|
+
|
30
|
+
# Default server variables
|
31
|
+
attr_accessor :server_variables
|
32
|
+
|
33
|
+
# Default server operation variables
|
34
|
+
attr_accessor :server_operation_variables
|
35
|
+
|
24
36
|
# Defines API keys used with API Key authentications.
|
25
37
|
#
|
26
38
|
# @return [Hash] key: parameter name, value: parameter value (API key)
|
@@ -121,6 +133,7 @@ module IbmCloudPower
|
|
121
133
|
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
|
122
134
|
attr_accessor :params_encoding
|
123
135
|
|
136
|
+
|
124
137
|
attr_accessor :inject_format
|
125
138
|
|
126
139
|
attr_accessor :force_ending_format
|
@@ -129,15 +142,19 @@ module IbmCloudPower
|
|
129
142
|
@scheme = 'http'
|
130
143
|
@host = 'localhost'
|
131
144
|
@base_path = ''
|
145
|
+
@server_index = 0
|
146
|
+
@server_operation_index = {}
|
147
|
+
@server_variables = {}
|
148
|
+
@server_operation_variables = {}
|
132
149
|
@api_key = {}
|
133
150
|
@api_key_prefix = {}
|
134
|
-
@timeout = 0
|
135
151
|
@client_side_validation = true
|
136
152
|
@verify_ssl = true
|
137
153
|
@verify_ssl_host = true
|
138
|
-
@params_encoding = nil
|
139
154
|
@cert_file = nil
|
140
155
|
@key_file = nil
|
156
|
+
@timeout = 0
|
157
|
+
@params_encoding = nil
|
141
158
|
@debugging = false
|
142
159
|
@inject_format = false
|
143
160
|
@force_ending_format = false
|
@@ -171,17 +188,23 @@ module IbmCloudPower
|
|
171
188
|
@base_path = '' if @base_path == '/'
|
172
189
|
end
|
173
190
|
|
174
|
-
|
175
|
-
|
191
|
+
# Returns base URL for specified operation based on server settings
|
192
|
+
def base_url(operation = nil)
|
193
|
+
index = server_operation_index.fetch(operation, nil)
|
194
|
+
return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
|
195
|
+
|
196
|
+
server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|
176
197
|
end
|
177
198
|
|
178
199
|
# Gets API key (with prefix if set).
|
179
200
|
# @param [String] param_name the parameter name of API key auth
|
180
|
-
def api_key_with_prefix(param_name)
|
201
|
+
def api_key_with_prefix(param_name, param_alias = nil)
|
202
|
+
key = @api_key[param_name]
|
203
|
+
key = @api_key.fetch(param_alias, key) unless param_alias.nil?
|
181
204
|
if @api_key_prefix[param_name]
|
182
|
-
"#{@api_key_prefix[param_name]} #{
|
205
|
+
"#{@api_key_prefix[param_name]} #{key}"
|
183
206
|
else
|
184
|
-
|
207
|
+
key
|
185
208
|
end
|
186
209
|
end
|
187
210
|
|
@@ -200,18 +223,23 @@ module IbmCloudPower
|
|
200
223
|
def server_settings
|
201
224
|
[
|
202
225
|
{
|
203
|
-
url: "
|
226
|
+
url: "",
|
204
227
|
description: "No description provided",
|
205
228
|
}
|
206
229
|
]
|
207
230
|
end
|
208
231
|
|
232
|
+
def operation_server_settings
|
233
|
+
{
|
234
|
+
}
|
235
|
+
end
|
236
|
+
|
209
237
|
# Returns URL based on server settings
|
210
238
|
#
|
211
239
|
# @param index array index of the server settings
|
212
240
|
# @param variables hash of variable and the corresponding value
|
213
|
-
def server_url(index, variables = {})
|
214
|
-
servers = server_settings
|
241
|
+
def server_url(index, variables = {}, servers = nil)
|
242
|
+
servers = server_settings if servers == nil
|
215
243
|
|
216
244
|
# check array index out of bound
|
217
245
|
if (index < 0 || index >= servers.size)
|
@@ -221,10 +249,12 @@ module IbmCloudPower
|
|
221
249
|
server = servers[index]
|
222
250
|
url = server[:url]
|
223
251
|
|
252
|
+
return url unless server.key? :variables
|
253
|
+
|
224
254
|
# go through variable and assign a value
|
225
255
|
server[:variables].each do |name, variable|
|
226
256
|
if variables.key?(name)
|
227
|
-
if (server[:variables][name][:enum_values].include?
|
257
|
+
if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
|
228
258
|
url.gsub! "{" + name.to_s + "}", variables[name]
|
229
259
|
else
|
230
260
|
fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
|
@@ -237,5 +267,6 @@ module IbmCloudPower
|
|
237
267
|
|
238
268
|
url
|
239
269
|
end
|
270
|
+
|
240
271
|
end
|
241
272
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: kylej@us.ibm.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module IbmCloudPower
|
16
17
|
class CloneTaskReference
|
@@ -28,6 +29,11 @@ module IbmCloudPower
|
|
28
29
|
}
|
29
30
|
end
|
30
31
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
31
37
|
# Attribute type mapping.
|
32
38
|
def self.openapi_types
|
33
39
|
{
|
@@ -122,8 +128,11 @@ module IbmCloudPower
|
|
122
128
|
# @return [Object] Returns the model itself
|
123
129
|
def build_from_hash(attributes)
|
124
130
|
return nil unless attributes.is_a?(Hash)
|
131
|
+
attributes = attributes.transform_keys(&:to_sym)
|
125
132
|
self.class.openapi_types.each_pair do |key, type|
|
126
|
-
if
|
133
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
134
|
+
self.send("#{key}=", nil)
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
127
136
|
# check to ensure the input is an array given that the attribute
|
128
137
|
# is documented as an array but the input is not
|
129
138
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -131,8 +140,6 @@ module IbmCloudPower
|
|
131
140
|
end
|
132
141
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
142
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
135
|
-
self.send("#{key}=", nil)
|
136
143
|
end
|
137
144
|
end
|
138
145
|
|
@@ -145,8 +152,8 @@ module IbmCloudPower
|
|
145
152
|
# @return [Object] Deserialized data
|
146
153
|
def _deserialize(type, value)
|
147
154
|
case type.to_sym
|
148
|
-
when :
|
149
|
-
|
155
|
+
when :Time
|
156
|
+
Time.parse(value)
|
150
157
|
when :Date
|
151
158
|
Date.parse(value)
|
152
159
|
when :String
|
@@ -176,7 +183,9 @@ module IbmCloudPower
|
|
176
183
|
end
|
177
184
|
end
|
178
185
|
else # model
|
179
|
-
|
186
|
+
# models (e.g. Pet) or oneOf
|
187
|
+
klass = IbmCloudPower.const_get(type)
|
188
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
189
|
end
|
181
190
|
end
|
182
191
|
|
@@ -202,7 +211,7 @@ module IbmCloudPower
|
|
202
211
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
203
212
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
204
213
|
end
|
205
|
-
|
214
|
+
|
206
215
|
hash[param] = _to_hash(value)
|
207
216
|
end
|
208
217
|
hash
|
@@ -225,5 +234,7 @@ module IbmCloudPower
|
|
225
234
|
value
|
226
235
|
end
|
227
236
|
end
|
237
|
+
|
228
238
|
end
|
239
|
+
|
229
240
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: kylej@us.ibm.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module IbmCloudPower
|
16
17
|
class CloneTaskStatus
|
@@ -58,6 +59,11 @@ module IbmCloudPower
|
|
58
59
|
}
|
59
60
|
end
|
60
61
|
|
62
|
+
# Returns all the JSON keys this model knows about
|
63
|
+
def self.acceptable_attributes
|
64
|
+
attribute_map.values
|
65
|
+
end
|
66
|
+
|
61
67
|
# Attribute type mapping.
|
62
68
|
def self.openapi_types
|
63
69
|
{
|
@@ -178,8 +184,11 @@ module IbmCloudPower
|
|
178
184
|
# @return [Object] Returns the model itself
|
179
185
|
def build_from_hash(attributes)
|
180
186
|
return nil unless attributes.is_a?(Hash)
|
187
|
+
attributes = attributes.transform_keys(&:to_sym)
|
181
188
|
self.class.openapi_types.each_pair do |key, type|
|
182
|
-
if
|
189
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
190
|
+
self.send("#{key}=", nil)
|
191
|
+
elsif type =~ /\AArray<(.*)>/i
|
183
192
|
# check to ensure the input is an array given that the attribute
|
184
193
|
# is documented as an array but the input is not
|
185
194
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -187,8 +196,6 @@ module IbmCloudPower
|
|
187
196
|
end
|
188
197
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
189
198
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
190
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
191
|
-
self.send("#{key}=", nil)
|
192
199
|
end
|
193
200
|
end
|
194
201
|
|
@@ -201,8 +208,8 @@ module IbmCloudPower
|
|
201
208
|
# @return [Object] Deserialized data
|
202
209
|
def _deserialize(type, value)
|
203
210
|
case type.to_sym
|
204
|
-
when :
|
205
|
-
|
211
|
+
when :Time
|
212
|
+
Time.parse(value)
|
206
213
|
when :Date
|
207
214
|
Date.parse(value)
|
208
215
|
when :String
|
@@ -232,7 +239,9 @@ module IbmCloudPower
|
|
232
239
|
end
|
233
240
|
end
|
234
241
|
else # model
|
235
|
-
|
242
|
+
# models (e.g. Pet) or oneOf
|
243
|
+
klass = IbmCloudPower.const_get(type)
|
244
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
236
245
|
end
|
237
246
|
end
|
238
247
|
|
@@ -258,7 +267,7 @@ module IbmCloudPower
|
|
258
267
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
259
268
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
260
269
|
end
|
261
|
-
|
270
|
+
|
262
271
|
hash[param] = _to_hash(value)
|
263
272
|
end
|
264
273
|
hash
|
@@ -281,5 +290,7 @@ module IbmCloudPower
|
|
281
290
|
value
|
282
291
|
end
|
283
292
|
end
|
293
|
+
|
284
294
|
end
|
295
|
+
|
285
296
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: kylej@us.ibm.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module IbmCloudPower
|
16
17
|
class ClonedVolume
|
@@ -28,6 +29,11 @@ module IbmCloudPower
|
|
28
29
|
}
|
29
30
|
end
|
30
31
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
31
37
|
# Attribute type mapping.
|
32
38
|
def self.openapi_types
|
33
39
|
{
|
@@ -112,8 +118,11 @@ module IbmCloudPower
|
|
112
118
|
# @return [Object] Returns the model itself
|
113
119
|
def build_from_hash(attributes)
|
114
120
|
return nil unless attributes.is_a?(Hash)
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
115
122
|
self.class.openapi_types.each_pair do |key, type|
|
116
|
-
if
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
124
|
+
self.send("#{key}=", nil)
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
117
126
|
# check to ensure the input is an array given that the attribute
|
118
127
|
# is documented as an array but the input is not
|
119
128
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -121,8 +130,6 @@ module IbmCloudPower
|
|
121
130
|
end
|
122
131
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
123
132
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
124
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
125
|
-
self.send("#{key}=", nil)
|
126
133
|
end
|
127
134
|
end
|
128
135
|
|
@@ -135,8 +142,8 @@ module IbmCloudPower
|
|
135
142
|
# @return [Object] Deserialized data
|
136
143
|
def _deserialize(type, value)
|
137
144
|
case type.to_sym
|
138
|
-
when :
|
139
|
-
|
145
|
+
when :Time
|
146
|
+
Time.parse(value)
|
140
147
|
when :Date
|
141
148
|
Date.parse(value)
|
142
149
|
when :String
|
@@ -166,7 +173,9 @@ module IbmCloudPower
|
|
166
173
|
end
|
167
174
|
end
|
168
175
|
else # model
|
169
|
-
|
176
|
+
# models (e.g. Pet) or oneOf
|
177
|
+
klass = IbmCloudPower.const_get(type)
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
170
179
|
end
|
171
180
|
end
|
172
181
|
|
@@ -192,7 +201,7 @@ module IbmCloudPower
|
|
192
201
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
193
202
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
194
203
|
end
|
195
|
-
|
204
|
+
|
196
205
|
hash[param] = _to_hash(value)
|
197
206
|
end
|
198
207
|
hash
|
@@ -215,5 +224,7 @@ module IbmCloudPower
|
|
215
224
|
value
|
216
225
|
end
|
217
226
|
end
|
227
|
+
|
218
228
|
end
|
229
|
+
|
219
230
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: kylej@us.ibm.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module IbmCloudPower
|
16
17
|
class ClonedVolumeDetail
|
@@ -26,6 +27,11 @@ module IbmCloudPower
|
|
26
27
|
}
|
27
28
|
end
|
28
29
|
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
29
35
|
# Attribute type mapping.
|
30
36
|
def self.openapi_types
|
31
37
|
{
|
@@ -120,8 +126,11 @@ module IbmCloudPower
|
|
120
126
|
# @return [Object] Returns the model itself
|
121
127
|
def build_from_hash(attributes)
|
122
128
|
return nil unless attributes.is_a?(Hash)
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
123
130
|
self.class.openapi_types.each_pair do |key, type|
|
124
|
-
if
|
131
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
132
|
+
self.send("#{key}=", nil)
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
125
134
|
# check to ensure the input is an array given that the attribute
|
126
135
|
# is documented as an array but the input is not
|
127
136
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -129,8 +138,6 @@ module IbmCloudPower
|
|
129
138
|
end
|
130
139
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
131
140
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
132
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
133
|
-
self.send("#{key}=", nil)
|
134
141
|
end
|
135
142
|
end
|
136
143
|
|
@@ -143,8 +150,8 @@ module IbmCloudPower
|
|
143
150
|
# @return [Object] Deserialized data
|
144
151
|
def _deserialize(type, value)
|
145
152
|
case type.to_sym
|
146
|
-
when :
|
147
|
-
|
153
|
+
when :Time
|
154
|
+
Time.parse(value)
|
148
155
|
when :Date
|
149
156
|
Date.parse(value)
|
150
157
|
when :String
|
@@ -174,7 +181,9 @@ module IbmCloudPower
|
|
174
181
|
end
|
175
182
|
end
|
176
183
|
else # model
|
177
|
-
|
184
|
+
# models (e.g. Pet) or oneOf
|
185
|
+
klass = IbmCloudPower.const_get(type)
|
186
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
178
187
|
end
|
179
188
|
end
|
180
189
|
|
@@ -200,7 +209,7 @@ module IbmCloudPower
|
|
200
209
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
201
210
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
202
211
|
end
|
203
|
-
|
212
|
+
|
204
213
|
hash[param] = _to_hash(value)
|
205
214
|
end
|
206
215
|
hash
|
@@ -223,5 +232,7 @@ module IbmCloudPower
|
|
223
232
|
value
|
224
233
|
end
|
225
234
|
end
|
235
|
+
|
226
236
|
end
|
237
|
+
|
227
238
|
end
|