google-apis-forms_v1 0.15.0 → 0.16.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf06fafae873ad37ab089f59f60bf97821f4f8a435c29ccdaef2cfba3b0eaf7e
4
- data.tar.gz: 507d9c8f35fad518f79ff8d8b228f6f5f6b1e405e5e5e60b1b566abc10ba84d3
3
+ metadata.gz: 487f23bce83a2fd5121efe8a5f8bae24b28bf1dfca67b243ca54678367e61778
4
+ data.tar.gz: 7bd2cd4690982080f9af99ea6f670ae2b55cb9629b0be71737fd3dae748b4856
5
5
  SHA512:
6
- metadata.gz: cd6eba39a99add31569ca82c605fb7baee17096cff9f39f05e2f47a637a983503f6e5cc99ee9764a39a18036ca3f3baca58c50e192117413a84dcccb888f2199
7
- data.tar.gz: bfb359d935abfd3d4547510a2081413c65fdb0d3c12db0a01df362ee05c262530e04ff9bddb1850ff91f2a9e53d0e34e30c2c24f871dcbc770f9ffd73a148bb7
6
+ metadata.gz: 4c701ee4752827716b02343169b2c95066bea35e93487e835c8e607771ccd7f0d781305e439e217554d6fa294e3c0e3bfd159b458ae637569fe170641d985902
7
+ data.tar.gz: 5a8a6565d80f3e0d1cde94cdce7586c0fb17f765adef9f1f8b2a854ede178efdc8abf01bcd508dd934d54c9fd079eb47cae0715c3af7f961f29586b63bab65f7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-forms_v1
2
2
 
3
+ ### v0.16.0 (2025-03-16)
4
+
5
+ * Regenerated from discovery document revision 20250304
6
+
3
7
  ### v0.15.0 (2025-02-26)
4
8
 
5
9
  * Regenerated from discovery document revision 20250218
@@ -542,6 +542,11 @@ module Google
542
542
  # @return [String]
543
543
  attr_accessor :linked_sheet_id
544
544
 
545
+ # The publishing settings of a form.
546
+ # Corresponds to the JSON property `publishSettings`
547
+ # @return [Google::Apis::FormsV1::PublishSettings]
548
+ attr_accessor :publish_settings
549
+
545
550
  # Output only. The form URI to share with responders. This opens a page that
546
551
  # allows the user to submit responses but not edit the questions.
547
552
  # Corresponds to the JSON property `responderUri`
@@ -576,6 +581,7 @@ module Google
576
581
  @info = args[:info] if args.key?(:info)
577
582
  @items = args[:items] if args.key?(:items)
578
583
  @linked_sheet_id = args[:linked_sheet_id] if args.key?(:linked_sheet_id)
584
+ @publish_settings = args[:publish_settings] if args.key?(:publish_settings)
579
585
  @responder_uri = args[:responder_uri] if args.key?(:responder_uri)
580
586
  @revision_id = args[:revision_id] if args.key?(:revision_id)
581
587
  @settings = args[:settings] if args.key?(:settings)
@@ -1117,6 +1123,53 @@ module Google
1117
1123
  end
1118
1124
  end
1119
1125
 
1126
+ # The publishing settings of a form.
1127
+ class PublishSettings
1128
+ include Google::Apis::Core::Hashable
1129
+
1130
+ # The publishing state of a form.
1131
+ # Corresponds to the JSON property `publishState`
1132
+ # @return [Google::Apis::FormsV1::PublishState]
1133
+ attr_accessor :publish_state
1134
+
1135
+ def initialize(**args)
1136
+ update!(**args)
1137
+ end
1138
+
1139
+ # Update properties of this object
1140
+ def update!(**args)
1141
+ @publish_state = args[:publish_state] if args.key?(:publish_state)
1142
+ end
1143
+ end
1144
+
1145
+ # The publishing state of a form.
1146
+ class PublishState
1147
+ include Google::Apis::Core::Hashable
1148
+
1149
+ # Required. Whether the form accepts responses. If `is_published` is set to `
1150
+ # false`, this field is forced to `false`.
1151
+ # Corresponds to the JSON property `isAcceptingResponses`
1152
+ # @return [Boolean]
1153
+ attr_accessor :is_accepting_responses
1154
+ alias_method :is_accepting_responses?, :is_accepting_responses
1155
+
1156
+ # Required. Whether the form is published and visible to others.
1157
+ # Corresponds to the JSON property `isPublished`
1158
+ # @return [Boolean]
1159
+ attr_accessor :is_published
1160
+ alias_method :is_published?, :is_published
1161
+
1162
+ def initialize(**args)
1163
+ update!(**args)
1164
+ end
1165
+
1166
+ # Update properties of this object
1167
+ def update!(**args)
1168
+ @is_accepting_responses = args[:is_accepting_responses] if args.key?(:is_accepting_responses)
1169
+ @is_published = args[:is_published] if args.key?(:is_published)
1170
+ end
1171
+ end
1172
+
1120
1173
  # Any question. The specific type of question is known by its `kind`.
1121
1174
  class Question
1122
1175
  include Google::Apis::Core::Hashable
@@ -1443,6 +1496,58 @@ module Google
1443
1496
  end
1444
1497
  end
1445
1498
 
1499
+ # Updates the publish settings of a Form.
1500
+ class SetPublishSettingsRequest
1501
+ include Google::Apis::Core::Hashable
1502
+
1503
+ # The publishing settings of a form.
1504
+ # Corresponds to the JSON property `publishSettings`
1505
+ # @return [Google::Apis::FormsV1::PublishSettings]
1506
+ attr_accessor :publish_settings
1507
+
1508
+ # Optional. The `publish_settings` fields to update. This field mask accepts the
1509
+ # following values: * `publish_state`: Updates or replaces all `publish_state`
1510
+ # settings. * `"*"`: Updates or replaces all `publish_settings` fields.
1511
+ # Corresponds to the JSON property `updateMask`
1512
+ # @return [String]
1513
+ attr_accessor :update_mask
1514
+
1515
+ def initialize(**args)
1516
+ update!(**args)
1517
+ end
1518
+
1519
+ # Update properties of this object
1520
+ def update!(**args)
1521
+ @publish_settings = args[:publish_settings] if args.key?(:publish_settings)
1522
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
1523
+ end
1524
+ end
1525
+
1526
+ # The response of a `SetPublishSettings` request.
1527
+ class SetPublishSettingsResponse
1528
+ include Google::Apis::Core::Hashable
1529
+
1530
+ # Required. The ID of the Form. This is same as the `Form.form_id` field.
1531
+ # Corresponds to the JSON property `formId`
1532
+ # @return [String]
1533
+ attr_accessor :form_id
1534
+
1535
+ # The publishing settings of a form.
1536
+ # Corresponds to the JSON property `publishSettings`
1537
+ # @return [Google::Apis::FormsV1::PublishSettings]
1538
+ attr_accessor :publish_settings
1539
+
1540
+ def initialize(**args)
1541
+ update!(**args)
1542
+ end
1543
+
1544
+ # Update properties of this object
1545
+ def update!(**args)
1546
+ @form_id = args[:form_id] if args.key?(:form_id)
1547
+ @publish_settings = args[:publish_settings] if args.key?(:publish_settings)
1548
+ end
1549
+ end
1550
+
1446
1551
  # An answer to a question represented as text.
1447
1552
  class TextAnswer
1448
1553
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module FormsV1
18
18
  # Version of the google-apis-forms_v1 gem
19
- GEM_VERSION = "0.15.0"
19
+ GEM_VERSION = "0.16.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.16.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20250218"
25
+ REVISION = "20250304"
26
26
  end
27
27
  end
28
28
  end
@@ -232,6 +232,18 @@ module Google
232
232
  include Google::Apis::Core::JsonObjectSupport
233
233
  end
234
234
 
235
+ class PublishSettings
236
+ class Representation < Google::Apis::Core::JsonRepresentation; end
237
+
238
+ include Google::Apis::Core::JsonObjectSupport
239
+ end
240
+
241
+ class PublishState
242
+ class Representation < Google::Apis::Core::JsonRepresentation; end
243
+
244
+ include Google::Apis::Core::JsonObjectSupport
245
+ end
246
+
235
247
  class Question
236
248
  class Representation < Google::Apis::Core::JsonRepresentation; end
237
249
 
@@ -292,6 +304,18 @@ module Google
292
304
  include Google::Apis::Core::JsonObjectSupport
293
305
  end
294
306
 
307
+ class SetPublishSettingsRequest
308
+ class Representation < Google::Apis::Core::JsonRepresentation; end
309
+
310
+ include Google::Apis::Core::JsonObjectSupport
311
+ end
312
+
313
+ class SetPublishSettingsResponse
314
+ class Representation < Google::Apis::Core::JsonRepresentation; end
315
+
316
+ include Google::Apis::Core::JsonObjectSupport
317
+ end
318
+
295
319
  class TextAnswer
296
320
  class Representation < Google::Apis::Core::JsonRepresentation; end
297
321
 
@@ -554,6 +578,8 @@ module Google
554
578
  collection :items, as: 'items', class: Google::Apis::FormsV1::Item, decorator: Google::Apis::FormsV1::Item::Representation
555
579
 
556
580
  property :linked_sheet_id, as: 'linkedSheetId'
581
+ property :publish_settings, as: 'publishSettings', class: Google::Apis::FormsV1::PublishSettings, decorator: Google::Apis::FormsV1::PublishSettings::Representation
582
+
557
583
  property :responder_uri, as: 'responderUri'
558
584
  property :revision_id, as: 'revisionId'
559
585
  property :settings, as: 'settings', class: Google::Apis::FormsV1::FormSettings, decorator: Google::Apis::FormsV1::FormSettings::Representation
@@ -727,6 +753,22 @@ module Google
727
753
  end
728
754
  end
729
755
 
756
+ class PublishSettings
757
+ # @private
758
+ class Representation < Google::Apis::Core::JsonRepresentation
759
+ property :publish_state, as: 'publishState', class: Google::Apis::FormsV1::PublishState, decorator: Google::Apis::FormsV1::PublishState::Representation
760
+
761
+ end
762
+ end
763
+
764
+ class PublishState
765
+ # @private
766
+ class Representation < Google::Apis::Core::JsonRepresentation
767
+ property :is_accepting_responses, as: 'isAcceptingResponses'
768
+ property :is_published, as: 'isPublished'
769
+ end
770
+ end
771
+
730
772
  class Question
731
773
  # @private
732
774
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -839,6 +881,24 @@ module Google
839
881
  end
840
882
  end
841
883
 
884
+ class SetPublishSettingsRequest
885
+ # @private
886
+ class Representation < Google::Apis::Core::JsonRepresentation
887
+ property :publish_settings, as: 'publishSettings', class: Google::Apis::FormsV1::PublishSettings, decorator: Google::Apis::FormsV1::PublishSettings::Representation
888
+
889
+ property :update_mask, as: 'updateMask'
890
+ end
891
+ end
892
+
893
+ class SetPublishSettingsResponse
894
+ # @private
895
+ class Representation < Google::Apis::Core::JsonRepresentation
896
+ property :form_id, as: 'formId'
897
+ property :publish_settings, as: 'publishSettings', class: Google::Apis::FormsV1::PublishSettings, decorator: Google::Apis::FormsV1::PublishSettings::Representation
898
+
899
+ end
900
+ end
901
+
842
902
  class TextAnswer
843
903
  # @private
844
904
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -91,6 +91,10 @@ module Google
91
91
  # items, you must first call forms.create to create an empty form with a title
92
92
  # and (optional) document title, and then call forms.update to add the items.
93
93
  # @param [Google::Apis::FormsV1::Form] form_object
94
+ # @param [Boolean] unpublished
95
+ # Optional. Whether the form is unpublished. If set to `true`, the form doesn't
96
+ # accept responses. If set to `false` or unset, the form is published and
97
+ # accepts responses.
94
98
  # @param [String] fields
95
99
  # Selector specifying which fields to include in a partial response.
96
100
  # @param [String] quota_user
@@ -108,12 +112,13 @@ module Google
108
112
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
109
113
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
110
114
  # @raise [Google::Apis::AuthorizationError] Authorization is required
111
- def create_form(form_object = nil, fields: nil, quota_user: nil, options: nil, &block)
115
+ def create_form(form_object = nil, unpublished: nil, fields: nil, quota_user: nil, options: nil, &block)
112
116
  command = make_simple_command(:post, 'v1/forms', options)
113
117
  command.request_representation = Google::Apis::FormsV1::Form::Representation
114
118
  command.request_object = form_object
115
119
  command.response_representation = Google::Apis::FormsV1::Form::Representation
116
120
  command.response_class = Google::Apis::FormsV1::Form
121
+ command.query['unpublished'] = unpublished unless unpublished.nil?
117
122
  command.query['fields'] = fields unless fields.nil?
118
123
  command.query['quotaUser'] = quota_user unless quota_user.nil?
119
124
  execute_or_queue_command(command, &block)
@@ -149,6 +154,40 @@ module Google
149
154
  execute_or_queue_command(command, &block)
150
155
  end
151
156
 
157
+ # Updates the publish settings of a form. Legacy forms aren't supported because
158
+ # they don't have the `publish_settings` field.
159
+ # @param [String] form_id
160
+ # Required. The ID of the form. You can get the id from `Form.form_id` field.
161
+ # @param [Google::Apis::FormsV1::SetPublishSettingsRequest] set_publish_settings_request_object
162
+ # @param [String] fields
163
+ # Selector specifying which fields to include in a partial response.
164
+ # @param [String] quota_user
165
+ # Available to use for quota purposes for server-side applications. Can be any
166
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
167
+ # @param [Google::Apis::RequestOptions] options
168
+ # Request-specific options
169
+ #
170
+ # @yield [result, err] Result & error if block supplied
171
+ # @yieldparam result [Google::Apis::FormsV1::SetPublishSettingsResponse] parsed result object
172
+ # @yieldparam err [StandardError] error object if request failed
173
+ #
174
+ # @return [Google::Apis::FormsV1::SetPublishSettingsResponse]
175
+ #
176
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
177
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
178
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
179
+ def set_form_publish_settings(form_id, set_publish_settings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
180
+ command = make_simple_command(:post, 'v1/forms/{formId}:setPublishSettings', options)
181
+ command.request_representation = Google::Apis::FormsV1::SetPublishSettingsRequest::Representation
182
+ command.request_object = set_publish_settings_request_object
183
+ command.response_representation = Google::Apis::FormsV1::SetPublishSettingsResponse::Representation
184
+ command.response_class = Google::Apis::FormsV1::SetPublishSettingsResponse
185
+ command.params['formId'] = form_id unless form_id.nil?
186
+ command.query['fields'] = fields unless fields.nil?
187
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
188
+ execute_or_queue_command(command, &block)
189
+ end
190
+
152
191
  # Get one response from the form.
153
192
  # @param [String] form_id
154
193
  # Required. The form ID.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-forms_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-02 00:00:00.000000000 Z
10
+ date: 2025-03-16 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: google-apis-core
@@ -57,7 +57,7 @@ licenses:
57
57
  metadata:
58
58
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
59
59
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-forms_v1/CHANGELOG.md
60
- documentation_uri: https://googleapis.dev/ruby/google-apis-forms_v1/v0.15.0
60
+ documentation_uri: https://googleapis.dev/ruby/google-apis-forms_v1/v0.16.0
61
61
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-forms_v1
62
62
  rdoc_options: []
63
63
  require_paths: