diff --git a/generated/google/apis/customsearch_v1.rb b/generated/google/apis/customsearch_v1.rb deleted file mode 100644 index c803a750b..000000000 --- a/generated/google/apis/customsearch_v1.rb +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'google/apis/customsearch_v1/service.rb' -require 'google/apis/customsearch_v1/classes.rb' -require 'google/apis/customsearch_v1/representations.rb' - -module Google - module Apis - # Custom Search API - # - # Searches over a website or collection of websites - # - # @see https://developers.google.com/custom-search/v1/introduction - module CustomsearchV1 - VERSION = 'V1' - REVISION = '20200504' - end - end -end diff --git a/generated/google/apis/customsearch_v1/classes.rb b/generated/google/apis/customsearch_v1/classes.rb deleted file mode 100644 index 35607e2d3..000000000 --- a/generated/google/apis/customsearch_v1/classes.rb +++ /dev/null @@ -1,1606 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'date' -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module CustomsearchV1 - - # Promotion result. - class Promotion - include Google::Apis::Core::Hashable - - # An array of block objects for this promotion. See [Google WebSearch - # Protocol - # reference](https://developers.google.com/custom-search/docs/xml_results) - # for more information. - # Corresponds to the JSON property `bodyLines` - # @return [Array] - attr_accessor :body_lines - - # An abridged version of this search's result URL, e.g. www.example.com. - # Corresponds to the JSON property `displayLink` - # @return [String] - attr_accessor :display_link - - # The title of the promotion, in HTML. - # Corresponds to the JSON property `htmlTitle` - # @return [String] - attr_accessor :html_title - - # Image belonging to a promotion. - # Corresponds to the JSON property `image` - # @return [Google::Apis::CustomsearchV1::Promotion::Image] - attr_accessor :image - - # The URL of the promotion. - # Corresponds to the JSON property `link` - # @return [String] - attr_accessor :link - - # The title of the promotion. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @body_lines = args[:body_lines] if args.key?(:body_lines) - @display_link = args[:display_link] if args.key?(:display_link) - @html_title = args[:html_title] if args.key?(:html_title) - @image = args[:image] if args.key?(:image) - @link = args[:link] if args.key?(:link) - @title = args[:title] if args.key?(:title) - end - - # Block object belonging to a promotion. - class BodyLine - include Google::Apis::Core::Hashable - - # The block object's text in HTML, if it has text. - # Corresponds to the JSON property `htmlTitle` - # @return [String] - attr_accessor :html_title - - # The anchor text of the block object's link, if it has a link. - # Corresponds to the JSON property `link` - # @return [String] - attr_accessor :link - - # The block object's text, if it has text. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The URL of the block object's link, if it has one. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @html_title = args[:html_title] if args.key?(:html_title) - @link = args[:link] if args.key?(:link) - @title = args[:title] if args.key?(:title) - @url = args[:url] if args.key?(:url) - end - end - - # Image belonging to a promotion. - class Image - include Google::Apis::Core::Hashable - - # Image height in pixels. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # URL of the image for this promotion link. - # Corresponds to the JSON property `source` - # @return [String] - attr_accessor :source - - # Image width in pixels. - # Corresponds to the JSON property `width` - # @return [Fixnum] - attr_accessor :width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @height = args[:height] if args.key?(:height) - @source = args[:source] if args.key?(:source) - @width = args[:width] if args.key?(:width) - end - end - end - - # A custom search result. - class Result - include Google::Apis::Core::Hashable - - # Indicates the ID of Google's cached version of the search result. - # Corresponds to the JSON property `cacheId` - # @return [String] - attr_accessor :cache_id - - # An abridged version of this search result’s URL, e.g. www.example.com. - # Corresponds to the JSON property `displayLink` - # @return [String] - attr_accessor :display_link - - # The file format of the search result. - # Corresponds to the JSON property `fileFormat` - # @return [String] - attr_accessor :file_format - - # The URL displayed after the snippet for each search result. - # Corresponds to the JSON property `formattedUrl` - # @return [String] - attr_accessor :formatted_url - - # The HTML-formatted URL displayed after the snippet for each search result. - # Corresponds to the JSON property `htmlFormattedUrl` - # @return [String] - attr_accessor :html_formatted_url - - # The snippet of the search result, in HTML. - # Corresponds to the JSON property `htmlSnippet` - # @return [String] - attr_accessor :html_snippet - - # The title of the search result, in HTML. - # Corresponds to the JSON property `htmlTitle` - # @return [String] - attr_accessor :html_title - - # Image belonging to a custom search result. - # Corresponds to the JSON property `image` - # @return [Google::Apis::CustomsearchV1::Result::Image] - attr_accessor :image - - # A unique identifier for the type of current object. For this API, it is - # `customsearch#result.` - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Encapsulates all information about [refinement - # labels](https://developers.google.com/custom-search/docs/xml_results). - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - - # The full URL to which the search result is pointing, e.g. - # http://www.example.com/foo/bar. - # Corresponds to the JSON property `link` - # @return [String] - attr_accessor :link - - # The MIME type of the search result. - # Corresponds to the JSON property `mime` - # @return [String] - attr_accessor :mime - - # Contains - # [PageMap](https://developers.google.com/custom-search/docs/structured_data# - # pagemaps) - # information for this search result. - # Corresponds to the JSON property `pagemap` - # @return [Hash] - attr_accessor :pagemap - - # The snippet of the search result, in plain text. - # Corresponds to the JSON property `snippet` - # @return [String] - attr_accessor :snippet - - # The title of the search result, in plain text. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cache_id = args[:cache_id] if args.key?(:cache_id) - @display_link = args[:display_link] if args.key?(:display_link) - @file_format = args[:file_format] if args.key?(:file_format) - @formatted_url = args[:formatted_url] if args.key?(:formatted_url) - @html_formatted_url = args[:html_formatted_url] if args.key?(:html_formatted_url) - @html_snippet = args[:html_snippet] if args.key?(:html_snippet) - @html_title = args[:html_title] if args.key?(:html_title) - @image = args[:image] if args.key?(:image) - @kind = args[:kind] if args.key?(:kind) - @labels = args[:labels] if args.key?(:labels) - @link = args[:link] if args.key?(:link) - @mime = args[:mime] if args.key?(:mime) - @pagemap = args[:pagemap] if args.key?(:pagemap) - @snippet = args[:snippet] if args.key?(:snippet) - @title = args[:title] if args.key?(:title) - end - - # Image belonging to a custom search result. - class Image - include Google::Apis::Core::Hashable - - # The size of the image, in pixels. - # Corresponds to the JSON property `byteSize` - # @return [Fixnum] - attr_accessor :byte_size - - # A URL pointing to the webpage hosting the image. - # Corresponds to the JSON property `contextLink` - # @return [String] - attr_accessor :context_link - - # The height of the image, in pixels. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # The height of the thumbnail image, in pixels. - # Corresponds to the JSON property `thumbnailHeight` - # @return [Fixnum] - attr_accessor :thumbnail_height - - # A URL to the thumbnail image. - # Corresponds to the JSON property `thumbnailLink` - # @return [String] - attr_accessor :thumbnail_link - - # The width of the thumbnail image, in pixels. - # Corresponds to the JSON property `thumbnailWidth` - # @return [Fixnum] - attr_accessor :thumbnail_width - - # The width of the image, in pixels. - # Corresponds to the JSON property `width` - # @return [Fixnum] - attr_accessor :width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @byte_size = args[:byte_size] if args.key?(:byte_size) - @context_link = args[:context_link] if args.key?(:context_link) - @height = args[:height] if args.key?(:height) - @thumbnail_height = args[:thumbnail_height] if args.key?(:thumbnail_height) - @thumbnail_link = args[:thumbnail_link] if args.key?(:thumbnail_link) - @thumbnail_width = args[:thumbnail_width] if args.key?(:thumbnail_width) - @width = args[:width] if args.key?(:width) - end - end - - # Refinement label associated with a custom search result. - class Label - include Google::Apis::Core::Hashable - - # The display name of a refinement label. This is the name you should - # display in your user interface. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Refinement label and the associated refinement operation. - # Corresponds to the JSON property `label_with_op` - # @return [String] - attr_accessor :label_with_op - - # The name of a refinement label, which you can use to refine searches. - # Don't display this in your user interface; instead, use displayName. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) - @label_with_op = args[:label_with_op] if args.key?(:label_with_op) - @name = args[:name] if args.key?(:name) - end - end - end - - # Response to a custom search request. - class Search - include Google::Apis::Core::Hashable - - # Metadata and refinements associated with the given search engine, - # including: - # * The name of the search engine that was used for the query. - # * A set of [facet - # objects](https://developers.google.com/custom-search/docs/refinements#create) - # (refinements) you can use for refining a search. - # Corresponds to the JSON property `context` - # @return [Hash] - attr_accessor :context - - # The current set of custom search results. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Unique identifier for the type of current object. For this API, it is - # customsearch#search. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The set of - # [promotions](https://developers.google.com/custom-search/docs/promotions). - # Present only if the custom search engine's configuration files define any - # promotions for the given query. - # Corresponds to the JSON property `promotions` - # @return [Array] - attr_accessor :promotions - - # Query metadata for the previous, current, and next pages of results. - # Corresponds to the JSON property `queries` - # @return [Google::Apis::CustomsearchV1::Search::Queries] - attr_accessor :queries - - # Metadata about a search operation. - # Corresponds to the JSON property `searchInformation` - # @return [Google::Apis::CustomsearchV1::Search::SearchInformation] - attr_accessor :search_information - - # Spell correction information for a query. - # Corresponds to the JSON property `spelling` - # @return [Google::Apis::CustomsearchV1::Search::Spelling] - attr_accessor :spelling - - # OpenSearch template and URL. - # Corresponds to the JSON property `url` - # @return [Google::Apis::CustomsearchV1::Search::Url] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @context = args[:context] if args.key?(:context) - @items = args[:items] if args.key?(:items) - @kind = args[:kind] if args.key?(:kind) - @promotions = args[:promotions] if args.key?(:promotions) - @queries = args[:queries] if args.key?(:queries) - @search_information = args[:search_information] if args.key?(:search_information) - @spelling = args[:spelling] if args.key?(:spelling) - @url = args[:url] if args.key?(:url) - end - - # Query metadata for the previous, current, and next pages of results. - class Queries - include Google::Apis::Core::Hashable - - # Metadata representing the next page of results, if applicable. - # Corresponds to the JSON property `nextPage` - # @return [Array] - attr_accessor :next_page - - # Metadata representing the previous page of results, if applicable. - # Corresponds to the JSON property `previousPage` - # @return [Array] - attr_accessor :previous_page - - # Metadata representing the current request. - # Corresponds to the JSON property `request` - # @return [Array] - attr_accessor :request - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page = args[:next_page] if args.key?(:next_page) - @previous_page = args[:previous_page] if args.key?(:previous_page) - @request = args[:request] if args.key?(:request) - end - - # Custom search request metadata. - class NextPage - include Google::Apis::Core::Hashable - - # Number of search results returned in this set. - # Corresponds to the JSON property `count` - # @return [Fixnum] - attr_accessor :count - - # Restricts search results to documents originating in a particular - # country. You may use [Boolean - # operators](https://developers.google.com/custom-search/docs/xml_results# - # booleanOperators) - # in the `cr` parameter's value. - # Google WebSearch determines the country of a document by analyzing the - # following: - # * The top-level domain (TLD) of the document's URL. - # * The geographic location of the web server's IP address. - # See [Country (cr) Parameter - # Values](https://developers.google.com/custom-search/docs/xml_results# - # countryCollections) - # for a list of valid values for this parameter. - # Corresponds to the JSON property `cr` - # @return [String] - attr_accessor :cr - - # The identifier of a custom search engine created using the Custom Search - # [Control Panel](https://cse.google.com/). This is a custom property not - # defined in the OpenSearch spec. This parameter is **required**. - # Corresponds to the JSON property `cx` - # @return [String] - attr_accessor :cx - - # Restricts results to URLs based on date. Supported values include: - # * `d[number]`: requests results from the specified number of past days. - # * `w[number]`: requests results from the specified number of past weeks. - # * `m[number]`: requests results from the specified number of past months. - # * `y[number]`: requests results from the specified number of past years. - # Corresponds to the JSON property `dateRestrict` - # @return [String] - attr_accessor :date_restrict - - # Enables or disables the [Simplified and Traditional Chinese - # Search](https://developers.google.com/custom-search/docs/xml_results# - # chineseSearch) - # feature. - # Supported values are: - # * `0`: enabled (default) - # * `1`: disabled - # Corresponds to the JSON property `disableCnTwTranslation` - # @return [String] - attr_accessor :disable_cn_tw_translation - - # Identifies a phrase that all documents in the search results must - # contain. - # Corresponds to the JSON property `exactTerms` - # @return [String] - attr_accessor :exact_terms - - # Identifies a word or phrase that should not appear in any documents in - # the search results. - # Corresponds to the JSON property `excludeTerms` - # @return [String] - attr_accessor :exclude_terms - - # Restricts results to files of a specified extension. Filetypes supported - # by Google include: - # * Adobe Portable Document Format (`pdf`) - # * Adobe PostScript (`ps`) - # * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`, `wku`) - # * Lotus WordPro (`lwp`) - # * Macwrite (`mw`) - # * Microsoft Excel (`xls`) - # * Microsoft PowerPoint (`ppt`) - # * Microsoft Word (`doc`) - # * Microsoft Works (`wks`, `wps`, `wdb`) - # * Microsoft Write (`wri`) - # * Rich Text Format (`rtf`) - # * Shockwave Flash (`swf`) - # * Text (`ans`, `txt`). - # Additional filetypes may be added in the future. An up-to-date list can - # always be found in Google's [file type - # FAQ](https://support.google.com/webmasters/answer/35287). - # Corresponds to the JSON property `fileType` - # @return [String] - attr_accessor :file_type - - # Activates or deactivates the automatic filtering of Google search - # results. See [Automatic - # Filtering](https://developers.google.com/custom-search/docs/xml_results# - # automaticFiltering) - # for more information about Google's search results filters. Valid values - # for this parameter are: - # * `0`: Disabled - # * `1`: Enabled (default) - # **Note**: By default, Google applies filtering to all search results to - # improve the quality of those results. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Boosts search results whose country of origin matches the parameter - # value. See [Country - # Codes](https://developers.google.com/custom-search/docs/xml_results# - # countryCodes) - # for a list of valid values. - # Specifying a `gl` parameter value in WebSearch requests should improve - # the relevance of results. This is particularly true for international - # customers and, even more specifically, for customers in English-speaking - # countries other than the United States. - # Corresponds to the JSON property `gl` - # @return [String] - attr_accessor :gl - - # Specifies the Google domain (for example, google.com, google.de, or - # google.fr) to which the search should be limited. - # Corresponds to the JSON property `googleHost` - # @return [String] - attr_accessor :google_host - - # Specifies the ending value for a search range. Use `cse:lowRange` and - # `cse:highrange` to append an inclusive search range of - # `lowRange...highRange` to the query. - # Corresponds to the JSON property `highRange` - # @return [String] - attr_accessor :high_range - - # Specifies the interface language (host language) of your user interface. - # Explicitly setting this parameter improves the performance and the - # quality of your search results. - # See the [Interface - # Languages](https://developers.google.com/custom-search/docs/xml_results# - # wsInterfaceLanguages) - # section of [Internationalizing Queries and Results - # Presentation](https://developers.google.com/custom-search/docs/xml_results# - # wsInternationalizing) - # for more information, and [Supported Interface - # Languages](https://developers.google.com/custom-search/docs/ - # xml_results_appendices#interfaceLanguages) - # for a list of supported languages. - # Corresponds to the JSON property `hl` - # @return [String] - attr_accessor :hl - - # Appends the specified query terms to the query, as if they were combined - # with a logical `AND` operator. - # Corresponds to the JSON property `hq` - # @return [String] - attr_accessor :hq - - # Restricts results to images of a specified color type. Supported values - # are: - # * `mono` (black and white) - # * `gray` (grayscale) - # * `color` (color) - # Corresponds to the JSON property `imgColorType` - # @return [String] - attr_accessor :img_color_type - - # Restricts results to images with a specific dominant color. Supported - # values are: - # * `red` - # * `orange` - # * `yellow` - # * `green` - # * `teal` - # * `blue` - # * `purple` - # * `pink` - # * `white` - # * `gray` - # * `black` - # * `brown` - # Corresponds to the JSON property `imgDominantColor` - # @return [String] - attr_accessor :img_dominant_color - - # Restricts results to images of a specified size. Supported values are: - # * `icon` (small) - # * `small | medium | large | xlarge` (medium) - # * `xxlarge` (large) - # * `huge` (extra-large) - # Corresponds to the JSON property `imgSize` - # @return [String] - attr_accessor :img_size - - # Restricts results to images of a specified type. Supported values are: - # * `clipart` (Clip art) - # * `face` (Face) - # * `lineart` (Line drawing) - # * `photo` (Photo) - # * `animated` (Animated) - # * `stock` (Stock) - # Corresponds to the JSON property `imgType` - # @return [String] - attr_accessor :img_type - - # The character encoding supported for search requests. - # Corresponds to the JSON property `inputEncoding` - # @return [String] - attr_accessor :input_encoding - - # The language of the search results. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # Specifies that all results should contain a link to a specific URL. - # Corresponds to the JSON property `linkSite` - # @return [String] - attr_accessor :link_site - - # Specifies the starting value for a search range. Use `cse:lowRange` and - # `cse:highrange` to append an inclusive search range of - # `lowRange...highRange` to the query. - # Corresponds to the JSON property `lowRange` - # @return [String] - attr_accessor :low_range - - # Provides additional search terms to check for in a document, where each - # document in the search results must contain at least one of the - # additional search terms. You can also use the [Boolean - # OR](https://developers.google.com/custom-search/docs/xml_results#BooleanOrqt) - # query term for this type of query. - # Corresponds to the JSON property `orTerms` - # @return [String] - attr_accessor :or_terms - - # The character encoding supported for search results. - # Corresponds to the JSON property `outputEncoding` - # @return [String] - attr_accessor :output_encoding - - # Specifies that all search results should be pages that are related to the - # specified URL. The parameter value should be a URL. - # Corresponds to the JSON property `relatedSite` - # @return [String] - attr_accessor :related_site - - # Filters based on licensing. Supported values include: - # * `cc_publicdomain` - # * `cc_attribute` - # * `cc_sharealike` - # * `cc_noncommercial` - # * `cc_nonderived` - # Corresponds to the JSON property `rights` - # @return [String] - attr_accessor :rights - - # Specifies the [SafeSearch - # level](https://developers.google.com/custom-search/docs/xml_results# - # safeSearchLevels) - # used for filtering out adult results. This is a custom property not - # defined in the OpenSearch spec. Valid parameter values are: - # * `"off"`: Disable SafeSearch - # * `"active"`: Enable SafeSearch - # Corresponds to the JSON property `safe` - # @return [String] - attr_accessor :safe - - # The search terms entered by the user. - # Corresponds to the JSON property `searchTerms` - # @return [String] - attr_accessor :search_terms - - # Allowed values are `web` or `image`. If unspecified, results are limited - # to webpages. - # Corresponds to the JSON property `searchType` - # @return [String] - attr_accessor :search_type - - # Restricts results to URLs from a specified site. - # Corresponds to the JSON property `siteSearch` - # @return [String] - attr_accessor :site_search - - # Specifies whether to include or exclude results from the site named in - # the `sitesearch` parameter. Supported values are: - # * `i`: include content from site - # * `e`: exclude content from site - # Corresponds to the JSON property `siteSearchFilter` - # @return [String] - attr_accessor :site_search_filter - - # Specifies that results should be sorted according to the specified - # expression. For example, sort by date. - # Corresponds to the JSON property `sort` - # @return [String] - attr_accessor :sort - - # The index of the current set of search results into the total set of - # results, where the index of the first result is 1. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The page number of this set of results, where the page length is set by - # the `count` property. - # Corresponds to the JSON property `startPage` - # @return [Fixnum] - attr_accessor :start_page - - # A description of the query. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Estimated number of total search results. May not be accurate. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count = args[:count] if args.key?(:count) - @cr = args[:cr] if args.key?(:cr) - @cx = args[:cx] if args.key?(:cx) - @date_restrict = args[:date_restrict] if args.key?(:date_restrict) - @disable_cn_tw_translation = args[:disable_cn_tw_translation] if args.key?(:disable_cn_tw_translation) - @exact_terms = args[:exact_terms] if args.key?(:exact_terms) - @exclude_terms = args[:exclude_terms] if args.key?(:exclude_terms) - @file_type = args[:file_type] if args.key?(:file_type) - @filter = args[:filter] if args.key?(:filter) - @gl = args[:gl] if args.key?(:gl) - @google_host = args[:google_host] if args.key?(:google_host) - @high_range = args[:high_range] if args.key?(:high_range) - @hl = args[:hl] if args.key?(:hl) - @hq = args[:hq] if args.key?(:hq) - @img_color_type = args[:img_color_type] if args.key?(:img_color_type) - @img_dominant_color = args[:img_dominant_color] if args.key?(:img_dominant_color) - @img_size = args[:img_size] if args.key?(:img_size) - @img_type = args[:img_type] if args.key?(:img_type) - @input_encoding = args[:input_encoding] if args.key?(:input_encoding) - @language = args[:language] if args.key?(:language) - @link_site = args[:link_site] if args.key?(:link_site) - @low_range = args[:low_range] if args.key?(:low_range) - @or_terms = args[:or_terms] if args.key?(:or_terms) - @output_encoding = args[:output_encoding] if args.key?(:output_encoding) - @related_site = args[:related_site] if args.key?(:related_site) - @rights = args[:rights] if args.key?(:rights) - @safe = args[:safe] if args.key?(:safe) - @search_terms = args[:search_terms] if args.key?(:search_terms) - @search_type = args[:search_type] if args.key?(:search_type) - @site_search = args[:site_search] if args.key?(:site_search) - @site_search_filter = args[:site_search_filter] if args.key?(:site_search_filter) - @sort = args[:sort] if args.key?(:sort) - @start_index = args[:start_index] if args.key?(:start_index) - @start_page = args[:start_page] if args.key?(:start_page) - @title = args[:title] if args.key?(:title) - @total_results = args[:total_results] if args.key?(:total_results) - end - end - - # Custom search request metadata. - class PreviousPage - include Google::Apis::Core::Hashable - - # Number of search results returned in this set. - # Corresponds to the JSON property `count` - # @return [Fixnum] - attr_accessor :count - - # Restricts search results to documents originating in a particular - # country. You may use [Boolean - # operators](https://developers.google.com/custom-search/docs/xml_results# - # booleanOperators) - # in the `cr` parameter's value. - # Google WebSearch determines the country of a document by analyzing the - # following: - # * The top-level domain (TLD) of the document's URL. - # * The geographic location of the web server's IP address. - # See [Country (cr) Parameter - # Values](https://developers.google.com/custom-search/docs/xml_results# - # countryCollections) - # for a list of valid values for this parameter. - # Corresponds to the JSON property `cr` - # @return [String] - attr_accessor :cr - - # The identifier of a custom search engine created using the Custom Search - # [Control Panel](https://cse.google.com/). This is a custom property not - # defined in the OpenSearch spec. This parameter is **required**. - # Corresponds to the JSON property `cx` - # @return [String] - attr_accessor :cx - - # Restricts results to URLs based on date. Supported values include: - # * `d[number]`: requests results from the specified number of past days. - # * `w[number]`: requests results from the specified number of past weeks. - # * `m[number]`: requests results from the specified number of past months. - # * `y[number]`: requests results from the specified number of past years. - # Corresponds to the JSON property `dateRestrict` - # @return [String] - attr_accessor :date_restrict - - # Enables or disables the [Simplified and Traditional Chinese - # Search](https://developers.google.com/custom-search/docs/xml_results# - # chineseSearch) - # feature. - # Supported values are: - # * `0`: enabled (default) - # * `1`: disabled - # Corresponds to the JSON property `disableCnTwTranslation` - # @return [String] - attr_accessor :disable_cn_tw_translation - - # Identifies a phrase that all documents in the search results must - # contain. - # Corresponds to the JSON property `exactTerms` - # @return [String] - attr_accessor :exact_terms - - # Identifies a word or phrase that should not appear in any documents in - # the search results. - # Corresponds to the JSON property `excludeTerms` - # @return [String] - attr_accessor :exclude_terms - - # Restricts results to files of a specified extension. Filetypes supported - # by Google include: - # * Adobe Portable Document Format (`pdf`) - # * Adobe PostScript (`ps`) - # * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`, `wku`) - # * Lotus WordPro (`lwp`) - # * Macwrite (`mw`) - # * Microsoft Excel (`xls`) - # * Microsoft PowerPoint (`ppt`) - # * Microsoft Word (`doc`) - # * Microsoft Works (`wks`, `wps`, `wdb`) - # * Microsoft Write (`wri`) - # * Rich Text Format (`rtf`) - # * Shockwave Flash (`swf`) - # * Text (`ans`, `txt`). - # Additional filetypes may be added in the future. An up-to-date list can - # always be found in Google's [file type - # FAQ](https://support.google.com/webmasters/answer/35287). - # Corresponds to the JSON property `fileType` - # @return [String] - attr_accessor :file_type - - # Activates or deactivates the automatic filtering of Google search - # results. See [Automatic - # Filtering](https://developers.google.com/custom-search/docs/xml_results# - # automaticFiltering) - # for more information about Google's search results filters. Valid values - # for this parameter are: - # * `0`: Disabled - # * `1`: Enabled (default) - # **Note**: By default, Google applies filtering to all search results to - # improve the quality of those results. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Boosts search results whose country of origin matches the parameter - # value. See [Country - # Codes](https://developers.google.com/custom-search/docs/xml_results# - # countryCodes) - # for a list of valid values. - # Specifying a `gl` parameter value in WebSearch requests should improve - # the relevance of results. This is particularly true for international - # customers and, even more specifically, for customers in English-speaking - # countries other than the United States. - # Corresponds to the JSON property `gl` - # @return [String] - attr_accessor :gl - - # Specifies the Google domain (for example, google.com, google.de, or - # google.fr) to which the search should be limited. - # Corresponds to the JSON property `googleHost` - # @return [String] - attr_accessor :google_host - - # Specifies the ending value for a search range. Use `cse:lowRange` and - # `cse:highrange` to append an inclusive search range of - # `lowRange...highRange` to the query. - # Corresponds to the JSON property `highRange` - # @return [String] - attr_accessor :high_range - - # Specifies the interface language (host language) of your user interface. - # Explicitly setting this parameter improves the performance and the - # quality of your search results. - # See the [Interface - # Languages](https://developers.google.com/custom-search/docs/xml_results# - # wsInterfaceLanguages) - # section of [Internationalizing Queries and Results - # Presentation](https://developers.google.com/custom-search/docs/xml_results# - # wsInternationalizing) - # for more information, and [Supported Interface - # Languages](https://developers.google.com/custom-search/docs/ - # xml_results_appendices#interfaceLanguages) - # for a list of supported languages. - # Corresponds to the JSON property `hl` - # @return [String] - attr_accessor :hl - - # Appends the specified query terms to the query, as if they were combined - # with a logical `AND` operator. - # Corresponds to the JSON property `hq` - # @return [String] - attr_accessor :hq - - # Restricts results to images of a specified color type. Supported values - # are: - # * `mono` (black and white) - # * `gray` (grayscale) - # * `color` (color) - # Corresponds to the JSON property `imgColorType` - # @return [String] - attr_accessor :img_color_type - - # Restricts results to images with a specific dominant color. Supported - # values are: - # * `red` - # * `orange` - # * `yellow` - # * `green` - # * `teal` - # * `blue` - # * `purple` - # * `pink` - # * `white` - # * `gray` - # * `black` - # * `brown` - # Corresponds to the JSON property `imgDominantColor` - # @return [String] - attr_accessor :img_dominant_color - - # Restricts results to images of a specified size. Supported values are: - # * `icon` (small) - # * `small | medium | large | xlarge` (medium) - # * `xxlarge` (large) - # * `huge` (extra-large) - # Corresponds to the JSON property `imgSize` - # @return [String] - attr_accessor :img_size - - # Restricts results to images of a specified type. Supported values are: - # * `clipart` (Clip art) - # * `face` (Face) - # * `lineart` (Line drawing) - # * `photo` (Photo) - # * `animated` (Animated) - # * `stock` (Stock) - # Corresponds to the JSON property `imgType` - # @return [String] - attr_accessor :img_type - - # The character encoding supported for search requests. - # Corresponds to the JSON property `inputEncoding` - # @return [String] - attr_accessor :input_encoding - - # The language of the search results. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # Specifies that all results should contain a link to a specific URL. - # Corresponds to the JSON property `linkSite` - # @return [String] - attr_accessor :link_site - - # Specifies the starting value for a search range. Use `cse:lowRange` and - # `cse:highrange` to append an inclusive search range of - # `lowRange...highRange` to the query. - # Corresponds to the JSON property `lowRange` - # @return [String] - attr_accessor :low_range - - # Provides additional search terms to check for in a document, where each - # document in the search results must contain at least one of the - # additional search terms. You can also use the [Boolean - # OR](https://developers.google.com/custom-search/docs/xml_results#BooleanOrqt) - # query term for this type of query. - # Corresponds to the JSON property `orTerms` - # @return [String] - attr_accessor :or_terms - - # The character encoding supported for search results. - # Corresponds to the JSON property `outputEncoding` - # @return [String] - attr_accessor :output_encoding - - # Specifies that all search results should be pages that are related to the - # specified URL. The parameter value should be a URL. - # Corresponds to the JSON property `relatedSite` - # @return [String] - attr_accessor :related_site - - # Filters based on licensing. Supported values include: - # * `cc_publicdomain` - # * `cc_attribute` - # * `cc_sharealike` - # * `cc_noncommercial` - # * `cc_nonderived` - # Corresponds to the JSON property `rights` - # @return [String] - attr_accessor :rights - - # Specifies the [SafeSearch - # level](https://developers.google.com/custom-search/docs/xml_results# - # safeSearchLevels) - # used for filtering out adult results. This is a custom property not - # defined in the OpenSearch spec. Valid parameter values are: - # * `"off"`: Disable SafeSearch - # * `"active"`: Enable SafeSearch - # Corresponds to the JSON property `safe` - # @return [String] - attr_accessor :safe - - # The search terms entered by the user. - # Corresponds to the JSON property `searchTerms` - # @return [String] - attr_accessor :search_terms - - # Allowed values are `web` or `image`. If unspecified, results are limited - # to webpages. - # Corresponds to the JSON property `searchType` - # @return [String] - attr_accessor :search_type - - # Restricts results to URLs from a specified site. - # Corresponds to the JSON property `siteSearch` - # @return [String] - attr_accessor :site_search - - # Specifies whether to include or exclude results from the site named in - # the `sitesearch` parameter. Supported values are: - # * `i`: include content from site - # * `e`: exclude content from site - # Corresponds to the JSON property `siteSearchFilter` - # @return [String] - attr_accessor :site_search_filter - - # Specifies that results should be sorted according to the specified - # expression. For example, sort by date. - # Corresponds to the JSON property `sort` - # @return [String] - attr_accessor :sort - - # The index of the current set of search results into the total set of - # results, where the index of the first result is 1. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The page number of this set of results, where the page length is set by - # the `count` property. - # Corresponds to the JSON property `startPage` - # @return [Fixnum] - attr_accessor :start_page - - # A description of the query. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Estimated number of total search results. May not be accurate. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count = args[:count] if args.key?(:count) - @cr = args[:cr] if args.key?(:cr) - @cx = args[:cx] if args.key?(:cx) - @date_restrict = args[:date_restrict] if args.key?(:date_restrict) - @disable_cn_tw_translation = args[:disable_cn_tw_translation] if args.key?(:disable_cn_tw_translation) - @exact_terms = args[:exact_terms] if args.key?(:exact_terms) - @exclude_terms = args[:exclude_terms] if args.key?(:exclude_terms) - @file_type = args[:file_type] if args.key?(:file_type) - @filter = args[:filter] if args.key?(:filter) - @gl = args[:gl] if args.key?(:gl) - @google_host = args[:google_host] if args.key?(:google_host) - @high_range = args[:high_range] if args.key?(:high_range) - @hl = args[:hl] if args.key?(:hl) - @hq = args[:hq] if args.key?(:hq) - @img_color_type = args[:img_color_type] if args.key?(:img_color_type) - @img_dominant_color = args[:img_dominant_color] if args.key?(:img_dominant_color) - @img_size = args[:img_size] if args.key?(:img_size) - @img_type = args[:img_type] if args.key?(:img_type) - @input_encoding = args[:input_encoding] if args.key?(:input_encoding) - @language = args[:language] if args.key?(:language) - @link_site = args[:link_site] if args.key?(:link_site) - @low_range = args[:low_range] if args.key?(:low_range) - @or_terms = args[:or_terms] if args.key?(:or_terms) - @output_encoding = args[:output_encoding] if args.key?(:output_encoding) - @related_site = args[:related_site] if args.key?(:related_site) - @rights = args[:rights] if args.key?(:rights) - @safe = args[:safe] if args.key?(:safe) - @search_terms = args[:search_terms] if args.key?(:search_terms) - @search_type = args[:search_type] if args.key?(:search_type) - @site_search = args[:site_search] if args.key?(:site_search) - @site_search_filter = args[:site_search_filter] if args.key?(:site_search_filter) - @sort = args[:sort] if args.key?(:sort) - @start_index = args[:start_index] if args.key?(:start_index) - @start_page = args[:start_page] if args.key?(:start_page) - @title = args[:title] if args.key?(:title) - @total_results = args[:total_results] if args.key?(:total_results) - end - end - - # Custom search request metadata. - class Request - include Google::Apis::Core::Hashable - - # Number of search results returned in this set. - # Corresponds to the JSON property `count` - # @return [Fixnum] - attr_accessor :count - - # Restricts search results to documents originating in a particular - # country. You may use [Boolean - # operators](https://developers.google.com/custom-search/docs/xml_results# - # booleanOperators) - # in the `cr` parameter's value. - # Google WebSearch determines the country of a document by analyzing the - # following: - # * The top-level domain (TLD) of the document's URL. - # * The geographic location of the web server's IP address. - # See [Country (cr) Parameter - # Values](https://developers.google.com/custom-search/docs/xml_results# - # countryCollections) - # for a list of valid values for this parameter. - # Corresponds to the JSON property `cr` - # @return [String] - attr_accessor :cr - - # The identifier of a custom search engine created using the Custom Search - # [Control Panel](https://cse.google.com/). This is a custom property not - # defined in the OpenSearch spec. This parameter is **required**. - # Corresponds to the JSON property `cx` - # @return [String] - attr_accessor :cx - - # Restricts results to URLs based on date. Supported values include: - # * `d[number]`: requests results from the specified number of past days. - # * `w[number]`: requests results from the specified number of past weeks. - # * `m[number]`: requests results from the specified number of past months. - # * `y[number]`: requests results from the specified number of past years. - # Corresponds to the JSON property `dateRestrict` - # @return [String] - attr_accessor :date_restrict - - # Enables or disables the [Simplified and Traditional Chinese - # Search](https://developers.google.com/custom-search/docs/xml_results# - # chineseSearch) - # feature. - # Supported values are: - # * `0`: enabled (default) - # * `1`: disabled - # Corresponds to the JSON property `disableCnTwTranslation` - # @return [String] - attr_accessor :disable_cn_tw_translation - - # Identifies a phrase that all documents in the search results must - # contain. - # Corresponds to the JSON property `exactTerms` - # @return [String] - attr_accessor :exact_terms - - # Identifies a word or phrase that should not appear in any documents in - # the search results. - # Corresponds to the JSON property `excludeTerms` - # @return [String] - attr_accessor :exclude_terms - - # Restricts results to files of a specified extension. Filetypes supported - # by Google include: - # * Adobe Portable Document Format (`pdf`) - # * Adobe PostScript (`ps`) - # * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`, `wku`) - # * Lotus WordPro (`lwp`) - # * Macwrite (`mw`) - # * Microsoft Excel (`xls`) - # * Microsoft PowerPoint (`ppt`) - # * Microsoft Word (`doc`) - # * Microsoft Works (`wks`, `wps`, `wdb`) - # * Microsoft Write (`wri`) - # * Rich Text Format (`rtf`) - # * Shockwave Flash (`swf`) - # * Text (`ans`, `txt`). - # Additional filetypes may be added in the future. An up-to-date list can - # always be found in Google's [file type - # FAQ](https://support.google.com/webmasters/answer/35287). - # Corresponds to the JSON property `fileType` - # @return [String] - attr_accessor :file_type - - # Activates or deactivates the automatic filtering of Google search - # results. See [Automatic - # Filtering](https://developers.google.com/custom-search/docs/xml_results# - # automaticFiltering) - # for more information about Google's search results filters. Valid values - # for this parameter are: - # * `0`: Disabled - # * `1`: Enabled (default) - # **Note**: By default, Google applies filtering to all search results to - # improve the quality of those results. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Boosts search results whose country of origin matches the parameter - # value. See [Country - # Codes](https://developers.google.com/custom-search/docs/xml_results# - # countryCodes) - # for a list of valid values. - # Specifying a `gl` parameter value in WebSearch requests should improve - # the relevance of results. This is particularly true for international - # customers and, even more specifically, for customers in English-speaking - # countries other than the United States. - # Corresponds to the JSON property `gl` - # @return [String] - attr_accessor :gl - - # Specifies the Google domain (for example, google.com, google.de, or - # google.fr) to which the search should be limited. - # Corresponds to the JSON property `googleHost` - # @return [String] - attr_accessor :google_host - - # Specifies the ending value for a search range. Use `cse:lowRange` and - # `cse:highrange` to append an inclusive search range of - # `lowRange...highRange` to the query. - # Corresponds to the JSON property `highRange` - # @return [String] - attr_accessor :high_range - - # Specifies the interface language (host language) of your user interface. - # Explicitly setting this parameter improves the performance and the - # quality of your search results. - # See the [Interface - # Languages](https://developers.google.com/custom-search/docs/xml_results# - # wsInterfaceLanguages) - # section of [Internationalizing Queries and Results - # Presentation](https://developers.google.com/custom-search/docs/xml_results# - # wsInternationalizing) - # for more information, and [Supported Interface - # Languages](https://developers.google.com/custom-search/docs/ - # xml_results_appendices#interfaceLanguages) - # for a list of supported languages. - # Corresponds to the JSON property `hl` - # @return [String] - attr_accessor :hl - - # Appends the specified query terms to the query, as if they were combined - # with a logical `AND` operator. - # Corresponds to the JSON property `hq` - # @return [String] - attr_accessor :hq - - # Restricts results to images of a specified color type. Supported values - # are: - # * `mono` (black and white) - # * `gray` (grayscale) - # * `color` (color) - # Corresponds to the JSON property `imgColorType` - # @return [String] - attr_accessor :img_color_type - - # Restricts results to images with a specific dominant color. Supported - # values are: - # * `red` - # * `orange` - # * `yellow` - # * `green` - # * `teal` - # * `blue` - # * `purple` - # * `pink` - # * `white` - # * `gray` - # * `black` - # * `brown` - # Corresponds to the JSON property `imgDominantColor` - # @return [String] - attr_accessor :img_dominant_color - - # Restricts results to images of a specified size. Supported values are: - # * `icon` (small) - # * `small | medium | large | xlarge` (medium) - # * `xxlarge` (large) - # * `huge` (extra-large) - # Corresponds to the JSON property `imgSize` - # @return [String] - attr_accessor :img_size - - # Restricts results to images of a specified type. Supported values are: - # * `clipart` (Clip art) - # * `face` (Face) - # * `lineart` (Line drawing) - # * `photo` (Photo) - # * `animated` (Animated) - # * `stock` (Stock) - # Corresponds to the JSON property `imgType` - # @return [String] - attr_accessor :img_type - - # The character encoding supported for search requests. - # Corresponds to the JSON property `inputEncoding` - # @return [String] - attr_accessor :input_encoding - - # The language of the search results. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # Specifies that all results should contain a link to a specific URL. - # Corresponds to the JSON property `linkSite` - # @return [String] - attr_accessor :link_site - - # Specifies the starting value for a search range. Use `cse:lowRange` and - # `cse:highrange` to append an inclusive search range of - # `lowRange...highRange` to the query. - # Corresponds to the JSON property `lowRange` - # @return [String] - attr_accessor :low_range - - # Provides additional search terms to check for in a document, where each - # document in the search results must contain at least one of the - # additional search terms. You can also use the [Boolean - # OR](https://developers.google.com/custom-search/docs/xml_results#BooleanOrqt) - # query term for this type of query. - # Corresponds to the JSON property `orTerms` - # @return [String] - attr_accessor :or_terms - - # The character encoding supported for search results. - # Corresponds to the JSON property `outputEncoding` - # @return [String] - attr_accessor :output_encoding - - # Specifies that all search results should be pages that are related to the - # specified URL. The parameter value should be a URL. - # Corresponds to the JSON property `relatedSite` - # @return [String] - attr_accessor :related_site - - # Filters based on licensing. Supported values include: - # * `cc_publicdomain` - # * `cc_attribute` - # * `cc_sharealike` - # * `cc_noncommercial` - # * `cc_nonderived` - # Corresponds to the JSON property `rights` - # @return [String] - attr_accessor :rights - - # Specifies the [SafeSearch - # level](https://developers.google.com/custom-search/docs/xml_results# - # safeSearchLevels) - # used for filtering out adult results. This is a custom property not - # defined in the OpenSearch spec. Valid parameter values are: - # * `"off"`: Disable SafeSearch - # * `"active"`: Enable SafeSearch - # Corresponds to the JSON property `safe` - # @return [String] - attr_accessor :safe - - # The search terms entered by the user. - # Corresponds to the JSON property `searchTerms` - # @return [String] - attr_accessor :search_terms - - # Allowed values are `web` or `image`. If unspecified, results are limited - # to webpages. - # Corresponds to the JSON property `searchType` - # @return [String] - attr_accessor :search_type - - # Restricts results to URLs from a specified site. - # Corresponds to the JSON property `siteSearch` - # @return [String] - attr_accessor :site_search - - # Specifies whether to include or exclude results from the site named in - # the `sitesearch` parameter. Supported values are: - # * `i`: include content from site - # * `e`: exclude content from site - # Corresponds to the JSON property `siteSearchFilter` - # @return [String] - attr_accessor :site_search_filter - - # Specifies that results should be sorted according to the specified - # expression. For example, sort by date. - # Corresponds to the JSON property `sort` - # @return [String] - attr_accessor :sort - - # The index of the current set of search results into the total set of - # results, where the index of the first result is 1. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The page number of this set of results, where the page length is set by - # the `count` property. - # Corresponds to the JSON property `startPage` - # @return [Fixnum] - attr_accessor :start_page - - # A description of the query. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Estimated number of total search results. May not be accurate. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count = args[:count] if args.key?(:count) - @cr = args[:cr] if args.key?(:cr) - @cx = args[:cx] if args.key?(:cx) - @date_restrict = args[:date_restrict] if args.key?(:date_restrict) - @disable_cn_tw_translation = args[:disable_cn_tw_translation] if args.key?(:disable_cn_tw_translation) - @exact_terms = args[:exact_terms] if args.key?(:exact_terms) - @exclude_terms = args[:exclude_terms] if args.key?(:exclude_terms) - @file_type = args[:file_type] if args.key?(:file_type) - @filter = args[:filter] if args.key?(:filter) - @gl = args[:gl] if args.key?(:gl) - @google_host = args[:google_host] if args.key?(:google_host) - @high_range = args[:high_range] if args.key?(:high_range) - @hl = args[:hl] if args.key?(:hl) - @hq = args[:hq] if args.key?(:hq) - @img_color_type = args[:img_color_type] if args.key?(:img_color_type) - @img_dominant_color = args[:img_dominant_color] if args.key?(:img_dominant_color) - @img_size = args[:img_size] if args.key?(:img_size) - @img_type = args[:img_type] if args.key?(:img_type) - @input_encoding = args[:input_encoding] if args.key?(:input_encoding) - @language = args[:language] if args.key?(:language) - @link_site = args[:link_site] if args.key?(:link_site) - @low_range = args[:low_range] if args.key?(:low_range) - @or_terms = args[:or_terms] if args.key?(:or_terms) - @output_encoding = args[:output_encoding] if args.key?(:output_encoding) - @related_site = args[:related_site] if args.key?(:related_site) - @rights = args[:rights] if args.key?(:rights) - @safe = args[:safe] if args.key?(:safe) - @search_terms = args[:search_terms] if args.key?(:search_terms) - @search_type = args[:search_type] if args.key?(:search_type) - @site_search = args[:site_search] if args.key?(:site_search) - @site_search_filter = args[:site_search_filter] if args.key?(:site_search_filter) - @sort = args[:sort] if args.key?(:sort) - @start_index = args[:start_index] if args.key?(:start_index) - @start_page = args[:start_page] if args.key?(:start_page) - @title = args[:title] if args.key?(:title) - @total_results = args[:total_results] if args.key?(:total_results) - end - end - end - - # Metadata about a search operation. - class SearchInformation - include Google::Apis::Core::Hashable - - # The time taken for the server to return search results, formatted - # according to locale style. - # Corresponds to the JSON property `formattedSearchTime` - # @return [String] - attr_accessor :formatted_search_time - - # The total number of search results, formatted according to locale style. - # Corresponds to the JSON property `formattedTotalResults` - # @return [String] - attr_accessor :formatted_total_results - - # The time taken for the server to return search results. - # Corresponds to the JSON property `searchTime` - # @return [Float] - attr_accessor :search_time - - # The total number of search results returned by the query. - # Corresponds to the JSON property `totalResults` - # @return [String] - attr_accessor :total_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formatted_search_time = args[:formatted_search_time] if args.key?(:formatted_search_time) - @formatted_total_results = args[:formatted_total_results] if args.key?(:formatted_total_results) - @search_time = args[:search_time] if args.key?(:search_time) - @total_results = args[:total_results] if args.key?(:total_results) - end - end - - # Spell correction information for a query. - class Spelling - include Google::Apis::Core::Hashable - - # The corrected query. - # Corresponds to the JSON property `correctedQuery` - # @return [String] - attr_accessor :corrected_query - - # The corrected query, formatted in HTML. - # Corresponds to the JSON property `htmlCorrectedQuery` - # @return [String] - attr_accessor :html_corrected_query - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @corrected_query = args[:corrected_query] if args.key?(:corrected_query) - @html_corrected_query = args[:html_corrected_query] if args.key?(:html_corrected_query) - end - end - - # OpenSearch template and URL. - class Url - include Google::Apis::Core::Hashable - - # The actual [OpenSearch - # template](http://www.opensearch.org/specifications/opensearch/1.1# - # opensearch_url_template_syntax) - # for this API. - # Corresponds to the JSON property `template` - # @return [String] - attr_accessor :template - - # The MIME type of the OpenSearch URL template for the Custom Search API. - # 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) - @template = args[:template] if args.key?(:template) - @type = args[:type] if args.key?(:type) - end - end - end - end - end -end diff --git a/generated/google/apis/customsearch_v1/representations.rb b/generated/google/apis/customsearch_v1/representations.rb deleted file mode 100644 index 7ad933bc4..000000000 --- a/generated/google/apis/customsearch_v1/representations.rb +++ /dev/null @@ -1,372 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'date' -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module CustomsearchV1 - - class Promotion - class Representation < Google::Apis::Core::JsonRepresentation; end - - class BodyLine - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - class Result - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Label - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - class Search - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Queries - class Representation < Google::Apis::Core::JsonRepresentation; end - - class NextPage - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PreviousPage - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Request - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchInformation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Spelling - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Url - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - class Promotion - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :body_lines, as: 'bodyLines', class: Google::Apis::CustomsearchV1::Promotion::BodyLine, decorator: Google::Apis::CustomsearchV1::Promotion::BodyLine::Representation - - property :display_link, as: 'displayLink' - property :html_title, as: 'htmlTitle' - property :image, as: 'image', class: Google::Apis::CustomsearchV1::Promotion::Image, decorator: Google::Apis::CustomsearchV1::Promotion::Image::Representation - - property :link, as: 'link' - property :title, as: 'title' - end - - class BodyLine - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :html_title, as: 'htmlTitle' - property :link, as: 'link' - property :title, as: 'title' - property :url, as: 'url' - end - end - - class Image - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :source, as: 'source' - property :width, as: 'width' - end - end - end - - class Result - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cache_id, as: 'cacheId' - property :display_link, as: 'displayLink' - property :file_format, as: 'fileFormat' - property :formatted_url, as: 'formattedUrl' - property :html_formatted_url, as: 'htmlFormattedUrl' - property :html_snippet, as: 'htmlSnippet' - property :html_title, as: 'htmlTitle' - property :image, as: 'image', class: Google::Apis::CustomsearchV1::Result::Image, decorator: Google::Apis::CustomsearchV1::Result::Image::Representation - - property :kind, as: 'kind' - collection :labels, as: 'labels', class: Google::Apis::CustomsearchV1::Result::Label, decorator: Google::Apis::CustomsearchV1::Result::Label::Representation - - property :link, as: 'link' - property :mime, as: 'mime' - hash :pagemap, as: 'pagemap' - property :snippet, as: 'snippet' - property :title, as: 'title' - end - - class Image - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :byte_size, as: 'byteSize' - property :context_link, as: 'contextLink' - property :height, as: 'height' - property :thumbnail_height, as: 'thumbnailHeight' - property :thumbnail_link, as: 'thumbnailLink' - property :thumbnail_width, as: 'thumbnailWidth' - property :width, as: 'width' - end - end - - class Label - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :label_with_op, as: 'label_with_op' - property :name, as: 'name' - end - end - end - - class Search - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :context, as: 'context' - collection :items, as: 'items', class: Google::Apis::CustomsearchV1::Result, decorator: Google::Apis::CustomsearchV1::Result::Representation - - property :kind, as: 'kind' - collection :promotions, as: 'promotions', class: Google::Apis::CustomsearchV1::Promotion, decorator: Google::Apis::CustomsearchV1::Promotion::Representation - - property :queries, as: 'queries', class: Google::Apis::CustomsearchV1::Search::Queries, decorator: Google::Apis::CustomsearchV1::Search::Queries::Representation - - property :search_information, as: 'searchInformation', class: Google::Apis::CustomsearchV1::Search::SearchInformation, decorator: Google::Apis::CustomsearchV1::Search::SearchInformation::Representation - - property :spelling, as: 'spelling', class: Google::Apis::CustomsearchV1::Search::Spelling, decorator: Google::Apis::CustomsearchV1::Search::Spelling::Representation - - property :url, as: 'url', class: Google::Apis::CustomsearchV1::Search::Url, decorator: Google::Apis::CustomsearchV1::Search::Url::Representation - - end - - class Queries - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :next_page, as: 'nextPage', class: Google::Apis::CustomsearchV1::Search::Queries::NextPage, decorator: Google::Apis::CustomsearchV1::Search::Queries::NextPage::Representation - - collection :previous_page, as: 'previousPage', class: Google::Apis::CustomsearchV1::Search::Queries::PreviousPage, decorator: Google::Apis::CustomsearchV1::Search::Queries::PreviousPage::Representation - - collection :request, as: 'request', class: Google::Apis::CustomsearchV1::Search::Queries::Request, decorator: Google::Apis::CustomsearchV1::Search::Queries::Request::Representation - - end - - class NextPage - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - property :cr, as: 'cr' - property :cx, as: 'cx' - property :date_restrict, as: 'dateRestrict' - property :disable_cn_tw_translation, as: 'disableCnTwTranslation' - property :exact_terms, as: 'exactTerms' - property :exclude_terms, as: 'excludeTerms' - property :file_type, as: 'fileType' - property :filter, as: 'filter' - property :gl, as: 'gl' - property :google_host, as: 'googleHost' - property :high_range, as: 'highRange' - property :hl, as: 'hl' - property :hq, as: 'hq' - property :img_color_type, as: 'imgColorType' - property :img_dominant_color, as: 'imgDominantColor' - property :img_size, as: 'imgSize' - property :img_type, as: 'imgType' - property :input_encoding, as: 'inputEncoding' - property :language, as: 'language' - property :link_site, as: 'linkSite' - property :low_range, as: 'lowRange' - property :or_terms, as: 'orTerms' - property :output_encoding, as: 'outputEncoding' - property :related_site, as: 'relatedSite' - property :rights, as: 'rights' - property :safe, as: 'safe' - property :search_terms, as: 'searchTerms' - property :search_type, as: 'searchType' - property :site_search, as: 'siteSearch' - property :site_search_filter, as: 'siteSearchFilter' - property :sort, as: 'sort' - property :start_index, as: 'startIndex' - property :start_page, as: 'startPage' - property :title, as: 'title' - property :total_results, :numeric_string => true, as: 'totalResults' - end - end - - class PreviousPage - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - property :cr, as: 'cr' - property :cx, as: 'cx' - property :date_restrict, as: 'dateRestrict' - property :disable_cn_tw_translation, as: 'disableCnTwTranslation' - property :exact_terms, as: 'exactTerms' - property :exclude_terms, as: 'excludeTerms' - property :file_type, as: 'fileType' - property :filter, as: 'filter' - property :gl, as: 'gl' - property :google_host, as: 'googleHost' - property :high_range, as: 'highRange' - property :hl, as: 'hl' - property :hq, as: 'hq' - property :img_color_type, as: 'imgColorType' - property :img_dominant_color, as: 'imgDominantColor' - property :img_size, as: 'imgSize' - property :img_type, as: 'imgType' - property :input_encoding, as: 'inputEncoding' - property :language, as: 'language' - property :link_site, as: 'linkSite' - property :low_range, as: 'lowRange' - property :or_terms, as: 'orTerms' - property :output_encoding, as: 'outputEncoding' - property :related_site, as: 'relatedSite' - property :rights, as: 'rights' - property :safe, as: 'safe' - property :search_terms, as: 'searchTerms' - property :search_type, as: 'searchType' - property :site_search, as: 'siteSearch' - property :site_search_filter, as: 'siteSearchFilter' - property :sort, as: 'sort' - property :start_index, as: 'startIndex' - property :start_page, as: 'startPage' - property :title, as: 'title' - property :total_results, :numeric_string => true, as: 'totalResults' - end - end - - class Request - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - property :cr, as: 'cr' - property :cx, as: 'cx' - property :date_restrict, as: 'dateRestrict' - property :disable_cn_tw_translation, as: 'disableCnTwTranslation' - property :exact_terms, as: 'exactTerms' - property :exclude_terms, as: 'excludeTerms' - property :file_type, as: 'fileType' - property :filter, as: 'filter' - property :gl, as: 'gl' - property :google_host, as: 'googleHost' - property :high_range, as: 'highRange' - property :hl, as: 'hl' - property :hq, as: 'hq' - property :img_color_type, as: 'imgColorType' - property :img_dominant_color, as: 'imgDominantColor' - property :img_size, as: 'imgSize' - property :img_type, as: 'imgType' - property :input_encoding, as: 'inputEncoding' - property :language, as: 'language' - property :link_site, as: 'linkSite' - property :low_range, as: 'lowRange' - property :or_terms, as: 'orTerms' - property :output_encoding, as: 'outputEncoding' - property :related_site, as: 'relatedSite' - property :rights, as: 'rights' - property :safe, as: 'safe' - property :search_terms, as: 'searchTerms' - property :search_type, as: 'searchType' - property :site_search, as: 'siteSearch' - property :site_search_filter, as: 'siteSearchFilter' - property :sort, as: 'sort' - property :start_index, as: 'startIndex' - property :start_page, as: 'startPage' - property :title, as: 'title' - property :total_results, :numeric_string => true, as: 'totalResults' - end - end - end - - class SearchInformation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_search_time, as: 'formattedSearchTime' - property :formatted_total_results, as: 'formattedTotalResults' - property :search_time, as: 'searchTime' - property :total_results, as: 'totalResults' - end - end - - class Spelling - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :corrected_query, as: 'correctedQuery' - property :html_corrected_query, as: 'htmlCorrectedQuery' - end - end - - class Url - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :template, as: 'template' - property :type, as: 'type' - end - end - end - end - end -end diff --git a/generated/google/apis/customsearch_v1/service.rb b/generated/google/apis/customsearch_v1/service.rb deleted file mode 100644 index dd4c9ae6c..000000000 --- a/generated/google/apis/customsearch_v1/service.rb +++ /dev/null @@ -1,608 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module CustomsearchV1 - # Custom Search API - # - # Searches over a website or collection of websites - # - # @example - # require 'google/apis/customsearch_v1' - # - # Customsearch = Google::Apis::CustomsearchV1 # Alias the module - # service = Customsearch::CustomsearchService.new - # - # @see https://developers.google.com/custom-search/v1/introduction - class CustomsearchService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - - # @return [String] - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - attr_accessor :quota_user - - def initialize - super('https://customsearch.googleapis.com/', '') - @batch_path = 'batch' - end - - # Returns metadata about the search performed, metadata about the custom - # search engine used for the search, and the search results. - # @param [String] c2coff - # Enables or disables [Simplified and Traditional Chinese - # Search](https://developers.google.com/custom-search/docs/xml_results# - # chineseSearch). - # The default value for this parameter is 0 (zero), meaning that the feature - # is enabled. Supported values are: - # * `1`: Disabled - # * `0`: Enabled (default) - # @param [String] cr - # Restricts search results to documents originating in a particular country. - # You may use [Boolean - # operators](https://developers.google.com/custom-search/docs/ - # xml_results_appendices#booleanOperators) - # in the cr parameter's value. - # Google Search determines the country of a document by analyzing: - # * the top-level domain (TLD) of the document's URL - # * the geographic location of the Web server's IP address - # See the [Country Parameter - # Values](https://developers.google.com/custom-search/docs/ - # xml_results_appendices#countryCollections) - # page for a list of valid values for this parameter. - # @param [String] cx - # The custom search engine ID to use for this request. - # @param [String] date_restrict - # Restricts results to URLs based on date. Supported values include: - # * `d[number]`: requests results from the specified number of past days. - # * `w[number]`: requests results from the specified number of past weeks. - # * `m[number]`: requests results from the specified number of past months. - # * `y[number]`: requests results from the specified number of past years. - # @param [String] exact_terms - # Identifies a phrase that all documents in the search results must contain. - # @param [String] exclude_terms - # Identifies a word or phrase that should not appear in any documents in the - # search results. - # @param [String] file_type - # Restricts results to files of a specified extension. A list of file types - # indexable by Google can be found in Search Console [Help - # Center](https://support.google.com/webmasters/answer/35287). - # @param [String] filter - # Controls turning on or off the duplicate content filter. - # * See [Automatic - # Filtering](https://developers.google.com/custom-search/docs/xml_results# - # automaticFiltering) - # for more information about Google's search results filters. Note that host - # crowding filtering applies only to multi-site searches. - # * By default, Google applies filtering to all search results to improve the - # quality of those results. - # Acceptable values are: - # * `0`: Turns off duplicate content filter. - # * `1`: Turns on duplicate content filter. - # @param [String] gl - # Geolocation of end user. - # * The `gl` parameter value is a two-letter country code. The `gl` parameter - # boosts search results whose country of origin matches the parameter value. - # See the [Country - # Codes](https://developers.google.com/custom-search/docs/xml_results_appendices# - # countryCodes) - # page for a list of valid values. - # * Specifying a `gl` parameter value should lead to more relevant results. - # This is particularly true for international customers and, even more - # specifically, for customers in English- speaking countries other than the - # United States. - # @param [String] googlehost - # **Deprecated**. Use the `gl` parameter for a similar effect. - # The local Google domain (for example, google.com, google.de, or - # google.fr) to use to perform the search. - # @param [String] high_range - # Specifies the ending value for a search range. - # * Use `lowRange` and `highRange` to append an inclusive search range of - # `lowRange...highRange` to the query. - # @param [String] hl - # Sets the user interface language. - # * Explicitly setting this parameter improves the performance and the - # quality of your search results. - # * See the [Interface - # Languages](https://developers.google.com/custom-search/docs/xml_results# - # wsInterfaceLanguages) - # section of [Internationalizing Queries and Results - # Presentation](https://developers.google.com/custom-search/docs/xml_results# - # wsInternationalizing) - # for more information, and (Supported Interface - # Languages)[https://developers.google.com/custom-search/docs/ - # xml_results_appendices#interfaceLanguages] - # for a list of supported languages. - # @param [String] hq - # Appends the specified query terms to the query, as if they were combined - # with a logical AND operator. - # @param [String] img_color_type - # Returns black and white, grayscale, transparent, or color images. - # Acceptable values are: - # * `"color"` - # * `"gray"` - # * `"mono"`: black and white - # * `"trans"`: transparent background - # @param [String] img_dominant_color - # Returns images of a specific dominant color. Acceptable values are: - # * `"black"` - # * `"blue"` - # * `"brown"` - # * `"gray"` - # * `"green"` - # * `"orange"` - # * `"pink"` - # * `"purple"` - # * `"red"` - # * `"teal"` - # * `"white"` - # * `"yellow"` - # @param [String] img_size - # Returns images of a specified size. Acceptable values are: - # * `"huge"` - # * `"icon"` - # * `"large"` - # * `"medium"` - # * `"small"` - # * `"xlarge"` - # * `"xxlarge"` - # @param [String] img_type - # Returns images of a type. Acceptable values are: - # * `"clipart"` - # * `"face"` - # * `"lineart"` - # * `"stock"` - # * `"photo"` - # * `"animated"` - # @param [String] link_site - # Specifies that all search results should contain a link to a particular - # URL. - # @param [String] low_range - # Specifies the starting value for a search range. Use `lowRange` and - # `highRange` to append an inclusive search range of `lowRange...highRange` - # to the query. - # @param [String] lr - # Restricts the search to documents written in a particular language (e.g., - # `lr=lang_ja`). - # Acceptable values are: - # * `"lang_ar"`: Arabic - # * `"lang_bg"`: Bulgarian - # * `"lang_ca"`: Catalan - # * `"lang_cs"`: Czech - # * `"lang_da"`: Danish - # * `"lang_de"`: German - # * `"lang_el"`: Greek - # * `"lang_en"`: English - # * `"lang_es"`: Spanish - # * `"lang_et"`: Estonian - # * `"lang_fi"`: Finnish - # * `"lang_fr"`: French - # * `"lang_hr"`: Croatian - # * `"lang_hu"`: Hungarian - # * `"lang_id"`: Indonesian - # * `"lang_is"`: Icelandic - # * `"lang_it"`: Italian - # * `"lang_iw"`: Hebrew - # * `"lang_ja"`: Japanese - # * `"lang_ko"`: Korean - # * `"lang_lt"`: Lithuanian - # * `"lang_lv"`: Latvian - # * `"lang_nl"`: Dutch - # * `"lang_no"`: Norwegian - # * `"lang_pl"`: Polish - # * `"lang_pt"`: Portuguese - # * `"lang_ro"`: Romanian - # * `"lang_ru"`: Russian - # * `"lang_sk"`: Slovak - # * `"lang_sl"`: Slovenian - # * `"lang_sr"`: Serbian - # * `"lang_sv"`: Swedish - # * `"lang_tr"`: Turkish - # * `"lang_zh-CN"`: Chinese (Simplified) - # * `"lang_zh-TW"`: Chinese (Traditional) - # @param [Fixnum] num - # Number of search results to return. - # * Valid values are integers between 1 and 10, inclusive. - # @param [String] or_terms - # Provides additional search terms to check for in a document, where each - # document in the search results must contain at least one of the additional - # search terms. - # @param [String] q - # Query - # @param [String] related_site - # Specifies that all search results should be pages that are related to the - # specified URL. - # @param [String] rights - # Filters based on licensing. Supported values include: `cc_publicdomain`, - # `cc_attribute`, `cc_sharealike`, `cc_noncommercial`, `cc_nonderived` and - # combinations of these. See [typical - # combinations](https://wiki.creativecommons.org/wiki/CC_Search_integration). - # @param [String] safe - # Search safety level. Acceptable values are: - # * `"active"`: Enables SafeSearch filtering. - # * `"off"`: Disables SafeSearch filtering. (default) - # @param [String] search_type - # Specifies the search type: `image`. If unspecified, results are limited to - # webpages. - # Acceptable values are: - # * `"image"`: custom image search. - # @param [String] site_search - # Specifies a given site which should always be included or excluded from - # results (see `siteSearchFilter` parameter, below). - # @param [String] site_search_filter - # Controls whether to include or exclude results from the site named in the - # `siteSearch` parameter. - # Acceptable values are: - # * `"e"`: exclude - # * `"i"`: include - # @param [String] sort - # The sort expression to apply to the results. - # @param [Fixnum] start - # The index of the first result to return. The default number of results per - # page is 10, so `&start=11` would start at the top of the second page of - # results. **Note**: The JSON API will never return more than 100 results, - # even if more than 100 documents match the query, so setting the sum of - # `start + num` to a number greater than 100 will produce an error. Also note - # that the maximum value for `num` is 10. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CustomsearchV1::Search] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CustomsearchV1::Search] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_cses(c2coff: nil, cr: nil, cx: nil, date_restrict: nil, exact_terms: nil, exclude_terms: nil, file_type: nil, filter: nil, gl: nil, googlehost: nil, high_range: nil, hl: nil, hq: nil, img_color_type: nil, img_dominant_color: nil, img_size: nil, img_type: nil, link_site: nil, low_range: nil, lr: nil, num: nil, or_terms: nil, q: nil, related_site: nil, rights: nil, safe: nil, search_type: nil, site_search: nil, site_search_filter: nil, sort: nil, start: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'customsearch/v1', options) - command.response_representation = Google::Apis::CustomsearchV1::Search::Representation - command.response_class = Google::Apis::CustomsearchV1::Search - command.query['c2coff'] = c2coff unless c2coff.nil? - command.query['cr'] = cr unless cr.nil? - command.query['cx'] = cx unless cx.nil? - command.query['dateRestrict'] = date_restrict unless date_restrict.nil? - command.query['exactTerms'] = exact_terms unless exact_terms.nil? - command.query['excludeTerms'] = exclude_terms unless exclude_terms.nil? - command.query['fileType'] = file_type unless file_type.nil? - command.query['filter'] = filter unless filter.nil? - command.query['gl'] = gl unless gl.nil? - command.query['googlehost'] = googlehost unless googlehost.nil? - command.query['highRange'] = high_range unless high_range.nil? - command.query['hl'] = hl unless hl.nil? - command.query['hq'] = hq unless hq.nil? - command.query['imgColorType'] = img_color_type unless img_color_type.nil? - command.query['imgDominantColor'] = img_dominant_color unless img_dominant_color.nil? - command.query['imgSize'] = img_size unless img_size.nil? - command.query['imgType'] = img_type unless img_type.nil? - command.query['linkSite'] = link_site unless link_site.nil? - command.query['lowRange'] = low_range unless low_range.nil? - command.query['lr'] = lr unless lr.nil? - command.query['num'] = num unless num.nil? - command.query['orTerms'] = or_terms unless or_terms.nil? - command.query['q'] = q unless q.nil? - command.query['relatedSite'] = related_site unless related_site.nil? - command.query['rights'] = rights unless rights.nil? - command.query['safe'] = safe unless safe.nil? - command.query['searchType'] = search_type unless search_type.nil? - command.query['siteSearch'] = site_search unless site_search.nil? - command.query['siteSearchFilter'] = site_search_filter unless site_search_filter.nil? - command.query['sort'] = sort unless sort.nil? - command.query['start'] = start unless start.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns metadata about the search performed, metadata about the custom - # search engine used for the search, and the search results. Uses a small set - # of url patterns. - # @param [String] c2coff - # Enables or disables [Simplified and Traditional Chinese - # Search](https://developers.google.com/custom-search/docs/xml_results# - # chineseSearch). - # The default value for this parameter is 0 (zero), meaning that the feature - # is enabled. Supported values are: - # * `1`: Disabled - # * `0`: Enabled (default) - # @param [String] cr - # Restricts search results to documents originating in a particular country. - # You may use [Boolean - # operators](https://developers.google.com/custom-search/docs/ - # xml_results_appendices#booleanOperators) - # in the cr parameter's value. - # Google Search determines the country of a document by analyzing: - # * the top-level domain (TLD) of the document's URL - # * the geographic location of the Web server's IP address - # See the [Country Parameter - # Values](https://developers.google.com/custom-search/docs/ - # xml_results_appendices#countryCollections) - # page for a list of valid values for this parameter. - # @param [String] cx - # The custom search engine ID to use for this request. - # @param [String] date_restrict - # Restricts results to URLs based on date. Supported values include: - # * `d[number]`: requests results from the specified number of past days. - # * `w[number]`: requests results from the specified number of past weeks. - # * `m[number]`: requests results from the specified number of past months. - # * `y[number]`: requests results from the specified number of past years. - # @param [String] exact_terms - # Identifies a phrase that all documents in the search results must contain. - # @param [String] exclude_terms - # Identifies a word or phrase that should not appear in any documents in the - # search results. - # @param [String] file_type - # Restricts results to files of a specified extension. A list of file types - # indexable by Google can be found in Search Console [Help - # Center](https://support.google.com/webmasters/answer/35287). - # @param [String] filter - # Controls turning on or off the duplicate content filter. - # * See [Automatic - # Filtering](https://developers.google.com/custom-search/docs/xml_results# - # automaticFiltering) - # for more information about Google's search results filters. Note that host - # crowding filtering applies only to multi-site searches. - # * By default, Google applies filtering to all search results to improve the - # quality of those results. - # Acceptable values are: - # * `0`: Turns off duplicate content filter. - # * `1`: Turns on duplicate content filter. - # @param [String] gl - # Geolocation of end user. - # * The `gl` parameter value is a two-letter country code. The `gl` parameter - # boosts search results whose country of origin matches the parameter value. - # See the [Country - # Codes](https://developers.google.com/custom-search/docs/xml_results_appendices# - # countryCodes) - # page for a list of valid values. - # * Specifying a `gl` parameter value should lead to more relevant results. - # This is particularly true for international customers and, even more - # specifically, for customers in English- speaking countries other than the - # United States. - # @param [String] googlehost - # **Deprecated**. Use the `gl` parameter for a similar effect. - # The local Google domain (for example, google.com, google.de, or - # google.fr) to use to perform the search. - # @param [String] high_range - # Specifies the ending value for a search range. - # * Use `lowRange` and `highRange` to append an inclusive search range of - # `lowRange...highRange` to the query. - # @param [String] hl - # Sets the user interface language. - # * Explicitly setting this parameter improves the performance and the - # quality of your search results. - # * See the [Interface - # Languages](https://developers.google.com/custom-search/docs/xml_results# - # wsInterfaceLanguages) - # section of [Internationalizing Queries and Results - # Presentation](https://developers.google.com/custom-search/docs/xml_results# - # wsInternationalizing) - # for more information, and (Supported Interface - # Languages)[https://developers.google.com/custom-search/docs/ - # xml_results_appendices#interfaceLanguages] - # for a list of supported languages. - # @param [String] hq - # Appends the specified query terms to the query, as if they were combined - # with a logical AND operator. - # @param [String] img_color_type - # Returns black and white, grayscale, transparent, or color images. - # Acceptable values are: - # * `"color"` - # * `"gray"` - # * `"mono"`: black and white - # * `"trans"`: transparent background - # @param [String] img_dominant_color - # Returns images of a specific dominant color. Acceptable values are: - # * `"black"` - # * `"blue"` - # * `"brown"` - # * `"gray"` - # * `"green"` - # * `"orange"` - # * `"pink"` - # * `"purple"` - # * `"red"` - # * `"teal"` - # * `"white"` - # * `"yellow"` - # @param [String] img_size - # Returns images of a specified size. Acceptable values are: - # * `"huge"` - # * `"icon"` - # * `"large"` - # * `"medium"` - # * `"small"` - # * `"xlarge"` - # * `"xxlarge"` - # @param [String] img_type - # Returns images of a type. Acceptable values are: - # * `"clipart"` - # * `"face"` - # * `"lineart"` - # * `"stock"` - # * `"photo"` - # * `"animated"` - # @param [String] link_site - # Specifies that all search results should contain a link to a particular - # URL. - # @param [String] low_range - # Specifies the starting value for a search range. Use `lowRange` and - # `highRange` to append an inclusive search range of `lowRange...highRange` - # to the query. - # @param [String] lr - # Restricts the search to documents written in a particular language (e.g., - # `lr=lang_ja`). - # Acceptable values are: - # * `"lang_ar"`: Arabic - # * `"lang_bg"`: Bulgarian - # * `"lang_ca"`: Catalan - # * `"lang_cs"`: Czech - # * `"lang_da"`: Danish - # * `"lang_de"`: German - # * `"lang_el"`: Greek - # * `"lang_en"`: English - # * `"lang_es"`: Spanish - # * `"lang_et"`: Estonian - # * `"lang_fi"`: Finnish - # * `"lang_fr"`: French - # * `"lang_hr"`: Croatian - # * `"lang_hu"`: Hungarian - # * `"lang_id"`: Indonesian - # * `"lang_is"`: Icelandic - # * `"lang_it"`: Italian - # * `"lang_iw"`: Hebrew - # * `"lang_ja"`: Japanese - # * `"lang_ko"`: Korean - # * `"lang_lt"`: Lithuanian - # * `"lang_lv"`: Latvian - # * `"lang_nl"`: Dutch - # * `"lang_no"`: Norwegian - # * `"lang_pl"`: Polish - # * `"lang_pt"`: Portuguese - # * `"lang_ro"`: Romanian - # * `"lang_ru"`: Russian - # * `"lang_sk"`: Slovak - # * `"lang_sl"`: Slovenian - # * `"lang_sr"`: Serbian - # * `"lang_sv"`: Swedish - # * `"lang_tr"`: Turkish - # * `"lang_zh-CN"`: Chinese (Simplified) - # * `"lang_zh-TW"`: Chinese (Traditional) - # @param [Fixnum] num - # Number of search results to return. - # * Valid values are integers between 1 and 10, inclusive. - # @param [String] or_terms - # Provides additional search terms to check for in a document, where each - # document in the search results must contain at least one of the additional - # search terms. - # @param [String] q - # Query - # @param [String] related_site - # Specifies that all search results should be pages that are related to the - # specified URL. - # @param [String] rights - # Filters based on licensing. Supported values include: `cc_publicdomain`, - # `cc_attribute`, `cc_sharealike`, `cc_noncommercial`, `cc_nonderived` and - # combinations of these. See [typical - # combinations](https://wiki.creativecommons.org/wiki/CC_Search_integration). - # @param [String] safe - # Search safety level. Acceptable values are: - # * `"active"`: Enables SafeSearch filtering. - # * `"off"`: Disables SafeSearch filtering. (default) - # @param [String] search_type - # Specifies the search type: `image`. If unspecified, results are limited to - # webpages. - # Acceptable values are: - # * `"image"`: custom image search. - # @param [String] site_search - # Specifies a given site which should always be included or excluded from - # results (see `siteSearchFilter` parameter, below). - # @param [String] site_search_filter - # Controls whether to include or exclude results from the site named in the - # `siteSearch` parameter. - # Acceptable values are: - # * `"e"`: exclude - # * `"i"`: include - # @param [String] sort - # The sort expression to apply to the results. - # @param [Fixnum] start - # The index of the first result to return. The default number of results per - # page is 10, so `&start=11` would start at the top of the second page of - # results. **Note**: The JSON API will never return more than 100 results, - # even if more than 100 documents match the query, so setting the sum of - # `start + num` to a number greater than 100 will produce an error. Also note - # that the maximum value for `num` is 10. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CustomsearchV1::Search] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CustomsearchV1::Search] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_cse_siterestricts(c2coff: nil, cr: nil, cx: nil, date_restrict: nil, exact_terms: nil, exclude_terms: nil, file_type: nil, filter: nil, gl: nil, googlehost: nil, high_range: nil, hl: nil, hq: nil, img_color_type: nil, img_dominant_color: nil, img_size: nil, img_type: nil, link_site: nil, low_range: nil, lr: nil, num: nil, or_terms: nil, q: nil, related_site: nil, rights: nil, safe: nil, search_type: nil, site_search: nil, site_search_filter: nil, sort: nil, start: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'customsearch/v1/siterestrict', options) - command.response_representation = Google::Apis::CustomsearchV1::Search::Representation - command.response_class = Google::Apis::CustomsearchV1::Search - command.query['c2coff'] = c2coff unless c2coff.nil? - command.query['cr'] = cr unless cr.nil? - command.query['cx'] = cx unless cx.nil? - command.query['dateRestrict'] = date_restrict unless date_restrict.nil? - command.query['exactTerms'] = exact_terms unless exact_terms.nil? - command.query['excludeTerms'] = exclude_terms unless exclude_terms.nil? - command.query['fileType'] = file_type unless file_type.nil? - command.query['filter'] = filter unless filter.nil? - command.query['gl'] = gl unless gl.nil? - command.query['googlehost'] = googlehost unless googlehost.nil? - command.query['highRange'] = high_range unless high_range.nil? - command.query['hl'] = hl unless hl.nil? - command.query['hq'] = hq unless hq.nil? - command.query['imgColorType'] = img_color_type unless img_color_type.nil? - command.query['imgDominantColor'] = img_dominant_color unless img_dominant_color.nil? - command.query['imgSize'] = img_size unless img_size.nil? - command.query['imgType'] = img_type unless img_type.nil? - command.query['linkSite'] = link_site unless link_site.nil? - command.query['lowRange'] = low_range unless low_range.nil? - command.query['lr'] = lr unless lr.nil? - command.query['num'] = num unless num.nil? - command.query['orTerms'] = or_terms unless or_terms.nil? - command.query['q'] = q unless q.nil? - command.query['relatedSite'] = related_site unless related_site.nil? - command.query['rights'] = rights unless rights.nil? - command.query['safe'] = safe unless safe.nil? - command.query['searchType'] = search_type unless search_type.nil? - command.query['siteSearch'] = site_search unless site_search.nil? - command.query['siteSearchFilter'] = site_search_filter unless site_search_filter.nil? - command.query['sort'] = sort unless sort.nil? - command.query['start'] = start unless start.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - protected - - def apply_command_defaults(command) - command.query['key'] = key unless key.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - end - end - end - end -end diff --git a/generated/google/apis/dataproc_v1.rb b/generated/google/apis/dataproc_v1.rb index 1dbaaf364..d2b43a70d 100644 --- a/generated/google/apis/dataproc_v1.rb +++ b/generated/google/apis/dataproc_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/dataproc/ module DataprocV1 VERSION = 'V1' - REVISION = '20200528' + REVISION = '20200611' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/dataproc_v1/classes.rb b/generated/google/apis/dataproc_v1/classes.rb index 4b3a6b9fb..819a27acc 100644 --- a/generated/google/apis/dataproc_v1/classes.rb +++ b/generated/google/apis/dataproc_v1/classes.rb @@ -416,6 +416,11 @@ module Google # @return [Google::Apis::DataprocV1::EncryptionConfig] attr_accessor :encryption_config + # Endpoint config for this cluster + # Corresponds to the JSON property `endpointConfig` + # @return [Google::Apis::DataprocV1::EndpointConfig] + attr_accessor :endpoint_config + # Common config settings for resources of Compute Engine cluster instances, # applicable to all instances in the cluster. # Corresponds to the JSON property `gceClusterConfig` @@ -464,6 +469,17 @@ module Google # @return [Google::Apis::DataprocV1::SoftwareConfig] attr_accessor :software_config + # Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data, + # such as Spark and MapReduce history files. If you do not specify a temp + # bucket, Cloud Dataproc will determine a Cloud Storage location (US, ASIA, or + # EU) for your cluster's temp bucket according to the Compute Engine zone where + # your cluster is deployed, and then create and manage this project-level, per- + # location bucket. The default bucket has a TTL of 90 days, but you can use any + # TTL (or none) if you specify a bucket. + # Corresponds to the JSON property `tempBucket` + # @return [String] + attr_accessor :temp_bucket + # The config settings for Compute Engine resources in an instance group, such as # a master or worker group. # Corresponds to the JSON property `workerConfig` @@ -479,6 +495,7 @@ module Google @autoscaling_config = args[:autoscaling_config] if args.key?(:autoscaling_config) @config_bucket = args[:config_bucket] if args.key?(:config_bucket) @encryption_config = args[:encryption_config] if args.key?(:encryption_config) + @endpoint_config = args[:endpoint_config] if args.key?(:endpoint_config) @gce_cluster_config = args[:gce_cluster_config] if args.key?(:gce_cluster_config) @initialization_actions = args[:initialization_actions] if args.key?(:initialization_actions) @lifecycle_config = args[:lifecycle_config] if args.key?(:lifecycle_config) @@ -486,6 +503,7 @@ module Google @secondary_worker_config = args[:secondary_worker_config] if args.key?(:secondary_worker_config) @security_config = args[:security_config] if args.key?(:security_config) @software_config = args[:software_config] if args.key?(:software_config) + @temp_bucket = args[:temp_bucket] if args.key?(:temp_bucket) @worker_config = args[:worker_config] if args.key?(:worker_config) end end @@ -822,6 +840,34 @@ module Google end end + # Endpoint config for this cluster + class EndpointConfig + include Google::Apis::Core::Hashable + + # Optional. If true, enable http access to specific ports on the cluster from + # external sources. Defaults to false. + # Corresponds to the JSON property `enableHttpPortAccess` + # @return [Boolean] + attr_accessor :enable_http_port_access + alias_method :enable_http_port_access?, :enable_http_port_access + + # Output only. The map of port descriptions to URLs. Will only be populated if + # enable_http_port_access is true. + # Corresponds to the JSON property `httpPorts` + # @return [Hash] + attr_accessor :http_ports + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enable_http_port_access = args[:enable_http_port_access] if args.key?(:enable_http_port_access) + @http_ports = args[:http_ports] if args.key?(:http_ports) + end + end + # Represents a textual expression in the Common Expression Language (CEL) syntax. # CEL is a C-like expression language. The syntax and semantics of CEL are # documented at https://github.com/google/cel-spec.Example (Comparison): diff --git a/generated/google/apis/dataproc_v1/representations.rb b/generated/google/apis/dataproc_v1/representations.rb index 04e9f9a52..d01c30355 100644 --- a/generated/google/apis/dataproc_v1/representations.rb +++ b/generated/google/apis/dataproc_v1/representations.rb @@ -142,6 +142,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class EndpointConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Expr class Representation < Google::Apis::Core::JsonRepresentation; end @@ -557,6 +563,8 @@ module Google property :config_bucket, as: 'configBucket' property :encryption_config, as: 'encryptionConfig', class: Google::Apis::DataprocV1::EncryptionConfig, decorator: Google::Apis::DataprocV1::EncryptionConfig::Representation + property :endpoint_config, as: 'endpointConfig', class: Google::Apis::DataprocV1::EndpointConfig, decorator: Google::Apis::DataprocV1::EndpointConfig::Representation + property :gce_cluster_config, as: 'gceClusterConfig', class: Google::Apis::DataprocV1::GceClusterConfig, decorator: Google::Apis::DataprocV1::GceClusterConfig::Representation collection :initialization_actions, as: 'initializationActions', class: Google::Apis::DataprocV1::NodeInitializationAction, decorator: Google::Apis::DataprocV1::NodeInitializationAction::Representation @@ -571,6 +579,7 @@ module Google property :software_config, as: 'softwareConfig', class: Google::Apis::DataprocV1::SoftwareConfig, decorator: Google::Apis::DataprocV1::SoftwareConfig::Representation + property :temp_bucket, as: 'tempBucket' property :worker_config, as: 'workerConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation end @@ -672,6 +681,14 @@ module Google end end + class EndpointConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enable_http_port_access, as: 'enableHttpPortAccess' + hash :http_ports, as: 'httpPorts' + end + end + class Expr # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/dataproc_v1beta2.rb b/generated/google/apis/dataproc_v1beta2.rb index 6ecfa37cb..aa4155b7c 100644 --- a/generated/google/apis/dataproc_v1beta2.rb +++ b/generated/google/apis/dataproc_v1beta2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/dataproc/ module DataprocV1beta2 VERSION = 'V1beta2' - REVISION = '20200528' + REVISION = '20200611' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/dataproc_v1beta2/classes.rb b/generated/google/apis/dataproc_v1beta2/classes.rb index 676b366e3..4aafa0652 100644 --- a/generated/google/apis/dataproc_v1beta2/classes.rb +++ b/generated/google/apis/dataproc_v1beta2/classes.rb @@ -474,6 +474,17 @@ module Google # @return [Google::Apis::DataprocV1beta2::SoftwareConfig] attr_accessor :software_config + # Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data, + # such as Spark and MapReduce history files. If you do not specify a temp + # bucket, Cloud Dataproc will determine a Cloud Storage location (US, ASIA, or + # EU) for your cluster's temp bucket according to the Compute Engine zone where + # your cluster is deployed, and then create and manage this project-level, per- + # location bucket. The default bucket has a TTL of 90 days, but you can use any + # TTL (or none) if you specify a bucket. + # Corresponds to the JSON property `tempBucket` + # @return [String] + attr_accessor :temp_bucket + # The config settings for Compute Engine resources in an instance group, such as # a master or worker group. # Corresponds to the JSON property `workerConfig` @@ -498,6 +509,7 @@ module Google @secondary_worker_config = args[:secondary_worker_config] if args.key?(:secondary_worker_config) @security_config = args[:security_config] if args.key?(:security_config) @software_config = args[:software_config] if args.key?(:software_config) + @temp_bucket = args[:temp_bucket] if args.key?(:temp_bucket) @worker_config = args[:worker_config] if args.key?(:worker_config) end end diff --git a/generated/google/apis/dataproc_v1beta2/representations.rb b/generated/google/apis/dataproc_v1beta2/representations.rb index fc21683bf..777b4c3f2 100644 --- a/generated/google/apis/dataproc_v1beta2/representations.rb +++ b/generated/google/apis/dataproc_v1beta2/representations.rb @@ -605,6 +605,7 @@ module Google property :software_config, as: 'softwareConfig', class: Google::Apis::DataprocV1beta2::SoftwareConfig, decorator: Google::Apis::DataprocV1beta2::SoftwareConfig::Representation + property :temp_bucket, as: 'tempBucket' property :worker_config, as: 'workerConfig', class: Google::Apis::DataprocV1beta2::InstanceGroupConfig, decorator: Google::Apis::DataprocV1beta2::InstanceGroupConfig::Representation end diff --git a/generated/google/apis/fcm_v1.rb b/generated/google/apis/fcm_v1.rb index 59be567af..ad83060a3 100644 --- a/generated/google/apis/fcm_v1.rb +++ b/generated/google/apis/fcm_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://firebase.google.com/docs/cloud-messaging module FcmV1 VERSION = 'V1' - REVISION = '20200608' + REVISION = '20200615' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/fcm_v1/classes.rb b/generated/google/apis/fcm_v1/classes.rb index 26fa2e15f..2255b6c77 100644 --- a/generated/google/apis/fcm_v1/classes.rb +++ b/generated/google/apis/fcm_v1/classes.rb @@ -456,6 +456,9 @@ module Google # 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; # // ... @@ -626,6 +629,9 @@ module Google # 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; # // ... diff --git a/generated/google/apis/firebase_v1beta1.rb b/generated/google/apis/firebase_v1beta1.rb index 861dc7241..76f603b15 100644 --- a/generated/google/apis/firebase_v1beta1.rb +++ b/generated/google/apis/firebase_v1beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://firebase.google.com module FirebaseV1beta1 VERSION = 'V1beta1' - REVISION = '20200513' + REVISION = '20200616' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/firebase_v1beta1/classes.rb b/generated/google/apis/firebase_v1beta1/classes.rb index caec4aa69..d248d87e9 100644 --- a/generated/google/apis/firebase_v1beta1/classes.rb +++ b/generated/google/apis/firebase_v1beta1/classes.rb @@ -929,7 +929,7 @@ module Google # The resource name of the GCP `Project` to which Firebase resources can be # added, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # Corresponds to the JSON property `project` # @return [String] attr_accessor :project @@ -1014,8 +1014,8 @@ module Google attr_accessor :cert_type # The fully qualified resource name of the `sha-key`, in the format: - #
projects/projectId/androidApps/appId/sha/ - # shaId + #
projects/PROJECT_NUMBER/androidApps/APP_ID/sha/ + # SHA_ID # Corresponds to the JSON property `name` # @return [String] attr_accessor :name @@ -1147,11 +1147,12 @@ module Google # The fully qualified resource name of the Firebase App associated with the # Google Analytics data stream, in the format: - #
projects/projectId/androidApps/appId + #
projects/PROJECT_NUMBER/androidApps/APP_ID # or - # projects/projectId/iosApps/appId + # projects/PROJECT_NUMBER/iosApps/APP_ID # or - # projects/projectId/webApps/appId + # projects/PROJECT_NUMBER/webApps/APP_ID # Corresponds to the JSON property `app` # @return [String] attr_accessor :app diff --git a/generated/google/apis/firebase_v1beta1/service.rb b/generated/google/apis/firebase_v1beta1/service.rb index 01a4e3ec6..f67149691 100644 --- a/generated/google/apis/firebase_v1beta1/service.rb +++ b/generated/google/apis/firebase_v1beta1/service.rb @@ -138,7 +138,7 @@ module Google #
#
Since a FirebaseProject is actually also a GCP `Project`, a # `FirebaseProject` uses underlying GCP identifiers (most importantly, - # the `projectId`) as its own for easy interop with GCP APIs. + # the `PROJECT_NUMBER`) as its own for easy interop with GCP APIs. #
#
The result of this call is an [`Operation`](../../v1beta1/operations). # Poll the `Operation` to track the provisioning process by calling @@ -164,11 +164,11 @@ module Google # @param [String] project # The resource name of the GCP `Project` to which Firebase resources will be # added, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # After calling `AddFirebase`, the - # [`projectId`](https://cloud.google.com/resource-manager/reference/rest/v1/ + # [`project_id`](https://cloud.google.com/resource-manager/reference/rest/v1/ # projects#Project.FIELDS.project_id) - # of the GCP `Project` is also the `projectId` of the FirebaseProject. + # of the GCP `Project` is also the `project_id` of the FirebaseProject. # @param [Google::Apis::FirebaseV1beta1::AddFirebaseRequest] add_firebase_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -255,7 +255,7 @@ module Google # @param [String] parent # The parent `FirebaseProject` to link to an existing Google Analytics # account, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # @param [Google::Apis::FirebaseV1beta1::AddGoogleAnalyticsRequest] add_google_analytics_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -289,7 +289,7 @@ module Google # Gets the FirebaseProject identified by the specified resource name. # @param [String] name # The fully qualified resource name of the Project, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -325,7 +325,7 @@ module Google # command. # @param [String] name # The fully qualified resource name of the Project, in the format: - #
projects/projectId/adminSdkConfig + #
projects/PROJECT_NUMBER/adminSdkConfig # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -360,7 +360,7 @@ module Google # the response to `GetAnalyticsDetails` is NOT_FOUND. # @param [String] name # The fully qualified resource name, in the format: - #
projects/projectId/analyticsDetails + #
projects/PROJECT_NUMBER/analyticsDetails # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -505,7 +505,7 @@ module Google # @param [String] parent # The parent `FirebaseProject` to unlink from its Google Analytics account, # in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # @param [Google::Apis::FirebaseV1beta1::RemoveAnalyticsRequest] remove_analytics_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -544,7 +544,7 @@ module Google # known Apps (such as for App selector interfaces). # @param [String] parent # The parent Project for which to list Apps, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # @param [Fixnum] page_size # The maximum number of Apps to return in the response. #
@@ -592,7 +592,7 @@ module Google # completion, so there is no need to call `DeleteOperation`. # @param [String] parent # The parent Project in which to create an App, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # @param [Google::Apis::FirebaseV1beta1::AndroidApp] android_app_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -626,10 +626,11 @@ module Google # Gets the AndroidApp identified by the specified resource name. # @param [String] name # The fully qualified resource name of the App, in the format: - #
projects/projectId/androidApps/appId - #
As an appId is a unique identifier, the Unique Resource + #
projects/PROJECT_NUMBER/androidApps/APP_ID + #
As an APP_ID is a unique identifier, the Unique Resource # from Sub-Collection access pattern may be used here, in the format: - #
projects/-/androidApps/appId + #
projects/-/androidApps/APP_ID # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -661,11 +662,11 @@ module Google # AndroidApp. # @param [String] name # The resource name of the App configuration to download, in the format: - #
projects/projectId/androidApps/appId/config - #
As an appId is a unique identifier, the Unique Resource + #
projects/PROJECT_NUMBER/androidApps/APP_ID/ + # config + #
As an APP_ID is a unique identifier, the Unique Resource # from Sub-Collection access pattern may be used here, in the format: - #
projects/-/androidApps/appId + #
projects/-/androidApps/APP_ID # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -700,7 +701,7 @@ module Google # `pageToken`. # @param [String] parent # The parent Project for which to list Apps, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # @param [Fixnum] page_size # The maximum number of Apps to return in the response. #
@@ -747,7 +748,7 @@ module Google # @param [Google::Apis::FirebaseV1beta1::AndroidApp] android_app_object # @param [String] update_mask # Specifies which fields to update. - #
Note that the fields `name`, `appId`, `projectId`, and `packageName` + #
Note that the fields `name`, `app_id`, `project_id`, and `package_name` # are all immutable. # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -782,10 +783,11 @@ module Google # Adds a SHA certificate to the specified AndroidApp. # @param [String] parent # The parent App to which a SHA certificate will be added, in the format: - #
projects/projectId/androidApps/appId - #
As an appId is a unique identifier, the Unique Resource + #
projects/PROJECT_NUMBER/androidApps/APP_ID + #
As an APP_ID is a unique identifier, the Unique Resource # from Sub-Collection access pattern may be used here, in the format: - #
projects/-/androidApps/appId + #
projects/-/androidApps/APP_ID # @param [Google::Apis::FirebaseV1beta1::ShaCertificate] sha_certificate_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -819,8 +821,8 @@ module Google # Removes a SHA certificate from the specified AndroidApp. # @param [String] name # The fully qualified resource name of the `sha-key`, in the format: - #
projects/projectId/androidApps/appId/sha/ - # shaId + #
projects/PROJECT_NUMBER/androidApps/APP_ID/sha/ + # SHA_ID #
You can obtain the full name from the response of # [`ListShaCertificates`](../projects.androidApps.sha/list) or the original # [`CreateShaCertificate`](../projects.androidApps.sha/create). @@ -855,10 +857,11 @@ module Google # AndroidApp. # @param [String] parent # The parent App for which to list SHA certificates, in the format: - #
projects/projectId/androidApps/appId - #
As an appId is a unique identifier, the Unique Resource + #
projects/PROJECT_NUMBER/androidApps/APP_ID + #
As an APP_ID is a unique identifier, the Unique Resource # from Sub-Collection access pattern may be used here, in the format: - #
projects/-/androidApps/appId + #
projects/-/androidApps/APP_ID # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -902,15 +905,14 @@ module Google # policy/defining-locations) # for the specified Project and, thus, might return a subset of all possible # GCP resource locations. To list all GCP resource locations (regardless of - # any restrictions), call the endpoint without specifying a `projectId` (that - # is, `/v1beta1/`parent=projects/-`/listAvailableLocations`). - #
+ # any restrictions), call the endpoint without specifying a `PROJECT_NUMBER` + # (that is, `/v1beta1/`parent=projects/-`/listAvailableLocations`).
#
To call `ListAvailableLocations` with a specified project, a member # must be at minimum a Viewer of the project. Calls without a specified # project do not require any specific project permissions. # @param [String] parent # The Project for which to list GCP resource locations, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER #
If no project is specified (that is, `projects/-`), the returned list # does not take into account org-specific or project-specific location # restrictions. @@ -997,7 +999,7 @@ module Google # @param [String] parent # The resource name of the Project for which the default GCP resource # location will be set, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # @param [Google::Apis::FirebaseV1beta1::FinalizeDefaultLocationRequest] finalize_default_location_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -1035,7 +1037,7 @@ module Google # completion, so there is no need to call `DeleteOperation`. # @param [String] parent # The parent Project in which to create an App, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # @param [Google::Apis::FirebaseV1beta1::IosApp] ios_app_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -1069,10 +1071,10 @@ module Google # Gets the IosApp identified by the specified resource name. # @param [String] name # The fully qualified resource name of the App, in the format: - # projects/projectId/iosApps/appId - #
As an appId is a unique identifier, the Unique Resource + # projects/PROJECT_NUMBER/iosApps/APP_ID + #
As an APP_ID is a unique identifier, the Unique Resource # from Sub-Collection access pattern may be used here, in the format: - #
projects/-/iosApps/appId + #
projects/-/iosApps/APP_ID # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1103,10 +1105,11 @@ module Google # Gets the configuration artifact associated with the specified IosApp. # @param [String] name # The resource name of the App configuration to download, in the format: - #
projects/projectId/iosApps/appId/config - #
As an appId is a unique identifier, the Unique Resource + #
projects/PROJECT_NUMBER/iosApps/APP_ID/config + #
As an APP_ID is a unique identifier, the Unique Resource # from Sub-Collection access pattern may be used here, in the format: - #
projects/-/iosApps/appId + #
projects/-/iosApps/APP_ID # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1141,7 +1144,7 @@ module Google # `pageToken`. # @param [String] parent # The parent Project for which to list Apps, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # @param [Fixnum] page_size # The maximum number of Apps to return in the response. #
@@ -1227,7 +1230,7 @@ module Google # completion, so there is no need to call `DeleteOperation`. # @param [String] parent # The parent Project in which to create an App, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # @param [Google::Apis::FirebaseV1beta1::WebApp] web_app_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -1261,10 +1264,10 @@ module Google # Gets the WebApp identified by the specified resource name. # @param [String] name # The fully qualified resource name of the App, in the format: - #
projects/projectId/webApps/appId - #
As an appId is a unique identifier, the Unique Resource + #
projects/PROJECT_NUMBER/webApps/APP_ID + #
As an APP_ID is a unique identifier, the Unique Resource # from Sub-Collection access pattern may be used here, in the format: - #
projects/-/webApps/appId + #
projects/-/webApps/APP_ID # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1295,10 +1298,11 @@ module Google # Gets the configuration artifact associated with the specified WebApp. # @param [String] name # The resource name of the App configuration to download, in the format: - #
projects/projectId/webApps/appId/config - #
As an appId is a unique identifier, the Unique Resource + #
projects/PROJECT_NUMBER/webApps/APP_ID/config + #
As an APP_ID is a unique identifier, the Unique Resource # from Sub-Collection access pattern may be used here, in the format: - #
projects/-/webApps/appId + #
projects/-/webApps/APP_ID # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1333,7 +1337,7 @@ module Google # `pageToken`. # @param [String] parent # The parent Project for which to list Apps, in the format: - #
projects/projectId + #
projects/PROJECT_NUMBER # @param [Fixnum] page_size # The maximum number of Apps to return in the response. #
diff --git a/generated/google/apis/lifesciences_v2beta.rb b/generated/google/apis/lifesciences_v2beta.rb index dfea71841..d2b2d31f3 100644 --- a/generated/google/apis/lifesciences_v2beta.rb +++ b/generated/google/apis/lifesciences_v2beta.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/life-sciences module LifesciencesV2beta VERSION = 'V2beta' - REVISION = '20200220' + REVISION = '20200603' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/lifesciences_v2beta/classes.rb b/generated/google/apis/lifesciences_v2beta/classes.rb index bb2c18abe..9ac529653 100644 --- a/generated/google/apis/lifesciences_v2beta/classes.rb +++ b/generated/google/apis/lifesciences_v2beta/classes.rb @@ -1192,6 +1192,15 @@ module Google # @return [Array] attr_accessor :disks + # The Compute Engine Disk Images to use as a Docker cache. The disks will be + # mounted into the Docker folder in a way that the images present in the + # cache will not need to be pulled. The digests of the cached images must + # match those of the tags used or the latest version will still be pulled. + # Only a single image is supported. + # Corresponds to the JSON property `dockerCacheImages` + # @return [Array] + attr_accessor :docker_cache_images + # Whether Stackdriver monitoring should be enabled on the VM. # Corresponds to the JSON property `enableStackdriverMonitoring` # @return [Boolean] @@ -1257,6 +1266,7 @@ module Google @boot_image = args[:boot_image] if args.key?(:boot_image) @cpu_platform = args[:cpu_platform] if args.key?(:cpu_platform) @disks = args[:disks] if args.key?(:disks) + @docker_cache_images = args[:docker_cache_images] if args.key?(:docker_cache_images) @enable_stackdriver_monitoring = args[:enable_stackdriver_monitoring] if args.key?(:enable_stackdriver_monitoring) @labels = args[:labels] if args.key?(:labels) @machine_type = args[:machine_type] if args.key?(:machine_type) diff --git a/generated/google/apis/lifesciences_v2beta/representations.rb b/generated/google/apis/lifesciences_v2beta/representations.rb index 9974d3dfb..3aec1552d 100644 --- a/generated/google/apis/lifesciences_v2beta/representations.rb +++ b/generated/google/apis/lifesciences_v2beta/representations.rb @@ -500,6 +500,7 @@ module Google property :cpu_platform, as: 'cpuPlatform' collection :disks, as: 'disks', class: Google::Apis::LifesciencesV2beta::Disk, decorator: Google::Apis::LifesciencesV2beta::Disk::Representation + collection :docker_cache_images, as: 'dockerCacheImages' property :enable_stackdriver_monitoring, as: 'enableStackdriverMonitoring' hash :labels, as: 'labels' property :machine_type, as: 'machineType' diff --git a/generated/google/apis/servicemanagement_v1.rb b/generated/google/apis/servicemanagement_v1.rb index 248ee4e71..372fae561 100644 --- a/generated/google/apis/servicemanagement_v1.rb +++ b/generated/google/apis/servicemanagement_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/service-management/ module ServicemanagementV1 VERSION = 'V1' - REVISION = '20200605' + REVISION = '20200613' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/servicemanagement_v1/classes.rb b/generated/google/apis/servicemanagement_v1/classes.rb index 56a9c2563..303e9eb4b 100644 --- a/generated/google/apis/servicemanagement_v1/classes.rb +++ b/generated/google/apis/servicemanagement_v1/classes.rb @@ -2564,6 +2564,15 @@ module Google # Defines a metric type and its schema. Once a metric descriptor is created, # deleting or altering it stops data collection and makes the metric type's # existing data unusable. + # The following are specific rules for service defined Monitoring metric + # descriptors: + # * `type`, `metric_kind`, `value_type`, `description`, `display_name`, + # `launch_stage` fields are all required. The `unit` field must be specified + # if the `value_type` is any of DOUBLE, INT64, DISTRIBUTION. + # * Maximum of default 500 metric descriptors per service is allowed. + # * Maximum of default 10 labels per metric descriptor is allowed. + # The default maximum limit can be overridden. Please follow + # https://cloud.google.com/monitoring/quotas class MetricDescriptor include Google::Apis::Core::Hashable @@ -2581,7 +2590,13 @@ module Google attr_accessor :display_name # The set of labels that can be used to describe a specific - # instance of this metric type. For example, the + # instance of this metric type. + # The label key name must follow: + # * Only upper and lower-case letters, digits and underscores (_) are + # allowed. + # * Label name must start with a letter or digit. + # * The maximum length of a label name is 100 characters. + # For example, the # `appengine.googleapis.com/http/server/response_latencies` metric # type has a label for the HTTP response code, `response_code`, so # you can look at latencies for successful responses or just @@ -2621,9 +2636,19 @@ module Google attr_accessor :name # The metric type, including its DNS name prefix. The type is not - # URL-encoded. All user-defined metric types have the DNS name - # `custom.googleapis.com` or `external.googleapis.com`. Metric types should - # use a natural hierarchical grouping. For example: + # URL-encoded. + # All service defined metrics must be prefixed with the service name, in the + # format of ``service name`/`relative metric name``, such as + # `cloudsql.googleapis.com/database/cpu/utilization`. The relative metric + # name must follow: + # * Only upper and lower-case letters, digits, '/' and underscores '_' are + # allowed. + # * The maximum number of characters allowed for the relative_metric_name is + # 100. + # All user-defined metric types have the DNS name + # `custom.googleapis.com`, `external.googleapis.com`, or + # `logging.googleapis.com/user/`. + # Metric types should use a natural hierarchical grouping. For example: # "custom.googleapis.com/invoice/paid/amount" # "external.googleapis.com/prometheus/up" # "appengine.googleapis.com/http/server/response_latencies" @@ -2902,9 +2927,20 @@ module Google # descriptor for Google Compute Engine VM instances has a type of # `"gce_instance"` and specifies the use of the labels `"instance_id"` and # `"zone"` to identify particular VM instances. - # Different APIs can support different monitored resource types. APIs generally - # provide a `list` method that returns the monitored resource descriptors used - # by the API. + # Different services can support different monitored resource types. + # The following are specific rules to service defined monitored resources for + # Monitoring and Logging: + # * The `type`, `display_name`, `description`, `labels` and `launch_stage` + # fields are all required. + # * The first label of the monitored resource descriptor must be + # `resource_container`. There are legacy monitored resource descritptors + # start with `project_id`. + # * It must include a `location` label. + # * Maximum of default 5 service defined monitored resource descriptors + # is allowed per service. + # * Maximum of default 10 labels per monitored resource is allowed. + # The default maximum limit can be overridden. Please follow + # https://cloud.google.com/monitoring/quotas class MonitoredResourceDescriptor include Google::Apis::Core::Hashable @@ -2923,8 +2959,14 @@ module Google attr_accessor :display_name # Required. A set of labels used to describe instances of this monitored - # resource type. For example, an individual Google Cloud SQL database is - # identified by values for the labels `"database_id"` and `"zone"`. + # resource type. + # The label key name must follow: + # * Only upper and lower-case letters, digits and underscores (_) are + # allowed. + # * Label name must start with a letter or digit. + # * The maximum length of a label name is 100 characters. + # For example, an individual Google Cloud SQL database is + # identified by values for the labels `database_id` and `location`. # Corresponds to the JSON property `labels` # @return [Array] attr_accessor :labels @@ -2945,8 +2987,16 @@ module Google attr_accessor :name # Required. The monitored resource type. For example, the type - # `"cloudsql_database"` represents databases in Google Cloud SQL. - # The maximum length of this value is 256 characters. + # `cloudsql_database` represents databases in Google Cloud SQL. + # All service defined monitored resource types must be prefixed with the + # service name, in the format of ``service name`/`relative resource name``. + # The relative resource name must follow: + # * Only upper and lower-case letters and digits are allowed. + # * It must start with upper case character and is recommended to use Upper + # Camel Case style. + # * The maximum number of characters allowed for the relative_resource_name + # is 100. + # Note there are legacy service monitored resources not following this rule. # Corresponds to the JSON property `type` # @return [String] attr_accessor :type @@ -2971,41 +3021,56 @@ module Google # for monitoring. In the example, a monitored resource and two metrics are # defined. The `library.googleapis.com/book/returned_count` metric is sent # to both producer and consumer projects, whereas the - # `library.googleapis.com/book/overdue_count` metric is only sent to the + # `library.googleapis.com/book/num_overdue` metric is only sent to the # consumer project. # monitored_resources: - # - type: library.googleapis.com/branch + # - type: library.googleapis.com/Branch + # display_name: "Library Branch" + # description: "A branch of a library." + # launch_stage: GA # labels: - # - key: /city - # description: The city where the library branch is located in. - # - key: /name - # description: The name of the branch. + # - key: resource_container + # description: "The Cloud container (ie. project id) for the Branch." + # - key: location + # description: "The location of the library branch." + # - key: branch_id + # description: "The id of the branch." # metrics: # - name: library.googleapis.com/book/returned_count + # display_name: "Books Returned" + # description: "The count of books that have been returned." + # launch_stage: GA # metric_kind: DELTA # value_type: INT64 + # unit: "1" # labels: - # - key: /customer_id - # - name: library.googleapis.com/book/overdue_count + # - key: customer_id + # description: "The id of the customer." + # - name: library.googleapis.com/book/num_overdue + # display_name: "Books Overdue" + # description: "The current number of overdue books." + # launch_stage: GA # metric_kind: GAUGE # value_type: INT64 + # unit: "1" # labels: - # - key: /customer_id + # - key: customer_id + # description: "The id of the customer." # monitoring: # producer_destinations: - # - monitored_resource: library.googleapis.com/branch + # - monitored_resource: library.googleapis.com/Branch # metrics: # - library.googleapis.com/book/returned_count # consumer_destinations: - # - monitored_resource: library.googleapis.com/branch + # - monitored_resource: library.googleapis.com/Branch # metrics: # - library.googleapis.com/book/returned_count - # - library.googleapis.com/book/overdue_count + # - library.googleapis.com/book/num_overdue class Monitoring include Google::Apis::Core::Hashable # Monitoring configurations for sending metrics to the consumer project. - # There can be multiple consumer destinations. A monitored resouce type may + # There can be multiple consumer destinations. A monitored resource type may # appear in multiple monitoring destinations if different aggregations are # needed for different sets of metrics associated with that monitored # resource type. A monitored resource and metric pair may only be used once @@ -3015,7 +3080,7 @@ module Google attr_accessor :consumer_destinations # Monitoring configurations for sending metrics to the producer project. - # There can be multiple producer destinations. A monitored resouce type may + # There can be multiple producer destinations. A monitored resource type may # appear in multiple monitoring destinations if different aggregations are # needed for different sets of metrics associated with that monitored # resource type. A monitored resource and metric pair may only be used once @@ -3963,36 +4028,51 @@ module Google # for monitoring. In the example, a monitored resource and two metrics are # defined. The `library.googleapis.com/book/returned_count` metric is sent # to both producer and consumer projects, whereas the - # `library.googleapis.com/book/overdue_count` metric is only sent to the + # `library.googleapis.com/book/num_overdue` metric is only sent to the # consumer project. # monitored_resources: - # - type: library.googleapis.com/branch + # - type: library.googleapis.com/Branch + # display_name: "Library Branch" + # description: "A branch of a library." + # launch_stage: GA # labels: - # - key: /city - # description: The city where the library branch is located in. - # - key: /name - # description: The name of the branch. + # - key: resource_container + # description: "The Cloud container (ie. project id) for the Branch." + # - key: location + # description: "The location of the library branch." + # - key: branch_id + # description: "The id of the branch." # metrics: # - name: library.googleapis.com/book/returned_count + # display_name: "Books Returned" + # description: "The count of books that have been returned." + # launch_stage: GA # metric_kind: DELTA # value_type: INT64 + # unit: "1" # labels: - # - key: /customer_id - # - name: library.googleapis.com/book/overdue_count + # - key: customer_id + # description: "The id of the customer." + # - name: library.googleapis.com/book/num_overdue + # display_name: "Books Overdue" + # description: "The current number of overdue books." + # launch_stage: GA # metric_kind: GAUGE # value_type: INT64 + # unit: "1" # labels: - # - key: /customer_id + # - key: customer_id + # description: "The id of the customer." # monitoring: # producer_destinations: - # - monitored_resource: library.googleapis.com/branch + # - monitored_resource: library.googleapis.com/Branch # metrics: # - library.googleapis.com/book/returned_count # consumer_destinations: - # - monitored_resource: library.googleapis.com/branch + # - monitored_resource: library.googleapis.com/Branch # metrics: # - library.googleapis.com/book/returned_count - # - library.googleapis.com/book/overdue_count + # - library.googleapis.com/book/num_overdue # Corresponds to the JSON property `monitoring` # @return [Google::Apis::ServicemanagementV1::Monitoring] attr_accessor :monitoring