google-api-client 0.34.0 → 0.34.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.kokoro/continuous/linux.cfg +2 -2
- data/.kokoro/continuous/post.cfg +30 -0
- data/.kokoro/presubmit/linux.cfg +1 -1
- data/.kokoro/release.cfg +94 -0
- data/.repo-metadata.json +5 -0
- data/.rubocop.yml +5 -0
- data/CHANGELOG.md +18 -0
- data/Gemfile +1 -0
- data/Rakefile +71 -2
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +33 -0
- data/generated/google/apis/bigquery_v2/representations.rb +18 -0
- data/generated/google/apis/cloudshell_v1.rb +1 -1
- data/generated/google/apis/cloudshell_v1/classes.rb +2 -1
- data/generated/google/apis/cloudshell_v1alpha1.rb +1 -1
- data/generated/google/apis/cloudshell_v1alpha1/classes.rb +2 -1
- data/generated/google/apis/dlp_v2.rb +1 -1
- data/generated/google/apis/dlp_v2/classes.rb +25 -0
- data/generated/google/apis/dlp_v2/representations.rb +14 -0
- data/generated/google/apis/dlp_v2/service.rb +55 -43
- data/generated/google/apis/docs_v1.rb +1 -1
- data/generated/google/apis/docs_v1/classes.rb +8 -4
- data/generated/google/apis/genomics_v2alpha1.rb +1 -1
- data/generated/google/apis/recommender_v1beta1.rb +1 -1
- data/generated/google/apis/redis_v1.rb +1 -1
- data/generated/google/apis/redis_v1/classes.rb +11 -11
- data/generated/google/apis/redis_v1/service.rb +5 -5
- data/generated/google/apis/redis_v1beta1.rb +1 -1
- data/generated/google/apis/redis_v1beta1/classes.rb +11 -11
- data/generated/google/apis/redis_v1beta1/service.rb +5 -5
- data/generated/google/apis/securitycenter_v1.rb +1 -1
- data/generated/google/apis/securitycenter_v1/classes.rb +22 -18
- data/generated/google/apis/securitycenter_v1/service.rb +14 -12
- data/generated/google/apis/securitycenter_v1beta1.rb +1 -1
- data/generated/google/apis/securitycenter_v1beta1/classes.rb +8 -7
- data/generated/google/apis/securitycenter_v1beta1/service.rb +14 -12
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +768 -18
- data/generated/google/apis/sheets_v4/representations.rb +101 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +66 -0
- data/generated/google/apis/vision_v1/representations.rb +32 -0
- data/generated/google/apis/vision_v1p1beta1.rb +1 -1
- data/generated/google/apis/vision_v1p1beta1/classes.rb +66 -0
- data/generated/google/apis/vision_v1p1beta1/representations.rb +32 -0
- data/generated/google/apis/vision_v1p2beta1.rb +1 -1
- data/generated/google/apis/vision_v1p2beta1/classes.rb +66 -0
- data/generated/google/apis/vision_v1p2beta1/representations.rb +32 -0
- data/lib/google/apis/core/upload.rb +4 -0
- data/lib/google/apis/version.rb +1 -1
- data/rakelib/devsite/devsite_builder.rb +126 -0
- data/rakelib/devsite/link_checker.rb +64 -0
- data/rakelib/devsite/repo_metadata.rb +56 -0
- metadata +9 -3
@@ -26,7 +26,7 @@ module Google
|
|
26
26
|
# @see https://console.cloud.google.com/apis/api/securitycenter.googleapis.com/overview
|
27
27
|
module SecuritycenterV1beta1
|
28
28
|
VERSION = 'V1beta1'
|
29
|
-
REVISION = '
|
29
|
+
REVISION = '20191101'
|
30
30
|
|
31
31
|
# View and manage your data across Google Cloud Platform services
|
32
32
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -38,7 +38,7 @@ module Google
|
|
38
38
|
# The relative resource name of this asset. See:
|
39
39
|
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
40
40
|
# Example:
|
41
|
-
# "organizations
|
41
|
+
# "organizations/`organization_id`/assets/`asset_id`".
|
42
42
|
# Corresponds to the JSON property `name`
|
43
43
|
# @return [String]
|
44
44
|
attr_accessor :name
|
@@ -389,7 +389,7 @@ module Google
|
|
389
389
|
# The relative resource name of this finding. See:
|
390
390
|
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
391
391
|
# Example:
|
392
|
-
# "organizations
|
392
|
+
# "organizations/`organization_id`/sources/`source_id`/findings/`finding_id`"
|
393
393
|
# Corresponds to the JSON property `name`
|
394
394
|
# @return [String]
|
395
395
|
attr_accessor :name
|
@@ -399,7 +399,7 @@ module Google
|
|
399
399
|
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
400
400
|
# This field is immutable after creation time.
|
401
401
|
# For example:
|
402
|
-
# "organizations
|
402
|
+
# "organizations/`organization_id`/sources/`source_id`"
|
403
403
|
# Corresponds to the JSON property `parent`
|
404
404
|
# @return [String]
|
405
405
|
attr_accessor :parent
|
@@ -1056,7 +1056,7 @@ module Google
|
|
1056
1056
|
# The relative resource name of the settings. See:
|
1057
1057
|
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
1058
1058
|
# Example:
|
1059
|
-
# "organizations
|
1059
|
+
# "organizations/`organization_id`/organizationSettings".
|
1060
1060
|
# Corresponds to the JSON property `name`
|
1061
1061
|
# @return [String]
|
1062
1062
|
attr_accessor :name
|
@@ -1266,8 +1266,9 @@ module Google
|
|
1266
1266
|
# The relative resource name of the SecurityMarks. See:
|
1267
1267
|
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
1268
1268
|
# Examples:
|
1269
|
-
# "organizations
|
1270
|
-
# "organizations
|
1269
|
+
# "organizations/`organization_id`/assets/`asset_id`/securityMarks"
|
1270
|
+
# "organizations/`organization_id`/sources/`source_id`/findings/`finding_id`/
|
1271
|
+
# securityMarks".
|
1271
1272
|
# Corresponds to the JSON property `name`
|
1272
1273
|
# @return [String]
|
1273
1274
|
attr_accessor :name
|
@@ -1415,7 +1416,7 @@ module Google
|
|
1415
1416
|
# The relative resource name of this source. See:
|
1416
1417
|
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
1417
1418
|
# Example:
|
1418
|
-
# "organizations
|
1419
|
+
# "organizations/`organization_id`/sources/`source_id`"
|
1419
1420
|
# Corresponds to the JSON property `name`
|
1420
1421
|
# @return [String]
|
1421
1422
|
attr_accessor :name
|
@@ -85,7 +85,7 @@ module Google
|
|
85
85
|
# The relative resource name of the settings. See:
|
86
86
|
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
87
87
|
# Example:
|
88
|
-
# "organizations
|
88
|
+
# "organizations/`organization_id`/organizationSettings".
|
89
89
|
# @param [Google::Apis::SecuritycenterV1beta1::OrganizationSettings] organization_settings_object
|
90
90
|
# @param [String] update_mask
|
91
91
|
# The FieldMask to use when updating the settings resource.
|
@@ -302,8 +302,9 @@ module Google
|
|
302
302
|
# The relative resource name of the SecurityMarks. See:
|
303
303
|
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
304
304
|
# Examples:
|
305
|
-
# "organizations
|
306
|
-
# "organizations
|
305
|
+
# "organizations/`organization_id`/assets/`asset_id`/securityMarks"
|
306
|
+
# "organizations/`organization_id`/sources/`source_id`/findings/`finding_id`/
|
307
|
+
# securityMarks".
|
307
308
|
# @param [Google::Apis::SecuritycenterV1beta1::SecurityMarks] security_marks_object
|
308
309
|
# @param [String] start_time
|
309
310
|
# The time at which the updated SecurityMarks take effect.
|
@@ -638,7 +639,7 @@ module Google
|
|
638
639
|
# The relative resource name of this source. See:
|
639
640
|
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
640
641
|
# Example:
|
641
|
-
# "organizations
|
642
|
+
# "organizations/`organization_id`/sources/`source_id`"
|
642
643
|
# @param [Google::Apis::SecuritycenterV1beta1::Source] source_object
|
643
644
|
# @param [String] update_mask
|
644
645
|
# The FieldMask to use when updating the source resource.
|
@@ -783,12 +784,12 @@ module Google
|
|
783
784
|
# Filters an organization or source's findings and groups them by their
|
784
785
|
# specified properties.
|
785
786
|
# To group across all sources provide a `-` as the source id.
|
786
|
-
# Example: /v1beta1/organizations
|
787
|
+
# Example: /v1beta1/organizations/`organization_id`/sources/-/findings
|
787
788
|
# @param [String] parent
|
788
789
|
# Required. Name of the source to groupBy. Its format is
|
789
790
|
# "organizations/[organization_id]/sources/[source_id]". To groupBy across
|
790
791
|
# all sources provide a source_id of `-`. For example:
|
791
|
-
# organizations
|
792
|
+
# organizations/`organization_id`/sources/-
|
792
793
|
# @param [Google::Apis::SecuritycenterV1beta1::GroupFindingsRequest] group_findings_request_object
|
793
794
|
# @param [String] fields
|
794
795
|
# Selector specifying which fields to include in a partial response.
|
@@ -821,12 +822,12 @@ module Google
|
|
821
822
|
|
822
823
|
# Lists an organization or source's findings.
|
823
824
|
# To list across all sources provide a `-` as the source id.
|
824
|
-
# Example: /v1beta1/organizations
|
825
|
+
# Example: /v1beta1/organizations/`organization_id`/sources/-/findings
|
825
826
|
# @param [String] parent
|
826
827
|
# Required. Name of the source the findings belong to. Its format is
|
827
828
|
# "organizations/[organization_id]/sources/[source_id]". To list across all
|
828
829
|
# sources provide a source_id of `-`. For example:
|
829
|
-
# organizations
|
830
|
+
# organizations/`organization_id`/sources/-
|
830
831
|
# @param [String] field_mask
|
831
832
|
# Optional. A field mask to specify the Finding fields to be listed in the
|
832
833
|
# response.
|
@@ -910,7 +911,7 @@ module Google
|
|
910
911
|
# The relative resource name of this finding. See:
|
911
912
|
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
912
913
|
# Example:
|
913
|
-
# "organizations
|
914
|
+
# "organizations/`organization_id`/sources/`source_id`/findings/`finding_id`"
|
914
915
|
# @param [Google::Apis::SecuritycenterV1beta1::Finding] finding_object
|
915
916
|
# @param [String] update_mask
|
916
917
|
# The FieldMask to use when updating the finding resource. This field should
|
@@ -950,7 +951,7 @@ module Google
|
|
950
951
|
# Required. The relative resource name of the finding. See:
|
951
952
|
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
952
953
|
# Example:
|
953
|
-
# "organizations
|
954
|
+
# "organizations/`organization_id`/sources/`source_id`/finding/`finding_id`".
|
954
955
|
# @param [Google::Apis::SecuritycenterV1beta1::SetFindingStateRequest] set_finding_state_request_object
|
955
956
|
# @param [String] fields
|
956
957
|
# Selector specifying which fields to include in a partial response.
|
@@ -986,8 +987,9 @@ module Google
|
|
986
987
|
# The relative resource name of the SecurityMarks. See:
|
987
988
|
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
988
989
|
# Examples:
|
989
|
-
# "organizations
|
990
|
-
# "organizations
|
990
|
+
# "organizations/`organization_id`/assets/`asset_id`/securityMarks"
|
991
|
+
# "organizations/`organization_id`/sources/`source_id`/findings/`finding_id`/
|
992
|
+
# securityMarks".
|
991
993
|
# @param [Google::Apis::SecuritycenterV1beta1::SecurityMarks] security_marks_object
|
992
994
|
# @param [String] start_time
|
993
995
|
# The time at which the updated SecurityMarks take effect.
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://developers.google.com/sheets/
|
26
26
|
module SheetsV4
|
27
27
|
VERSION = 'V4'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20191031'
|
29
29
|
|
30
30
|
# See, edit, create, and delete all of your Google Drive files
|
31
31
|
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
|
@@ -337,6 +337,44 @@ module Google
|
|
337
337
|
end
|
338
338
|
end
|
339
339
|
|
340
|
+
# Adds a slicer to a sheet in the spreadsheet.
|
341
|
+
class AddSlicerRequest
|
342
|
+
include Google::Apis::Core::Hashable
|
343
|
+
|
344
|
+
# A slicer in a sheet.
|
345
|
+
# Corresponds to the JSON property `slicer`
|
346
|
+
# @return [Google::Apis::SheetsV4::Slicer]
|
347
|
+
attr_accessor :slicer
|
348
|
+
|
349
|
+
def initialize(**args)
|
350
|
+
update!(**args)
|
351
|
+
end
|
352
|
+
|
353
|
+
# Update properties of this object
|
354
|
+
def update!(**args)
|
355
|
+
@slicer = args[:slicer] if args.key?(:slicer)
|
356
|
+
end
|
357
|
+
end
|
358
|
+
|
359
|
+
# The result of adding a slicer to a spreadsheet.
|
360
|
+
class AddSlicerResponse
|
361
|
+
include Google::Apis::Core::Hashable
|
362
|
+
|
363
|
+
# A slicer in a sheet.
|
364
|
+
# Corresponds to the JSON property `slicer`
|
365
|
+
# @return [Google::Apis::SheetsV4::Slicer]
|
366
|
+
attr_accessor :slicer
|
367
|
+
|
368
|
+
def initialize(**args)
|
369
|
+
update!(**args)
|
370
|
+
end
|
371
|
+
|
372
|
+
# Update properties of this object
|
373
|
+
def update!(**args)
|
374
|
+
@slicer = args[:slicer] if args.key?(:slicer)
|
375
|
+
end
|
376
|
+
end
|
377
|
+
|
340
378
|
# Adds new cells after the last row with data in a sheet,
|
341
379
|
# inserting new rows into the sheet if necessary.
|
342
380
|
class AppendCellsRequest
|
@@ -4985,6 +5023,220 @@ module Google
|
|
4985
5023
|
# @return [Array<String>]
|
4986
5024
|
attr_accessor :hidden_values
|
4987
5025
|
|
5026
|
+
# Represents a color in the RGBA color space. This representation is designed
|
5027
|
+
# for simplicity of conversion to/from color representations in various
|
5028
|
+
# languages over compactness; for example, the fields of this representation
|
5029
|
+
# can be trivially provided to the constructor of "java.awt.Color" in Java; it
|
5030
|
+
# can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
5031
|
+
# method in iOS; and, with just a little work, it can be easily formatted into
|
5032
|
+
# a CSS "rgba()" string in JavaScript, as well.
|
5033
|
+
# Note: this proto does not carry information about the absolute color space
|
5034
|
+
# that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
|
5035
|
+
# DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
|
5036
|
+
# space.
|
5037
|
+
# Example (Java):
|
5038
|
+
# import com.google.type.Color;
|
5039
|
+
# // ...
|
5040
|
+
# public static java.awt.Color fromProto(Color protocolor) `
|
5041
|
+
# float alpha = protocolor.hasAlpha()
|
5042
|
+
# ? protocolor.getAlpha().getValue()
|
5043
|
+
# : 1.0;
|
5044
|
+
# return new java.awt.Color(
|
5045
|
+
# protocolor.getRed(),
|
5046
|
+
# protocolor.getGreen(),
|
5047
|
+
# protocolor.getBlue(),
|
5048
|
+
# alpha);
|
5049
|
+
# `
|
5050
|
+
# public static Color toProto(java.awt.Color color) `
|
5051
|
+
# float red = (float) color.getRed();
|
5052
|
+
# float green = (float) color.getGreen();
|
5053
|
+
# float blue = (float) color.getBlue();
|
5054
|
+
# float denominator = 255.0;
|
5055
|
+
# Color.Builder resultBuilder =
|
5056
|
+
# Color
|
5057
|
+
# .newBuilder()
|
5058
|
+
# .setRed(red / denominator)
|
5059
|
+
# .setGreen(green / denominator)
|
5060
|
+
# .setBlue(blue / denominator);
|
5061
|
+
# int alpha = color.getAlpha();
|
5062
|
+
# if (alpha != 255) `
|
5063
|
+
# result.setAlpha(
|
5064
|
+
# FloatValue
|
5065
|
+
# .newBuilder()
|
5066
|
+
# .setValue(((float) alpha) / denominator)
|
5067
|
+
# .build());
|
5068
|
+
# `
|
5069
|
+
# return resultBuilder.build();
|
5070
|
+
# `
|
5071
|
+
# // ...
|
5072
|
+
# Example (iOS / Obj-C):
|
5073
|
+
# // ...
|
5074
|
+
# static UIColor* fromProto(Color* protocolor) `
|
5075
|
+
# float red = [protocolor red];
|
5076
|
+
# float green = [protocolor green];
|
5077
|
+
# float blue = [protocolor blue];
|
5078
|
+
# FloatValue* alpha_wrapper = [protocolor alpha];
|
5079
|
+
# float alpha = 1.0;
|
5080
|
+
# if (alpha_wrapper != nil) `
|
5081
|
+
# alpha = [alpha_wrapper value];
|
5082
|
+
# `
|
5083
|
+
# return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
|
5084
|
+
# `
|
5085
|
+
# static Color* toProto(UIColor* color) `
|
5086
|
+
# CGFloat red, green, blue, alpha;
|
5087
|
+
# if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
|
5088
|
+
# return nil;
|
5089
|
+
# `
|
5090
|
+
# Color* result = [[Color alloc] init];
|
5091
|
+
# [result setRed:red];
|
5092
|
+
# [result setGreen:green];
|
5093
|
+
# [result setBlue:blue];
|
5094
|
+
# if (alpha <= 0.9999) `
|
5095
|
+
# [result setAlpha:floatWrapperWithValue(alpha)];
|
5096
|
+
# `
|
5097
|
+
# [result autorelease];
|
5098
|
+
# return result;
|
5099
|
+
# `
|
5100
|
+
# // ...
|
5101
|
+
# Example (JavaScript):
|
5102
|
+
# // ...
|
5103
|
+
# var protoToCssColor = function(rgb_color) `
|
5104
|
+
# var redFrac = rgb_color.red || 0.0;
|
5105
|
+
# var greenFrac = rgb_color.green || 0.0;
|
5106
|
+
# var blueFrac = rgb_color.blue || 0.0;
|
5107
|
+
# var red = Math.floor(redFrac * 255);
|
5108
|
+
# var green = Math.floor(greenFrac * 255);
|
5109
|
+
# var blue = Math.floor(blueFrac * 255);
|
5110
|
+
# if (!('alpha' in rgb_color)) `
|
5111
|
+
# return rgbToCssColor_(red, green, blue);
|
5112
|
+
# `
|
5113
|
+
# var alphaFrac = rgb_color.alpha.value || 0.0;
|
5114
|
+
# var rgbParams = [red, green, blue].join(',');
|
5115
|
+
# return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
|
5116
|
+
# `;
|
5117
|
+
# var rgbToCssColor_ = function(red, green, blue) `
|
5118
|
+
# var rgbNumber = new Number((red << 16) | (green << 8) | blue);
|
5119
|
+
# var hexString = rgbNumber.toString(16);
|
5120
|
+
# var missingZeros = 6 - hexString.length;
|
5121
|
+
# var resultBuilder = ['#'];
|
5122
|
+
# for (var i = 0; i < missingZeros; i++) `
|
5123
|
+
# resultBuilder.push('0');
|
5124
|
+
# `
|
5125
|
+
# resultBuilder.push(hexString);
|
5126
|
+
# return resultBuilder.join('');
|
5127
|
+
# `;
|
5128
|
+
# // ...
|
5129
|
+
# Corresponds to the JSON property `visibleBackgroundColor`
|
5130
|
+
# @return [Google::Apis::SheetsV4::Color]
|
5131
|
+
attr_accessor :visible_background_color
|
5132
|
+
|
5133
|
+
# Represents a color in the RGBA color space. This representation is designed
|
5134
|
+
# for simplicity of conversion to/from color representations in various
|
5135
|
+
# languages over compactness; for example, the fields of this representation
|
5136
|
+
# can be trivially provided to the constructor of "java.awt.Color" in Java; it
|
5137
|
+
# can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
5138
|
+
# method in iOS; and, with just a little work, it can be easily formatted into
|
5139
|
+
# a CSS "rgba()" string in JavaScript, as well.
|
5140
|
+
# Note: this proto does not carry information about the absolute color space
|
5141
|
+
# that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
|
5142
|
+
# DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
|
5143
|
+
# space.
|
5144
|
+
# Example (Java):
|
5145
|
+
# import com.google.type.Color;
|
5146
|
+
# // ...
|
5147
|
+
# public static java.awt.Color fromProto(Color protocolor) `
|
5148
|
+
# float alpha = protocolor.hasAlpha()
|
5149
|
+
# ? protocolor.getAlpha().getValue()
|
5150
|
+
# : 1.0;
|
5151
|
+
# return new java.awt.Color(
|
5152
|
+
# protocolor.getRed(),
|
5153
|
+
# protocolor.getGreen(),
|
5154
|
+
# protocolor.getBlue(),
|
5155
|
+
# alpha);
|
5156
|
+
# `
|
5157
|
+
# public static Color toProto(java.awt.Color color) `
|
5158
|
+
# float red = (float) color.getRed();
|
5159
|
+
# float green = (float) color.getGreen();
|
5160
|
+
# float blue = (float) color.getBlue();
|
5161
|
+
# float denominator = 255.0;
|
5162
|
+
# Color.Builder resultBuilder =
|
5163
|
+
# Color
|
5164
|
+
# .newBuilder()
|
5165
|
+
# .setRed(red / denominator)
|
5166
|
+
# .setGreen(green / denominator)
|
5167
|
+
# .setBlue(blue / denominator);
|
5168
|
+
# int alpha = color.getAlpha();
|
5169
|
+
# if (alpha != 255) `
|
5170
|
+
# result.setAlpha(
|
5171
|
+
# FloatValue
|
5172
|
+
# .newBuilder()
|
5173
|
+
# .setValue(((float) alpha) / denominator)
|
5174
|
+
# .build());
|
5175
|
+
# `
|
5176
|
+
# return resultBuilder.build();
|
5177
|
+
# `
|
5178
|
+
# // ...
|
5179
|
+
# Example (iOS / Obj-C):
|
5180
|
+
# // ...
|
5181
|
+
# static UIColor* fromProto(Color* protocolor) `
|
5182
|
+
# float red = [protocolor red];
|
5183
|
+
# float green = [protocolor green];
|
5184
|
+
# float blue = [protocolor blue];
|
5185
|
+
# FloatValue* alpha_wrapper = [protocolor alpha];
|
5186
|
+
# float alpha = 1.0;
|
5187
|
+
# if (alpha_wrapper != nil) `
|
5188
|
+
# alpha = [alpha_wrapper value];
|
5189
|
+
# `
|
5190
|
+
# return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
|
5191
|
+
# `
|
5192
|
+
# static Color* toProto(UIColor* color) `
|
5193
|
+
# CGFloat red, green, blue, alpha;
|
5194
|
+
# if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
|
5195
|
+
# return nil;
|
5196
|
+
# `
|
5197
|
+
# Color* result = [[Color alloc] init];
|
5198
|
+
# [result setRed:red];
|
5199
|
+
# [result setGreen:green];
|
5200
|
+
# [result setBlue:blue];
|
5201
|
+
# if (alpha <= 0.9999) `
|
5202
|
+
# [result setAlpha:floatWrapperWithValue(alpha)];
|
5203
|
+
# `
|
5204
|
+
# [result autorelease];
|
5205
|
+
# return result;
|
5206
|
+
# `
|
5207
|
+
# // ...
|
5208
|
+
# Example (JavaScript):
|
5209
|
+
# // ...
|
5210
|
+
# var protoToCssColor = function(rgb_color) `
|
5211
|
+
# var redFrac = rgb_color.red || 0.0;
|
5212
|
+
# var greenFrac = rgb_color.green || 0.0;
|
5213
|
+
# var blueFrac = rgb_color.blue || 0.0;
|
5214
|
+
# var red = Math.floor(redFrac * 255);
|
5215
|
+
# var green = Math.floor(greenFrac * 255);
|
5216
|
+
# var blue = Math.floor(blueFrac * 255);
|
5217
|
+
# if (!('alpha' in rgb_color)) `
|
5218
|
+
# return rgbToCssColor_(red, green, blue);
|
5219
|
+
# `
|
5220
|
+
# var alphaFrac = rgb_color.alpha.value || 0.0;
|
5221
|
+
# var rgbParams = [red, green, blue].join(',');
|
5222
|
+
# return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
|
5223
|
+
# `;
|
5224
|
+
# var rgbToCssColor_ = function(red, green, blue) `
|
5225
|
+
# var rgbNumber = new Number((red << 16) | (green << 8) | blue);
|
5226
|
+
# var hexString = rgbNumber.toString(16);
|
5227
|
+
# var missingZeros = 6 - hexString.length;
|
5228
|
+
# var resultBuilder = ['#'];
|
5229
|
+
# for (var i = 0; i < missingZeros; i++) `
|
5230
|
+
# resultBuilder.push('0');
|
5231
|
+
# `
|
5232
|
+
# resultBuilder.push(hexString);
|
5233
|
+
# return resultBuilder.join('');
|
5234
|
+
# `;
|
5235
|
+
# // ...
|
5236
|
+
# Corresponds to the JSON property `visibleForegroundColor`
|
5237
|
+
# @return [Google::Apis::SheetsV4::Color]
|
5238
|
+
attr_accessor :visible_foreground_color
|
5239
|
+
|
4988
5240
|
def initialize(**args)
|
4989
5241
|
update!(**args)
|
4990
5242
|
end
|
@@ -4993,6 +5245,8 @@ module Google
|
|
4993
5245
|
def update!(**args)
|
4994
5246
|
@condition = args[:condition] if args.key?(:condition)
|
4995
5247
|
@hidden_values = args[:hidden_values] if args.key?(:hidden_values)
|
5248
|
+
@visible_background_color = args[:visible_background_color] if args.key?(:visible_background_color)
|
5249
|
+
@visible_foreground_color = args[:visible_foreground_color] if args.key?(:visible_foreground_color)
|
4996
5250
|
end
|
4997
5251
|
end
|
4998
5252
|
|
@@ -7461,6 +7715,11 @@ module Google
|
|
7461
7715
|
# @return [Google::Apis::SheetsV4::AddSheetRequest]
|
7462
7716
|
attr_accessor :add_sheet
|
7463
7717
|
|
7718
|
+
# Adds a slicer to a sheet in the spreadsheet.
|
7719
|
+
# Corresponds to the JSON property `addSlicer`
|
7720
|
+
# @return [Google::Apis::SheetsV4::AddSlicerRequest]
|
7721
|
+
attr_accessor :add_slicer
|
7722
|
+
|
7464
7723
|
# Adds new cells after the last row with data in a sheet,
|
7465
7724
|
# inserting new rows into the sheet if necessary.
|
7466
7725
|
# Corresponds to the JSON property `appendCells`
|
@@ -7758,6 +8017,13 @@ module Google
|
|
7758
8017
|
# @return [Google::Apis::SheetsV4::UpdateSheetPropertiesRequest]
|
7759
8018
|
attr_accessor :update_sheet_properties
|
7760
8019
|
|
8020
|
+
# Updates a slicer’s specifications.
|
8021
|
+
# (This does not move or resize a slicer. To move or resize a slicer use
|
8022
|
+
# UpdateEmbeddedObjectPositionRequest.
|
8023
|
+
# Corresponds to the JSON property `updateSlicerSpec`
|
8024
|
+
# @return [Google::Apis::SheetsV4::UpdateSlicerSpecRequest]
|
8025
|
+
attr_accessor :update_slicer_spec
|
8026
|
+
|
7761
8027
|
# Updates properties of a spreadsheet.
|
7762
8028
|
# Corresponds to the JSON property `updateSpreadsheetProperties`
|
7763
8029
|
# @return [Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest]
|
@@ -7777,6 +8043,7 @@ module Google
|
|
7777
8043
|
@add_named_range = args[:add_named_range] if args.key?(:add_named_range)
|
7778
8044
|
@add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range)
|
7779
8045
|
@add_sheet = args[:add_sheet] if args.key?(:add_sheet)
|
8046
|
+
@add_slicer = args[:add_slicer] if args.key?(:add_slicer)
|
7780
8047
|
@append_cells = args[:append_cells] if args.key?(:append_cells)
|
7781
8048
|
@append_dimension = args[:append_dimension] if args.key?(:append_dimension)
|
7782
8049
|
@auto_fill = args[:auto_fill] if args.key?(:auto_fill)
|
@@ -7826,6 +8093,7 @@ module Google
|
|
7826
8093
|
@update_named_range = args[:update_named_range] if args.key?(:update_named_range)
|
7827
8094
|
@update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range)
|
7828
8095
|
@update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties)
|
8096
|
+
@update_slicer_spec = args[:update_slicer_spec] if args.key?(:update_slicer_spec)
|
7829
8097
|
@update_spreadsheet_properties = args[:update_spreadsheet_properties] if args.key?(:update_spreadsheet_properties)
|
7830
8098
|
end
|
7831
8099
|
end
|
@@ -7869,6 +8137,11 @@ module Google
|
|
7869
8137
|
# @return [Google::Apis::SheetsV4::AddSheetResponse]
|
7870
8138
|
attr_accessor :add_sheet
|
7871
8139
|
|
8140
|
+
# The result of adding a slicer to a spreadsheet.
|
8141
|
+
# Corresponds to the JSON property `addSlicer`
|
8142
|
+
# @return [Google::Apis::SheetsV4::AddSlicerResponse]
|
8143
|
+
attr_accessor :add_slicer
|
8144
|
+
|
7872
8145
|
# The response from creating developer metadata.
|
7873
8146
|
# Corresponds to the JSON property `createDeveloperMetadata`
|
7874
8147
|
# @return [Google::Apis::SheetsV4::CreateDeveloperMetadataResponse]
|
@@ -7942,6 +8215,7 @@ module Google
|
|
7942
8215
|
@add_named_range = args[:add_named_range] if args.key?(:add_named_range)
|
7943
8216
|
@add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range)
|
7944
8217
|
@add_sheet = args[:add_sheet] if args.key?(:add_sheet)
|
8218
|
+
@add_slicer = args[:add_slicer] if args.key?(:add_slicer)
|
7945
8219
|
@create_developer_metadata = args[:create_developer_metadata] if args.key?(:create_developer_metadata)
|
7946
8220
|
@delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule)
|
7947
8221
|
@delete_developer_metadata = args[:delete_developer_metadata] if args.key?(:delete_developer_metadata)
|
@@ -8226,6 +8500,11 @@ module Google
|
|
8226
8500
|
# @return [Array<Google::Apis::SheetsV4::DimensionGroup>]
|
8227
8501
|
attr_accessor :row_groups
|
8228
8502
|
|
8503
|
+
# The slicers on this sheet.
|
8504
|
+
# Corresponds to the JSON property `slicers`
|
8505
|
+
# @return [Array<Google::Apis::SheetsV4::Slicer>]
|
8506
|
+
attr_accessor :slicers
|
8507
|
+
|
8229
8508
|
def initialize(**args)
|
8230
8509
|
update!(**args)
|
8231
8510
|
end
|
@@ -8244,6 +8523,7 @@ module Google
|
|
8244
8523
|
@properties = args[:properties] if args.key?(:properties)
|
8245
8524
|
@protected_ranges = args[:protected_ranges] if args.key?(:protected_ranges)
|
8246
8525
|
@row_groups = args[:row_groups] if args.key?(:row_groups)
|
8526
|
+
@slicers = args[:slicers] if args.key?(:slicers)
|
8247
8527
|
end
|
8248
8528
|
end
|
8249
8529
|
|
@@ -8423,26 +8703,245 @@ module Google
|
|
8423
8703
|
end
|
8424
8704
|
end
|
8425
8705
|
|
8426
|
-
#
|
8427
|
-
class
|
8706
|
+
# A slicer in a sheet.
|
8707
|
+
class Slicer
|
8428
8708
|
include Google::Apis::Core::Hashable
|
8429
8709
|
|
8430
|
-
#
|
8431
|
-
#
|
8432
|
-
#
|
8433
|
-
|
8434
|
-
|
8435
|
-
#
|
8436
|
-
#
|
8437
|
-
#
|
8438
|
-
|
8439
|
-
|
8440
|
-
#
|
8441
|
-
#
|
8442
|
-
#
|
8443
|
-
|
8444
|
-
|
8445
|
-
|
8710
|
+
# The position of an embedded object such as a chart.
|
8711
|
+
# Corresponds to the JSON property `position`
|
8712
|
+
# @return [Google::Apis::SheetsV4::EmbeddedObjectPosition]
|
8713
|
+
attr_accessor :position
|
8714
|
+
|
8715
|
+
# The ID of the slicer.
|
8716
|
+
# Corresponds to the JSON property `slicerId`
|
8717
|
+
# @return [Fixnum]
|
8718
|
+
attr_accessor :slicer_id
|
8719
|
+
|
8720
|
+
# The specifications of a slicer.
|
8721
|
+
# Corresponds to the JSON property `spec`
|
8722
|
+
# @return [Google::Apis::SheetsV4::SlicerSpec]
|
8723
|
+
attr_accessor :spec
|
8724
|
+
|
8725
|
+
def initialize(**args)
|
8726
|
+
update!(**args)
|
8727
|
+
end
|
8728
|
+
|
8729
|
+
# Update properties of this object
|
8730
|
+
def update!(**args)
|
8731
|
+
@position = args[:position] if args.key?(:position)
|
8732
|
+
@slicer_id = args[:slicer_id] if args.key?(:slicer_id)
|
8733
|
+
@spec = args[:spec] if args.key?(:spec)
|
8734
|
+
end
|
8735
|
+
end
|
8736
|
+
|
8737
|
+
# The specifications of a slicer.
|
8738
|
+
class SlicerSpec
|
8739
|
+
include Google::Apis::Core::Hashable
|
8740
|
+
|
8741
|
+
# True if the filter should apply to pivot tables.
|
8742
|
+
# If not set, default to `True`.
|
8743
|
+
# Corresponds to the JSON property `applyToPivotTables`
|
8744
|
+
# @return [Boolean]
|
8745
|
+
attr_accessor :apply_to_pivot_tables
|
8746
|
+
alias_method :apply_to_pivot_tables?, :apply_to_pivot_tables
|
8747
|
+
|
8748
|
+
# Represents a color in the RGBA color space. This representation is designed
|
8749
|
+
# for simplicity of conversion to/from color representations in various
|
8750
|
+
# languages over compactness; for example, the fields of this representation
|
8751
|
+
# can be trivially provided to the constructor of "java.awt.Color" in Java; it
|
8752
|
+
# can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
8753
|
+
# method in iOS; and, with just a little work, it can be easily formatted into
|
8754
|
+
# a CSS "rgba()" string in JavaScript, as well.
|
8755
|
+
# Note: this proto does not carry information about the absolute color space
|
8756
|
+
# that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
|
8757
|
+
# DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
|
8758
|
+
# space.
|
8759
|
+
# Example (Java):
|
8760
|
+
# import com.google.type.Color;
|
8761
|
+
# // ...
|
8762
|
+
# public static java.awt.Color fromProto(Color protocolor) `
|
8763
|
+
# float alpha = protocolor.hasAlpha()
|
8764
|
+
# ? protocolor.getAlpha().getValue()
|
8765
|
+
# : 1.0;
|
8766
|
+
# return new java.awt.Color(
|
8767
|
+
# protocolor.getRed(),
|
8768
|
+
# protocolor.getGreen(),
|
8769
|
+
# protocolor.getBlue(),
|
8770
|
+
# alpha);
|
8771
|
+
# `
|
8772
|
+
# public static Color toProto(java.awt.Color color) `
|
8773
|
+
# float red = (float) color.getRed();
|
8774
|
+
# float green = (float) color.getGreen();
|
8775
|
+
# float blue = (float) color.getBlue();
|
8776
|
+
# float denominator = 255.0;
|
8777
|
+
# Color.Builder resultBuilder =
|
8778
|
+
# Color
|
8779
|
+
# .newBuilder()
|
8780
|
+
# .setRed(red / denominator)
|
8781
|
+
# .setGreen(green / denominator)
|
8782
|
+
# .setBlue(blue / denominator);
|
8783
|
+
# int alpha = color.getAlpha();
|
8784
|
+
# if (alpha != 255) `
|
8785
|
+
# result.setAlpha(
|
8786
|
+
# FloatValue
|
8787
|
+
# .newBuilder()
|
8788
|
+
# .setValue(((float) alpha) / denominator)
|
8789
|
+
# .build());
|
8790
|
+
# `
|
8791
|
+
# return resultBuilder.build();
|
8792
|
+
# `
|
8793
|
+
# // ...
|
8794
|
+
# Example (iOS / Obj-C):
|
8795
|
+
# // ...
|
8796
|
+
# static UIColor* fromProto(Color* protocolor) `
|
8797
|
+
# float red = [protocolor red];
|
8798
|
+
# float green = [protocolor green];
|
8799
|
+
# float blue = [protocolor blue];
|
8800
|
+
# FloatValue* alpha_wrapper = [protocolor alpha];
|
8801
|
+
# float alpha = 1.0;
|
8802
|
+
# if (alpha_wrapper != nil) `
|
8803
|
+
# alpha = [alpha_wrapper value];
|
8804
|
+
# `
|
8805
|
+
# return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
|
8806
|
+
# `
|
8807
|
+
# static Color* toProto(UIColor* color) `
|
8808
|
+
# CGFloat red, green, blue, alpha;
|
8809
|
+
# if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
|
8810
|
+
# return nil;
|
8811
|
+
# `
|
8812
|
+
# Color* result = [[Color alloc] init];
|
8813
|
+
# [result setRed:red];
|
8814
|
+
# [result setGreen:green];
|
8815
|
+
# [result setBlue:blue];
|
8816
|
+
# if (alpha <= 0.9999) `
|
8817
|
+
# [result setAlpha:floatWrapperWithValue(alpha)];
|
8818
|
+
# `
|
8819
|
+
# [result autorelease];
|
8820
|
+
# return result;
|
8821
|
+
# `
|
8822
|
+
# // ...
|
8823
|
+
# Example (JavaScript):
|
8824
|
+
# // ...
|
8825
|
+
# var protoToCssColor = function(rgb_color) `
|
8826
|
+
# var redFrac = rgb_color.red || 0.0;
|
8827
|
+
# var greenFrac = rgb_color.green || 0.0;
|
8828
|
+
# var blueFrac = rgb_color.blue || 0.0;
|
8829
|
+
# var red = Math.floor(redFrac * 255);
|
8830
|
+
# var green = Math.floor(greenFrac * 255);
|
8831
|
+
# var blue = Math.floor(blueFrac * 255);
|
8832
|
+
# if (!('alpha' in rgb_color)) `
|
8833
|
+
# return rgbToCssColor_(red, green, blue);
|
8834
|
+
# `
|
8835
|
+
# var alphaFrac = rgb_color.alpha.value || 0.0;
|
8836
|
+
# var rgbParams = [red, green, blue].join(',');
|
8837
|
+
# return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
|
8838
|
+
# `;
|
8839
|
+
# var rgbToCssColor_ = function(red, green, blue) `
|
8840
|
+
# var rgbNumber = new Number((red << 16) | (green << 8) | blue);
|
8841
|
+
# var hexString = rgbNumber.toString(16);
|
8842
|
+
# var missingZeros = 6 - hexString.length;
|
8843
|
+
# var resultBuilder = ['#'];
|
8844
|
+
# for (var i = 0; i < missingZeros; i++) `
|
8845
|
+
# resultBuilder.push('0');
|
8846
|
+
# `
|
8847
|
+
# resultBuilder.push(hexString);
|
8848
|
+
# return resultBuilder.join('');
|
8849
|
+
# `;
|
8850
|
+
# // ...
|
8851
|
+
# Corresponds to the JSON property `backgroundColor`
|
8852
|
+
# @return [Google::Apis::SheetsV4::Color]
|
8853
|
+
attr_accessor :background_color
|
8854
|
+
|
8855
|
+
# The column index in the data table on which the filter is applied to.
|
8856
|
+
# Corresponds to the JSON property `columnIndex`
|
8857
|
+
# @return [Fixnum]
|
8858
|
+
attr_accessor :column_index
|
8859
|
+
|
8860
|
+
# A range on a sheet.
|
8861
|
+
# All indexes are zero-based.
|
8862
|
+
# Indexes are half open, e.g the start index is inclusive
|
8863
|
+
# and the end index is exclusive -- [start_index, end_index).
|
8864
|
+
# Missing indexes indicate the range is unbounded on that side.
|
8865
|
+
# For example, if `"Sheet1"` is sheet ID 0, then:
|
8866
|
+
# `Sheet1!A1:A1 == sheet_id: 0,
|
8867
|
+
# start_row_index: 0, end_row_index: 1,
|
8868
|
+
# start_column_index: 0, end_column_index: 1`
|
8869
|
+
# `Sheet1!A3:B4 == sheet_id: 0,
|
8870
|
+
# start_row_index: 2, end_row_index: 4,
|
8871
|
+
# start_column_index: 0, end_column_index: 2`
|
8872
|
+
# `Sheet1!A:B == sheet_id: 0,
|
8873
|
+
# start_column_index: 0, end_column_index: 2`
|
8874
|
+
# `Sheet1!A5:B == sheet_id: 0,
|
8875
|
+
# start_row_index: 4,
|
8876
|
+
# start_column_index: 0, end_column_index: 2`
|
8877
|
+
# `Sheet1 == sheet_id:0`
|
8878
|
+
# The start index must always be less than or equal to the end index.
|
8879
|
+
# If the start index equals the end index, then the range is empty.
|
8880
|
+
# Empty ranges are typically not meaningful and are usually rendered in the
|
8881
|
+
# UI as `#REF!`.
|
8882
|
+
# Corresponds to the JSON property `dataRange`
|
8883
|
+
# @return [Google::Apis::SheetsV4::GridRange]
|
8884
|
+
attr_accessor :data_range
|
8885
|
+
|
8886
|
+
# Criteria for showing/hiding rows in a filter or filter view.
|
8887
|
+
# Corresponds to the JSON property `filterCriteria`
|
8888
|
+
# @return [Google::Apis::SheetsV4::FilterCriteria]
|
8889
|
+
attr_accessor :filter_criteria
|
8890
|
+
|
8891
|
+
# The horizontal alignment of title in the slicer.
|
8892
|
+
# If unspecified, defaults to `LEFT`
|
8893
|
+
# Corresponds to the JSON property `horizontalAlignment`
|
8894
|
+
# @return [String]
|
8895
|
+
attr_accessor :horizontal_alignment
|
8896
|
+
|
8897
|
+
# The format of a run of text in a cell.
|
8898
|
+
# Absent values indicate that the field isn't specified.
|
8899
|
+
# Corresponds to the JSON property `textFormat`
|
8900
|
+
# @return [Google::Apis::SheetsV4::TextFormat]
|
8901
|
+
attr_accessor :text_format
|
8902
|
+
|
8903
|
+
# The title of the slicer.
|
8904
|
+
# Corresponds to the JSON property `title`
|
8905
|
+
# @return [String]
|
8906
|
+
attr_accessor :title
|
8907
|
+
|
8908
|
+
def initialize(**args)
|
8909
|
+
update!(**args)
|
8910
|
+
end
|
8911
|
+
|
8912
|
+
# Update properties of this object
|
8913
|
+
def update!(**args)
|
8914
|
+
@apply_to_pivot_tables = args[:apply_to_pivot_tables] if args.key?(:apply_to_pivot_tables)
|
8915
|
+
@background_color = args[:background_color] if args.key?(:background_color)
|
8916
|
+
@column_index = args[:column_index] if args.key?(:column_index)
|
8917
|
+
@data_range = args[:data_range] if args.key?(:data_range)
|
8918
|
+
@filter_criteria = args[:filter_criteria] if args.key?(:filter_criteria)
|
8919
|
+
@horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment)
|
8920
|
+
@text_format = args[:text_format] if args.key?(:text_format)
|
8921
|
+
@title = args[:title] if args.key?(:title)
|
8922
|
+
end
|
8923
|
+
end
|
8924
|
+
|
8925
|
+
# Sorts data in rows based on a sort order per column.
|
8926
|
+
class SortRangeRequest
|
8927
|
+
include Google::Apis::Core::Hashable
|
8928
|
+
|
8929
|
+
# A range on a sheet.
|
8930
|
+
# All indexes are zero-based.
|
8931
|
+
# Indexes are half open, e.g the start index is inclusive
|
8932
|
+
# and the end index is exclusive -- [start_index, end_index).
|
8933
|
+
# Missing indexes indicate the range is unbounded on that side.
|
8934
|
+
# For example, if `"Sheet1"` is sheet ID 0, then:
|
8935
|
+
# `Sheet1!A1:A1 == sheet_id: 0,
|
8936
|
+
# start_row_index: 0, end_row_index: 1,
|
8937
|
+
# start_column_index: 0, end_column_index: 1`
|
8938
|
+
# `Sheet1!A3:B4 == sheet_id: 0,
|
8939
|
+
# start_row_index: 2, end_row_index: 4,
|
8940
|
+
# start_column_index: 0, end_column_index: 2`
|
8941
|
+
# `Sheet1!A:B == sheet_id: 0,
|
8942
|
+
# start_column_index: 0, end_column_index: 2`
|
8943
|
+
# `Sheet1!A5:B == sheet_id: 0,
|
8944
|
+
# start_row_index: 4,
|
8446
8945
|
# start_column_index: 0, end_column_index: 2`
|
8447
8946
|
# `Sheet1 == sheet_id:0`
|
8448
8947
|
# The start index must always be less than or equal to the end index.
|
@@ -8474,11 +8973,225 @@ module Google
|
|
8474
8973
|
class SortSpec
|
8475
8974
|
include Google::Apis::Core::Hashable
|
8476
8975
|
|
8976
|
+
# Represents a color in the RGBA color space. This representation is designed
|
8977
|
+
# for simplicity of conversion to/from color representations in various
|
8978
|
+
# languages over compactness; for example, the fields of this representation
|
8979
|
+
# can be trivially provided to the constructor of "java.awt.Color" in Java; it
|
8980
|
+
# can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
8981
|
+
# method in iOS; and, with just a little work, it can be easily formatted into
|
8982
|
+
# a CSS "rgba()" string in JavaScript, as well.
|
8983
|
+
# Note: this proto does not carry information about the absolute color space
|
8984
|
+
# that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
|
8985
|
+
# DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
|
8986
|
+
# space.
|
8987
|
+
# Example (Java):
|
8988
|
+
# import com.google.type.Color;
|
8989
|
+
# // ...
|
8990
|
+
# public static java.awt.Color fromProto(Color protocolor) `
|
8991
|
+
# float alpha = protocolor.hasAlpha()
|
8992
|
+
# ? protocolor.getAlpha().getValue()
|
8993
|
+
# : 1.0;
|
8994
|
+
# return new java.awt.Color(
|
8995
|
+
# protocolor.getRed(),
|
8996
|
+
# protocolor.getGreen(),
|
8997
|
+
# protocolor.getBlue(),
|
8998
|
+
# alpha);
|
8999
|
+
# `
|
9000
|
+
# public static Color toProto(java.awt.Color color) `
|
9001
|
+
# float red = (float) color.getRed();
|
9002
|
+
# float green = (float) color.getGreen();
|
9003
|
+
# float blue = (float) color.getBlue();
|
9004
|
+
# float denominator = 255.0;
|
9005
|
+
# Color.Builder resultBuilder =
|
9006
|
+
# Color
|
9007
|
+
# .newBuilder()
|
9008
|
+
# .setRed(red / denominator)
|
9009
|
+
# .setGreen(green / denominator)
|
9010
|
+
# .setBlue(blue / denominator);
|
9011
|
+
# int alpha = color.getAlpha();
|
9012
|
+
# if (alpha != 255) `
|
9013
|
+
# result.setAlpha(
|
9014
|
+
# FloatValue
|
9015
|
+
# .newBuilder()
|
9016
|
+
# .setValue(((float) alpha) / denominator)
|
9017
|
+
# .build());
|
9018
|
+
# `
|
9019
|
+
# return resultBuilder.build();
|
9020
|
+
# `
|
9021
|
+
# // ...
|
9022
|
+
# Example (iOS / Obj-C):
|
9023
|
+
# // ...
|
9024
|
+
# static UIColor* fromProto(Color* protocolor) `
|
9025
|
+
# float red = [protocolor red];
|
9026
|
+
# float green = [protocolor green];
|
9027
|
+
# float blue = [protocolor blue];
|
9028
|
+
# FloatValue* alpha_wrapper = [protocolor alpha];
|
9029
|
+
# float alpha = 1.0;
|
9030
|
+
# if (alpha_wrapper != nil) `
|
9031
|
+
# alpha = [alpha_wrapper value];
|
9032
|
+
# `
|
9033
|
+
# return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
|
9034
|
+
# `
|
9035
|
+
# static Color* toProto(UIColor* color) `
|
9036
|
+
# CGFloat red, green, blue, alpha;
|
9037
|
+
# if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
|
9038
|
+
# return nil;
|
9039
|
+
# `
|
9040
|
+
# Color* result = [[Color alloc] init];
|
9041
|
+
# [result setRed:red];
|
9042
|
+
# [result setGreen:green];
|
9043
|
+
# [result setBlue:blue];
|
9044
|
+
# if (alpha <= 0.9999) `
|
9045
|
+
# [result setAlpha:floatWrapperWithValue(alpha)];
|
9046
|
+
# `
|
9047
|
+
# [result autorelease];
|
9048
|
+
# return result;
|
9049
|
+
# `
|
9050
|
+
# // ...
|
9051
|
+
# Example (JavaScript):
|
9052
|
+
# // ...
|
9053
|
+
# var protoToCssColor = function(rgb_color) `
|
9054
|
+
# var redFrac = rgb_color.red || 0.0;
|
9055
|
+
# var greenFrac = rgb_color.green || 0.0;
|
9056
|
+
# var blueFrac = rgb_color.blue || 0.0;
|
9057
|
+
# var red = Math.floor(redFrac * 255);
|
9058
|
+
# var green = Math.floor(greenFrac * 255);
|
9059
|
+
# var blue = Math.floor(blueFrac * 255);
|
9060
|
+
# if (!('alpha' in rgb_color)) `
|
9061
|
+
# return rgbToCssColor_(red, green, blue);
|
9062
|
+
# `
|
9063
|
+
# var alphaFrac = rgb_color.alpha.value || 0.0;
|
9064
|
+
# var rgbParams = [red, green, blue].join(',');
|
9065
|
+
# return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
|
9066
|
+
# `;
|
9067
|
+
# var rgbToCssColor_ = function(red, green, blue) `
|
9068
|
+
# var rgbNumber = new Number((red << 16) | (green << 8) | blue);
|
9069
|
+
# var hexString = rgbNumber.toString(16);
|
9070
|
+
# var missingZeros = 6 - hexString.length;
|
9071
|
+
# var resultBuilder = ['#'];
|
9072
|
+
# for (var i = 0; i < missingZeros; i++) `
|
9073
|
+
# resultBuilder.push('0');
|
9074
|
+
# `
|
9075
|
+
# resultBuilder.push(hexString);
|
9076
|
+
# return resultBuilder.join('');
|
9077
|
+
# `;
|
9078
|
+
# // ...
|
9079
|
+
# Corresponds to the JSON property `backgroundColor`
|
9080
|
+
# @return [Google::Apis::SheetsV4::Color]
|
9081
|
+
attr_accessor :background_color
|
9082
|
+
|
8477
9083
|
# The dimension the sort should be applied to.
|
8478
9084
|
# Corresponds to the JSON property `dimensionIndex`
|
8479
9085
|
# @return [Fixnum]
|
8480
9086
|
attr_accessor :dimension_index
|
8481
9087
|
|
9088
|
+
# Represents a color in the RGBA color space. This representation is designed
|
9089
|
+
# for simplicity of conversion to/from color representations in various
|
9090
|
+
# languages over compactness; for example, the fields of this representation
|
9091
|
+
# can be trivially provided to the constructor of "java.awt.Color" in Java; it
|
9092
|
+
# can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
9093
|
+
# method in iOS; and, with just a little work, it can be easily formatted into
|
9094
|
+
# a CSS "rgba()" string in JavaScript, as well.
|
9095
|
+
# Note: this proto does not carry information about the absolute color space
|
9096
|
+
# that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
|
9097
|
+
# DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
|
9098
|
+
# space.
|
9099
|
+
# Example (Java):
|
9100
|
+
# import com.google.type.Color;
|
9101
|
+
# // ...
|
9102
|
+
# public static java.awt.Color fromProto(Color protocolor) `
|
9103
|
+
# float alpha = protocolor.hasAlpha()
|
9104
|
+
# ? protocolor.getAlpha().getValue()
|
9105
|
+
# : 1.0;
|
9106
|
+
# return new java.awt.Color(
|
9107
|
+
# protocolor.getRed(),
|
9108
|
+
# protocolor.getGreen(),
|
9109
|
+
# protocolor.getBlue(),
|
9110
|
+
# alpha);
|
9111
|
+
# `
|
9112
|
+
# public static Color toProto(java.awt.Color color) `
|
9113
|
+
# float red = (float) color.getRed();
|
9114
|
+
# float green = (float) color.getGreen();
|
9115
|
+
# float blue = (float) color.getBlue();
|
9116
|
+
# float denominator = 255.0;
|
9117
|
+
# Color.Builder resultBuilder =
|
9118
|
+
# Color
|
9119
|
+
# .newBuilder()
|
9120
|
+
# .setRed(red / denominator)
|
9121
|
+
# .setGreen(green / denominator)
|
9122
|
+
# .setBlue(blue / denominator);
|
9123
|
+
# int alpha = color.getAlpha();
|
9124
|
+
# if (alpha != 255) `
|
9125
|
+
# result.setAlpha(
|
9126
|
+
# FloatValue
|
9127
|
+
# .newBuilder()
|
9128
|
+
# .setValue(((float) alpha) / denominator)
|
9129
|
+
# .build());
|
9130
|
+
# `
|
9131
|
+
# return resultBuilder.build();
|
9132
|
+
# `
|
9133
|
+
# // ...
|
9134
|
+
# Example (iOS / Obj-C):
|
9135
|
+
# // ...
|
9136
|
+
# static UIColor* fromProto(Color* protocolor) `
|
9137
|
+
# float red = [protocolor red];
|
9138
|
+
# float green = [protocolor green];
|
9139
|
+
# float blue = [protocolor blue];
|
9140
|
+
# FloatValue* alpha_wrapper = [protocolor alpha];
|
9141
|
+
# float alpha = 1.0;
|
9142
|
+
# if (alpha_wrapper != nil) `
|
9143
|
+
# alpha = [alpha_wrapper value];
|
9144
|
+
# `
|
9145
|
+
# return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
|
9146
|
+
# `
|
9147
|
+
# static Color* toProto(UIColor* color) `
|
9148
|
+
# CGFloat red, green, blue, alpha;
|
9149
|
+
# if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
|
9150
|
+
# return nil;
|
9151
|
+
# `
|
9152
|
+
# Color* result = [[Color alloc] init];
|
9153
|
+
# [result setRed:red];
|
9154
|
+
# [result setGreen:green];
|
9155
|
+
# [result setBlue:blue];
|
9156
|
+
# if (alpha <= 0.9999) `
|
9157
|
+
# [result setAlpha:floatWrapperWithValue(alpha)];
|
9158
|
+
# `
|
9159
|
+
# [result autorelease];
|
9160
|
+
# return result;
|
9161
|
+
# `
|
9162
|
+
# // ...
|
9163
|
+
# Example (JavaScript):
|
9164
|
+
# // ...
|
9165
|
+
# var protoToCssColor = function(rgb_color) `
|
9166
|
+
# var redFrac = rgb_color.red || 0.0;
|
9167
|
+
# var greenFrac = rgb_color.green || 0.0;
|
9168
|
+
# var blueFrac = rgb_color.blue || 0.0;
|
9169
|
+
# var red = Math.floor(redFrac * 255);
|
9170
|
+
# var green = Math.floor(greenFrac * 255);
|
9171
|
+
# var blue = Math.floor(blueFrac * 255);
|
9172
|
+
# if (!('alpha' in rgb_color)) `
|
9173
|
+
# return rgbToCssColor_(red, green, blue);
|
9174
|
+
# `
|
9175
|
+
# var alphaFrac = rgb_color.alpha.value || 0.0;
|
9176
|
+
# var rgbParams = [red, green, blue].join(',');
|
9177
|
+
# return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
|
9178
|
+
# `;
|
9179
|
+
# var rgbToCssColor_ = function(red, green, blue) `
|
9180
|
+
# var rgbNumber = new Number((red << 16) | (green << 8) | blue);
|
9181
|
+
# var hexString = rgbNumber.toString(16);
|
9182
|
+
# var missingZeros = 6 - hexString.length;
|
9183
|
+
# var resultBuilder = ['#'];
|
9184
|
+
# for (var i = 0; i < missingZeros; i++) `
|
9185
|
+
# resultBuilder.push('0');
|
9186
|
+
# `
|
9187
|
+
# resultBuilder.push(hexString);
|
9188
|
+
# return resultBuilder.join('');
|
9189
|
+
# `;
|
9190
|
+
# // ...
|
9191
|
+
# Corresponds to the JSON property `foregroundColor`
|
9192
|
+
# @return [Google::Apis::SheetsV4::Color]
|
9193
|
+
attr_accessor :foreground_color
|
9194
|
+
|
8482
9195
|
# The order data should be sorted.
|
8483
9196
|
# Corresponds to the JSON property `sortOrder`
|
8484
9197
|
# @return [String]
|
@@ -8490,7 +9203,9 @@ module Google
|
|
8490
9203
|
|
8491
9204
|
# Update properties of this object
|
8492
9205
|
def update!(**args)
|
9206
|
+
@background_color = args[:background_color] if args.key?(:background_color)
|
8493
9207
|
@dimension_index = args[:dimension_index] if args.key?(:dimension_index)
|
9208
|
+
@foreground_color = args[:foreground_color] if args.key?(:foreground_color)
|
8494
9209
|
@sort_order = args[:sort_order] if args.key?(:sort_order)
|
8495
9210
|
end
|
8496
9211
|
end
|
@@ -10284,6 +10999,41 @@ module Google
|
|
10284
10999
|
end
|
10285
11000
|
end
|
10286
11001
|
|
11002
|
+
# Updates a slicer’s specifications.
|
11003
|
+
# (This does not move or resize a slicer. To move or resize a slicer use
|
11004
|
+
# UpdateEmbeddedObjectPositionRequest.
|
11005
|
+
class UpdateSlicerSpecRequest
|
11006
|
+
include Google::Apis::Core::Hashable
|
11007
|
+
|
11008
|
+
# The fields that should be updated. At least one field must be specified.
|
11009
|
+
# The root `SlicerSpec` is implied and should not be specified. A single "*"`
|
11010
|
+
# can be used as short-hand for listing every field.
|
11011
|
+
# Corresponds to the JSON property `fields`
|
11012
|
+
# @return [String]
|
11013
|
+
attr_accessor :fields
|
11014
|
+
|
11015
|
+
# The id of the slicer to update.
|
11016
|
+
# Corresponds to the JSON property `slicerId`
|
11017
|
+
# @return [Fixnum]
|
11018
|
+
attr_accessor :slicer_id
|
11019
|
+
|
11020
|
+
# The specifications of a slicer.
|
11021
|
+
# Corresponds to the JSON property `spec`
|
11022
|
+
# @return [Google::Apis::SheetsV4::SlicerSpec]
|
11023
|
+
attr_accessor :spec
|
11024
|
+
|
11025
|
+
def initialize(**args)
|
11026
|
+
update!(**args)
|
11027
|
+
end
|
11028
|
+
|
11029
|
+
# Update properties of this object
|
11030
|
+
def update!(**args)
|
11031
|
+
@fields = args[:fields] if args.key?(:fields)
|
11032
|
+
@slicer_id = args[:slicer_id] if args.key?(:slicer_id)
|
11033
|
+
@spec = args[:spec] if args.key?(:spec)
|
11034
|
+
end
|
11035
|
+
end
|
11036
|
+
|
10287
11037
|
# Updates properties of a spreadsheet.
|
10288
11038
|
class UpdateSpreadsheetPropertiesRequest
|
10289
11039
|
include Google::Apis::Core::Hashable
|