vgen-apimatic-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +152 -0
- data/bin/console +15 -0
- data/lib/videogen/api_helper.rb +10 -0
- data/lib/videogen/apis/account_api.rb +31 -0
- data/lib/videogen/apis/assistant_api.rb +191 -0
- data/lib/videogen/apis/base_api.rb +67 -0
- data/lib/videogen/apis/entities_api.rb +230 -0
- data/lib/videogen/apis/files_api.rb +263 -0
- data/lib/videogen/apis/projects_api.rb +355 -0
- data/lib/videogen/apis/resources_api.rb +81 -0
- data/lib/videogen/apis/text_api.rb +39 -0
- data/lib/videogen/apis/tools_api.rb +494 -0
- data/lib/videogen/apis/webhooks_api.rb +94 -0
- data/lib/videogen/apis/workflows_api.rb +217 -0
- data/lib/videogen/client.rb +127 -0
- data/lib/videogen/configuration.rb +166 -0
- data/lib/videogen/exceptions/api_exception.rb +21 -0
- data/lib/videogen/http/api_response.rb +19 -0
- data/lib/videogen/http/auth/oauth_2.rb +53 -0
- data/lib/videogen/http/http_call_back.rb +10 -0
- data/lib/videogen/http/http_method_enum.rb +10 -0
- data/lib/videogen/http/http_request.rb +10 -0
- data/lib/videogen/http/http_response.rb +10 -0
- data/lib/videogen/http/proxy_settings.rb +22 -0
- data/lib/videogen/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/videogen/logging/sdk_logger.rb +17 -0
- data/lib/videogen/models/act_on_assistant_action_request.rb +77 -0
- data/lib/videogen/models/act_on_assistant_action_request_decision.rb +36 -0
- data/lib/videogen/models/act_on_assistant_action_response.rb +77 -0
- data/lib/videogen/models/add_entity_reference_request.rb +95 -0
- data/lib/videogen/models/api_error.rb +137 -0
- data/lib/videogen/models/aspect_ratio.rb +105 -0
- data/lib/videogen/models/aspect_ratio1.rb +82 -0
- data/lib/videogen/models/aspect_ratio2.rb +82 -0
- data/lib/videogen/models/aspect_ratio4.rb +83 -0
- data/lib/videogen/models/assistant_action.rb +148 -0
- data/lib/videogen/models/assistant_action_detail.rb +108 -0
- data/lib/videogen/models/assistant_action_detail1.rb +117 -0
- data/lib/videogen/models/assistant_action_kind.rb +52 -0
- data/lib/videogen/models/assistant_message.rb +167 -0
- data/lib/videogen/models/assistant_message1.rb +259 -0
- data/lib/videogen/models/assistant_message_attachment.rb +101 -0
- data/lib/videogen/models/assistant_message_status.rb +49 -0
- data/lib/videogen/models/assistant_workflow_suggestion.rb +133 -0
- data/lib/videogen/models/base_model.rb +110 -0
- data/lib/videogen/models/content_policy_config.rb +80 -0
- data/lib/videogen/models/create_entity_request.rb +96 -0
- data/lib/videogen/models/create_entity_request_entity_type.rb +47 -0
- data/lib/videogen/models/create_file_upload_request.rb +125 -0
- data/lib/videogen/models/create_timeline_interchange_request.rb +93 -0
- data/lib/videogen/models/create_timeline_interchange_response.rb +76 -0
- data/lib/videogen/models/create_webhook_endpoint_request.rb +94 -0
- data/lib/videogen/models/end_screen_mode.rb +43 -0
- data/lib/videogen/models/entity.rb +166 -0
- data/lib/videogen/models/entity_actor_config.rb +101 -0
- data/lib/videogen/models/entity_archive_response.rb +82 -0
- data/lib/videogen/models/entity_entity_type.rb +47 -0
- data/lib/videogen/models/entity_reference.rb +93 -0
- data/lib/videogen/models/error_requirement.rb +101 -0
- data/lib/videogen/models/executed_tool.rb +148 -0
- data/lib/videogen/models/export_delivery_destination.rb +110 -0
- data/lib/videogen/models/export_delivery_destination_type.rb +36 -0
- data/lib/videogen/models/export_project_quality.rb +44 -0
- data/lib/videogen/models/export_project_request.rb +124 -0
- data/lib/videogen/models/export_project_response.rb +76 -0
- data/lib/videogen/models/file_analysis_metadata.rb +112 -0
- data/lib/videogen/models/file_analysis_metadata1.rb +112 -0
- data/lib/videogen/models/file_analysis_metadata_analysis_loading_state.rb +48 -0
- data/lib/videogen/models/file_info.rb +386 -0
- data/lib/videogen/models/file_info1.rb +387 -0
- data/lib/videogen/models/file_info_scope.rb +54 -0
- data/lib/videogen/models/file_source.rb +134 -0
- data/lib/videogen/models/file_source_status.rb +46 -0
- data/lib/videogen/models/file_type.rb +57 -0
- data/lib/videogen/models/file_type1.rb +56 -0
- data/lib/videogen/models/file_type2.rb +57 -0
- data/lib/videogen/models/file_upload_response.rb +82 -0
- data/lib/videogen/models/generate_avatar_request.rb +149 -0
- data/lib/videogen/models/generate_image_request.rb +187 -0
- data/lib/videogen/models/generate_motion_graphic_request.rb +193 -0
- data/lib/videogen/models/generate_music_request.rb +111 -0
- data/lib/videogen/models/generate_sound_effect_request.rb +139 -0
- data/lib/videogen/models/generate_text_request.rb +120 -0
- data/lib/videogen/models/generate_text_response.rb +72 -0
- data/lib/videogen/models/generate_video_clip_request.rb +297 -0
- data/lib/videogen/models/get_assistant_response.rb +135 -0
- data/lib/videogen/models/get_files_response.rb +102 -0
- data/lib/videogen/models/image_asset_request.rb +125 -0
- data/lib/videogen/models/job_status.rb +51 -0
- data/lib/videogen/models/language.rb +83 -0
- data/lib/videogen/models/language_list_response.rb +83 -0
- data/lib/videogen/models/list_entities_response.rb +103 -0
- data/lib/videogen/models/list_project_exports_response.rb +104 -0
- data/lib/videogen/models/list_projects_response.rb +105 -0
- data/lib/videogen/models/list_remix_actions_response.rb +103 -0
- data/lib/videogen/models/me_response.rb +114 -0
- data/lib/videogen/models/model_quality.rb +51 -0
- data/lib/videogen/models/model_quality1.rb +47 -0
- data/lib/videogen/models/model_quality10.rb +46 -0
- data/lib/videogen/models/model_quality11.rb +46 -0
- data/lib/videogen/models/model_quality12.rb +45 -0
- data/lib/videogen/models/model_quality13.rb +46 -0
- data/lib/videogen/models/model_quality2.rb +46 -0
- data/lib/videogen/models/model_quality3.rb +46 -0
- data/lib/videogen/models/model_quality4.rb +48 -0
- data/lib/videogen/models/model_quality9.rb +47 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode.rb +44 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode1.rb +40 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode2.rb +41 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode3.rb +40 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode4.rb +40 -0
- data/lib/videogen/models/motion_graphic_sub_tool_modes.rb +114 -0
- data/lib/videogen/models/motion_graphic_sub_tool_modes1.rb +116 -0
- data/lib/videogen/models/project_export.rb +207 -0
- data/lib/videogen/models/project_response.rb +151 -0
- data/lib/videogen/models/project_response_status.rb +36 -0
- data/lib/videogen/models/prompt_to_video_clip_request.rb +155 -0
- data/lib/videogen/models/pronunciation_replacement.rb +82 -0
- data/lib/videogen/models/remix_action.rb +111 -0
- data/lib/videogen/models/remix_action1.rb +123 -0
- data/lib/videogen/models/remix_action10.rb +115 -0
- data/lib/videogen/models/remix_action11.rb +148 -0
- data/lib/videogen/models/remix_action12.rb +89 -0
- data/lib/videogen/models/remix_action13.rb +105 -0
- data/lib/videogen/models/remix_action14.rb +138 -0
- data/lib/videogen/models/remix_action2.rb +101 -0
- data/lib/videogen/models/remix_action3.rb +85 -0
- data/lib/videogen/models/remix_action4.rb +120 -0
- data/lib/videogen/models/remix_action5.rb +88 -0
- data/lib/videogen/models/remix_action6.rb +106 -0
- data/lib/videogen/models/remix_action7.rb +137 -0
- data/lib/videogen/models/remix_action8.rb +131 -0
- data/lib/videogen/models/remix_action9.rb +120 -0
- data/lib/videogen/models/remix_action_discriminator_mapping_set_logo_position.rb +53 -0
- data/lib/videogen/models/remix_action_run.rb +150 -0
- data/lib/videogen/models/remix_action_type.rb +88 -0
- data/lib/videogen/models/remix_project_request.rb +105 -0
- data/lib/videogen/models/remix_project_response.rb +101 -0
- data/lib/videogen/models/remix_transition_style.rb +58 -0
- data/lib/videogen/models/remove_entity_reference_request.rb +73 -0
- data/lib/videogen/models/scene_description_range.rb +121 -0
- data/lib/videogen/models/script_to_video_request.rb +309 -0
- data/lib/videogen/models/search_files_request.rb +96 -0
- data/lib/videogen/models/search_files_response.rb +82 -0
- data/lib/videogen/models/search_files_result.rb +85 -0
- data/lib/videogen/models/send_assistant_message_request.rb +73 -0
- data/lib/videogen/models/send_assistant_message_response.rb +76 -0
- data/lib/videogen/models/slideshow_to_video_request.rb +276 -0
- data/lib/videogen/models/start_assistant_chat_request.rb +88 -0
- data/lib/videogen/models/start_assistant_chat_response.rb +105 -0
- data/lib/videogen/models/start_tool_execution_response.rb +76 -0
- data/lib/videogen/models/start_workflow_run_response.rb +141 -0
- data/lib/videogen/models/text_to_speech_request.rb +191 -0
- data/lib/videogen/models/timeline_interchange.rb +210 -0
- data/lib/videogen/models/timeline_interchange_format.rb +47 -0
- data/lib/videogen/models/timeline_interchange_media_delivery.rb +39 -0
- data/lib/videogen/models/tool_execution_list_response.rb +104 -0
- data/lib/videogen/models/tool_success_result.rb +152 -0
- data/lib/videogen/models/transcript.rb +97 -0
- data/lib/videogen/models/transcript_word.rb +93 -0
- data/lib/videogen/models/tts_voice.rb +162 -0
- data/lib/videogen/models/tts_voice_display_gender.rb +40 -0
- data/lib/videogen/models/tts_voice_list_response.rb +103 -0
- data/lib/videogen/models/update_entity_request.rb +88 -0
- data/lib/videogen/models/v1_entities_get_parameters_entity_type.rb +44 -0
- data/lib/videogen/models/video_asset_request.rb +125 -0
- data/lib/videogen/models/visual_pacing.rb +41 -0
- data/lib/videogen/models/voiceover_to_video_request.rb +297 -0
- data/lib/videogen/models/watermark_mode.rb +43 -0
- data/lib/videogen/models/webhook_endpoint.rb +137 -0
- data/lib/videogen/models/webhook_endpoint_list_response.rb +103 -0
- data/lib/videogen/models/webhook_event_name.rb +100 -0
- data/lib/videogen/models/workflow_caption_background_style.rb +133 -0
- data/lib/videogen/models/workflow_caption_background_style_type.rb +41 -0
- data/lib/videogen/models/workflow_caption_style.rb +220 -0
- data/lib/videogen/models/workflow_caption_style_font_weight.rb +64 -0
- data/lib/videogen/models/workflow_caption_style_text_justification.rb +40 -0
- data/lib/videogen/models/workflow_caption_style_vertical_alignment.rb +40 -0
- data/lib/videogen/models/workflow_rgb_color.rb +116 -0
- data/lib/videogen/models/workflow_run.rb +150 -0
- data/lib/videogen/models/workflow_run_list_response.rb +103 -0
- data/lib/videogen/models/workflow_type.rb +52 -0
- data/lib/videogen/models/workflow_type1.rb +52 -0
- data/lib/videogen/models/workflow_visual_style.rb +136 -0
- data/lib/videogen/models/workflow_visual_style_type.rb +38 -0
- data/lib/videogen/utilities/date_time_helper.rb +11 -0
- data/lib/videogen/utilities/file_wrapper.rb +28 -0
- data/lib/videogen/utilities/union_type_lookup.rb +188 -0
- data/lib/videogen.rb +213 -0
- metadata +275 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# Optional extra data for rendering this action inline without opening the
|
|
8
|
+
# app.
|
|
9
|
+
class AssistantActionDetail1 < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Human-readable summary of the proposed plan or edit (for `APPROVE_PLAN`
|
|
14
|
+
# and `APPLY_EDIT` actions).
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :summary
|
|
17
|
+
|
|
18
|
+
# Credits currently remaining on your team (for the usage/credits widget). A
|
|
19
|
+
# whole number of credits.
|
|
20
|
+
# @return [Integer]
|
|
21
|
+
attr_accessor :credits_remaining
|
|
22
|
+
|
|
23
|
+
# Estimated credit cost of the current workflow (for the cost-estimate
|
|
24
|
+
# widget). A whole number of credits.
|
|
25
|
+
# @return [Integer]
|
|
26
|
+
attr_accessor :estimated_credits
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['summary'] = 'summary'
|
|
32
|
+
@_hash['credits_remaining'] = 'creditsRemaining'
|
|
33
|
+
@_hash['estimated_credits'] = 'estimatedCredits'
|
|
34
|
+
@_hash
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# An array for optional fields
|
|
38
|
+
def self.optionals
|
|
39
|
+
%w[
|
|
40
|
+
summary
|
|
41
|
+
credits_remaining
|
|
42
|
+
estimated_credits
|
|
43
|
+
]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# An array for nullable fields
|
|
47
|
+
def self.nullables
|
|
48
|
+
%w[
|
|
49
|
+
summary
|
|
50
|
+
credits_remaining
|
|
51
|
+
estimated_credits
|
|
52
|
+
]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def initialize(summary: SKIP, credits_remaining: SKIP,
|
|
56
|
+
estimated_credits: SKIP, additional_properties: nil)
|
|
57
|
+
# Add additional model properties to the instance
|
|
58
|
+
additional_properties = {} if additional_properties.nil?
|
|
59
|
+
|
|
60
|
+
@summary = summary unless summary == SKIP
|
|
61
|
+
@credits_remaining = credits_remaining unless credits_remaining == SKIP
|
|
62
|
+
@estimated_credits = estimated_credits unless estimated_credits == SKIP
|
|
63
|
+
@additional_properties = additional_properties
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Creates an instance of the object from a hash.
|
|
67
|
+
def self.from_hash(hash)
|
|
68
|
+
return nil unless hash
|
|
69
|
+
|
|
70
|
+
# Extract variables from the hash.
|
|
71
|
+
summary = hash.key?('summary') ? hash['summary'] : SKIP
|
|
72
|
+
credits_remaining =
|
|
73
|
+
hash.key?('creditsRemaining') ? hash['creditsRemaining'] : SKIP
|
|
74
|
+
estimated_credits =
|
|
75
|
+
hash.key?('estimatedCredits') ? hash['estimatedCredits'] : SKIP
|
|
76
|
+
|
|
77
|
+
# Create a new hash for additional properties, removing known properties.
|
|
78
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
79
|
+
|
|
80
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
81
|
+
new_hash, proc { |value| value }
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# Create object from extracted values.
|
|
85
|
+
AssistantActionDetail1.new(summary: summary,
|
|
86
|
+
credits_remaining: credits_remaining,
|
|
87
|
+
estimated_credits: estimated_credits,
|
|
88
|
+
additional_properties: additional_properties)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Validates an instance of the object from a given value.
|
|
92
|
+
# @param [AssistantActionDetail1 | Hash] The value against the validation is performed.
|
|
93
|
+
def self.validate(value)
|
|
94
|
+
return true if value.instance_of? self
|
|
95
|
+
|
|
96
|
+
return false unless value.instance_of? Hash
|
|
97
|
+
|
|
98
|
+
true
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Provides a human-readable string representation of the object.
|
|
102
|
+
def to_s
|
|
103
|
+
class_name = self.class.name.split('::').last
|
|
104
|
+
"<#{class_name} summary: #{@summary}, credits_remaining: #{@credits_remaining},"\
|
|
105
|
+
" estimated_credits: #{@estimated_credits}, additional_properties:"\
|
|
106
|
+
" #{@additional_properties}>"
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
110
|
+
def inspect
|
|
111
|
+
class_name = self.class.name.split('::').last
|
|
112
|
+
"<#{class_name} summary: #{@summary.inspect}, credits_remaining:"\
|
|
113
|
+
" #{@credits_remaining.inspect}, estimated_credits: #{@estimated_credits.inspect},"\
|
|
114
|
+
" additional_properties: #{@additional_properties}>"
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# Normalized category of an actionable widget the assistant offered.
|
|
8
|
+
# `APPROVE_PLAN` accepts a proposed generation plan; `APPLY_EDIT` applies a
|
|
9
|
+
# proposed edit (e.g. a rewritten script); `RUN_TOOL` runs an inline tool;
|
|
10
|
+
# `GENERATE` starts building the video; `OPEN_IN_APP` requires the full web
|
|
11
|
+
# app — open the assistant's `projectUrl` instead of acting via the API.
|
|
12
|
+
class AssistantActionKind
|
|
13
|
+
ASSISTANT_ACTION_KIND = [
|
|
14
|
+
# TODO: Write general description for APPROVE_PLAN
|
|
15
|
+
APPROVE_PLAN = 'APPROVE_PLAN'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for APPLY_EDIT
|
|
18
|
+
APPLY_EDIT = 'APPLY_EDIT'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for RUN_TOOL
|
|
21
|
+
RUN_TOOL = 'RUN_TOOL'.freeze,
|
|
22
|
+
|
|
23
|
+
# TODO: Write general description for GENERATE
|
|
24
|
+
GENERATE = 'GENERATE'.freeze,
|
|
25
|
+
|
|
26
|
+
# TODO: Write general description for OPEN_IN_APP
|
|
27
|
+
OPEN_IN_APP = 'OPEN_IN_APP'.freeze
|
|
28
|
+
].freeze
|
|
29
|
+
|
|
30
|
+
def self.validate(value)
|
|
31
|
+
return false if value.nil?
|
|
32
|
+
|
|
33
|
+
ASSISTANT_ACTION_KIND.include?(value)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def self.from_value(value, default_value = APPROVE_PLAN)
|
|
37
|
+
return default_value if value.nil?
|
|
38
|
+
|
|
39
|
+
str = value.to_s.strip
|
|
40
|
+
|
|
41
|
+
case str.downcase
|
|
42
|
+
when 'approve_plan' then APPROVE_PLAN
|
|
43
|
+
when 'apply_edit' then APPLY_EDIT
|
|
44
|
+
when 'run_tool' then RUN_TOOL
|
|
45
|
+
when 'generate' then GENERATE
|
|
46
|
+
when 'open_in_app' then OPEN_IN_APP
|
|
47
|
+
else
|
|
48
|
+
default_value
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# A user-authored message in an assistant chat.
|
|
8
|
+
class AssistantMessage < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Discriminator value: user
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_reader :role
|
|
15
|
+
|
|
16
|
+
# Opaque assistant message id (e.g. `vg_mesg_...`).
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :message_id
|
|
19
|
+
|
|
20
|
+
# Lifecycle status of an assistant chat message. `pending` and `running` are
|
|
21
|
+
# in-progress; `succeeded`, `failed`, and `cancelled` are terminal.
|
|
22
|
+
# @return [AssistantMessageStatus]
|
|
23
|
+
attr_accessor :status
|
|
24
|
+
|
|
25
|
+
# The user's message text.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :content
|
|
28
|
+
|
|
29
|
+
# Files attached to this message.
|
|
30
|
+
# @return [Array[AssistantMessageAttachment]]
|
|
31
|
+
attr_accessor :attachments
|
|
32
|
+
|
|
33
|
+
# Seconds since epoch (Unix timestamp) when the message was created.
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
attr_accessor :created_at
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['role'] = 'role'
|
|
41
|
+
@_hash['message_id'] = 'messageId'
|
|
42
|
+
@_hash['status'] = 'status'
|
|
43
|
+
@_hash['content'] = 'content'
|
|
44
|
+
@_hash['attachments'] = 'attachments'
|
|
45
|
+
@_hash['created_at'] = 'createdAt'
|
|
46
|
+
@_hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for optional fields
|
|
50
|
+
def self.optionals
|
|
51
|
+
[]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for nullable fields
|
|
55
|
+
def self.nullables
|
|
56
|
+
[]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def initialize(message_id:, status:, content:, attachments:, created_at:,
|
|
60
|
+
additional_properties: nil)
|
|
61
|
+
# Add additional model properties to the instance
|
|
62
|
+
additional_properties = {} if additional_properties.nil?
|
|
63
|
+
|
|
64
|
+
@role = 'user'
|
|
65
|
+
@message_id = message_id
|
|
66
|
+
@status = status
|
|
67
|
+
@content = content
|
|
68
|
+
@attachments = attachments
|
|
69
|
+
@created_at = created_at
|
|
70
|
+
@additional_properties = additional_properties
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Creates an instance of the object from a hash.
|
|
74
|
+
def self.from_hash(hash)
|
|
75
|
+
return nil unless hash
|
|
76
|
+
|
|
77
|
+
# Extract variables from the hash.
|
|
78
|
+
message_id = hash.key?('messageId') ? hash['messageId'] : nil
|
|
79
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
80
|
+
content = hash.key?('content') ? hash['content'] : nil
|
|
81
|
+
# Parameter is an array, so we need to iterate through it
|
|
82
|
+
attachments = nil
|
|
83
|
+
unless hash['attachments'].nil?
|
|
84
|
+
attachments = []
|
|
85
|
+
hash['attachments'].each do |structure|
|
|
86
|
+
attachments << (AssistantMessageAttachment.from_hash(structure) if structure)
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
attachments = nil unless hash.key?('attachments')
|
|
91
|
+
created_at = hash.key?('createdAt') ? hash['createdAt'] : nil
|
|
92
|
+
|
|
93
|
+
# Create a new hash for additional properties, removing known properties.
|
|
94
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
95
|
+
|
|
96
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
97
|
+
new_hash, proc { |value| value }
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
# Create object from extracted values.
|
|
101
|
+
AssistantMessage.new(message_id: message_id,
|
|
102
|
+
status: status,
|
|
103
|
+
content: content,
|
|
104
|
+
attachments: attachments,
|
|
105
|
+
created_at: created_at,
|
|
106
|
+
additional_properties: additional_properties)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Validates an instance of the object from a given value.
|
|
110
|
+
# @param [AssistantMessage | Hash] The value against the validation is performed.
|
|
111
|
+
def self.validate(value)
|
|
112
|
+
if value.instance_of? self
|
|
113
|
+
return (
|
|
114
|
+
APIHelper.valid_type?(value.role,
|
|
115
|
+
->(val) { val.instance_of? String }) and
|
|
116
|
+
APIHelper.valid_type?(value.message_id,
|
|
117
|
+
->(val) { val.instance_of? String }) and
|
|
118
|
+
APIHelper.valid_type?(value.status,
|
|
119
|
+
->(val) { AssistantMessageStatus.validate(val) }) and
|
|
120
|
+
APIHelper.valid_type?(value.content,
|
|
121
|
+
->(val) { val.instance_of? String }) and
|
|
122
|
+
APIHelper.valid_type?(value.attachments,
|
|
123
|
+
->(val) { AssistantMessageAttachment.validate(val) },
|
|
124
|
+
is_model_hash: true,
|
|
125
|
+
is_inner_model_hash: true) and
|
|
126
|
+
APIHelper.valid_type?(value.created_at,
|
|
127
|
+
->(val) { val.instance_of? Integer })
|
|
128
|
+
)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
return false unless value.instance_of? Hash
|
|
132
|
+
|
|
133
|
+
(
|
|
134
|
+
APIHelper.valid_type?(value['role'],
|
|
135
|
+
->(val) { val.instance_of? String }) and
|
|
136
|
+
APIHelper.valid_type?(value['messageId'],
|
|
137
|
+
->(val) { val.instance_of? String }) and
|
|
138
|
+
APIHelper.valid_type?(value['status'],
|
|
139
|
+
->(val) { AssistantMessageStatus.validate(val) }) and
|
|
140
|
+
APIHelper.valid_type?(value['content'],
|
|
141
|
+
->(val) { val.instance_of? String }) and
|
|
142
|
+
APIHelper.valid_type?(value['attachments'],
|
|
143
|
+
->(val) { AssistantMessageAttachment.validate(val) },
|
|
144
|
+
is_model_hash: true,
|
|
145
|
+
is_inner_model_hash: true) and
|
|
146
|
+
APIHelper.valid_type?(value['createdAt'],
|
|
147
|
+
->(val) { val.instance_of? Integer })
|
|
148
|
+
)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Provides a human-readable string representation of the object.
|
|
152
|
+
def to_s
|
|
153
|
+
class_name = self.class.name.split('::').last
|
|
154
|
+
"<#{class_name} role: #{@role}, message_id: #{@message_id}, status: #{@status}, content:"\
|
|
155
|
+
" #{@content}, attachments: #{@attachments}, created_at: #{@created_at},"\
|
|
156
|
+
" additional_properties: #{@additional_properties}>"
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
160
|
+
def inspect
|
|
161
|
+
class_name = self.class.name.split('::').last
|
|
162
|
+
"<#{class_name} role: #{@role.inspect}, message_id: #{@message_id.inspect}, status:"\
|
|
163
|
+
" #{@status.inspect}, content: #{@content.inspect}, attachments: #{@attachments.inspect},"\
|
|
164
|
+
" created_at: #{@created_at.inspect}, additional_properties: #{@additional_properties}>"
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# An assistant-authored message in an assistant chat, including any
|
|
8
|
+
# suggestions or actions it offered.
|
|
9
|
+
class AssistantMessage1 < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Discriminator value: assistant
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_reader :role
|
|
16
|
+
|
|
17
|
+
# Opaque assistant message id (e.g. `vg_mesg_...`).
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :message_id
|
|
20
|
+
|
|
21
|
+
# Lifecycle status of an assistant chat message. `pending` and `running` are
|
|
22
|
+
# in-progress; `succeeded`, `failed`, and `cancelled` are terminal.
|
|
23
|
+
# @return [AssistantMessageStatus]
|
|
24
|
+
attr_accessor :status
|
|
25
|
+
|
|
26
|
+
# The assistant's text reply. `null` while `status` is `pending` or
|
|
27
|
+
# `running`; may be empty when the assistant only offered widgets.
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :content
|
|
30
|
+
|
|
31
|
+
# Files attached to this message.
|
|
32
|
+
# @return [Array[AssistantMessageAttachment]]
|
|
33
|
+
attr_accessor :attachments
|
|
34
|
+
|
|
35
|
+
# Workflow starting points the assistant suggested on this message. Empty
|
|
36
|
+
# when none were offered.
|
|
37
|
+
# @return [Array[AssistantWorkflowSuggestion]]
|
|
38
|
+
attr_accessor :workflow_suggestions
|
|
39
|
+
|
|
40
|
+
# Actionable widgets the assistant offered on this message (plans, edits,
|
|
41
|
+
# tools, generate). Empty when none were offered.
|
|
42
|
+
# @return [Array[AssistantAction]]
|
|
43
|
+
attr_accessor :actions
|
|
44
|
+
|
|
45
|
+
# Present when this message kicked off a workflow run (via `autoGenerate` on
|
|
46
|
+
# start, or acting on a workflow suggestion): the workflow run to poll via
|
|
47
|
+
# `GET /v1/workflows/runs/{workflowRunId}`.
|
|
48
|
+
# @return [StartWorkflowRunResponse]
|
|
49
|
+
attr_accessor :generation
|
|
50
|
+
|
|
51
|
+
# Error details. `null` unless `status` is `failed`.
|
|
52
|
+
# @return [ApiError]
|
|
53
|
+
attr_accessor :error
|
|
54
|
+
|
|
55
|
+
# Seconds since epoch (Unix timestamp) when the message was created.
|
|
56
|
+
# @return [Integer]
|
|
57
|
+
attr_accessor :created_at
|
|
58
|
+
|
|
59
|
+
# A mapping from model property names to API property names.
|
|
60
|
+
def self.names
|
|
61
|
+
@_hash = {} if @_hash.nil?
|
|
62
|
+
@_hash['role'] = 'role'
|
|
63
|
+
@_hash['message_id'] = 'messageId'
|
|
64
|
+
@_hash['status'] = 'status'
|
|
65
|
+
@_hash['content'] = 'content'
|
|
66
|
+
@_hash['attachments'] = 'attachments'
|
|
67
|
+
@_hash['workflow_suggestions'] = 'workflowSuggestions'
|
|
68
|
+
@_hash['actions'] = 'actions'
|
|
69
|
+
@_hash['generation'] = 'generation'
|
|
70
|
+
@_hash['error'] = 'error'
|
|
71
|
+
@_hash['created_at'] = 'createdAt'
|
|
72
|
+
@_hash
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# An array for optional fields
|
|
76
|
+
def self.optionals
|
|
77
|
+
[]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# An array for nullable fields
|
|
81
|
+
def self.nullables
|
|
82
|
+
%w[
|
|
83
|
+
content
|
|
84
|
+
generation
|
|
85
|
+
error
|
|
86
|
+
]
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def initialize(message_id:, status:, content:, attachments:,
|
|
90
|
+
workflow_suggestions:, actions:, generation:, error:,
|
|
91
|
+
created_at:, additional_properties: nil)
|
|
92
|
+
# Add additional model properties to the instance
|
|
93
|
+
additional_properties = {} if additional_properties.nil?
|
|
94
|
+
|
|
95
|
+
@role = 'assistant'
|
|
96
|
+
@message_id = message_id
|
|
97
|
+
@status = status
|
|
98
|
+
@content = content
|
|
99
|
+
@attachments = attachments
|
|
100
|
+
@workflow_suggestions = workflow_suggestions
|
|
101
|
+
@actions = actions
|
|
102
|
+
@generation = generation
|
|
103
|
+
@error = error
|
|
104
|
+
@created_at = created_at
|
|
105
|
+
@additional_properties = additional_properties
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Creates an instance of the object from a hash.
|
|
109
|
+
def self.from_hash(hash)
|
|
110
|
+
return nil unless hash
|
|
111
|
+
|
|
112
|
+
# Extract variables from the hash.
|
|
113
|
+
message_id = hash.key?('messageId') ? hash['messageId'] : nil
|
|
114
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
115
|
+
content = hash.key?('content') ? hash['content'] : nil
|
|
116
|
+
# Parameter is an array, so we need to iterate through it
|
|
117
|
+
attachments = nil
|
|
118
|
+
unless hash['attachments'].nil?
|
|
119
|
+
attachments = []
|
|
120
|
+
hash['attachments'].each do |structure|
|
|
121
|
+
attachments << (AssistantMessageAttachment.from_hash(structure) if structure)
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
attachments = nil unless hash.key?('attachments')
|
|
126
|
+
# Parameter is an array, so we need to iterate through it
|
|
127
|
+
workflow_suggestions = nil
|
|
128
|
+
unless hash['workflowSuggestions'].nil?
|
|
129
|
+
workflow_suggestions = []
|
|
130
|
+
hash['workflowSuggestions'].each do |structure|
|
|
131
|
+
workflow_suggestions << (AssistantWorkflowSuggestion.from_hash(structure) if structure)
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
workflow_suggestions = nil unless hash.key?('workflowSuggestions')
|
|
136
|
+
# Parameter is an array, so we need to iterate through it
|
|
137
|
+
actions = nil
|
|
138
|
+
unless hash['actions'].nil?
|
|
139
|
+
actions = []
|
|
140
|
+
hash['actions'].each do |structure|
|
|
141
|
+
actions << (AssistantAction.from_hash(structure) if structure)
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
actions = nil unless hash.key?('actions')
|
|
146
|
+
generation = StartWorkflowRunResponse.from_hash(hash['generation']) if hash['generation']
|
|
147
|
+
error = ApiError.from_hash(hash['error']) if hash['error']
|
|
148
|
+
created_at = hash.key?('createdAt') ? hash['createdAt'] : nil
|
|
149
|
+
|
|
150
|
+
# Create a new hash for additional properties, removing known properties.
|
|
151
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
152
|
+
|
|
153
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
154
|
+
new_hash, proc { |value| value }
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
# Create object from extracted values.
|
|
158
|
+
AssistantMessage1.new(message_id: message_id,
|
|
159
|
+
status: status,
|
|
160
|
+
content: content,
|
|
161
|
+
attachments: attachments,
|
|
162
|
+
workflow_suggestions: workflow_suggestions,
|
|
163
|
+
actions: actions,
|
|
164
|
+
generation: generation,
|
|
165
|
+
error: error,
|
|
166
|
+
created_at: created_at,
|
|
167
|
+
additional_properties: additional_properties)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Validates an instance of the object from a given value.
|
|
171
|
+
# @param [AssistantMessage1 | Hash] The value against the validation is performed.
|
|
172
|
+
def self.validate(value)
|
|
173
|
+
if value.instance_of? self
|
|
174
|
+
return (
|
|
175
|
+
APIHelper.valid_type?(value.role,
|
|
176
|
+
->(val) { val.instance_of? String }) and
|
|
177
|
+
APIHelper.valid_type?(value.message_id,
|
|
178
|
+
->(val) { val.instance_of? String }) and
|
|
179
|
+
APIHelper.valid_type?(value.status,
|
|
180
|
+
->(val) { AssistantMessageStatus.validate(val) }) and
|
|
181
|
+
APIHelper.valid_type?(value.content,
|
|
182
|
+
->(val) { val.instance_of? String }) and
|
|
183
|
+
APIHelper.valid_type?(value.attachments,
|
|
184
|
+
->(val) { AssistantMessageAttachment.validate(val) },
|
|
185
|
+
is_model_hash: true,
|
|
186
|
+
is_inner_model_hash: true) and
|
|
187
|
+
APIHelper.valid_type?(value.workflow_suggestions,
|
|
188
|
+
->(val) { AssistantWorkflowSuggestion.validate(val) },
|
|
189
|
+
is_model_hash: true,
|
|
190
|
+
is_inner_model_hash: true) and
|
|
191
|
+
APIHelper.valid_type?(value.actions,
|
|
192
|
+
->(val) { AssistantAction.validate(val) },
|
|
193
|
+
is_model_hash: true,
|
|
194
|
+
is_inner_model_hash: true) and
|
|
195
|
+
APIHelper.valid_type?(value.generation,
|
|
196
|
+
->(val) { StartWorkflowRunResponse.validate(val) },
|
|
197
|
+
is_model_hash: true) and
|
|
198
|
+
APIHelper.valid_type?(value.error,
|
|
199
|
+
->(val) { ApiError.validate(val) },
|
|
200
|
+
is_model_hash: true) and
|
|
201
|
+
APIHelper.valid_type?(value.created_at,
|
|
202
|
+
->(val) { val.instance_of? Integer })
|
|
203
|
+
)
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
return false unless value.instance_of? Hash
|
|
207
|
+
|
|
208
|
+
(
|
|
209
|
+
APIHelper.valid_type?(value['role'],
|
|
210
|
+
->(val) { val.instance_of? String }) and
|
|
211
|
+
APIHelper.valid_type?(value['messageId'],
|
|
212
|
+
->(val) { val.instance_of? String }) and
|
|
213
|
+
APIHelper.valid_type?(value['status'],
|
|
214
|
+
->(val) { AssistantMessageStatus.validate(val) }) and
|
|
215
|
+
APIHelper.valid_type?(value['content'],
|
|
216
|
+
->(val) { val.instance_of? String }) and
|
|
217
|
+
APIHelper.valid_type?(value['attachments'],
|
|
218
|
+
->(val) { AssistantMessageAttachment.validate(val) },
|
|
219
|
+
is_model_hash: true,
|
|
220
|
+
is_inner_model_hash: true) and
|
|
221
|
+
APIHelper.valid_type?(value['workflowSuggestions'],
|
|
222
|
+
->(val) { AssistantWorkflowSuggestion.validate(val) },
|
|
223
|
+
is_model_hash: true,
|
|
224
|
+
is_inner_model_hash: true) and
|
|
225
|
+
APIHelper.valid_type?(value['actions'],
|
|
226
|
+
->(val) { AssistantAction.validate(val) },
|
|
227
|
+
is_model_hash: true,
|
|
228
|
+
is_inner_model_hash: true) and
|
|
229
|
+
APIHelper.valid_type?(value['generation'],
|
|
230
|
+
->(val) { StartWorkflowRunResponse.validate(val) },
|
|
231
|
+
is_model_hash: true) and
|
|
232
|
+
APIHelper.valid_type?(value['error'],
|
|
233
|
+
->(val) { ApiError.validate(val) },
|
|
234
|
+
is_model_hash: true) and
|
|
235
|
+
APIHelper.valid_type?(value['createdAt'],
|
|
236
|
+
->(val) { val.instance_of? Integer })
|
|
237
|
+
)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Provides a human-readable string representation of the object.
|
|
241
|
+
def to_s
|
|
242
|
+
class_name = self.class.name.split('::').last
|
|
243
|
+
"<#{class_name} role: #{@role}, message_id: #{@message_id}, status: #{@status}, content:"\
|
|
244
|
+
" #{@content}, attachments: #{@attachments}, workflow_suggestions: #{@workflow_suggestions},"\
|
|
245
|
+
" actions: #{@actions}, generation: #{@generation}, error: #{@error}, created_at:"\
|
|
246
|
+
" #{@created_at}, additional_properties: #{@additional_properties}>"
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
250
|
+
def inspect
|
|
251
|
+
class_name = self.class.name.split('::').last
|
|
252
|
+
"<#{class_name} role: #{@role.inspect}, message_id: #{@message_id.inspect}, status:"\
|
|
253
|
+
" #{@status.inspect}, content: #{@content.inspect}, attachments: #{@attachments.inspect},"\
|
|
254
|
+
" workflow_suggestions: #{@workflow_suggestions.inspect}, actions: #{@actions.inspect},"\
|
|
255
|
+
" generation: #{@generation.inspect}, error: #{@error.inspect}, created_at:"\
|
|
256
|
+
" #{@created_at.inspect}, additional_properties: #{@additional_properties}>"
|
|
257
|
+
end
|
|
258
|
+
end
|
|
259
|
+
end
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# A file linked to an assistant chat message.
|
|
8
|
+
class AssistantMessageAttachment < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# File id (e.g. `vg_file_...`) when the attachment is a storage file. `null`
|
|
13
|
+
# for attachments that are not resolvable storage files.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :file_id
|
|
16
|
+
|
|
17
|
+
# Human-readable name of the attachment.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :display_name
|
|
20
|
+
|
|
21
|
+
# A mapping from model property names to API property names.
|
|
22
|
+
def self.names
|
|
23
|
+
@_hash = {} if @_hash.nil?
|
|
24
|
+
@_hash['file_id'] = 'fileId'
|
|
25
|
+
@_hash['display_name'] = 'displayName'
|
|
26
|
+
@_hash
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# An array for optional fields
|
|
30
|
+
def self.optionals
|
|
31
|
+
%w[
|
|
32
|
+
file_id
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
%w[
|
|
39
|
+
file_id
|
|
40
|
+
]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def initialize(display_name:, file_id: SKIP, additional_properties: nil)
|
|
44
|
+
# Add additional model properties to the instance
|
|
45
|
+
additional_properties = {} if additional_properties.nil?
|
|
46
|
+
|
|
47
|
+
@file_id = file_id unless file_id == SKIP
|
|
48
|
+
@display_name = display_name
|
|
49
|
+
@additional_properties = additional_properties
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Creates an instance of the object from a hash.
|
|
53
|
+
def self.from_hash(hash)
|
|
54
|
+
return nil unless hash
|
|
55
|
+
|
|
56
|
+
# Extract variables from the hash.
|
|
57
|
+
display_name = hash.key?('displayName') ? hash['displayName'] : nil
|
|
58
|
+
file_id = hash.key?('fileId') ? hash['fileId'] : SKIP
|
|
59
|
+
|
|
60
|
+
# Create a new hash for additional properties, removing known properties.
|
|
61
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
62
|
+
|
|
63
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
64
|
+
new_hash, proc { |value| value }
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
# Create object from extracted values.
|
|
68
|
+
AssistantMessageAttachment.new(display_name: display_name,
|
|
69
|
+
file_id: file_id,
|
|
70
|
+
additional_properties: additional_properties)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Validates an instance of the object from a given value.
|
|
74
|
+
# @param [AssistantMessageAttachment | Hash] The value against the validation is performed.
|
|
75
|
+
def self.validate(value)
|
|
76
|
+
if value.instance_of? self
|
|
77
|
+
return APIHelper.valid_type?(value.display_name,
|
|
78
|
+
->(val) { val.instance_of? String })
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
return false unless value.instance_of? Hash
|
|
82
|
+
|
|
83
|
+
APIHelper.valid_type?(value['displayName'],
|
|
84
|
+
->(val) { val.instance_of? String })
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Provides a human-readable string representation of the object.
|
|
88
|
+
def to_s
|
|
89
|
+
class_name = self.class.name.split('::').last
|
|
90
|
+
"<#{class_name} file_id: #{@file_id}, display_name: #{@display_name},"\
|
|
91
|
+
" additional_properties: #{@additional_properties}>"
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
95
|
+
def inspect
|
|
96
|
+
class_name = self.class.name.split('::').last
|
|
97
|
+
"<#{class_name} file_id: #{@file_id.inspect}, display_name: #{@display_name.inspect},"\
|
|
98
|
+
" additional_properties: #{@additional_properties}>"
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|