launchdarkly_api 5.0.1 → 5.3.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 +4 -4
- data/Gemfile +1 -1
- data/README.md +246 -236
- data/docs/ApprovalRequest.md +3 -1
- data/docs/ApprovalRequestConfigBody.md +2 -0
- data/docs/{UnboundedSegmentTargetChanges.md → BigSegmentTargetChanges.md} +1 -1
- data/docs/BigSegmentTargetsBody.md +9 -0
- data/docs/DependentFlag.md +11 -0
- data/docs/DependentFlagEnvironment.md +11 -0
- data/docs/DependentFlagEnvironmentLinks.md +9 -0
- data/docs/{IntegrationLinks.md → DependentFlagLinks.md} +1 -1
- data/docs/DependentFlagsByEnvironment.md +10 -0
- data/docs/DependentFlagsLinks.md +9 -0
- data/docs/EnvironmentApprovalSettings.md +2 -1
- data/docs/EnvironmentsApi.md +3 -3
- data/docs/FeatureFlagStatus.md +1 -1
- data/docs/FeatureFlagStatusAcrossEnvironments.md +1 -1
- data/docs/FeatureFlagStatusLinks.md +9 -0
- data/docs/FeatureFlagStatuses.md +1 -1
- data/docs/FeatureFlagsApi.md +115 -0
- data/docs/Integration.md +1 -1
- data/docs/MultiEnvironmentDependentFlag.md +12 -0
- data/docs/MultiEnvironmentDependentFlags.md +10 -0
- data/docs/UserSegment.md +1 -1
- data/docs/UserSegmentBody.md +1 -1
- data/docs/UserSegmentsApi.md +9 -9
- data/launchdarkly_api.gemspec +3 -2
- data/lib/launchdarkly_api.rb +13 -5
- data/lib/launchdarkly_api/api/access_tokens_api.rb +2 -2
- data/lib/launchdarkly_api/api/audit_log_api.rb +2 -2
- data/lib/launchdarkly_api/api/custom_roles_api.rb +2 -2
- data/lib/launchdarkly_api/api/customer_metrics_api.rb +2 -2
- data/lib/launchdarkly_api/api/data_export_destinations_api.rb +2 -2
- data/lib/launchdarkly_api/api/environments_api.rb +4 -4
- data/lib/launchdarkly_api/api/feature_flags_api.rb +124 -2
- data/lib/launchdarkly_api/api/integrations_api.rb +2 -2
- data/lib/launchdarkly_api/api/projects_api.rb +2 -2
- data/lib/launchdarkly_api/api/relay_proxy_configurations_api.rb +2 -2
- data/lib/launchdarkly_api/api/root_api.rb +2 -2
- data/lib/launchdarkly_api/api/team_members_api.rb +2 -2
- data/lib/launchdarkly_api/api/user_segments_api.rb +19 -19
- data/lib/launchdarkly_api/api/user_settings_api.rb +2 -2
- data/lib/launchdarkly_api/api/users_api.rb +2 -2
- data/lib/launchdarkly_api/api/webhooks_api.rb +2 -2
- data/lib/launchdarkly_api/api_client.rb +7 -5
- data/lib/launchdarkly_api/api_error.rb +2 -2
- data/lib/launchdarkly_api/configuration.rb +4 -4
- data/lib/launchdarkly_api/models/approval_request.rb +31 -10
- data/lib/launchdarkly_api/models/approval_request_apply_config_body.rb +4 -3
- data/lib/launchdarkly_api/models/approval_request_config_body.rb +28 -7
- data/lib/launchdarkly_api/models/approval_request_review.rb +4 -3
- data/lib/launchdarkly_api/models/approval_request_review_config_body.rb +4 -3
- data/lib/launchdarkly_api/models/approval_request_review_status.rb +2 -2
- data/lib/launchdarkly_api/models/approval_requests.rb +4 -3
- data/lib/launchdarkly_api/models/audit_log_entries.rb +4 -3
- data/lib/launchdarkly_api/models/audit_log_entry.rb +4 -3
- data/lib/launchdarkly_api/models/audit_log_entry_target.rb +4 -3
- data/lib/launchdarkly_api/models/{unbounded_segment_target_changes.rb → big_segment_target_changes.rb} +5 -4
- data/lib/launchdarkly_api/models/{unbounded_segment_targets_body.rb → big_segment_targets_body.rb} +7 -6
- data/lib/launchdarkly_api/models/clause.rb +4 -3
- data/lib/launchdarkly_api/models/client_side_availability.rb +4 -3
- data/lib/launchdarkly_api/models/copy_actions.rb +2 -2
- data/lib/launchdarkly_api/models/custom_property.rb +4 -3
- data/lib/launchdarkly_api/models/custom_property_values.rb +4 -3
- data/lib/launchdarkly_api/models/custom_role.rb +4 -3
- data/lib/launchdarkly_api/models/custom_role_body.rb +4 -3
- data/lib/launchdarkly_api/models/custom_roles.rb +4 -3
- data/lib/launchdarkly_api/models/defaults.rb +4 -3
- data/lib/launchdarkly_api/models/dependent_flag.rb +211 -0
- data/lib/launchdarkly_api/models/{integration__links.rb → dependent_flag__links.rb} +5 -4
- data/lib/launchdarkly_api/models/dependent_flag_environment.rb +211 -0
- data/lib/launchdarkly_api/models/dependent_flag_environment__links.rb +193 -0
- data/lib/launchdarkly_api/models/dependent_flags_by_environment.rb +204 -0
- data/lib/launchdarkly_api/models/dependent_flags_links.rb +193 -0
- data/lib/launchdarkly_api/models/destination.rb +4 -3
- data/lib/launchdarkly_api/models/destination_amazon_kinesis.rb +4 -3
- data/lib/launchdarkly_api/models/destination_body.rb +4 -3
- data/lib/launchdarkly_api/models/destination_google_pub_sub.rb +4 -3
- data/lib/launchdarkly_api/models/destination_m_particle.rb +4 -3
- data/lib/launchdarkly_api/models/destination_segment.rb +4 -3
- data/lib/launchdarkly_api/models/destinations.rb +4 -3
- data/lib/launchdarkly_api/models/environment.rb +4 -3
- data/lib/launchdarkly_api/models/environment_approval_settings.rb +21 -8
- data/lib/launchdarkly_api/models/environment_post.rb +4 -3
- data/lib/launchdarkly_api/models/evaluation_usage_error.rb +4 -3
- data/lib/launchdarkly_api/models/events.rb +4 -3
- data/lib/launchdarkly_api/models/fallthrough.rb +4 -3
- data/lib/launchdarkly_api/models/feature_flag.rb +4 -3
- data/lib/launchdarkly_api/models/feature_flag_body.rb +4 -3
- data/lib/launchdarkly_api/models/feature_flag_config.rb +4 -3
- data/lib/launchdarkly_api/models/feature_flag_copy_body.rb +4 -3
- data/lib/launchdarkly_api/models/feature_flag_copy_object.rb +4 -3
- data/lib/launchdarkly_api/models/feature_flag_scheduled_change.rb +4 -3
- data/lib/launchdarkly_api/models/feature_flag_scheduled_changes.rb +4 -3
- data/lib/launchdarkly_api/models/feature_flag_scheduled_changes_conflicts.rb +4 -3
- data/lib/launchdarkly_api/models/feature_flag_scheduled_changes_conflicts_instructions.rb +4 -3
- data/lib/launchdarkly_api/models/feature_flag_status.rb +5 -4
- data/lib/launchdarkly_api/models/feature_flag_status_across_environments.rb +5 -4
- data/lib/launchdarkly_api/models/feature_flag_status_for_queried_environment.rb +4 -3
- data/lib/launchdarkly_api/models/feature_flag_status_links.rb +193 -0
- data/lib/launchdarkly_api/models/feature_flag_statuses.rb +5 -4
- data/lib/launchdarkly_api/models/feature_flags.rb +4 -3
- data/lib/launchdarkly_api/models/flag_config_scheduled_changes_conflicts_body.rb +4 -3
- data/lib/launchdarkly_api/models/flag_config_scheduled_changes_patch_body.rb +4 -3
- data/lib/launchdarkly_api/models/flag_config_scheduled_changes_post_body.rb +4 -3
- data/lib/launchdarkly_api/models/flag_list_item.rb +4 -3
- data/lib/launchdarkly_api/models/hierarchical_links.rb +4 -3
- data/lib/launchdarkly_api/models/id.rb +4 -3
- data/lib/launchdarkly_api/models/integration.rb +5 -4
- data/lib/launchdarkly_api/models/integration_subscription.rb +4 -3
- data/lib/launchdarkly_api/models/integration_subscription__status.rb +4 -3
- data/lib/launchdarkly_api/models/integrations.rb +4 -3
- data/lib/launchdarkly_api/models/link.rb +4 -3
- data/lib/launchdarkly_api/models/links.rb +4 -3
- data/lib/launchdarkly_api/models/ma_uby_category.rb +4 -3
- data/lib/launchdarkly_api/models/mau.rb +4 -3
- data/lib/launchdarkly_api/models/mau_metadata.rb +4 -3
- data/lib/launchdarkly_api/models/member.rb +4 -3
- data/lib/launchdarkly_api/models/member__last_seen_metadata.rb +4 -3
- data/lib/launchdarkly_api/models/members.rb +4 -3
- data/lib/launchdarkly_api/models/members_body.rb +4 -3
- data/lib/launchdarkly_api/models/multi_environment_dependent_flag.rb +222 -0
- data/lib/launchdarkly_api/models/multi_environment_dependent_flags.rb +204 -0
- data/lib/launchdarkly_api/models/patch_comment.rb +4 -3
- data/lib/launchdarkly_api/models/patch_operation.rb +4 -3
- data/lib/launchdarkly_api/models/policy.rb +4 -3
- data/lib/launchdarkly_api/models/prerequisite.rb +4 -3
- data/lib/launchdarkly_api/models/project.rb +4 -3
- data/lib/launchdarkly_api/models/project_body.rb +4 -3
- data/lib/launchdarkly_api/models/projects.rb +4 -3
- data/lib/launchdarkly_api/models/relay_proxy_config.rb +4 -3
- data/lib/launchdarkly_api/models/relay_proxy_config_body.rb +4 -3
- data/lib/launchdarkly_api/models/relay_proxy_configs.rb +4 -3
- data/lib/launchdarkly_api/models/role.rb +2 -2
- data/lib/launchdarkly_api/models/rollout.rb +4 -3
- data/lib/launchdarkly_api/models/rule.rb +4 -3
- data/lib/launchdarkly_api/models/scheduled_changes_feature_flag_conflict.rb +4 -3
- data/lib/launchdarkly_api/models/semantic_patch_instruction.rb +4 -3
- data/lib/launchdarkly_api/models/semantic_patch_instruction_inner.rb +4 -3
- data/lib/launchdarkly_api/models/semantic_patch_operation.rb +4 -3
- data/lib/launchdarkly_api/models/site.rb +4 -3
- data/lib/launchdarkly_api/models/statement.rb +4 -3
- data/lib/launchdarkly_api/models/stream.rb +4 -3
- data/lib/launchdarkly_api/models/stream_by_sdk.rb +4 -3
- data/lib/launchdarkly_api/models/stream_by_sdk_links.rb +4 -3
- data/lib/launchdarkly_api/models/stream_by_sdk_links_metadata.rb +4 -3
- data/lib/launchdarkly_api/models/stream_links.rb +4 -3
- data/lib/launchdarkly_api/models/stream_sdk_version.rb +4 -3
- data/lib/launchdarkly_api/models/stream_sdk_version_data.rb +4 -3
- data/lib/launchdarkly_api/models/stream_usage_error.rb +4 -3
- data/lib/launchdarkly_api/models/stream_usage_links.rb +4 -3
- data/lib/launchdarkly_api/models/stream_usage_metadata.rb +4 -3
- data/lib/launchdarkly_api/models/stream_usage_series.rb +4 -3
- data/lib/launchdarkly_api/models/streams.rb +4 -3
- data/lib/launchdarkly_api/models/subscription_body.rb +4 -3
- data/lib/launchdarkly_api/models/target.rb +4 -3
- data/lib/launchdarkly_api/models/token.rb +4 -3
- data/lib/launchdarkly_api/models/token_body.rb +4 -3
- data/lib/launchdarkly_api/models/tokens.rb +4 -3
- data/lib/launchdarkly_api/models/usage.rb +4 -3
- data/lib/launchdarkly_api/models/usage_error.rb +4 -3
- data/lib/launchdarkly_api/models/usage_links.rb +4 -3
- data/lib/launchdarkly_api/models/user.rb +4 -3
- data/lib/launchdarkly_api/models/user_flag_setting.rb +4 -3
- data/lib/launchdarkly_api/models/user_flag_settings.rb +4 -3
- data/lib/launchdarkly_api/models/user_record.rb +4 -3
- data/lib/launchdarkly_api/models/user_segment.rb +5 -4
- data/lib/launchdarkly_api/models/user_segment_body.rb +5 -4
- data/lib/launchdarkly_api/models/user_segment_rule.rb +4 -3
- data/lib/launchdarkly_api/models/user_segments.rb +4 -3
- data/lib/launchdarkly_api/models/user_settings_body.rb +4 -3
- data/lib/launchdarkly_api/models/user_targeting_expiration_for_flag.rb +4 -3
- data/lib/launchdarkly_api/models/user_targeting_expiration_for_flags.rb +4 -3
- data/lib/launchdarkly_api/models/user_targeting_expiration_for_segment.rb +4 -3
- data/lib/launchdarkly_api/models/user_targeting_expiration_on_flags_for_user.rb +4 -3
- data/lib/launchdarkly_api/models/user_targeting_expiration_resource_id_for_flag.rb +4 -3
- data/lib/launchdarkly_api/models/users.rb +4 -3
- data/lib/launchdarkly_api/models/variation.rb +4 -3
- data/lib/launchdarkly_api/models/webhook.rb +4 -3
- data/lib/launchdarkly_api/models/webhook_body.rb +4 -3
- data/lib/launchdarkly_api/models/webhooks.rb +4 -3
- data/lib/launchdarkly_api/models/weighted_variation.rb +4 -3
- data/lib/launchdarkly_api/version.rb +3 -3
- data/openapi.yml +187 -28
- data/spec/api/access_tokens_api_spec.rb +2 -2
- data/spec/api/audit_log_api_spec.rb +2 -2
- data/spec/api/custom_roles_api_spec.rb +2 -2
- data/spec/api/customer_metrics_api_spec.rb +2 -2
- data/spec/api/data_export_destinations_api_spec.rb +2 -2
- data/spec/api/environments_api_spec.rb +3 -3
- data/spec/api/feature_flags_api_spec.rb +27 -2
- data/spec/api/integrations_api_spec.rb +2 -2
- data/spec/api/projects_api_spec.rb +2 -2
- data/spec/api/relay_proxy_configurations_api_spec.rb +2 -2
- data/spec/api/root_api_spec.rb +2 -2
- data/spec/api/team_members_api_spec.rb +2 -2
- data/spec/api/user_segments_api_spec.rb +6 -6
- data/spec/api/user_settings_api_spec.rb +2 -2
- data/spec/api/users_api_spec.rb +2 -2
- data/spec/api/webhooks_api_spec.rb +2 -2
- data/spec/api_client_spec.rb +19 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/approval_request_apply_config_body_spec.rb +2 -2
- data/spec/models/approval_request_config_body_spec.rb +14 -2
- data/spec/models/approval_request_review_config_body_spec.rb +2 -2
- data/spec/models/approval_request_review_spec.rb +2 -2
- data/spec/models/approval_request_review_status_spec.rb +2 -2
- data/spec/models/approval_request_spec.rb +15 -3
- data/spec/models/approval_requests_spec.rb +2 -2
- data/spec/models/audit_log_entries_spec.rb +2 -2
- data/spec/models/audit_log_entry_spec.rb +2 -2
- data/spec/models/audit_log_entry_target_spec.rb +2 -2
- data/spec/models/{unbounded_segment_target_changes_spec.rb → big_segment_target_changes_spec.rb} +8 -8
- data/spec/models/{unbounded_segment_targets_body_spec.rb → big_segment_targets_body_spec.rb} +8 -8
- data/spec/models/clause_spec.rb +2 -2
- data/spec/models/client_side_availability_spec.rb +2 -2
- data/spec/models/copy_actions_spec.rb +2 -2
- data/spec/models/custom_property_spec.rb +2 -2
- data/spec/models/custom_property_values_spec.rb +2 -2
- data/spec/models/custom_role_body_spec.rb +2 -2
- data/spec/models/custom_role_spec.rb +2 -2
- data/spec/models/custom_roles_spec.rb +2 -2
- data/spec/models/defaults_spec.rb +2 -2
- data/spec/models/{integration__links_spec.rb → dependent_flag__links_spec.rb} +8 -8
- data/spec/models/dependent_flag_environment__links_spec.rb +47 -0
- data/spec/models/dependent_flag_environment_spec.rb +59 -0
- data/spec/models/dependent_flag_spec.rb +59 -0
- data/spec/models/dependent_flags_by_environment_spec.rb +53 -0
- data/spec/models/dependent_flags_links_spec.rb +47 -0
- data/spec/models/destination_amazon_kinesis_spec.rb +2 -2
- data/spec/models/destination_body_spec.rb +2 -2
- data/spec/models/destination_google_pub_sub_spec.rb +2 -2
- data/spec/models/destination_m_particle_spec.rb +2 -2
- data/spec/models/destination_segment_spec.rb +2 -2
- data/spec/models/destination_spec.rb +2 -2
- data/spec/models/destinations_spec.rb +2 -2
- data/spec/models/environment_approval_settings_spec.rb +8 -2
- data/spec/models/environment_post_spec.rb +2 -2
- data/spec/models/environment_spec.rb +2 -2
- data/spec/models/evaluation_usage_error_spec.rb +2 -2
- data/spec/models/events_spec.rb +2 -2
- data/spec/models/fallthrough_spec.rb +2 -2
- data/spec/models/feature_flag_body_spec.rb +2 -2
- data/spec/models/feature_flag_config_spec.rb +2 -2
- data/spec/models/feature_flag_copy_body_spec.rb +2 -2
- data/spec/models/feature_flag_copy_object_spec.rb +2 -2
- data/spec/models/feature_flag_scheduled_change_spec.rb +2 -2
- data/spec/models/feature_flag_scheduled_changes_conflicts_instructions_spec.rb +2 -2
- data/spec/models/feature_flag_scheduled_changes_conflicts_spec.rb +2 -2
- data/spec/models/feature_flag_scheduled_changes_spec.rb +2 -2
- data/spec/models/feature_flag_spec.rb +2 -2
- data/spec/models/feature_flag_status_across_environments_spec.rb +2 -2
- data/spec/models/feature_flag_status_for_queried_environment_spec.rb +2 -2
- data/spec/models/feature_flag_status_links_spec.rb +47 -0
- data/spec/models/feature_flag_status_spec.rb +2 -2
- data/spec/models/feature_flag_statuses_spec.rb +2 -2
- data/spec/models/feature_flags_spec.rb +2 -2
- data/spec/models/flag_config_scheduled_changes_conflicts_body_spec.rb +2 -2
- data/spec/models/flag_config_scheduled_changes_patch_body_spec.rb +2 -2
- data/spec/models/flag_config_scheduled_changes_post_body_spec.rb +2 -2
- data/spec/models/flag_list_item_spec.rb +2 -2
- data/spec/models/hierarchical_links_spec.rb +2 -2
- data/spec/models/id_spec.rb +2 -2
- data/spec/models/integration_spec.rb +2 -2
- data/spec/models/integration_subscription__status_spec.rb +2 -2
- data/spec/models/integration_subscription_spec.rb +2 -2
- data/spec/models/integrations_spec.rb +2 -2
- data/spec/models/link_spec.rb +2 -2
- data/spec/models/links_spec.rb +2 -2
- data/spec/models/ma_uby_category_spec.rb +2 -2
- data/spec/models/mau_metadata_spec.rb +2 -2
- data/spec/models/mau_spec.rb +2 -2
- data/spec/models/member__last_seen_metadata_spec.rb +2 -2
- data/spec/models/member_spec.rb +2 -2
- data/spec/models/members_body_spec.rb +2 -2
- data/spec/models/members_spec.rb +2 -2
- data/spec/models/multi_environment_dependent_flag_spec.rb +65 -0
- data/spec/models/multi_environment_dependent_flags_spec.rb +53 -0
- data/spec/models/patch_comment_spec.rb +2 -2
- data/spec/models/patch_operation_spec.rb +2 -2
- data/spec/models/policy_spec.rb +2 -2
- data/spec/models/prerequisite_spec.rb +2 -2
- data/spec/models/project_body_spec.rb +2 -2
- data/spec/models/project_spec.rb +2 -2
- data/spec/models/projects_spec.rb +2 -2
- data/spec/models/relay_proxy_config_body_spec.rb +2 -2
- data/spec/models/relay_proxy_config_spec.rb +2 -2
- data/spec/models/relay_proxy_configs_spec.rb +2 -2
- data/spec/models/role_spec.rb +2 -2
- data/spec/models/rollout_spec.rb +2 -2
- data/spec/models/rule_spec.rb +2 -2
- data/spec/models/scheduled_changes_feature_flag_conflict_spec.rb +2 -2
- data/spec/models/semantic_patch_instruction_inner_spec.rb +2 -2
- data/spec/models/semantic_patch_instruction_spec.rb +2 -2
- data/spec/models/semantic_patch_operation_spec.rb +2 -2
- data/spec/models/site_spec.rb +2 -2
- data/spec/models/statement_spec.rb +2 -2
- data/spec/models/stream_by_sdk_links_metadata_spec.rb +2 -2
- data/spec/models/stream_by_sdk_links_spec.rb +2 -2
- data/spec/models/stream_by_sdk_spec.rb +2 -2
- data/spec/models/stream_links_spec.rb +2 -2
- data/spec/models/stream_sdk_version_data_spec.rb +2 -2
- data/spec/models/stream_sdk_version_spec.rb +2 -2
- data/spec/models/stream_spec.rb +2 -2
- data/spec/models/stream_usage_error_spec.rb +2 -2
- data/spec/models/stream_usage_links_spec.rb +2 -2
- data/spec/models/stream_usage_metadata_spec.rb +2 -2
- data/spec/models/stream_usage_series_spec.rb +2 -2
- data/spec/models/streams_spec.rb +2 -2
- data/spec/models/subscription_body_spec.rb +2 -2
- data/spec/models/target_spec.rb +2 -2
- data/spec/models/token_body_spec.rb +2 -2
- data/spec/models/token_spec.rb +2 -2
- data/spec/models/tokens_spec.rb +2 -2
- data/spec/models/usage_error_spec.rb +2 -2
- data/spec/models/usage_links_spec.rb +2 -2
- data/spec/models/usage_spec.rb +2 -2
- data/spec/models/user_flag_setting_spec.rb +2 -2
- data/spec/models/user_flag_settings_spec.rb +2 -2
- data/spec/models/user_record_spec.rb +2 -2
- data/spec/models/user_segment_body_spec.rb +2 -2
- data/spec/models/user_segment_rule_spec.rb +2 -2
- data/spec/models/user_segment_spec.rb +2 -2
- data/spec/models/user_segments_spec.rb +2 -2
- data/spec/models/user_settings_body_spec.rb +2 -2
- data/spec/models/user_spec.rb +2 -2
- data/spec/models/user_targeting_expiration_for_flag_spec.rb +2 -2
- data/spec/models/user_targeting_expiration_for_flags_spec.rb +2 -2
- data/spec/models/user_targeting_expiration_for_segment_spec.rb +2 -2
- data/spec/models/user_targeting_expiration_on_flags_for_user_spec.rb +2 -2
- data/spec/models/user_targeting_expiration_resource_id_for_flag_spec.rb +2 -2
- data/spec/models/users_spec.rb +2 -2
- data/spec/models/variation_spec.rb +2 -2
- data/spec/models/webhook_body_spec.rb +2 -2
- data/spec/models/webhook_spec.rb +2 -2
- data/spec/models/webhooks_spec.rb +2 -2
- data/spec/models/weighted_variation_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- metadata +66 -14
- data/docs/UnboundedSegmentTargetsBody.md +0 -9
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 5.0
|
|
6
|
+
OpenAPI spec version: 5.3.0
|
|
7
7
|
Contact: support@launchdarkly.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.
|
|
9
|
+
Swagger Codegen version: 2.4.17
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -105,7 +105,7 @@ module LaunchDarklyApi
|
|
|
105
105
|
return nil unless attributes.is_a?(Hash)
|
|
106
106
|
self.class.swagger_types.each_pair do |key, type|
|
|
107
107
|
if type =~ /\AArray<(.*)>/i
|
|
108
|
-
# check to ensure the input is an array given that the
|
|
108
|
+
# check to ensure the input is an array given that the attribute
|
|
109
109
|
# is documented as an array but the input is not
|
|
110
110
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
111
111
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
@@ -201,5 +201,6 @@ module LaunchDarklyApi
|
|
|
201
201
|
value
|
|
202
202
|
end
|
|
203
203
|
end
|
|
204
|
+
|
|
204
205
|
end
|
|
205
206
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 5.0
|
|
6
|
+
OpenAPI spec version: 5.3.0
|
|
7
7
|
Contact: support@launchdarkly.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.
|
|
9
|
+
Swagger Codegen version: 2.4.17
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -74,7 +74,7 @@ module LaunchDarklyApi
|
|
|
74
74
|
return nil unless attributes.is_a?(Hash)
|
|
75
75
|
self.class.swagger_types.each_pair do |key, type|
|
|
76
76
|
if type =~ /\AArray<(.*)>/i
|
|
77
|
-
# check to ensure the input is an array given that the
|
|
77
|
+
# check to ensure the input is an array given that the attribute
|
|
78
78
|
# is documented as an array but the input is not
|
|
79
79
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
80
80
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
@@ -170,5 +170,6 @@ module LaunchDarklyApi
|
|
|
170
170
|
value
|
|
171
171
|
end
|
|
172
172
|
end
|
|
173
|
+
|
|
173
174
|
end
|
|
174
175
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 5.0
|
|
6
|
+
OpenAPI spec version: 5.3.0
|
|
7
7
|
Contact: support@launchdarkly.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.
|
|
9
|
+
Swagger Codegen version: 2.4.17
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -185,7 +185,7 @@ module LaunchDarklyApi
|
|
|
185
185
|
return nil unless attributes.is_a?(Hash)
|
|
186
186
|
self.class.swagger_types.each_pair do |key, type|
|
|
187
187
|
if type =~ /\AArray<(.*)>/i
|
|
188
|
-
# check to ensure the input is an array given that the
|
|
188
|
+
# check to ensure the input is an array given that the attribute
|
|
189
189
|
# is documented as an array but the input is not
|
|
190
190
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
191
191
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
@@ -281,5 +281,6 @@ module LaunchDarklyApi
|
|
|
281
281
|
value
|
|
282
282
|
end
|
|
283
283
|
end
|
|
284
|
+
|
|
284
285
|
end
|
|
285
286
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 5.0
|
|
6
|
+
OpenAPI spec version: 5.3.0
|
|
7
7
|
Contact: support@launchdarkly.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.
|
|
9
|
+
Swagger Codegen version: 2.4.17
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -84,7 +84,7 @@ module LaunchDarklyApi
|
|
|
84
84
|
return nil unless attributes.is_a?(Hash)
|
|
85
85
|
self.class.swagger_types.each_pair do |key, type|
|
|
86
86
|
if type =~ /\AArray<(.*)>/i
|
|
87
|
-
# check to ensure the input is an array given that the
|
|
87
|
+
# check to ensure the input is an array given that the attribute
|
|
88
88
|
# is documented as an array but the input is not
|
|
89
89
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
90
90
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
@@ -180,5 +180,6 @@ module LaunchDarklyApi
|
|
|
180
180
|
value
|
|
181
181
|
end
|
|
182
182
|
end
|
|
183
|
+
|
|
183
184
|
end
|
|
184
185
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 5.0
|
|
6
|
+
OpenAPI spec version: 5.3.0
|
|
7
7
|
Contact: support@launchdarkly.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.
|
|
9
|
+
Swagger Codegen version: 2.4.17
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -103,7 +103,7 @@ module LaunchDarklyApi
|
|
|
103
103
|
return nil unless attributes.is_a?(Hash)
|
|
104
104
|
self.class.swagger_types.each_pair do |key, type|
|
|
105
105
|
if type =~ /\AArray<(.*)>/i
|
|
106
|
-
# check to ensure the input is an array given that the
|
|
106
|
+
# check to ensure the input is an array given that the attribute
|
|
107
107
|
# is documented as an array but the input is not
|
|
108
108
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
109
109
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
@@ -199,5 +199,6 @@ module LaunchDarklyApi
|
|
|
199
199
|
value
|
|
200
200
|
end
|
|
201
201
|
end
|
|
202
|
+
|
|
202
203
|
end
|
|
203
204
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 5.0
|
|
6
|
+
OpenAPI spec version: 5.3.0
|
|
7
7
|
Contact: support@launchdarkly.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.
|
|
9
|
+
Swagger Codegen version: 2.4.17
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -137,7 +137,7 @@ module LaunchDarklyApi
|
|
|
137
137
|
return nil unless attributes.is_a?(Hash)
|
|
138
138
|
self.class.swagger_types.each_pair do |key, type|
|
|
139
139
|
if type =~ /\AArray<(.*)>/i
|
|
140
|
-
# check to ensure the input is an array given that the
|
|
140
|
+
# check to ensure the input is an array given that the attribute
|
|
141
141
|
# is documented as an array but the input is not
|
|
142
142
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
143
143
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
@@ -233,5 +233,6 @@ module LaunchDarklyApi
|
|
|
233
233
|
value
|
|
234
234
|
end
|
|
235
235
|
end
|
|
236
|
+
|
|
236
237
|
end
|
|
237
238
|
end
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#LaunchDarkly REST API
|
|
3
|
+
|
|
4
|
+
#Build custom integrations with the LaunchDarkly REST API
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 5.3.0
|
|
7
|
+
Contact: support@launchdarkly.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.17
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module LaunchDarklyApi
|
|
16
|
+
class MultiEnvironmentDependentFlag
|
|
17
|
+
attr_accessor :name
|
|
18
|
+
|
|
19
|
+
attr_accessor :key
|
|
20
|
+
|
|
21
|
+
attr_accessor :environments
|
|
22
|
+
|
|
23
|
+
attr_accessor :_links
|
|
24
|
+
|
|
25
|
+
attr_accessor :_site
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'name' => :'name',
|
|
31
|
+
:'key' => :'key',
|
|
32
|
+
:'environments' => :'environments',
|
|
33
|
+
:'_links' => :'_links',
|
|
34
|
+
:'_site' => :'_site'
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.swagger_types
|
|
40
|
+
{
|
|
41
|
+
:'name' => :'String',
|
|
42
|
+
:'key' => :'String',
|
|
43
|
+
:'environments' => :'Array<DependentFlagEnvironment>',
|
|
44
|
+
:'_links' => :'DependentFlagsLinks',
|
|
45
|
+
:'_site' => :'Site'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Initializes the object
|
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
51
|
+
def initialize(attributes = {})
|
|
52
|
+
return unless attributes.is_a?(Hash)
|
|
53
|
+
|
|
54
|
+
# convert string to symbol for hash key
|
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
56
|
+
|
|
57
|
+
if attributes.has_key?(:'name')
|
|
58
|
+
self.name = attributes[:'name']
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
if attributes.has_key?(:'key')
|
|
62
|
+
self.key = attributes[:'key']
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
if attributes.has_key?(:'environments')
|
|
66
|
+
if (value = attributes[:'environments']).is_a?(Array)
|
|
67
|
+
self.environments = value
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
if attributes.has_key?(:'_links')
|
|
72
|
+
self._links = attributes[:'_links']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.has_key?(:'_site')
|
|
76
|
+
self._site = attributes[:'_site']
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
81
|
+
# @return Array for valid properties with the reasons
|
|
82
|
+
def list_invalid_properties
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Checks equality by comparing each attribute.
|
|
94
|
+
# @param [Object] Object to be compared
|
|
95
|
+
def ==(o)
|
|
96
|
+
return true if self.equal?(o)
|
|
97
|
+
self.class == o.class &&
|
|
98
|
+
name == o.name &&
|
|
99
|
+
key == o.key &&
|
|
100
|
+
environments == o.environments &&
|
|
101
|
+
_links == o._links &&
|
|
102
|
+
_site == o._site
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @see the `==` method
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def eql?(o)
|
|
108
|
+
self == o
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Calculates hash code according to all attributes.
|
|
112
|
+
# @return [Fixnum] Hash code
|
|
113
|
+
def hash
|
|
114
|
+
[name, key, environments, _links, _site].hash
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Builds the object from hash
|
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
119
|
+
# @return [Object] Returns the model itself
|
|
120
|
+
def build_from_hash(attributes)
|
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
|
122
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
123
|
+
if type =~ /\AArray<(.*)>/i
|
|
124
|
+
# check to ensure the input is an array given that the attribute
|
|
125
|
+
# is documented as an array but the input is not
|
|
126
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
127
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
128
|
+
end
|
|
129
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
130
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
131
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
self
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Deserializes the data based on type
|
|
138
|
+
# @param string type Data type
|
|
139
|
+
# @param string value Value to be deserialized
|
|
140
|
+
# @return [Object] Deserialized data
|
|
141
|
+
def _deserialize(type, value)
|
|
142
|
+
case type.to_sym
|
|
143
|
+
when :DateTime
|
|
144
|
+
DateTime.parse(value)
|
|
145
|
+
when :Date
|
|
146
|
+
Date.parse(value)
|
|
147
|
+
when :String
|
|
148
|
+
value.to_s
|
|
149
|
+
when :Integer
|
|
150
|
+
value.to_i
|
|
151
|
+
when :Float
|
|
152
|
+
value.to_f
|
|
153
|
+
when :BOOLEAN
|
|
154
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
155
|
+
true
|
|
156
|
+
else
|
|
157
|
+
false
|
|
158
|
+
end
|
|
159
|
+
when :Object
|
|
160
|
+
# generic object (usually a Hash), return directly
|
|
161
|
+
value
|
|
162
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
163
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
164
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
165
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
166
|
+
k_type = Regexp.last_match[:k_type]
|
|
167
|
+
v_type = Regexp.last_match[:v_type]
|
|
168
|
+
{}.tap do |hash|
|
|
169
|
+
value.each do |k, v|
|
|
170
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
else # model
|
|
174
|
+
temp_model = LaunchDarklyApi.const_get(type).new
|
|
175
|
+
temp_model.build_from_hash(value)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Returns the string representation of the object
|
|
180
|
+
# @return [String] String presentation of the object
|
|
181
|
+
def to_s
|
|
182
|
+
to_hash.to_s
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
|
187
|
+
def to_body
|
|
188
|
+
to_hash
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Returns the object in the form of hash
|
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
|
193
|
+
def to_hash
|
|
194
|
+
hash = {}
|
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
196
|
+
value = self.send(attr)
|
|
197
|
+
next if value.nil?
|
|
198
|
+
hash[param] = _to_hash(value)
|
|
199
|
+
end
|
|
200
|
+
hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Outputs non-array value in the form of hash
|
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
205
|
+
# @param [Object] value Any valid value
|
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
|
207
|
+
def _to_hash(value)
|
|
208
|
+
if value.is_a?(Array)
|
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
|
210
|
+
elsif value.is_a?(Hash)
|
|
211
|
+
{}.tap do |hash|
|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
213
|
+
end
|
|
214
|
+
elsif value.respond_to? :to_hash
|
|
215
|
+
value.to_hash
|
|
216
|
+
else
|
|
217
|
+
value
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|
|
222
|
+
end
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#LaunchDarkly REST API
|
|
3
|
+
|
|
4
|
+
#Build custom integrations with the LaunchDarkly REST API
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 5.3.0
|
|
7
|
+
Contact: support@launchdarkly.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.17
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module LaunchDarklyApi
|
|
16
|
+
class MultiEnvironmentDependentFlags
|
|
17
|
+
attr_accessor :items
|
|
18
|
+
|
|
19
|
+
attr_accessor :_links
|
|
20
|
+
|
|
21
|
+
attr_accessor :_site
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'items' => :'items',
|
|
27
|
+
:'_links' => :'_links',
|
|
28
|
+
:'_site' => :'_site'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Attribute type mapping.
|
|
33
|
+
def self.swagger_types
|
|
34
|
+
{
|
|
35
|
+
:'items' => :'Array<MultiEnvironmentDependentFlag>',
|
|
36
|
+
:'_links' => :'DependentFlagsLinks',
|
|
37
|
+
:'_site' => :'Site'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Initializes the object
|
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
43
|
+
def initialize(attributes = {})
|
|
44
|
+
return unless attributes.is_a?(Hash)
|
|
45
|
+
|
|
46
|
+
# convert string to symbol for hash key
|
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
48
|
+
|
|
49
|
+
if attributes.has_key?(:'items')
|
|
50
|
+
if (value = attributes[:'items']).is_a?(Array)
|
|
51
|
+
self.items = value
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
if attributes.has_key?(:'_links')
|
|
56
|
+
self._links = attributes[:'_links']
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
if attributes.has_key?(:'_site')
|
|
60
|
+
self._site = attributes[:'_site']
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
65
|
+
# @return Array for valid properties with the reasons
|
|
66
|
+
def list_invalid_properties
|
|
67
|
+
invalid_properties = Array.new
|
|
68
|
+
invalid_properties
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Check to see if the all the properties in the model are valid
|
|
72
|
+
# @return true if the model is valid
|
|
73
|
+
def valid?
|
|
74
|
+
true
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Checks equality by comparing each attribute.
|
|
78
|
+
# @param [Object] Object to be compared
|
|
79
|
+
def ==(o)
|
|
80
|
+
return true if self.equal?(o)
|
|
81
|
+
self.class == o.class &&
|
|
82
|
+
items == o.items &&
|
|
83
|
+
_links == o._links &&
|
|
84
|
+
_site == o._site
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# @see the `==` method
|
|
88
|
+
# @param [Object] Object to be compared
|
|
89
|
+
def eql?(o)
|
|
90
|
+
self == o
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Calculates hash code according to all attributes.
|
|
94
|
+
# @return [Fixnum] Hash code
|
|
95
|
+
def hash
|
|
96
|
+
[items, _links, _site].hash
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Builds the object from hash
|
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
101
|
+
# @return [Object] Returns the model itself
|
|
102
|
+
def build_from_hash(attributes)
|
|
103
|
+
return nil unless attributes.is_a?(Hash)
|
|
104
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
105
|
+
if type =~ /\AArray<(.*)>/i
|
|
106
|
+
# check to ensure the input is an array given that the attribute
|
|
107
|
+
# is documented as an array but the input is not
|
|
108
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
109
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
110
|
+
end
|
|
111
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
112
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
113
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
self
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Deserializes the data based on type
|
|
120
|
+
# @param string type Data type
|
|
121
|
+
# @param string value Value to be deserialized
|
|
122
|
+
# @return [Object] Deserialized data
|
|
123
|
+
def _deserialize(type, value)
|
|
124
|
+
case type.to_sym
|
|
125
|
+
when :DateTime
|
|
126
|
+
DateTime.parse(value)
|
|
127
|
+
when :Date
|
|
128
|
+
Date.parse(value)
|
|
129
|
+
when :String
|
|
130
|
+
value.to_s
|
|
131
|
+
when :Integer
|
|
132
|
+
value.to_i
|
|
133
|
+
when :Float
|
|
134
|
+
value.to_f
|
|
135
|
+
when :BOOLEAN
|
|
136
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
137
|
+
true
|
|
138
|
+
else
|
|
139
|
+
false
|
|
140
|
+
end
|
|
141
|
+
when :Object
|
|
142
|
+
# generic object (usually a Hash), return directly
|
|
143
|
+
value
|
|
144
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
145
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
146
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
147
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
148
|
+
k_type = Regexp.last_match[:k_type]
|
|
149
|
+
v_type = Regexp.last_match[:v_type]
|
|
150
|
+
{}.tap do |hash|
|
|
151
|
+
value.each do |k, v|
|
|
152
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
else # model
|
|
156
|
+
temp_model = LaunchDarklyApi.const_get(type).new
|
|
157
|
+
temp_model.build_from_hash(value)
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Returns the string representation of the object
|
|
162
|
+
# @return [String] String presentation of the object
|
|
163
|
+
def to_s
|
|
164
|
+
to_hash.to_s
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
|
169
|
+
def to_body
|
|
170
|
+
to_hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Returns the object in the form of hash
|
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
|
175
|
+
def to_hash
|
|
176
|
+
hash = {}
|
|
177
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
178
|
+
value = self.send(attr)
|
|
179
|
+
next if value.nil?
|
|
180
|
+
hash[param] = _to_hash(value)
|
|
181
|
+
end
|
|
182
|
+
hash
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Outputs non-array value in the form of hash
|
|
186
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
187
|
+
# @param [Object] value Any valid value
|
|
188
|
+
# @return [Hash] Returns the value in the form of hash
|
|
189
|
+
def _to_hash(value)
|
|
190
|
+
if value.is_a?(Array)
|
|
191
|
+
value.compact.map { |v| _to_hash(v) }
|
|
192
|
+
elsif value.is_a?(Hash)
|
|
193
|
+
{}.tap do |hash|
|
|
194
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
195
|
+
end
|
|
196
|
+
elsif value.respond_to? :to_hash
|
|
197
|
+
value.to_hash
|
|
198
|
+
else
|
|
199
|
+
value
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
end
|
|
204
|
+
end
|