/
classes.rb
5015 lines (4153 loc) · 199 KB
/
classes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudsearchV1
# Used to provide a search operator for boolean properties. This is optional.
# Search operators let users restrict the query to specific fields relevant to
# the type of item being searched.
class BooleanOperatorOptions
include Google::Apis::Core::Hashable
# Indicates the operator name required in the query in order to isolate the
# boolean property. For example, if operatorName is *closed* and the property's
# name is *isClosed*, then queries like *closed:<value>* show results only where
# the value of the property named *isClosed* matches *<value>*. By contrast, a
# search that uses the same *<value>* without an operator returns all items
# where *<value>* matches the value of any String properties or text within the
# content field for the item. The operator name can only contain lowercase
# letters (a-z). The maximum length is 32 characters.
# Corresponds to the JSON property `operatorName`
# @return [String]
attr_accessor :operator_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operator_name = args[:operator_name] if args.key?(:operator_name)
end
end
# Options for boolean properties.
class BooleanPropertyOptions
include Google::Apis::Core::Hashable
# Used to provide a search operator for boolean properties. This is optional.
# Search operators let users restrict the query to specific fields relevant to
# the type of item being searched.
# Corresponds to the JSON property `operatorOptions`
# @return [Google::Apis::CloudsearchV1::BooleanOperatorOptions]
attr_accessor :operator_options
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operator_options = args[:operator_options] if args.key?(:operator_options)
end
end
#
class CheckAccessResponse
include Google::Apis::Core::Hashable
# Returns true if principal has access. Returns false otherwise.
# Corresponds to the JSON property `hasAccess`
# @return [Boolean]
attr_accessor :has_access
alias_method :has_access?, :has_access
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@has_access = args[:has_access] if args.key?(:has_access)
end
end
#
class CompositeFilter
include Google::Apis::Core::Hashable
# The logic operator of the sub filter.
# Corresponds to the JSON property `logicOperator`
# @return [String]
attr_accessor :logic_operator
# Sub filters.
# Corresponds to the JSON property `subFilters`
# @return [Array<Google::Apis::CloudsearchV1::Filter>]
attr_accessor :sub_filters
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@logic_operator = args[:logic_operator] if args.key?(:logic_operator)
@sub_filters = args[:sub_filters] if args.key?(:sub_filters)
end
end
# Aggregation of items by status code as of the specified date.
class CustomerIndexStats
include Google::Apis::Core::Hashable
# Represents a whole calendar date, for example a date of birth. The time of day
# and time zone are either specified elsewhere or are not significant. The date
# is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/
# wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date
# between the year 1 and 9999.
# Corresponds to the JSON property `date`
# @return [Google::Apis::CloudsearchV1::Date]
attr_accessor :date
# Number of items aggregrated by status code.
# Corresponds to the JSON property `itemCountByStatus`
# @return [Array<Google::Apis::CloudsearchV1::ItemCountByStatus>]
attr_accessor :item_count_by_status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@date = args[:date] if args.key?(:date)
@item_count_by_status = args[:item_count_by_status] if args.key?(:item_count_by_status)
end
end
#
class CustomerQueryStats
include Google::Apis::Core::Hashable
# Represents a whole calendar date, for example a date of birth. The time of day
# and time zone are either specified elsewhere or are not significant. The date
# is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/
# wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date
# between the year 1 and 9999.
# Corresponds to the JSON property `date`
# @return [Google::Apis::CloudsearchV1::Date]
attr_accessor :date
#
# Corresponds to the JSON property `queryCountByStatus`
# @return [Array<Google::Apis::CloudsearchV1::QueryCountByStatus>]
attr_accessor :query_count_by_status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@date = args[:date] if args.key?(:date)
@query_count_by_status = args[:query_count_by_status] if args.key?(:query_count_by_status)
end
end
#
class CustomerSessionStats
include Google::Apis::Core::Hashable
# Represents a whole calendar date, for example a date of birth. The time of day
# and time zone are either specified elsewhere or are not significant. The date
# is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/
# wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date
# between the year 1 and 9999.
# Corresponds to the JSON property `date`
# @return [Google::Apis::CloudsearchV1::Date]
attr_accessor :date
# The count of search sessions on the day
# Corresponds to the JSON property `searchSessionsCount`
# @return [Fixnum]
attr_accessor :search_sessions_count
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@date = args[:date] if args.key?(:date)
@search_sessions_count = args[:search_sessions_count] if args.key?(:search_sessions_count)
end
end
#
class CustomerUserStats
include Google::Apis::Core::Hashable
# Represents a whole calendar date, for example a date of birth. The time of day
# and time zone are either specified elsewhere or are not significant. The date
# is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/
# wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date
# between the year 1 and 9999.
# Corresponds to the JSON property `date`
# @return [Google::Apis::CloudsearchV1::Date]
attr_accessor :date
# The count of unique active users in the past one day
# Corresponds to the JSON property `oneDayActiveUsersCount`
# @return [Fixnum]
attr_accessor :one_day_active_users_count
# The count of unique active users in the past seven days
# Corresponds to the JSON property `sevenDaysActiveUsersCount`
# @return [Fixnum]
attr_accessor :seven_days_active_users_count
# The count of unique active users in the past thirty days
# Corresponds to the JSON property `thirtyDaysActiveUsersCount`
# @return [Fixnum]
attr_accessor :thirty_days_active_users_count
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@date = args[:date] if args.key?(:date)
@one_day_active_users_count = args[:one_day_active_users_count] if args.key?(:one_day_active_users_count)
@seven_days_active_users_count = args[:seven_days_active_users_count] if args.key?(:seven_days_active_users_count)
@thirty_days_active_users_count = args[:thirty_days_active_users_count] if args.key?(:thirty_days_active_users_count)
end
end
# Datasource is a logical namespace for items to be indexed. All items must
# belong to a datasource. This is the prerequisite before items can be indexed
# into Cloud Search.
class DataSource
include Google::Apis::Core::Hashable
# If true, sets the datasource to read-only mode. In read-only mode, the
# Indexing API rejects any requests to index or delete items in this source.
# Enabling read-only mode does not stop the processing of previously accepted
# data.
# Corresponds to the JSON property `disableModifications`
# @return [Boolean]
attr_accessor :disable_modifications
alias_method :disable_modifications?, :disable_modifications
# Disable serving any search or assist results.
# Corresponds to the JSON property `disableServing`
# @return [Boolean]
attr_accessor :disable_serving
alias_method :disable_serving?, :disable_serving
# Required. Display name of the datasource The maximum length is 300 characters.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# List of service accounts that have indexing access.
# Corresponds to the JSON property `indexingServiceAccounts`
# @return [Array<String>]
attr_accessor :indexing_service_accounts
# This field restricts visibility to items at the datasource level. Items within
# the datasource are restricted to the union of users and groups included in
# this field. Note that, this does not ensure access to a specific item, as
# users need to have ACL permissions on the contained items. This ensures a high
# level access on the entire datasource, and that the individual items are not
# shared outside this visibility.
# Corresponds to the JSON property `itemsVisibility`
# @return [Array<Google::Apis::CloudsearchV1::GSuitePrincipal>]
attr_accessor :items_visibility
# Name of the datasource resource. Format: datasources/`source_id`. The name is
# ignored when creating a datasource.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# IDs of the Long Running Operations (LROs) currently running for this schema.
# Corresponds to the JSON property `operationIds`
# @return [Array<String>]
attr_accessor :operation_ids
# A short name or alias for the source. This value will be used to match the '
# source' operator. For example, if the short name is *<value>* then queries
# like *source:<value>* will only return results for this source. The value must
# be unique across all datasources. The value must only contain alphanumeric
# characters (a-zA-Z0-9). The value cannot start with 'google' and cannot be one
# of the following: mail, gmail, docs, drive, groups, sites, calendar, hangouts,
# gplus, keep, people, teams. Its maximum length is 32 characters.
# Corresponds to the JSON property `shortName`
# @return [String]
attr_accessor :short_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@disable_modifications = args[:disable_modifications] if args.key?(:disable_modifications)
@disable_serving = args[:disable_serving] if args.key?(:disable_serving)
@display_name = args[:display_name] if args.key?(:display_name)
@indexing_service_accounts = args[:indexing_service_accounts] if args.key?(:indexing_service_accounts)
@items_visibility = args[:items_visibility] if args.key?(:items_visibility)
@name = args[:name] if args.key?(:name)
@operation_ids = args[:operation_ids] if args.key?(:operation_ids)
@short_name = args[:short_name] if args.key?(:short_name)
end
end
# Aggregation of items by status code as of the specified date.
class DataSourceIndexStats
include Google::Apis::Core::Hashable
# Represents a whole calendar date, for example a date of birth. The time of day
# and time zone are either specified elsewhere or are not significant. The date
# is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/
# wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date
# between the year 1 and 9999.
# Corresponds to the JSON property `date`
# @return [Google::Apis::CloudsearchV1::Date]
attr_accessor :date
# Number of items aggregrated by status code.
# Corresponds to the JSON property `itemCountByStatus`
# @return [Array<Google::Apis::CloudsearchV1::ItemCountByStatus>]
attr_accessor :item_count_by_status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@date = args[:date] if args.key?(:date)
@item_count_by_status = args[:item_count_by_status] if args.key?(:item_count_by_status)
end
end
# Restriction on Datasource.
class DataSourceRestriction
include Google::Apis::Core::Hashable
# Filter options restricting the results. If multiple filters are present, they
# are grouped by object type before joining. Filters with the same object type
# are joined conjunctively, then the resulting expressions are joined
# disjunctively. The maximum number of elements is 20. NOTE: Suggest API
# supports only few filters at the moment: "objecttype", "type" and "mimetype".
# For now, schema specific filters cannot be used to filter suggestions.
# Corresponds to the JSON property `filterOptions`
# @return [Array<Google::Apis::CloudsearchV1::FilterOptions>]
attr_accessor :filter_options
# Defines sources for the suggest/search APIs.
# Corresponds to the JSON property `source`
# @return [Google::Apis::CloudsearchV1::Source]
attr_accessor :source
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@filter_options = args[:filter_options] if args.key?(:filter_options)
@source = args[:source] if args.key?(:source)
end
end
# Represents a whole calendar date, for example a date of birth. The time of day
# and time zone are either specified elsewhere or are not significant. The date
# is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/
# wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date
# between the year 1 and 9999.
class Date
include Google::Apis::Core::Hashable
# Day of month. Must be from 1 to 31 and valid for the year and month.
# Corresponds to the JSON property `day`
# @return [Fixnum]
attr_accessor :day
# Month of date. Must be from 1 to 12.
# Corresponds to the JSON property `month`
# @return [Fixnum]
attr_accessor :month
# Year of date. Must be from 1 to 9999.
# Corresponds to the JSON property `year`
# @return [Fixnum]
attr_accessor :year
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@day = args[:day] if args.key?(:day)
@month = args[:month] if args.key?(:month)
@year = args[:year] if args.key?(:year)
end
end
# Optional. Provides a search operator for date properties. Search operators let
# users restrict the query to specific fields relevant to the type of item being
# searched.
class DateOperatorOptions
include Google::Apis::Core::Hashable
# Indicates the operator name required in the query in order to isolate the date
# property using the greater-than operator. For example, if
# greaterThanOperatorName is *closedafter* and the property's name is *closeDate*
# , then queries like *closedafter:<value>* show results only where the value of
# the property named *closeDate* is later than *<value>*. The operator name can
# only contain lowercase letters (a-z). The maximum length is 32 characters.
# Corresponds to the JSON property `greaterThanOperatorName`
# @return [String]
attr_accessor :greater_than_operator_name
# Indicates the operator name required in the query in order to isolate the date
# property using the less-than operator. For example, if lessThanOperatorName is
# *closedbefore* and the property's name is *closeDate*, then queries like *
# closedbefore:<value>* show results only where the value of the property named *
# closeDate* is earlier than *<value>*. The operator name can only contain
# lowercase letters (a-z). The maximum length is 32 characters.
# Corresponds to the JSON property `lessThanOperatorName`
# @return [String]
attr_accessor :less_than_operator_name
# Indicates the actual string required in the query in order to isolate the date
# property. For example, suppose an issue tracking schema object has a property
# named *closeDate* that specifies an operator with an operatorName of *closedon*
# . For searches on that data, queries like *closedon:<value>* show results only
# where the value of the *closeDate* property matches *<value>*. By contrast, a
# search that uses the same *<value>* without an operator returns all items
# where *<value>* matches the value of any String properties or text within the
# content field for the indexed datasource. The operator name can only contain
# lowercase letters (a-z). The maximum length is 32 characters.
# Corresponds to the JSON property `operatorName`
# @return [String]
attr_accessor :operator_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@greater_than_operator_name = args[:greater_than_operator_name] if args.key?(:greater_than_operator_name)
@less_than_operator_name = args[:less_than_operator_name] if args.key?(:less_than_operator_name)
@operator_name = args[:operator_name] if args.key?(:operator_name)
end
end
# Options for date properties.
class DatePropertyOptions
include Google::Apis::Core::Hashable
# Optional. Provides a search operator for date properties. Search operators let
# users restrict the query to specific fields relevant to the type of item being
# searched.
# Corresponds to the JSON property `operatorOptions`
# @return [Google::Apis::CloudsearchV1::DateOperatorOptions]
attr_accessor :operator_options
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operator_options = args[:operator_options] if args.key?(:operator_options)
end
end
# List of date values.
class DateValues
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `values`
# @return [Array<Google::Apis::CloudsearchV1::Date>]
attr_accessor :values
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@values = args[:values] if args.key?(:values)
end
end
# Shared request debug options for all cloudsearch RPC methods.
class DebugOptions
include Google::Apis::Core::Hashable
# If you are asked by Google to help with debugging, set this field. Otherwise,
# ignore this field.
# Corresponds to the JSON property `enableDebugging`
# @return [Boolean]
attr_accessor :enable_debugging
alias_method :enable_debugging?, :enable_debugging
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enable_debugging = args[:enable_debugging] if args.key?(:enable_debugging)
end
end
#
class DeleteQueueItemsRequest
include Google::Apis::Core::Hashable
# Name of connector making this call. Format: datasources/`source_id`/connectors/
# `ID`
# Corresponds to the JSON property `connectorName`
# @return [String]
attr_accessor :connector_name
# Shared request debug options for all cloudsearch RPC methods.
# Corresponds to the JSON property `debugOptions`
# @return [Google::Apis::CloudsearchV1::DebugOptions]
attr_accessor :debug_options
# Name of a queue to delete items from.
# Corresponds to the JSON property `queue`
# @return [String]
attr_accessor :queue
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@connector_name = args[:connector_name] if args.key?(:connector_name)
@debug_options = args[:debug_options] if args.key?(:debug_options)
@queue = args[:queue] if args.key?(:queue)
end
end
# A reference to a top-level property within the object that should be displayed
# in search results. The values of the chosen properties is displayed in the
# search results along with the display label for that property if one is
# specified. If a display label is not specified, only the values is shown.
class DisplayedProperty
include Google::Apis::Core::Hashable
# The name of the top-level property as defined in a property definition for the
# object. If the name is not a defined property in the schema, an error is given
# when attempting to update the schema.
# Corresponds to the JSON property `propertyName`
# @return [String]
attr_accessor :property_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@property_name = args[:property_name] if args.key?(:property_name)
end
end
# Used to provide a search operator for double properties. This is optional.
# Search operators let users restrict the query to specific fields relevant to
# the type of item being searched.
class DoubleOperatorOptions
include Google::Apis::Core::Hashable
# Indicates the operator name required in the query in order to use the double
# property in sorting or as a facet. The operator name can only contain
# lowercase letters (a-z). The maximum length is 32 characters.
# Corresponds to the JSON property `operatorName`
# @return [String]
attr_accessor :operator_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operator_name = args[:operator_name] if args.key?(:operator_name)
end
end
# Options for double properties.
class DoublePropertyOptions
include Google::Apis::Core::Hashable
# Used to provide a search operator for double properties. This is optional.
# Search operators let users restrict the query to specific fields relevant to
# the type of item being searched.
# Corresponds to the JSON property `operatorOptions`
# @return [Google::Apis::CloudsearchV1::DoubleOperatorOptions]
attr_accessor :operator_options
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operator_options = args[:operator_options] if args.key?(:operator_options)
end
end
# List of double values.
class DoubleValues
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `values`
# @return [Array<Float>]
attr_accessor :values
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@values = args[:values] if args.key?(:values)
end
end
# Drive follow-up search restricts (e.g. "followup:suggestions").
class DriveFollowUpRestrict
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@type = args[:type] if args.key?(:type)
end
end
# Drive location search restricts (e.g. "is:starred").
class DriveLocationRestrict
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@type = args[:type] if args.key?(:type)
end
end
# Drive mime-type search restricts (e.g. "type:pdf").
class DriveMimeTypeRestrict
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@type = args[:type] if args.key?(:type)
end
end
# The time span search restrict (e.g. "after:2017-09-11 before:2017-09-12").
class DriveTimeSpanRestrict
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@type = args[:type] if args.key?(:type)
end
end
# A person's email address.
class EmailAddress
include Google::Apis::Core::Hashable
# The email address.
# Corresponds to the JSON property `emailAddress`
# @return [String]
attr_accessor :email_address
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@email_address = args[:email_address] if args.key?(:email_address)
end
end
# Used to provide a search operator for enum properties. This is optional.
# Search operators let users restrict the query to specific fields relevant to
# the type of item being searched. For example, if you provide no operator for a
# *priority* enum property with possible values *p0* and *p1*, a query that
# contains the term *p0* returns items that have *p0* as the value of the *
# priority* property, as well as any items that contain the string *p0* in other
# fields. If you provide an operator name for the enum, such as *priority*, then
# search users can use that operator to refine results to only items that have *
# p0* as this property's value, with the query *priority:p0*.
class EnumOperatorOptions
include Google::Apis::Core::Hashable
# Indicates the operator name required in the query in order to isolate the enum
# property. For example, if operatorName is *priority* and the property's name
# is *priorityVal*, then queries like *priority:<value>* show results only where
# the value of the property named *priorityVal* matches *<value>*. By contrast,
# a search that uses the same *<value>* without an operator returns all items
# where *<value>* matches the value of any String properties or text within the
# content field for the item. The operator name can only contain lowercase
# letters (a-z). The maximum length is 32 characters.
# Corresponds to the JSON property `operatorName`
# @return [String]
attr_accessor :operator_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operator_name = args[:operator_name] if args.key?(:operator_name)
end
end
# Options for enum properties, which allow you to define a restricted set of
# strings to match user queries, set rankings for those string values, and
# define an operator name to be paired with those strings so that users can
# narrow results to only items with a specific value. For example, for items in
# a request tracking system with priority information, you could define *p0* as
# an allowable enum value and tie this enum to the operator name *priority* so
# that search users could add *priority:p0* to their query to restrict the set
# of results to only those items indexed with the value *p0*.
class EnumPropertyOptions
include Google::Apis::Core::Hashable
# Used to provide a search operator for enum properties. This is optional.
# Search operators let users restrict the query to specific fields relevant to
# the type of item being searched. For example, if you provide no operator for a
# *priority* enum property with possible values *p0* and *p1*, a query that
# contains the term *p0* returns items that have *p0* as the value of the *
# priority* property, as well as any items that contain the string *p0* in other
# fields. If you provide an operator name for the enum, such as *priority*, then
# search users can use that operator to refine results to only items that have *
# p0* as this property's value, with the query *priority:p0*.
# Corresponds to the JSON property `operatorOptions`
# @return [Google::Apis::CloudsearchV1::EnumOperatorOptions]
attr_accessor :operator_options
# Used to specify the ordered ranking for the enumeration that determines how
# the integer values provided in the possible EnumValuePairs are used to rank
# results. If specified, integer values must be provided for all possible
# EnumValuePair values given for this property. Can only be used if isRepeatable
# is false.
# Corresponds to the JSON property `orderedRanking`
# @return [String]
attr_accessor :ordered_ranking
# The list of possible values for the enumeration property. All EnumValuePairs
# must provide a string value. If you specify an integer value for one
# EnumValuePair, then all possible EnumValuePairs must provide an integer value.
# Both the string value and integer value must be unique over all possible
# values. Once set, possible values cannot be removed or modified. If you supply
# an ordered ranking and think you might insert additional enum values in the
# future, leave gaps in the initial integer values to allow adding a value in
# between previously registered values. The maximum number of elements is 100.
# Corresponds to the JSON property `possibleValues`
# @return [Array<Google::Apis::CloudsearchV1::EnumValuePair>]
attr_accessor :possible_values
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operator_options = args[:operator_options] if args.key?(:operator_options)
@ordered_ranking = args[:ordered_ranking] if args.key?(:ordered_ranking)
@possible_values = args[:possible_values] if args.key?(:possible_values)
end
end
# The enumeration value pair defines two things: a required string value and an
# optional integer value. The string value defines the necessary query term
# required to retrieve that item, such as *p0* for a priority item. The integer
# value determines the ranking of that string value relative to other enumerated
# values for the same property. For example, you might associate *p0* with *0*
# and define another enum pair such as *p1* and *1*. You must use the integer
# value in combination with ordered ranking to set the ranking of a given value
# relative to other enumerated values for the same property name. Here, a
# ranking order of DESCENDING for *priority* properties results in a ranking
# boost for items indexed with a value of *p0* compared to items indexed with a
# value of *p1*. Without a specified ranking order, the integer value has no
# effect on item ranking.
class EnumValuePair
include Google::Apis::Core::Hashable
# The integer value of the EnumValuePair which must be non-negative. Optional.
# Corresponds to the JSON property `integerValue`
# @return [Fixnum]
attr_accessor :integer_value
# The string value of the EnumValuePair. The maximum length is 32 characters.
# Corresponds to the JSON property `stringValue`
# @return [String]
attr_accessor :string_value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@integer_value = args[:integer_value] if args.key?(:integer_value)
@string_value = args[:string_value] if args.key?(:string_value)
end
end
# List of enum values.
class EnumValues
include Google::Apis::Core::Hashable
# The maximum allowable length for string values is 32 characters.
# Corresponds to the JSON property `values`
# @return [Array<String>]
attr_accessor :values
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@values = args[:values] if args.key?(:values)
end
end
# Error information about the response.
class ErrorInfo
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `errorMessages`
# @return [Array<Google::Apis::CloudsearchV1::ErrorMessage>]
attr_accessor :error_messages
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@error_messages = args[:error_messages] if args.key?(:error_messages)
end
end
# Error message per source response.
class ErrorMessage
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `errorMessage`
# @return [String]
attr_accessor :error_message
# Defines sources for the suggest/search APIs.
# Corresponds to the JSON property `source`
# @return [Google::Apis::CloudsearchV1::Source]
attr_accessor :source
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@error_message = args[:error_message] if args.key?(:error_message)
@source = args[:source] if args.key?(:source)
end
end
# A bucket in a facet is the basic unit of operation. A bucket can comprise
# either a single value OR a contiguous range of values, depending on the type
# of the field bucketed. FacetBucket is currently used only for returning the
# response object.
class FacetBucket
include Google::Apis::Core::Hashable
# Number of results that match the bucket value. Counts are only returned for
# searches when count accuracy is ensured. Can be empty.
# Corresponds to the JSON property `count`
# @return [Fixnum]
attr_accessor :count
# Percent of results that match the bucket value. The returned value is between (
# 0-100], and is rounded down to an integer if fractional. If the value is not
# explicitly returned, it represents a percentage value that rounds to 0.
# Percentages are returned for all searches, but are an estimate. Because
# percentages are always returned, you should render percentages instead of
# counts.
# Corresponds to the JSON property `percentage`
# @return [Fixnum]
attr_accessor :percentage
# Definition of a single value with generic type.
# Corresponds to the JSON property `value`
# @return [Google::Apis::CloudsearchV1::Value]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@count = args[:count] if args.key?(:count)
@percentage = args[:percentage] if args.key?(:percentage)
@value = args[:value] if args.key?(:value)
end
end
# Specifies operators to return facet results for. There will be one FacetResult
# for every source_name/object_type/operator_name combination.
class FacetOptions
include Google::Apis::Core::Hashable
# Maximum number of facet buckets that should be returned for this facet.
# Defaults to 10. Maximum value is 100.
# Corresponds to the JSON property `numFacetBuckets`
# @return [Fixnum]
attr_accessor :num_facet_buckets
# If object_type is set, only those objects of that type will be used to compute
# facets. If empty, then all objects will be used to compute facets.
# Corresponds to the JSON property `objectType`
# @return [String]
attr_accessor :object_type
# Name of the operator chosen for faceting. @see cloudsearch.
# SchemaPropertyOptions
# Corresponds to the JSON property `operatorName`
# @return [String]
attr_accessor :operator_name
# Source name to facet on. Format: datasources/`source_id` If empty, all data