happyco_json 2.1.1 → 2.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/README.md +10 -6
- data/docs/ProtobufAny.md +9 -0
- data/docs/RuntimeStreamError.md +12 -0
- data/docs/V1Asset.md +1 -0
- data/docs/V1EventAck.md +10 -0
- data/docs/V1EventHandlerOptions.md +8 -0
- data/docs/V1Inspection.md +1 -0
- data/docs/V1RatingCheckbox.md +1 -0
- data/docs/V1RatingDropDownOption.md +1 -0
- data/docs/V1RatingGroup.md +5 -3
- data/docs/V1RatingRadioGroupOption.md +1 -0
- data/happyco_json.gemspec +1 -1
- data/lib/happyco_json/api/account_provisioning_service_api.rb +1 -1
- data/lib/happyco_json/api/account_service_api.rb +1 -1
- data/lib/happyco_json/api/account_users_service_api.rb +1 -1
- data/lib/happyco_json/api/asset_service_api.rb +1 -1
- data/lib/happyco_json/api/folder_service_api.rb +1 -1
- data/lib/happyco_json/api/inspection_service_api.rb +1 -1
- data/lib/happyco_json/api/report_service_api.rb +1 -1
- data/lib/happyco_json/api/template_service_api.rb +1 -1
- data/lib/happyco_json/api_client.rb +1 -1
- data/lib/happyco_json/api_error.rb +1 -1
- data/lib/happyco_json/configuration.rb +1 -1
- data/lib/happyco_json/helpers.rb +4 -0
- data/lib/happyco_json/models/create_accounts_request_account_with_admin.rb +1 -1
- data/lib/happyco_json/models/create_accounts_response_account_id_with_admin_id.rb +1 -1
- data/lib/happyco_json/models/inspection_status_change_status.rb +1 -1
- data/lib/happyco_json/models/inspection_status_changes_event_inspection_status_change.rb +1 -1
- data/lib/happyco_json/models/protobuf_any.rb +208 -0
- data/lib/happyco_json/models/reports_created_event_report_created.rb +1 -1
- data/lib/happyco_json/models/runtime_stream_error.rb +237 -0
- data/lib/happyco_json/models/update_accounts_request_account_with_admin_id.rb +1 -1
- data/lib/happyco_json/models/v1_account.rb +1 -1
- data/lib/happyco_json/models/v1_add_asset_photo_request.rb +1 -1
- data/lib/happyco_json/models/v1_add_asset_photo_response.rb +1 -1
- data/lib/happyco_json/models/v1_add_inspection_photo_request.rb +1 -1
- data/lib/happyco_json/models/v1_add_inspection_photo_response.rb +1 -1
- data/lib/happyco_json/models/v1_add_inspection_photos_request.rb +1 -1
- data/lib/happyco_json/models/v1_add_inspection_photos_response.rb +1 -1
- data/lib/happyco_json/models/v1_add_users_request.rb +1 -1
- data/lib/happyco_json/models/v1_add_users_response.rb +1 -1
- data/lib/happyco_json/models/v1_asset.rb +14 -5
- data/lib/happyco_json/models/v1_create_accounts_request.rb +1 -1
- data/lib/happyco_json/models/v1_create_accounts_response.rb +1 -1
- data/lib/happyco_json/models/v1_create_assets_request.rb +1 -1
- data/lib/happyco_json/models/v1_create_assets_response.rb +1 -1
- data/lib/happyco_json/models/v1_create_delegated_inspection_link_request.rb +1 -1
- data/lib/happyco_json/models/v1_create_delegated_inspection_link_response.rb +1 -1
- data/lib/happyco_json/models/v1_create_delegated_inspection_links_request.rb +1 -1
- data/lib/happyco_json/models/v1_create_delegated_inspection_links_response.rb +1 -1
- data/lib/happyco_json/models/v1_create_folders_request.rb +1 -1
- data/lib/happyco_json/models/v1_create_folders_response.rb +1 -1
- data/lib/happyco_json/models/v1_create_inspections_request.rb +1 -1
- data/lib/happyco_json/models/v1_create_inspections_response.rb +1 -1
- data/lib/happyco_json/models/v1_create_templates_request.rb +1 -1
- data/lib/happyco_json/models/v1_create_templates_response.rb +1 -1
- data/lib/happyco_json/models/v1_date.rb +1 -1
- data/lib/happyco_json/models/v1_date_time.rb +1 -1
- data/lib/happyco_json/models/v1_event.rb +1 -1
- data/lib/happyco_json/models/v1_event_ack.rb +219 -0
- data/lib/happyco_json/models/v1_event_handler_options.rb +199 -0
- data/lib/happyco_json/models/v1_float_array.rb +1 -1
- data/lib/happyco_json/models/v1_folder.rb +1 -1
- data/lib/happyco_json/models/v1_folder_type.rb +1 -1
- data/lib/happyco_json/models/v1_footer_field.rb +1 -1
- data/lib/happyco_json/models/v1_header_field.rb +1 -1
- data/lib/happyco_json/models/v1_inspection.rb +15 -5
- data/lib/happyco_json/models/v1_inspection_data.rb +1 -1
- data/lib/happyco_json/models/v1_inspection_status_changes_event.rb +1 -1
- data/lib/happyco_json/models/v1_inspection_status_changes_event_ack_response.rb +1 -1
- data/lib/happyco_json/models/v1_integration_id.rb +1 -1
- data/lib/happyco_json/models/v1_item.rb +1 -1
- data/lib/happyco_json/models/v1_list_accounts_request.rb +1 -1
- data/lib/happyco_json/models/v1_list_accounts_response.rb +1 -1
- data/lib/happyco_json/models/v1_list_assets_request.rb +1 -1
- data/lib/happyco_json/models/v1_list_assets_response.rb +1 -1
- data/lib/happyco_json/models/v1_list_folders_request.rb +1 -1
- data/lib/happyco_json/models/v1_list_folders_response.rb +1 -1
- data/lib/happyco_json/models/v1_list_inspections_request.rb +1 -1
- data/lib/happyco_json/models/v1_list_inspections_response.rb +1 -1
- data/lib/happyco_json/models/v1_list_reports_request.rb +1 -1
- data/lib/happyco_json/models/v1_list_reports_response.rb +1 -1
- data/lib/happyco_json/models/v1_list_templates_request.rb +1 -1
- data/lib/happyco_json/models/v1_list_templates_response.rb +1 -1
- data/lib/happyco_json/models/v1_list_users_request.rb +1 -1
- data/lib/happyco_json/models/v1_list_users_response.rb +1 -1
- data/lib/happyco_json/models/v1_paging.rb +1 -1
- data/lib/happyco_json/models/v1_paging_response.rb +1 -1
- data/lib/happyco_json/models/v1_photo.rb +1 -1
- data/lib/happyco_json/models/v1_property.rb +1 -1
- data/lib/happyco_json/models/v1_rating_checkbox.rb +15 -5
- data/lib/happyco_json/models/v1_rating_control.rb +1 -1
- data/lib/happyco_json/models/v1_rating_drop_down.rb +1 -1
- data/lib/happyco_json/models/v1_rating_drop_down_option.rb +15 -5
- data/lib/happyco_json/models/v1_rating_group.rb +27 -8
- data/lib/happyco_json/models/v1_rating_image.rb +1 -1
- data/lib/happyco_json/models/v1_rating_radio_group.rb +1 -1
- data/lib/happyco_json/models/v1_rating_radio_group_option.rb +15 -5
- data/lib/happyco_json/models/v1_rating_values.rb +1 -1
- data/lib/happyco_json/models/v1_report.rb +1 -1
- data/lib/happyco_json/models/v1_reports_created_event.rb +1 -1
- data/lib/happyco_json/models/v1_reports_created_event_ack_response.rb +1 -1
- data/lib/happyco_json/models/v1_scheduled_inspection.rb +1 -1
- data/lib/happyco_json/models/v1_section.rb +1 -1
- data/lib/happyco_json/models/v1_set_assets_archived_request.rb +1 -1
- data/lib/happyco_json/models/v1_set_assets_archived_response.rb +1 -1
- data/lib/happyco_json/models/v1_set_inspections_archived_request.rb +1 -1
- data/lib/happyco_json/models/v1_set_inspections_archived_response.rb +1 -1
- data/lib/happyco_json/models/v1_set_templates_archived_request.rb +1 -1
- data/lib/happyco_json/models/v1_set_templates_archived_response.rb +1 -1
- data/lib/happyco_json/models/v1_signatory.rb +1 -1
- data/lib/happyco_json/models/v1_string_array.rb +1 -1
- data/lib/happyco_json/models/v1_template.rb +1 -1
- data/lib/happyco_json/models/v1_unit.rb +1 -1
- data/lib/happyco_json/models/v1_update_account_statuses_request.rb +1 -1
- data/lib/happyco_json/models/v1_update_account_statuses_response.rb +1 -1
- data/lib/happyco_json/models/v1_update_accounts_request.rb +1 -1
- data/lib/happyco_json/models/v1_update_accounts_response.rb +1 -1
- data/lib/happyco_json/models/v1_update_assets_request.rb +1 -1
- data/lib/happyco_json/models/v1_update_assets_response.rb +1 -1
- data/lib/happyco_json/models/v1_update_folder_statuses_request.rb +1 -1
- data/lib/happyco_json/models/v1_update_folder_statuses_response.rb +1 -1
- data/lib/happyco_json/models/v1_update_folders_request.rb +1 -1
- data/lib/happyco_json/models/v1_update_folders_response.rb +1 -1
- data/lib/happyco_json/models/v1_update_inspections_request.rb +1 -1
- data/lib/happyco_json/models/v1_update_inspections_response.rb +1 -1
- data/lib/happyco_json/models/v1_update_templates_request.rb +1 -1
- data/lib/happyco_json/models/v1_update_templates_response.rb +1 -1
- data/lib/happyco_json/models/v1_update_user_statuses_request.rb +1 -1
- data/lib/happyco_json/models/v1_update_user_statuses_response.rb +1 -1
- data/lib/happyco_json/models/v1_update_users_request.rb +1 -1
- data/lib/happyco_json/models/v1_update_users_response.rb +1 -1
- data/lib/happyco_json/models/v1_user.rb +1 -1
- data/lib/happyco_json/version.rb +2 -2
- data/lib/happyco_json.rb +5 -1
- data/spec/api/account_provisioning_service_api_spec.rb +1 -1
- data/spec/api/account_service_api_spec.rb +1 -1
- data/spec/api/account_users_service_api_spec.rb +1 -1
- data/spec/api/asset_service_api_spec.rb +1 -1
- data/spec/api/folder_service_api_spec.rb +1 -1
- data/spec/api/inspection_service_api_spec.rb +1 -1
- data/spec/api/report_service_api_spec.rb +1 -1
- data/spec/api/template_service_api_spec.rb +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/create_accounts_request_account_with_admin_spec.rb +1 -1
- data/spec/models/create_accounts_response_account_id_with_admin_id_spec.rb +1 -1
- data/spec/models/inspection_status_change_status_spec.rb +1 -1
- data/spec/models/inspection_status_changes_event_inspection_status_change_spec.rb +1 -1
- data/spec/models/protobuf_any_spec.rb +59 -0
- data/spec/models/reports_created_event_report_created_spec.rb +1 -1
- data/spec/models/runtime_stream_error_spec.rb +77 -0
- data/spec/models/update_accounts_request_account_with_admin_id_spec.rb +1 -1
- data/spec/models/v1_account_spec.rb +1 -1
- data/spec/models/v1_add_asset_photo_request_spec.rb +1 -1
- data/spec/models/v1_add_asset_photo_response_spec.rb +1 -1
- data/spec/models/v1_add_inspection_photo_request_spec.rb +1 -1
- data/spec/models/v1_add_inspection_photo_response_spec.rb +1 -1
- data/spec/models/v1_add_inspection_photos_request_spec.rb +1 -1
- data/spec/models/v1_add_inspection_photos_response_spec.rb +1 -1
- data/spec/models/v1_add_users_request_spec.rb +1 -1
- data/spec/models/v1_add_users_response_spec.rb +1 -1
- data/spec/models/v1_asset_spec.rb +7 -1
- data/spec/models/v1_create_accounts_request_spec.rb +1 -1
- data/spec/models/v1_create_accounts_response_spec.rb +1 -1
- data/spec/models/v1_create_assets_request_spec.rb +1 -1
- data/spec/models/v1_create_assets_response_spec.rb +1 -1
- data/spec/models/v1_create_delegated_inspection_link_request_spec.rb +1 -1
- data/spec/models/v1_create_delegated_inspection_link_response_spec.rb +1 -1
- data/spec/models/v1_create_delegated_inspection_links_request_spec.rb +1 -1
- data/spec/models/v1_create_delegated_inspection_links_response_spec.rb +1 -1
- data/spec/models/v1_create_folders_request_spec.rb +1 -1
- data/spec/models/v1_create_folders_response_spec.rb +1 -1
- data/spec/models/v1_create_inspections_request_spec.rb +1 -1
- data/spec/models/v1_create_inspections_response_spec.rb +1 -1
- data/spec/models/v1_create_templates_request_spec.rb +1 -1
- data/spec/models/v1_create_templates_response_spec.rb +1 -1
- data/spec/models/v1_date_spec.rb +1 -1
- data/spec/models/v1_date_time_spec.rb +1 -1
- data/spec/models/v1_event_ack_spec.rb +65 -0
- data/spec/models/v1_event_handler_options_spec.rb +53 -0
- data/spec/models/v1_event_spec.rb +1 -1
- data/spec/models/v1_float_array_spec.rb +1 -1
- data/spec/models/v1_folder_spec.rb +1 -1
- data/spec/models/v1_folder_type_spec.rb +1 -1
- data/spec/models/v1_footer_field_spec.rb +1 -1
- data/spec/models/v1_header_field_spec.rb +1 -1
- data/spec/models/v1_inspection_data_spec.rb +1 -1
- data/spec/models/v1_inspection_spec.rb +7 -1
- data/spec/models/v1_inspection_status_changes_event_ack_response_spec.rb +1 -1
- data/spec/models/v1_inspection_status_changes_event_spec.rb +1 -1
- data/spec/models/v1_integration_id_spec.rb +1 -1
- data/spec/models/v1_item_spec.rb +1 -1
- data/spec/models/v1_list_accounts_request_spec.rb +1 -1
- data/spec/models/v1_list_accounts_response_spec.rb +1 -1
- data/spec/models/v1_list_assets_request_spec.rb +1 -1
- data/spec/models/v1_list_assets_response_spec.rb +1 -1
- data/spec/models/v1_list_folders_request_spec.rb +1 -1
- data/spec/models/v1_list_folders_response_spec.rb +1 -1
- data/spec/models/v1_list_inspections_request_spec.rb +1 -1
- data/spec/models/v1_list_inspections_response_spec.rb +1 -1
- data/spec/models/v1_list_reports_request_spec.rb +1 -1
- data/spec/models/v1_list_reports_response_spec.rb +1 -1
- data/spec/models/v1_list_templates_request_spec.rb +1 -1
- data/spec/models/v1_list_templates_response_spec.rb +1 -1
- data/spec/models/v1_list_users_request_spec.rb +1 -1
- data/spec/models/v1_list_users_response_spec.rb +1 -1
- data/spec/models/v1_paging_response_spec.rb +1 -1
- data/spec/models/v1_paging_spec.rb +1 -1
- data/spec/models/v1_photo_spec.rb +1 -1
- data/spec/models/v1_property_spec.rb +1 -1
- data/spec/models/v1_rating_checkbox_spec.rb +7 -1
- data/spec/models/v1_rating_control_spec.rb +1 -1
- data/spec/models/v1_rating_drop_down_option_spec.rb +7 -1
- data/spec/models/v1_rating_drop_down_spec.rb +1 -1
- data/spec/models/v1_rating_group_spec.rb +13 -1
- data/spec/models/v1_rating_image_spec.rb +1 -1
- data/spec/models/v1_rating_radio_group_option_spec.rb +7 -1
- data/spec/models/v1_rating_radio_group_spec.rb +1 -1
- data/spec/models/v1_rating_values_spec.rb +1 -1
- data/spec/models/v1_report_spec.rb +1 -1
- data/spec/models/v1_reports_created_event_ack_response_spec.rb +1 -1
- data/spec/models/v1_reports_created_event_spec.rb +1 -1
- data/spec/models/v1_scheduled_inspection_spec.rb +1 -1
- data/spec/models/v1_section_spec.rb +1 -1
- data/spec/models/v1_set_assets_archived_request_spec.rb +1 -1
- data/spec/models/v1_set_assets_archived_response_spec.rb +1 -1
- data/spec/models/v1_set_inspections_archived_request_spec.rb +1 -1
- data/spec/models/v1_set_inspections_archived_response_spec.rb +1 -1
- data/spec/models/v1_set_templates_archived_request_spec.rb +1 -1
- data/spec/models/v1_set_templates_archived_response_spec.rb +1 -1
- data/spec/models/v1_signatory_spec.rb +1 -1
- data/spec/models/v1_string_array_spec.rb +1 -1
- data/spec/models/v1_template_spec.rb +1 -1
- data/spec/models/v1_unit_spec.rb +1 -1
- data/spec/models/v1_update_account_statuses_request_spec.rb +1 -1
- data/spec/models/v1_update_account_statuses_response_spec.rb +1 -1
- data/spec/models/v1_update_accounts_request_spec.rb +1 -1
- data/spec/models/v1_update_accounts_response_spec.rb +1 -1
- data/spec/models/v1_update_assets_request_spec.rb +1 -1
- data/spec/models/v1_update_assets_response_spec.rb +1 -1
- data/spec/models/v1_update_folder_statuses_request_spec.rb +1 -1
- data/spec/models/v1_update_folder_statuses_response_spec.rb +1 -1
- data/spec/models/v1_update_folders_request_spec.rb +1 -1
- data/spec/models/v1_update_folders_response_spec.rb +1 -1
- data/spec/models/v1_update_inspections_request_spec.rb +1 -1
- data/spec/models/v1_update_inspections_response_spec.rb +1 -1
- data/spec/models/v1_update_templates_request_spec.rb +1 -1
- data/spec/models/v1_update_templates_response_spec.rb +1 -1
- data/spec/models/v1_update_user_statuses_request_spec.rb +1 -1
- data/spec/models/v1_update_user_statuses_response_spec.rb +1 -1
- data/spec/models/v1_update_users_request_spec.rb +1 -1
- data/spec/models/v1_update_users_response_spec.rb +1 -1
- data/spec/models/v1_user_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +111 -95
@@ -0,0 +1,219 @@
|
|
1
|
+
=begin
|
2
|
+
#Merged swaggers
|
3
|
+
|
4
|
+
#All happy services merged together
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.3.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'date'
|
25
|
+
|
26
|
+
module HappyCo
|
27
|
+
|
28
|
+
class V1EventAck
|
29
|
+
attr_accessor :event_ids
|
30
|
+
|
31
|
+
attr_accessor :ack
|
32
|
+
|
33
|
+
attr_accessor :extend_timeout_seconds
|
34
|
+
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
:'event_ids' => :'event_ids',
|
40
|
+
:'ack' => :'ack',
|
41
|
+
:'extend_timeout_seconds' => :'extend_timeout_seconds'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.swagger_types
|
47
|
+
{
|
48
|
+
:'event_ids' => :'Array<Integer>',
|
49
|
+
:'ack' => :'BOOLEAN',
|
50
|
+
:'extend_timeout_seconds' => :'Integer'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Initializes the object
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
56
|
+
def initialize(attributes = {})
|
57
|
+
return unless attributes.is_a?(Hash)
|
58
|
+
|
59
|
+
# convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
61
|
+
|
62
|
+
if attributes.has_key?(:'event_ids')
|
63
|
+
if (value = attributes[:'event_ids']).is_a?(Array)
|
64
|
+
self.event_ids = value
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.has_key?(:'ack')
|
69
|
+
self.ack = attributes[:'ack']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.has_key?(:'extend_timeout_seconds')
|
73
|
+
self.extend_timeout_seconds = attributes[:'extend_timeout_seconds']
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properies with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
return invalid_properties
|
83
|
+
end
|
84
|
+
|
85
|
+
# Check to see if the all the properties in the model are valid
|
86
|
+
# @return true if the model is valid
|
87
|
+
def valid?
|
88
|
+
return true
|
89
|
+
end
|
90
|
+
|
91
|
+
# Checks equality by comparing each attribute.
|
92
|
+
# @param [Object] Object to be compared
|
93
|
+
def ==(o)
|
94
|
+
return true if self.equal?(o)
|
95
|
+
self.class == o.class &&
|
96
|
+
event_ids == o.event_ids &&
|
97
|
+
ack == o.ack &&
|
98
|
+
extend_timeout_seconds == o.extend_timeout_seconds
|
99
|
+
end
|
100
|
+
|
101
|
+
# @see the `==` method
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def eql?(o)
|
104
|
+
self == o
|
105
|
+
end
|
106
|
+
|
107
|
+
# Calculates hash code according to all attributes.
|
108
|
+
# @return [Fixnum] Hash code
|
109
|
+
def hash
|
110
|
+
[event_ids, ack, extend_timeout_seconds].hash
|
111
|
+
end
|
112
|
+
|
113
|
+
# Builds the object from hash
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
+
# @return [Object] Returns the model itself
|
116
|
+
def build_from_hash(attributes)
|
117
|
+
return nil unless attributes.is_a?(Hash)
|
118
|
+
self.class.swagger_types.each_pair do |key, type|
|
119
|
+
if type =~ /^Array<(.*)>/i
|
120
|
+
# check to ensure the input is an array given that the the attribute
|
121
|
+
# is documented as an array but the input is not
|
122
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
123
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
124
|
+
end
|
125
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
126
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
127
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
128
|
+
end
|
129
|
+
|
130
|
+
self
|
131
|
+
end
|
132
|
+
|
133
|
+
# Deserializes the data based on type
|
134
|
+
# @param string type Data type
|
135
|
+
# @param string value Value to be deserialized
|
136
|
+
# @return [Object] Deserialized data
|
137
|
+
def _deserialize(type, value)
|
138
|
+
case type.to_sym
|
139
|
+
when :DateTime
|
140
|
+
DateTime.parse(value)
|
141
|
+
when :Date
|
142
|
+
Date.parse(value)
|
143
|
+
when :String
|
144
|
+
value.to_s
|
145
|
+
when :Integer
|
146
|
+
value.to_i
|
147
|
+
when :Float
|
148
|
+
value.to_f
|
149
|
+
when :BOOLEAN
|
150
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
151
|
+
true
|
152
|
+
else
|
153
|
+
false
|
154
|
+
end
|
155
|
+
when :Object
|
156
|
+
# generic object (usually a Hash), return directly
|
157
|
+
value
|
158
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
159
|
+
inner_type = Regexp.last_match[:inner_type]
|
160
|
+
value.map { |v| _deserialize(inner_type, v) }
|
161
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
162
|
+
k_type = Regexp.last_match[:k_type]
|
163
|
+
v_type = Regexp.last_match[:v_type]
|
164
|
+
{}.tap do |hash|
|
165
|
+
value.each do |k, v|
|
166
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
else # model
|
170
|
+
temp_model = HappyCo.const_get(type).new
|
171
|
+
temp_model.build_from_hash(value)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# Returns the string representation of the object
|
176
|
+
# @return [String] String presentation of the object
|
177
|
+
def to_s
|
178
|
+
to_hash.to_s
|
179
|
+
end
|
180
|
+
|
181
|
+
# to_body is an alias to to_hash (backward compatibility)
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
183
|
+
def to_body
|
184
|
+
to_hash
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the object in the form of hash
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_hash
|
190
|
+
hash = {}
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
192
|
+
value = self.send(attr)
|
193
|
+
next if value.nil?
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map{ |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
@@ -0,0 +1,199 @@
|
|
1
|
+
=begin
|
2
|
+
#Merged swaggers
|
3
|
+
|
4
|
+
#All happy services merged together
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.3.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'date'
|
25
|
+
|
26
|
+
module HappyCo
|
27
|
+
|
28
|
+
class V1EventHandlerOptions
|
29
|
+
attr_accessor :ack_timeout_seconds
|
30
|
+
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
:'ack_timeout_seconds' => :'ack_timeout_seconds'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'ack_timeout_seconds' => :'Integer'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
return unless attributes.is_a?(Hash)
|
50
|
+
|
51
|
+
# convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
53
|
+
|
54
|
+
if attributes.has_key?(:'ack_timeout_seconds')
|
55
|
+
self.ack_timeout_seconds = attributes[:'ack_timeout_seconds']
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
61
|
+
# @return Array for valid properies with the reasons
|
62
|
+
def list_invalid_properties
|
63
|
+
invalid_properties = Array.new
|
64
|
+
return invalid_properties
|
65
|
+
end
|
66
|
+
|
67
|
+
# Check to see if the all the properties in the model are valid
|
68
|
+
# @return true if the model is valid
|
69
|
+
def valid?
|
70
|
+
return true
|
71
|
+
end
|
72
|
+
|
73
|
+
# Checks equality by comparing each attribute.
|
74
|
+
# @param [Object] Object to be compared
|
75
|
+
def ==(o)
|
76
|
+
return true if self.equal?(o)
|
77
|
+
self.class == o.class &&
|
78
|
+
ack_timeout_seconds == o.ack_timeout_seconds
|
79
|
+
end
|
80
|
+
|
81
|
+
# @see the `==` method
|
82
|
+
# @param [Object] Object to be compared
|
83
|
+
def eql?(o)
|
84
|
+
self == o
|
85
|
+
end
|
86
|
+
|
87
|
+
# Calculates hash code according to all attributes.
|
88
|
+
# @return [Fixnum] Hash code
|
89
|
+
def hash
|
90
|
+
[ack_timeout_seconds].hash
|
91
|
+
end
|
92
|
+
|
93
|
+
# Builds the object from hash
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
95
|
+
# @return [Object] Returns the model itself
|
96
|
+
def build_from_hash(attributes)
|
97
|
+
return nil unless attributes.is_a?(Hash)
|
98
|
+
self.class.swagger_types.each_pair do |key, type|
|
99
|
+
if type =~ /^Array<(.*)>/i
|
100
|
+
# check to ensure the input is an array given that the the attribute
|
101
|
+
# is documented as an array but the input is not
|
102
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
103
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
104
|
+
end
|
105
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
106
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
107
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
108
|
+
end
|
109
|
+
|
110
|
+
self
|
111
|
+
end
|
112
|
+
|
113
|
+
# Deserializes the data based on type
|
114
|
+
# @param string type Data type
|
115
|
+
# @param string value Value to be deserialized
|
116
|
+
# @return [Object] Deserialized data
|
117
|
+
def _deserialize(type, value)
|
118
|
+
case type.to_sym
|
119
|
+
when :DateTime
|
120
|
+
DateTime.parse(value)
|
121
|
+
when :Date
|
122
|
+
Date.parse(value)
|
123
|
+
when :String
|
124
|
+
value.to_s
|
125
|
+
when :Integer
|
126
|
+
value.to_i
|
127
|
+
when :Float
|
128
|
+
value.to_f
|
129
|
+
when :BOOLEAN
|
130
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
131
|
+
true
|
132
|
+
else
|
133
|
+
false
|
134
|
+
end
|
135
|
+
when :Object
|
136
|
+
# generic object (usually a Hash), return directly
|
137
|
+
value
|
138
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
139
|
+
inner_type = Regexp.last_match[:inner_type]
|
140
|
+
value.map { |v| _deserialize(inner_type, v) }
|
141
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
142
|
+
k_type = Regexp.last_match[:k_type]
|
143
|
+
v_type = Regexp.last_match[:v_type]
|
144
|
+
{}.tap do |hash|
|
145
|
+
value.each do |k, v|
|
146
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
else # model
|
150
|
+
temp_model = HappyCo.const_get(type).new
|
151
|
+
temp_model.build_from_hash(value)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# Returns the string representation of the object
|
156
|
+
# @return [String] String presentation of the object
|
157
|
+
def to_s
|
158
|
+
to_hash.to_s
|
159
|
+
end
|
160
|
+
|
161
|
+
# to_body is an alias to to_hash (backward compatibility)
|
162
|
+
# @return [Hash] Returns the object in the form of hash
|
163
|
+
def to_body
|
164
|
+
to_hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns the object in the form of hash
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
169
|
+
def to_hash
|
170
|
+
hash = {}
|
171
|
+
self.class.attribute_map.each_pair do |attr, param|
|
172
|
+
value = self.send(attr)
|
173
|
+
next if value.nil?
|
174
|
+
hash[param] = _to_hash(value)
|
175
|
+
end
|
176
|
+
hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Outputs non-array value in the form of hash
|
180
|
+
# For object, use to_hash. Otherwise, just return the value
|
181
|
+
# @param [Object] value Any valid value
|
182
|
+
# @return [Hash] Returns the value in the form of hash
|
183
|
+
def _to_hash(value)
|
184
|
+
if value.is_a?(Array)
|
185
|
+
value.compact.map{ |v| _to_hash(v) }
|
186
|
+
elsif value.is_a?(Hash)
|
187
|
+
{}.tap do |hash|
|
188
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
189
|
+
end
|
190
|
+
elsif value.respond_to? :to_hash
|
191
|
+
value.to_hash
|
192
|
+
else
|
193
|
+
value
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
end
|
198
|
+
|
199
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#All happy services merged together
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.3.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -51,6 +51,9 @@ module HappyCo
|
|
51
51
|
|
52
52
|
attr_accessor :update_time
|
53
53
|
|
54
|
+
# * Photo Quality is an override setting sent to clients that informs them what level of Photo Quality they should enforce, regardless of user settings on the client. The default value is 0 which denotes that the client should use the user's settings, otherwise the higher the value the higher Photo Quality should be enforced by the client.
|
55
|
+
attr_accessor :photo_quality
|
56
|
+
|
54
57
|
|
55
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
56
59
|
def self.attribute_map
|
@@ -64,7 +67,8 @@ module HappyCo
|
|
64
67
|
:'scheduled' => :'scheduled',
|
65
68
|
:'in_progress' => :'in_progress',
|
66
69
|
:'completed' => :'completed',
|
67
|
-
:'update_time' => :'update_time'
|
70
|
+
:'update_time' => :'update_time',
|
71
|
+
:'photo_quality' => :'photo_quality'
|
68
72
|
}
|
69
73
|
end
|
70
74
|
|
@@ -80,7 +84,8 @@ module HappyCo
|
|
80
84
|
:'scheduled' => :'V1ScheduledInspection',
|
81
85
|
:'in_progress' => :'V1InspectionData',
|
82
86
|
:'completed' => :'V1InspectionData',
|
83
|
-
:'update_time' => :'V1DateTime'
|
87
|
+
:'update_time' => :'V1DateTime',
|
88
|
+
:'photo_quality' => :'Integer'
|
84
89
|
}
|
85
90
|
end
|
86
91
|
|
@@ -132,6 +137,10 @@ module HappyCo
|
|
132
137
|
self.update_time = attributes[:'update_time']
|
133
138
|
end
|
134
139
|
|
140
|
+
if attributes.has_key?(:'photo_quality')
|
141
|
+
self.photo_quality = attributes[:'photo_quality']
|
142
|
+
end
|
143
|
+
|
135
144
|
end
|
136
145
|
|
137
146
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -161,7 +170,8 @@ module HappyCo
|
|
161
170
|
scheduled == o.scheduled &&
|
162
171
|
in_progress == o.in_progress &&
|
163
172
|
completed == o.completed &&
|
164
|
-
update_time == o.update_time
|
173
|
+
update_time == o.update_time &&
|
174
|
+
photo_quality == o.photo_quality
|
165
175
|
end
|
166
176
|
|
167
177
|
# @see the `==` method
|
@@ -173,7 +183,7 @@ module HappyCo
|
|
173
183
|
# Calculates hash code according to all attributes.
|
174
184
|
# @return [Fixnum] Hash code
|
175
185
|
def hash
|
176
|
-
[id, account_id, folder_id, asset_id, template_id, template_outline, scheduled, in_progress, completed, update_time].hash
|
186
|
+
[id, account_id, folder_id, asset_id, template_id, template_outline, scheduled, in_progress, completed, update_time, photo_quality].hash
|
177
187
|
end
|
178
188
|
|
179
189
|
# Builds the object from hash
|