From a292c4573b5fbe486f03f257d61ef902d46d167b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 3 Dec 2020 03:26:04 -0800 Subject: [PATCH] feat: Automated regeneration of sheets v4 client (#1628) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-12-03 03:13:12,971 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py. On branch autosynth-sheets-v4 nothing to commit, working tree clean 2020-12-03 03:13:13,000 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sheets v4 DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sheets v4 bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`. Fetching gem metadata from https://rubygems.org/......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Fetching rake 11.3.0 Installing rake 11.3.0 Fetching concurrent-ruby 1.1.7 Installing concurrent-ruby 1.1.7 Fetching i18n 1.8.5 Installing i18n 1.8.5 Fetching minitest 5.14.2 Installing minitest 5.14.2 Fetching thread_safe 0.3.6 Installing thread_safe 0.3.6 Fetching tzinfo 1.2.8 Installing tzinfo 1.2.8 Fetching activesupport 5.0.7.2 Installing activesupport 5.0.7.2 Fetching public_suffix 4.0.6 Installing public_suffix 4.0.6 Fetching addressable 2.7.0 Installing addressable 2.7.0 Fetching ast 2.4.1 Installing ast 2.4.1 Using bundler 2.1.4 Fetching byebug 11.1.3 Installing byebug 11.1.3 with native extensions Fetching coderay 1.1.3 Installing coderay 1.1.3 Fetching json 2.3.1 Installing json 2.3.1 with native extensions Fetching docile 1.3.2 Installing docile 1.3.2 Fetching simplecov-html 0.10.2 Installing simplecov-html 0.10.2 Fetching simplecov 0.16.1 Installing simplecov 0.16.1 Using sync 0.5.0 Fetching tins 1.26.0 Installing tins 1.26.0 Fetching term-ansicolor 1.7.1 Installing term-ansicolor 1.7.1 Fetching thor 0.20.3 Installing thor 0.20.3 Fetching coveralls 0.8.23 Installing coveralls 0.8.23 Fetching crack 0.4.4 Installing crack 0.4.4 Fetching declarative 0.0.20 Installing declarative 0.0.20 Fetching declarative-option 0.1.0 Installing declarative-option 0.1.0 Fetching diff-lcs 1.4.4 Installing diff-lcs 1.4.4 Fetching dotenv 2.7.6 Installing dotenv 2.7.6 Fetching fakefs 0.20.1 Installing fakefs 0.20.1 Fetching multipart-post 2.1.1 Installing multipart-post 2.1.1 Fetching ruby2_keywords 0.0.2 Installing ruby2_keywords 0.0.2 Fetching faraday 1.1.0 Installing faraday 1.1.0 Fetching gems 1.2.0 Installing gems 1.2.0 Fetching github-markup 1.7.0 Installing github-markup 1.7.0 Fetching jwt 2.2.2 Installing jwt 2.2.2 Fetching memoist 0.16.2 Installing memoist 0.16.2 Fetching multi_json 1.15.0 Installing multi_json 1.15.0 Fetching os 0.9.6 Installing os 0.9.6 Fetching signet 0.14.0 Installing signet 0.14.0 Fetching googleauth 0.14.0 Installing googleauth 0.14.0 Fetching httpclient 2.8.3 Installing httpclient 2.8.3 Fetching mini_mime 1.0.2 Installing mini_mime 1.0.2 Fetching uber 0.1.0 Installing uber 0.1.0 Fetching representable 3.0.4 Installing representable 3.0.4 Fetching retriable 3.1.2 Installing retriable 3.1.2 Fetching rexml 3.2.4 Installing rexml 3.2.4 Using google-api-client 0.50.0 from source at `.` Fetching google-id-token 1.4.2 Installing google-id-token 1.4.2 Fetching hashdiff 1.0.1 Installing hashdiff 1.0.1 Fetching mime-types-data 3.2020.1104 Installing mime-types-data 3.2020.1104 Fetching mime-types 3.3.1 Installing mime-types 3.3.1 Fetching multi_xml 0.6.0 Installing multi_xml 0.6.0 Fetching httparty 0.18.1 Installing httparty 0.18.1 Fetching rspec-support 3.10.0 Installing rspec-support 3.10.0 Fetching rspec-core 3.10.0 Installing rspec-core 3.10.0 Fetching rspec-expectations 3.10.0 Installing rspec-expectations 3.10.0 Fetching rspec-mocks 3.10.0 Installing rspec-mocks 3.10.0 Fetching rspec 3.10.0 Installing rspec 3.10.0 Fetching json_spec 1.1.5 Installing json_spec 1.1.5 Fetching launchy 2.5.0 Installing launchy 2.5.0 Fetching little-plugger 1.1.4 Installing little-plugger 1.1.4 Fetching logging 2.3.0 Installing logging 2.3.0 Fetching method_source 1.0.0 Installing method_source 1.0.0 Fetching opencensus 0.5.0 Installing opencensus 0.5.0 Fetching parallel 1.20.1 Installing parallel 1.20.1 Fetching parser 2.7.2.0 Installing parser 2.7.2.0 Fetching powerpack 0.1.3 Installing powerpack 0.1.3 Fetching pry 0.13.1 Installing pry 0.13.1 Fetching pry-byebug 3.9.0 Installing pry-byebug 3.9.0 Fetching yard 0.9.25 Installing yard 0.9.25 Fetching pry-doc 0.13.5 Installing pry-doc 0.13.5 Fetching rainbow 2.2.2 Installing rainbow 2.2.2 with native extensions Fetching redcarpet 3.5.0 Installing redcarpet 3.5.0 with native extensions Fetching redis 3.3.5 Installing redis 3.3.5 Fetching rmail 1.1.4 Installing rmail 1.1.4 Fetching ruby-progressbar 1.10.1 Installing ruby-progressbar 1.10.1 Fetching unicode-display_width 1.7.0 Installing unicode-display_width 1.7.0 Fetching rubocop 0.49.1 Installing rubocop 0.49.1 Fetching webmock 2.3.2 Installing webmock 2.3.2 Bundle complete! 31 Gemfile dependencies, 78 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. Post-install message from i18n: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. But that may break your application. If you are upgrading your Rails application from an older version of Rails: Please check your Rails app for 'config.i18n.fallbacks = true'. If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 'config.i18n.fallbacks = [I18n.default_locale]'. If not, fallbacks will be broken in your app by I18n 1.1.x. If you are starting a NEW Rails application, you can ignore this notice. For more info see: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 Post-install message from httparty: When you HTTParty, you must party hard! echo a | bundle exec bin/generate-api gen generated --api=sheets.v4 --names-out=/workspace/api_names_out.yaml Loading sheets, version v4 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/sheets.v4.json W, [2020-12-03T11:13:34.240136 #241] WARN -- : Found reserved property 'object_id' W, [2020-12-03T11:13:34.240202 #241] WARN -- : Changed to 'object_id_prop' W, [2020-12-03T11:13:34.255752 #241] WARN -- : Found reserved property 'object_id' W, [2020-12-03T11:13:34.255794 #241] WARN -- : Changed to 'object_id_prop' W, [2020-12-03T11:13:34.255904 #241] WARN -- : Found reserved property 'object_id' W, [2020-12-03T11:13:34.255916 #241] WARN -- : Changed to 'object_id_prop' conflict google/apis/sheets_v4.rb Wrote metadata to generated/google/apis/sheets_v4/synth.metadata. DEBUG:synthtool:Wrote metadata to generated/google/apis/sheets_v4/synth.metadata. ```
Full log will be available here: https://source.cloud.google.com/results/invocations/7b006b37-fae5-4e1c-9d57-231db3ac031c/targets - [ ] To automatically regenerate this PR, check this box. --- api_names_out.yaml | 29 ++ generated/google/apis/sheets_v4.rb | 2 +- generated/google/apis/sheets_v4/classes.rb | 309 ++++++++++++++++++ .../google/apis/sheets_v4/representations.rb | 99 ++++++ .../google/apis/sheets_v4/synth.metadata | 2 +- 5 files changed, 439 insertions(+), 2 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index 0494ba836dc..f60a6cbfb82 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -140716,8 +140716,12 @@ "/sheets:v4/BasicChartSeries": basic_chart_series "/sheets:v4/BasicChartSeries/color": color "/sheets:v4/BasicChartSeries/colorStyle": color_style +"/sheets:v4/BasicChartSeries/dataLabel": data_label "/sheets:v4/BasicChartSeries/lineStyle": line_style +"/sheets:v4/BasicChartSeries/pointStyle": point_style "/sheets:v4/BasicChartSeries/series": series +"/sheets:v4/BasicChartSeries/styleOverrides": style_overrides +"/sheets:v4/BasicChartSeries/styleOverrides/style_override": style_override "/sheets:v4/BasicChartSeries/targetAxis": target_axis "/sheets:v4/BasicChartSeries/type": type "/sheets:v4/BasicChartSpec": basic_chart_spec @@ -140735,6 +140739,7 @@ "/sheets:v4/BasicChartSpec/series/series": series "/sheets:v4/BasicChartSpec/stackedType": stacked_type "/sheets:v4/BasicChartSpec/threeDimensional": three_dimensional +"/sheets:v4/BasicChartSpec/totalDataLabel": total_data_label "/sheets:v4/BasicFilter": basic_filter "/sheets:v4/BasicFilter/criteria": criteria "/sheets:v4/BasicFilter/criteria/criterium": criterium @@ -140743,6 +140748,11 @@ "/sheets:v4/BasicFilter/range": range "/sheets:v4/BasicFilter/sortSpecs": sort_specs "/sheets:v4/BasicFilter/sortSpecs/sort_spec": sort_spec +"/sheets:v4/BasicSeriesDataPointStyleOverride": basic_series_data_point_style_override +"/sheets:v4/BasicSeriesDataPointStyleOverride/color": color +"/sheets:v4/BasicSeriesDataPointStyleOverride/colorStyle": color_style +"/sheets:v4/BasicSeriesDataPointStyleOverride/index": index +"/sheets:v4/BasicSeriesDataPointStyleOverride/pointStyle": point_style "/sheets:v4/BatchClearValuesByDataFilterRequest": batch_clear_values_by_data_filter_request "/sheets:v4/BatchClearValuesByDataFilterRequest/dataFilters": data_filters "/sheets:v4/BatchClearValuesByDataFilterRequest/dataFilters/data_filter": data_filter @@ -140997,6 +141007,11 @@ "/sheets:v4/DataFilterValueRange/values": values "/sheets:v4/DataFilterValueRange/values/value": value "/sheets:v4/DataFilterValueRange/values/value/value": value +"/sheets:v4/DataLabel": data_label +"/sheets:v4/DataLabel/customLabelData": custom_label_data +"/sheets:v4/DataLabel/placement": placement +"/sheets:v4/DataLabel/textFormat": text_format +"/sheets:v4/DataLabel/type": type "/sheets:v4/DataSource": data_source "/sheets:v4/DataSource/calculatedColumns": calculated_columns "/sheets:v4/DataSource/calculatedColumns/calculated_column": calculated_column @@ -141168,9 +141183,13 @@ "/sheets:v4/Editors/users": users "/sheets:v4/Editors/users/user": user "/sheets:v4/EmbeddedChart": embedded_chart +"/sheets:v4/EmbeddedChart/border": border "/sheets:v4/EmbeddedChart/chartId": chart_id "/sheets:v4/EmbeddedChart/position": position "/sheets:v4/EmbeddedChart/spec": spec +"/sheets:v4/EmbeddedObjectBorder": embedded_object_border +"/sheets:v4/EmbeddedObjectBorder/color": color +"/sheets:v4/EmbeddedObjectBorder/colorStyle": color_style "/sheets:v4/EmbeddedObjectPosition": embedded_object_position "/sheets:v4/EmbeddedObjectPosition/newSheet": new_sheet "/sheets:v4/EmbeddedObjectPosition/overlayPosition": overlay_position @@ -141413,6 +141432,9 @@ "/sheets:v4/PivotValue/name": name "/sheets:v4/PivotValue/sourceColumnOffset": source_column_offset "/sheets:v4/PivotValue/summarizeFunction": summarize_function +"/sheets:v4/PointStyle": point_style +"/sheets:v4/PointStyle/shape": shape +"/sheets:v4/PointStyle/size": size "/sheets:v4/ProtectedRange": protected_range "/sheets:v4/ProtectedRange/description": description "/sheets:v4/ProtectedRange/editors": editors @@ -141498,6 +141520,7 @@ "/sheets:v4/Request/updateDeveloperMetadata": update_developer_metadata "/sheets:v4/Request/updateDimensionGroup": update_dimension_group "/sheets:v4/Request/updateDimensionProperties": update_dimension_properties +"/sheets:v4/Request/updateEmbeddedObjectBorder": update_embedded_object_border "/sheets:v4/Request/updateEmbeddedObjectPosition": update_embedded_object_position "/sheets:v4/Request/updateFilterView": update_filter_view "/sheets:v4/Request/updateNamedRange": update_named_range @@ -141754,6 +141777,10 @@ "/sheets:v4/UpdateDimensionPropertiesRequest/fields": fields "/sheets:v4/UpdateDimensionPropertiesRequest/properties": properties "/sheets:v4/UpdateDimensionPropertiesRequest/range": range +"/sheets:v4/UpdateEmbeddedObjectBorderRequest": update_embedded_object_border_request +"/sheets:v4/UpdateEmbeddedObjectBorderRequest/border": border +"/sheets:v4/UpdateEmbeddedObjectBorderRequest/fields": fields +"/sheets:v4/UpdateEmbeddedObjectBorderRequest/objectId": object_id_prop "/sheets:v4/UpdateEmbeddedObjectPositionRequest": update_embedded_object_position_request "/sheets:v4/UpdateEmbeddedObjectPositionRequest/fields": fields "/sheets:v4/UpdateEmbeddedObjectPositionRequest/newPosition": new_position @@ -141814,6 +141841,7 @@ "/sheets:v4/WaterfallChartSeries/customSubtotals": custom_subtotals "/sheets:v4/WaterfallChartSeries/customSubtotals/custom_subtotal": custom_subtotal "/sheets:v4/WaterfallChartSeries/data": data +"/sheets:v4/WaterfallChartSeries/dataLabel": data_label "/sheets:v4/WaterfallChartSeries/hideTrailingSubtotal": hide_trailing_subtotal "/sheets:v4/WaterfallChartSeries/negativeColumnsStyle": negative_columns_style "/sheets:v4/WaterfallChartSeries/positiveColumnsStyle": positive_columns_style @@ -141826,6 +141854,7 @@ "/sheets:v4/WaterfallChartSpec/series": series "/sheets:v4/WaterfallChartSpec/series/series": series "/sheets:v4/WaterfallChartSpec/stackedType": stacked_type +"/sheets:v4/WaterfallChartSpec/totalDataLabel": total_data_label "/sheets:v4/fields": fields "/sheets:v4/key": key "/sheets:v4/quotaUser": quota_user diff --git a/generated/google/apis/sheets_v4.rb b/generated/google/apis/sheets_v4.rb index 8a6ef530f02..6af7f06e518 100644 --- a/generated/google/apis/sheets_v4.rb +++ b/generated/google/apis/sheets_v4.rb @@ -25,7 +25,7 @@ module Apis # @see https://developers.google.com/sheets/ module SheetsV4 VERSION = 'V4' - REVISION = '20201124' + REVISION = '20201130' # See, edit, create, and delete all of your Google Drive files AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' diff --git a/generated/google/apis/sheets_v4/classes.rb b/generated/google/apis/sheets_v4/classes.rb index c3d1db48326..5736339e3ea 100644 --- a/generated/google/apis/sheets_v4/classes.rb +++ b/generated/google/apis/sheets_v4/classes.rb @@ -1191,16 +1191,34 @@ class BasicChartSeries # @return [Google::Apis::SheetsV4::ColorStyle] attr_accessor :color_style + # Settings for one set of data labels. Data labels are annotations that appear + # next to a set of data, such as the points on a line chart, and provide + # additional information about what the data represents, such as a text + # representation of the value behind that point on the graph. + # Corresponds to the JSON property `dataLabel` + # @return [Google::Apis::SheetsV4::DataLabel] + attr_accessor :data_label + # Properties that describe the style of a line. # Corresponds to the JSON property `lineStyle` # @return [Google::Apis::SheetsV4::LineStyle] attr_accessor :line_style + # The style of a point on the chart. + # Corresponds to the JSON property `pointStyle` + # @return [Google::Apis::SheetsV4::PointStyle] + attr_accessor :point_style + # The data included in a domain or series. # Corresponds to the JSON property `series` # @return [Google::Apis::SheetsV4::ChartData] attr_accessor :series + # Style override settings for series data points. + # Corresponds to the JSON property `styleOverrides` + # @return [Array] + attr_accessor :style_overrides + # The minor axis that will specify the range of values for this series. For # example, if charting stocks over time, the "Volume" series may want to be # pinned to the right with the prices pinned to the left, because the scale of @@ -1225,8 +1243,11 @@ def initialize(**args) def update!(**args) @color = args[:color] if args.key?(:color) @color_style = args[:color_style] if args.key?(:color_style) + @data_label = args[:data_label] if args.key?(:data_label) @line_style = args[:line_style] if args.key?(:line_style) + @point_style = args[:point_style] if args.key?(:point_style) @series = args[:series] if args.key?(:series) + @style_overrides = args[:style_overrides] if args.key?(:style_overrides) @target_axis = args[:target_axis] if args.key?(:target_axis) @type = args[:type] if args.key?(:type) end @@ -1303,6 +1324,14 @@ class BasicChartSpec attr_accessor :three_dimensional alias_method :three_dimensional?, :three_dimensional + # Settings for one set of data labels. Data labels are annotations that appear + # next to a set of data, such as the points on a line chart, and provide + # additional information about what the data represents, such as a text + # representation of the value behind that point on the graph. + # Corresponds to the JSON property `totalDataLabel` + # @return [Google::Apis::SheetsV4::DataLabel] + attr_accessor :total_data_label + def initialize(**args) update!(**args) end @@ -1320,6 +1349,7 @@ def update!(**args) @series = args[:series] if args.key?(:series) @stacked_type = args[:stacked_type] if args.key?(:stacked_type) @three_dimensional = args[:three_dimensional] if args.key?(:three_dimensional) + @total_data_label = args[:total_data_label] if args.key?(:total_data_label) end end @@ -1377,6 +1407,87 @@ def update!(**args) end end + # Style override settings for a single series data point. + class BasicSeriesDataPointStyleOverride + include Google::Apis::Core::Hashable + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation can + # be trivially provided to the constructor of "java.awt.Color" in Java; it can + # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into a + # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry + # information about the absolute color space that should be used to interpret + # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, + # applications SHOULD assume the sRGB color space. Note: when color equality + # needs to be decided, implementations, unless documented otherwise, will treat + # two colors to be equal if all their red, green, blue and alpha values each + # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... + # public static java.awt.Color fromProto(Color protocolor) ` float alpha = + # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new + # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue( + # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = ( + # float) color.getRed(); float green = (float) color.getGreen(); float blue = ( + # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder + # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) + # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) + # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / + # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS / + # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [ + # protocolor red]; float green = [protocolor green]; float blue = [protocolor + # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if ( + # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor + # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto( + # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red + # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color + # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue: + # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` + # [result autorelease]; return result; ` // ... Example (JavaScript): // ... + # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return + # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0. + # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ', + # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue) + # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var + # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder. + # join(''); `; // ... + # Corresponds to the JSON property `color` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :color + + # A color value. + # Corresponds to the JSON property `colorStyle` + # @return [Google::Apis::SheetsV4::ColorStyle] + attr_accessor :color_style + + # Zero based index of the series data point. + # Corresponds to the JSON property `index` + # @return [Fixnum] + attr_accessor :index + + # The style of a point on the chart. + # Corresponds to the JSON property `pointStyle` + # @return [Google::Apis::SheetsV4::PointStyle] + attr_accessor :point_style + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @color = args[:color] if args.key?(:color) + @color_style = args[:color_style] if args.key?(:color_style) + @index = args[:index] if args.key?(:index) + @point_style = args[:point_style] if args.key?(:point_style) + end + end + # The request for clearing more than one range selected by a DataFilter in a # spreadsheet. class BatchClearValuesByDataFilterRequest @@ -3603,6 +3714,47 @@ def update!(**args) end end + # Settings for one set of data labels. Data labels are annotations that appear + # next to a set of data, such as the points on a line chart, and provide + # additional information about what the data represents, such as a text + # representation of the value behind that point on the graph. + class DataLabel + include Google::Apis::Core::Hashable + + # The data included in a domain or series. + # Corresponds to the JSON property `customLabelData` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :custom_label_data + + # The placement of the data label relative to the labeled data. + # Corresponds to the JSON property `placement` + # @return [String] + attr_accessor :placement + + # The format of a run of text in a cell. Absent values indicate that the field + # isn't specified. + # Corresponds to the JSON property `textFormat` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :text_format + + # The type of the data label. + # 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) + @custom_label_data = args[:custom_label_data] if args.key?(:custom_label_data) + @placement = args[:placement] if args.key?(:placement) + @text_format = args[:text_format] if args.key?(:text_format) + @type = args[:type] if args.key?(:type) + end + end + # Information about an external data source in the spreadsheet. class DataSource include Google::Apis::Core::Hashable @@ -5050,6 +5202,11 @@ def update!(**args) class EmbeddedChart include Google::Apis::Core::Hashable + # A border along an embedded object. + # Corresponds to the JSON property `border` + # @return [Google::Apis::SheetsV4::EmbeddedObjectBorder] + attr_accessor :border + # The ID of the chart. # Corresponds to the JSON property `chartId` # @return [Fixnum] @@ -5071,12 +5228,82 @@ def initialize(**args) # Update properties of this object def update!(**args) + @border = args[:border] if args.key?(:border) @chart_id = args[:chart_id] if args.key?(:chart_id) @position = args[:position] if args.key?(:position) @spec = args[:spec] if args.key?(:spec) end end + # A border along an embedded object. + class EmbeddedObjectBorder + include Google::Apis::Core::Hashable + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation can + # be trivially provided to the constructor of "java.awt.Color" in Java; it can + # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into a + # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry + # information about the absolute color space that should be used to interpret + # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, + # applications SHOULD assume the sRGB color space. Note: when color equality + # needs to be decided, implementations, unless documented otherwise, will treat + # two colors to be equal if all their red, green, blue and alpha values each + # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... + # public static java.awt.Color fromProto(Color protocolor) ` float alpha = + # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new + # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue( + # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = ( + # float) color.getRed(); float green = (float) color.getGreen(); float blue = ( + # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder + # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) + # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) + # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / + # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS / + # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [ + # protocolor red]; float green = [protocolor green]; float blue = [protocolor + # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if ( + # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor + # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto( + # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red + # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color + # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue: + # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` + # [result autorelease]; return result; ` // ... Example (JavaScript): // ... + # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return + # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0. + # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ', + # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue) + # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var + # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder. + # join(''); `; // ... + # Corresponds to the JSON property `color` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :color + + # A color value. + # Corresponds to the JSON property `colorStyle` + # @return [Google::Apis::SheetsV4::ColorStyle] + attr_accessor :color_style + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @color = args[:color] if args.key?(:color) + @color_style = args[:color_style] if args.key?(:color_style) + end + end + # The position of an embedded object such as a chart. class EmbeddedObjectPosition include Google::Apis::Core::Hashable @@ -7325,6 +7552,31 @@ def update!(**args) end end + # The style of a point on the chart. + class PointStyle + include Google::Apis::Core::Hashable + + # The point shape. If empty or unspecified, a default shape is used. + # Corresponds to the JSON property `shape` + # @return [String] + attr_accessor :shape + + # The point size. If empty, a default size is used. + # Corresponds to the JSON property `size` + # @return [Float] + attr_accessor :size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @shape = args[:shape] if args.key?(:shape) + @size = args[:size] if args.key?(:size) + end + end + # A protected range. class ProtectedRange include Google::Apis::Core::Hashable @@ -7946,6 +8198,11 @@ class Request # @return [Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest] attr_accessor :update_dimension_properties + # Updates an embedded object's border property. + # Corresponds to the JSON property `updateEmbeddedObjectBorder` + # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectBorderRequest] + attr_accessor :update_embedded_object_border + # Update an embedded object's position (such as a moving or resizing a chart or # image). # Corresponds to the JSON property `updateEmbeddedObjectPosition` @@ -8046,6 +8303,7 @@ def update!(**args) @update_developer_metadata = args[:update_developer_metadata] if args.key?(:update_developer_metadata) @update_dimension_group = args[:update_dimension_group] if args.key?(:update_dimension_group) @update_dimension_properties = args[:update_dimension_properties] if args.key?(:update_dimension_properties) + @update_embedded_object_border = args[:update_embedded_object_border] if args.key?(:update_embedded_object_border) @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) @update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view) @update_named_range = args[:update_named_range] if args.key?(:update_named_range) @@ -10368,6 +10626,39 @@ def update!(**args) end end + # Updates an embedded object's border property. + class UpdateEmbeddedObjectBorderRequest + include Google::Apis::Core::Hashable + + # A border along an embedded object. + # Corresponds to the JSON property `border` + # @return [Google::Apis::SheetsV4::EmbeddedObjectBorder] + attr_accessor :border + + # The fields that should be updated. At least one field must be specified. The + # root `border` is implied and should not be specified. A single `"*"` can be + # used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # The ID of the embedded object to update. + # Corresponds to the JSON property `objectId` + # @return [Fixnum] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @border = args[:border] if args.key?(:border) + @fields = args[:fields] if args.key?(:fields) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + # Update an embedded object's position (such as a moving or resizing a chart or # image). class UpdateEmbeddedObjectPositionRequest @@ -10891,6 +11182,14 @@ class WaterfallChartSeries # @return [Google::Apis::SheetsV4::ChartData] attr_accessor :data + # Settings for one set of data labels. Data labels are annotations that appear + # next to a set of data, such as the points on a line chart, and provide + # additional information about what the data represents, such as a text + # representation of the value behind that point on the graph. + # Corresponds to the JSON property `dataLabel` + # @return [Google::Apis::SheetsV4::DataLabel] + attr_accessor :data_label + # True to hide the subtotal column from the end of the series. By default, a # subtotal column will appear at the end of each series. Setting this field to # true will hide that subtotal column for this series. @@ -10922,6 +11221,7 @@ def initialize(**args) def update!(**args) @custom_subtotals = args[:custom_subtotals] if args.key?(:custom_subtotals) @data = args[:data] if args.key?(:data) + @data_label = args[:data_label] if args.key?(:data_label) @hide_trailing_subtotal = args[:hide_trailing_subtotal] if args.key?(:hide_trailing_subtotal) @negative_columns_style = args[:negative_columns_style] if args.key?(:negative_columns_style) @positive_columns_style = args[:positive_columns_style] if args.key?(:positive_columns_style) @@ -10965,6 +11265,14 @@ class WaterfallChartSpec # @return [String] attr_accessor :stacked_type + # Settings for one set of data labels. Data labels are annotations that appear + # next to a set of data, such as the points on a line chart, and provide + # additional information about what the data represents, such as a text + # representation of the value behind that point on the graph. + # Corresponds to the JSON property `totalDataLabel` + # @return [Google::Apis::SheetsV4::DataLabel] + attr_accessor :total_data_label + def initialize(**args) update!(**args) end @@ -10977,6 +11285,7 @@ def update!(**args) @hide_connector_lines = args[:hide_connector_lines] if args.key?(:hide_connector_lines) @series = args[:series] if args.key?(:series) @stacked_type = args[:stacked_type] if args.key?(:stacked_type) + @total_data_label = args[:total_data_label] if args.key?(:total_data_label) end end end diff --git a/generated/google/apis/sheets_v4/representations.rb b/generated/google/apis/sheets_v4/representations.rb index e1b16097442..1f711b3a877 100644 --- a/generated/google/apis/sheets_v4/representations.rb +++ b/generated/google/apis/sheets_v4/representations.rb @@ -214,6 +214,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class BasicSeriesDataPointStyleOverride + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BatchClearValuesByDataFilterRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -514,6 +520,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class DataLabel + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class DataSource class Representation < Google::Apis::Core::JsonRepresentation; end @@ -796,6 +808,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class EmbeddedObjectBorder + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class EmbeddedObjectPosition class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1072,6 +1090,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class PointStyle + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ProtectedRange class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1360,6 +1384,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class UpdateEmbeddedObjectBorderRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class UpdateEmbeddedObjectPositionRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1746,10 +1776,16 @@ class Representation < Google::Apis::Core::JsonRepresentation property :color_style, as: 'colorStyle', class: Google::Apis::SheetsV4::ColorStyle, decorator: Google::Apis::SheetsV4::ColorStyle::Representation + property :data_label, as: 'dataLabel', class: Google::Apis::SheetsV4::DataLabel, decorator: Google::Apis::SheetsV4::DataLabel::Representation + property :line_style, as: 'lineStyle', class: Google::Apis::SheetsV4::LineStyle, decorator: Google::Apis::SheetsV4::LineStyle::Representation + property :point_style, as: 'pointStyle', class: Google::Apis::SheetsV4::PointStyle, decorator: Google::Apis::SheetsV4::PointStyle::Representation + property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + collection :style_overrides, as: 'styleOverrides', class: Google::Apis::SheetsV4::BasicSeriesDataPointStyleOverride, decorator: Google::Apis::SheetsV4::BasicSeriesDataPointStyleOverride::Representation + property :target_axis, as: 'targetAxis' property :type, as: 'type' end @@ -1772,6 +1808,8 @@ class Representation < Google::Apis::Core::JsonRepresentation property :stacked_type, as: 'stackedType' property :three_dimensional, as: 'threeDimensional' + property :total_data_label, as: 'totalDataLabel', class: Google::Apis::SheetsV4::DataLabel, decorator: Google::Apis::SheetsV4::DataLabel::Representation + end end @@ -1789,6 +1827,19 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class BasicSeriesDataPointStyleOverride + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :color_style, as: 'colorStyle', class: Google::Apis::SheetsV4::ColorStyle, decorator: Google::Apis::SheetsV4::ColorStyle::Representation + + property :index, as: 'index' + property :point_style, as: 'pointStyle', class: Google::Apis::SheetsV4::PointStyle, decorator: Google::Apis::SheetsV4::PointStyle::Representation + + end + end + class BatchClearValuesByDataFilterRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -2365,6 +2416,18 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class DataLabel + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :custom_label_data, as: 'customLabelData', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + property :placement, as: 'placement' + property :text_format, as: 'textFormat', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + + property :type, as: 'type' + end + end + class DataSource # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -2796,6 +2859,8 @@ class Representation < Google::Apis::Core::JsonRepresentation class EmbeddedChart # @private class Representation < Google::Apis::Core::JsonRepresentation + property :border, as: 'border', class: Google::Apis::SheetsV4::EmbeddedObjectBorder, decorator: Google::Apis::SheetsV4::EmbeddedObjectBorder::Representation + property :chart_id, as: 'chartId' property :position, as: 'position', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation @@ -2804,6 +2869,16 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class EmbeddedObjectBorder + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :color_style, as: 'colorStyle', class: Google::Apis::SheetsV4::ColorStyle, decorator: Google::Apis::SheetsV4::ColorStyle::Representation + + end + end + class EmbeddedObjectPosition # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -3328,6 +3403,14 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class PointStyle + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :shape, as: 'shape' + property :size, as: 'size' + end + end + class ProtectedRange # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -3510,6 +3593,8 @@ class Representation < Google::Apis::Core::JsonRepresentation property :update_dimension_properties, as: 'updateDimensionProperties', class: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest::Representation + property :update_embedded_object_border, as: 'updateEmbeddedObjectBorder', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectBorderRequest, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectBorderRequest::Representation + property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest::Representation property :update_filter_view, as: 'updateFilterView', class: Google::Apis::SheetsV4::UpdateFilterViewRequest, decorator: Google::Apis::SheetsV4::UpdateFilterViewRequest::Representation @@ -4081,6 +4166,16 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class UpdateEmbeddedObjectBorderRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :border, as: 'border', class: Google::Apis::SheetsV4::EmbeddedObjectBorder, decorator: Google::Apis::SheetsV4::EmbeddedObjectBorder::Representation + + property :fields, as: 'fields' + property :object_id_prop, as: 'objectId' + end + end + class UpdateEmbeddedObjectPositionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -4230,6 +4325,8 @@ class Representation < Google::Apis::Core::JsonRepresentation property :data, as: 'data', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + property :data_label, as: 'dataLabel', class: Google::Apis::SheetsV4::DataLabel, decorator: Google::Apis::SheetsV4::DataLabel::Representation + property :hide_trailing_subtotal, as: 'hideTrailingSubtotal' property :negative_columns_style, as: 'negativeColumnsStyle', class: Google::Apis::SheetsV4::WaterfallChartColumnStyle, decorator: Google::Apis::SheetsV4::WaterfallChartColumnStyle::Representation @@ -4252,6 +4349,8 @@ class Representation < Google::Apis::Core::JsonRepresentation collection :series, as: 'series', class: Google::Apis::SheetsV4::WaterfallChartSeries, decorator: Google::Apis::SheetsV4::WaterfallChartSeries::Representation property :stacked_type, as: 'stackedType' + property :total_data_label, as: 'totalDataLabel', class: Google::Apis::SheetsV4::DataLabel, decorator: Google::Apis::SheetsV4::DataLabel::Representation + end end end diff --git a/generated/google/apis/sheets_v4/synth.metadata b/generated/google/apis/sheets_v4/synth.metadata index df4f29dcec5..4e30d40dbfc 100644 --- a/generated/google/apis/sheets_v4/synth.metadata +++ b/generated/google/apis/sheets_v4/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-ruby-client.git", - "sha": "329feddce6c7f2e636ecc37079fc7137593511d3" + "sha": "0940da26fa91b8e41483fe7174655b756724ea41" } } ]