From 13fcb59c1122f919edcef911a69ecc5822896ab6 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 11 Mar 2020 00:37:34 +0000 Subject: [PATCH] Autogenerated update (2020-03-11) Update: - alertcenter_v1beta1 - billingbudgets_v1beta1 - chat_v1 - dlp_v2 - firebase_v1beta1 - firebaserules_v1 - iap_v1beta1 - ml_v1 - recommender_v1beta1 - serviceusage_v1beta1 - tpu_v1 - tpu_v1alpha1 --- generated/google/apis/alertcenter_v1beta1.rb | 2 +- .../apis/alertcenter_v1beta1/classes.rb | 78 +- .../alertcenter_v1beta1/representations.rb | 31 - .../google/apis/billingbudgets_v1beta1.rb | 2 +- .../apis/billingbudgets_v1beta1/classes.rb | 4 +- .../apis/billingbudgets_v1beta1/service.rb | 4 +- generated/google/apis/chat_v1.rb | 2 +- generated/google/apis/chat_v1/classes.rb | 53 +- .../google/apis/chat_v1/representations.rb | 18 - generated/google/apis/dlp_v2.rb | 2 +- generated/google/apis/dlp_v2/classes.rb | 83 +- .../google/apis/dlp_v2/representations.rb | 6 +- generated/google/apis/firebase_v1beta1.rb | 2 +- .../google/apis/firebase_v1beta1/service.rb | 6 +- generated/google/apis/firebaserules_v1.rb | 2 +- generated/google/apis/iap_v1beta1.rb | 2 +- generated/google/apis/ml_v1.rb | 2 +- generated/google/apis/ml_v1/classes.rb | 924 +++++++++++++++++- .../google/apis/ml_v1/representations.rb | 462 +++++++++ generated/google/apis/ml_v1/service.rb | 420 ++++++++ generated/google/apis/recommender_v1beta1.rb | 2 +- .../apis/recommender_v1beta1/classes.rb | 214 ++++ .../recommender_v1beta1/representations.rb | 96 ++ .../apis/recommender_v1beta1/service.rb | 123 +++ generated/google/apis/serviceusage_v1beta1.rb | 2 +- .../apis/serviceusage_v1beta1/classes.rb | 272 ++++++ .../serviceusage_v1beta1/representations.rb | 117 +++ .../apis/serviceusage_v1beta1/service.rb | 515 ++++++++++ generated/google/apis/tpu_v1.rb | 2 +- generated/google/apis/tpu_v1alpha1.rb | 2 +- 30 files changed, 3187 insertions(+), 263 deletions(-) diff --git a/generated/google/apis/alertcenter_v1beta1.rb b/generated/google/apis/alertcenter_v1beta1.rb index e344bc627..f7382b0a5 100644 --- a/generated/google/apis/alertcenter_v1beta1.rb +++ b/generated/google/apis/alertcenter_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/admin-sdk/alertcenter/ module AlertcenterV1beta1 VERSION = 'V1beta1' - REVISION = '20200215' + REVISION = '20200307' # See and delete your domain's G Suite alerts, and send alert feedback AUTH_APPS_ALERTS = 'https://www.googleapis.com/auth/apps.alerts' diff --git a/generated/google/apis/alertcenter_v1beta1/classes.rb b/generated/google/apis/alertcenter_v1beta1/classes.rb index fb999c5c8..4f56f2699 100644 --- a/generated/google/apis/alertcenter_v1beta1/classes.rb +++ b/generated/google/apis/alertcenter_v1beta1/classes.rb @@ -88,7 +88,7 @@ module Google # @return [Array] attr_accessor :superseded_alerts - # Alert id superseding this alert. It is used to indicate that superseding + # Alert ID superseding this alert. It is used to indicate that superseding # alert is essentially extension of this alert and we found the relationship # after creating both alerts. # Corresponds to the JSON property `supersedingAlert` @@ -461,7 +461,7 @@ module Google class BatchDeleteAlertsRequest include Google::Apis::Core::Hashable - # Required. list of alert ids. + # Required. list of alert IDs. # Corresponds to the JSON property `alertId` # @return [Array] attr_accessor :alert_id @@ -492,7 +492,7 @@ module Google # @return [Hash] attr_accessor :failed_alert_status - # The successful list of alert ids. + # The successful list of alert IDs. # Corresponds to the JSON property `successAlertIds` # @return [Array] attr_accessor :success_alert_ids @@ -512,7 +512,7 @@ module Google class BatchUndeleteAlertsRequest include Google::Apis::Core::Hashable - # Required. list of alert ids. + # Required. list of alert IDs. # Corresponds to the JSON property `alertId` # @return [Array] attr_accessor :alert_id @@ -543,7 +543,7 @@ module Google # @return [Hash] attr_accessor :failed_alert_status - # The successful list of alert ids. + # The successful list of alert IDs. # Corresponds to the JSON property `successAlertIds` # @return [Array] attr_accessor :success_alert_ids @@ -782,70 +782,6 @@ module Google end end - # A Drive file - class DriveFile - include Google::Apis::Core::Hashable - - # Abuse type of the file. - # Corresponds to the JSON property `abuseType` - # @return [String] - attr_accessor :abuse_type - - # The ID of the file. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The name of the file. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The number of recent downloads of the file. This is available for the - # following alert types: - # *Drive malware sharing detected - # Corresponds to the JSON property `numRecentDownload` - # @return [Fixnum] - attr_accessor :num_recent_download - - # The email address of the file owner. - # Corresponds to the JSON property `owner` - # @return [String] - attr_accessor :owner - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @abuse_type = args[:abuse_type] if args.key?(:abuse_type) - @id = args[:id] if args.key?(:id) - @name = args[:name] if args.key?(:name) - @num_recent_download = args[:num_recent_download] if args.key?(:num_recent_download) - @owner = args[:owner] if args.key?(:owner) - end - end - - # Alerts for suspicious Drive files or activities. - class DriveFileWarning - include Google::Apis::Core::Hashable - - # List of files in the alert. - # Corresponds to the JSON property `files` - # @return [Array] - attr_accessor :files - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @files = args[:files] if args.key?(:files) - end - end - # A generic empty message that you can re-use to avoid defining duplicated # empty messages in your APIs. A typical example is to use it as the request # or the response type of an API method. For instance: @@ -1023,7 +959,7 @@ module Google attr_accessor :ip_address # Optional. The successful login time that is associated with the warning - # event. This will not be present for blocked login attempts. + # event. This isn't present for blocked login attempts. # Corresponds to the JSON property `loginTime` # @return [String] attr_accessor :login_time @@ -1272,7 +1208,7 @@ module Google # @return [String] attr_accessor :document_id - # Title of the resource, e.g. email subject, or document title. + # Title of the resource, for example email subject, or document title. # Corresponds to the JSON property `resourceTitle` # @return [String] attr_accessor :resource_title diff --git a/generated/google/apis/alertcenter_v1beta1/representations.rb b/generated/google/apis/alertcenter_v1beta1/representations.rb index f9d151a89..0f0587693 100644 --- a/generated/google/apis/alertcenter_v1beta1/representations.rb +++ b/generated/google/apis/alertcenter_v1beta1/representations.rb @@ -142,18 +142,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class DriveFile - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DriveFileWarning - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Empty class Representation < Google::Apis::Core::JsonRepresentation; end @@ -502,25 +490,6 @@ module Google end end - class DriveFile - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :abuse_type, as: 'abuseType' - property :id, as: 'id' - property :name, as: 'name' - property :num_recent_download, :numeric_string => true, as: 'numRecentDownload' - property :owner, as: 'owner' - end - end - - class DriveFileWarning - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :files, as: 'files', class: Google::Apis::AlertcenterV1beta1::DriveFile, decorator: Google::Apis::AlertcenterV1beta1::DriveFile::Representation - - end - end - class Empty # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/billingbudgets_v1beta1.rb b/generated/google/apis/billingbudgets_v1beta1.rb index 0a3a2c9f6..dd850d6c4 100644 --- a/generated/google/apis/billingbudgets_v1beta1.rb +++ b/generated/google/apis/billingbudgets_v1beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/billing/docs/how-to/budget-api-overview module BillingbudgetsV1beta1 VERSION = 'V1beta1' - REVISION = '20200229' + REVISION = '20200308' # 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/billingbudgets_v1beta1/classes.rb b/generated/google/apis/billingbudgets_v1beta1/classes.rb index bef3525c1..671334128 100644 --- a/generated/google/apis/billingbudgets_v1beta1/classes.rb +++ b/generated/google/apis/billingbudgets_v1beta1/classes.rb @@ -107,7 +107,7 @@ module Google # @return [String] attr_accessor :name - # Required. Rules that trigger alerts (notifications of thresholds + # Optional. Rules that trigger alerts (notifications of thresholds # being crossed) when spend exceeds the specified percentages of the budget. # Corresponds to the JSON property `thresholdRules` # @return [Array] @@ -190,7 +190,7 @@ module Google # @return [String] attr_accessor :credit_types_treatment - # Optional. A set of projects of the form `projects/`project_id``, + # Optional. A set of projects of the form `projects/`project``, # specifying that usage from only this set of projects should be # included in the budget. If omitted, the report will include all usage for # the billing account, regardless of which project the usage occurred on. diff --git a/generated/google/apis/billingbudgets_v1beta1/service.rb b/generated/google/apis/billingbudgets_v1beta1/service.rb index c100b0651..1f1ea16a7 100644 --- a/generated/google/apis/billingbudgets_v1beta1/service.rb +++ b/generated/google/apis/billingbudgets_v1beta1/service.rb @@ -119,7 +119,7 @@ module Google # WARNING: There are some fields exposed on the Google Cloud Console that # aren’t available on this API. When reading from the API, you will not # see these fields in the return value, though they may have been set - # in the cloud console. + # in the Cloud Console. # @param [String] name # Required. Name of budget to get. Values are of the form # `billingAccounts/`billingAccountId`/budgets/`budgetId``. @@ -154,7 +154,7 @@ module Google # WARNING: There are some fields exposed on the Google Cloud Console that # aren’t available on this API. When reading from the API, you will not # see these fields in the return value, though they may have been set - # in the cloud console. + # in the Cloud Console. # @param [String] parent # Required. Name of billing account to list budgets under. Values # are of the form `billingAccounts/`billingAccountId``. diff --git a/generated/google/apis/chat_v1.rb b/generated/google/apis/chat_v1.rb index 8ab551347..3d1c0eeb4 100644 --- a/generated/google/apis/chat_v1.rb +++ b/generated/google/apis/chat_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/hangouts/chat module ChatV1 VERSION = 'V1' - REVISION = '20200219' + REVISION = '20200304' end end end diff --git a/generated/google/apis/chat_v1/classes.rb b/generated/google/apis/chat_v1/classes.rb index df00e1033..a8ce60569 100644 --- a/generated/google/apis/chat_v1/classes.rb +++ b/generated/google/apis/chat_v1/classes.rb @@ -282,30 +282,11 @@ module Google # @return [String] attr_accessor :config_complete_redirect_url - # The type of dialog event we have received. - # Corresponds to the JSON property `dialogEventType` - # @return [String] - attr_accessor :dialog_event_type - # The timestamp indicating when the event was dispatched. # Corresponds to the JSON property `eventTime` # @return [String] attr_accessor :event_time - # The list of form inputs we will supply to the bot. These are just the - # inputs from the dialog that are populated by the user. This will only be - # populated for CARD_CLICKED events. - # Corresponds to the JSON property `formInputs` - # @return [Array] - attr_accessor :form_inputs - - # Whether or not this event is related to dialogs request, submit or cancel. - # This will be set to true when we want a request/submit/cancel event. - # Corresponds to the JSON property `isDialogEvent` - # @return [Boolean] - attr_accessor :is_dialog_event - alias_method :is_dialog_event?, :is_dialog_event - # A message in Hangouts Chat. # Corresponds to the JSON property `message` # @return [Google::Apis::ChatV1::Message] @@ -349,10 +330,7 @@ module Google def update!(**args) @action = args[:action] if args.key?(:action) @config_complete_redirect_url = args[:config_complete_redirect_url] if args.key?(:config_complete_redirect_url) - @dialog_event_type = args[:dialog_event_type] if args.key?(:dialog_event_type) @event_time = args[:event_time] if args.key?(:event_time) - @form_inputs = args[:form_inputs] if args.key?(:form_inputs) - @is_dialog_event = args[:is_dialog_event] if args.key?(:is_dialog_event) @message = args[:message] if args.key?(:message) @space = args[:space] if args.key?(:space) @thread_key = args[:thread_key] if args.key?(:thread_key) @@ -386,8 +364,10 @@ module Google class FormAction include Google::Apis::Core::Hashable - # Apps Script function to invoke when the containing element is - # clicked/activated. + # The method name is used to identify which part of the form triggered the + # form submission. This information is echoed back to the bot as part of + # the card click event. The same method name can be used for several + # elements that trigger a common behavior if desired. # Corresponds to the JSON property `actionMethodName` # @return [String] attr_accessor :action_method_name @@ -408,31 +388,6 @@ module Google end end - # A single user input from an editable widget from Card API. - class FormInput - include Google::Apis::Core::Hashable - - # The name of the editable widget. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Value entered by user. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @value = args[:value] if args.key?(:value) - end - end - # An image that is specified by a URL and can have an onclick action. class Image include Google::Apis::Core::Hashable diff --git a/generated/google/apis/chat_v1/representations.rb b/generated/google/apis/chat_v1/representations.rb index ac441f525..8d0d5f5a2 100644 --- a/generated/google/apis/chat_v1/representations.rb +++ b/generated/google/apis/chat_v1/representations.rb @@ -82,12 +82,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class FormInput - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Image class Representation < Google::Apis::Core::JsonRepresentation; end @@ -265,11 +259,7 @@ module Google property :action, as: 'action', class: Google::Apis::ChatV1::FormAction, decorator: Google::Apis::ChatV1::FormAction::Representation property :config_complete_redirect_url, as: 'configCompleteRedirectUrl' - property :dialog_event_type, as: 'dialogEventType' property :event_time, as: 'eventTime' - collection :form_inputs, as: 'formInputs', class: Google::Apis::ChatV1::FormInput, decorator: Google::Apis::ChatV1::FormInput::Representation - - property :is_dialog_event, as: 'isDialogEvent' property :message, as: 'message', class: Google::Apis::ChatV1::Message, decorator: Google::Apis::ChatV1::Message::Representation property :space, as: 'space', class: Google::Apis::ChatV1::Space, decorator: Google::Apis::ChatV1::Space::Representation @@ -297,14 +287,6 @@ module Google end end - class FormInput - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :value, as: 'value' - end - end - class Image # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/dlp_v2.rb b/generated/google/apis/dlp_v2.rb index dfea0da6a..98c461dbd 100644 --- a/generated/google/apis/dlp_v2.rb +++ b/generated/google/apis/dlp_v2.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/dlp/docs/ module DlpV2 VERSION = 'V2' - REVISION = '20200229' + REVISION = '20200308' # 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/dlp_v2/classes.rb b/generated/google/apis/dlp_v2/classes.rb index 098e11504..1cff00c69 100644 --- a/generated/google/apis/dlp_v2/classes.rb +++ b/generated/google/apis/dlp_v2/classes.rb @@ -2545,7 +2545,7 @@ module Google # @return [String] attr_accessor :job_name - # The labels associated with this `InspectFinding`. + # The labels associated with this `Finding`. # Label keys must be between 1 and 63 characters long and must conform # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. # Label values must be between 0 and 63 characters long and must conform @@ -2567,8 +2567,9 @@ module Google # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2Location] attr_accessor :location - # Resource name in format projects/`id`/locations/`id`/inspectFindings/`id` - # Populated only when viewing persisted findings. + # Resource name in format + # projects/`project`/locations/`location`/findings/`finding` Populated only + # when viewing persisted findings. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name @@ -2655,9 +2656,6 @@ module Google end # The request message for finishing a DLP hybrid job. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. class GooglePrivacyDlpV2FinishDlpJobRequest include Google::Apis::Core::Hashable @@ -2761,16 +2759,10 @@ module Google # An individual hybrid item to inspect. Will be stored temporarily during # processing. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. class GooglePrivacyDlpV2HybridContentItem include Google::Apis::Core::Hashable # Populate to associate additional data with each finding. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. # Corresponds to the JSON property `findingDetails` # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2HybridFindingDetails] attr_accessor :finding_details @@ -2792,9 +2784,6 @@ module Google end # Populate to associate additional data with each finding. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. class GooglePrivacyDlpV2HybridFindingDetails include Google::Apis::Core::Hashable @@ -2835,9 +2824,6 @@ module Google attr_accessor :row_offset # Instructions regarding the table content being inspected. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. # Corresponds to the JSON property `tableOptions` # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2TableOptions] attr_accessor :table_options @@ -2857,17 +2843,11 @@ module Google end # Request to search for potentially sensitive info in a custom location. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. class GooglePrivacyDlpV2HybridInspectDlpJobRequest include Google::Apis::Core::Hashable # An individual hybrid item to inspect. Will be stored temporarily during # processing. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. # Corresponds to the JSON property `hybridItem` # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2HybridContentItem] attr_accessor :hybrid_item @@ -2883,17 +2863,11 @@ module Google end # Request to search for potentially sensitive info in a custom location. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. class GooglePrivacyDlpV2HybridInspectJobTriggerRequest include Google::Apis::Core::Hashable # An individual hybrid item to inspect. Will be stored temporarily during # processing. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. # Corresponds to the JSON property `hybridItem` # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2HybridContentItem] attr_accessor :hybrid_item @@ -2909,9 +2883,6 @@ module Google end # Quota exceeded errors will be thrown once quota has been met. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. class GooglePrivacyDlpV2HybridInspectResponse include Google::Apis::Core::Hashable @@ -2924,32 +2895,29 @@ module Google end end - # Statistics related to processing hybrid inspect requests - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. + # Statistics related to processing hybrid inspect requests. class GooglePrivacyDlpV2HybridInspectStatistics include Google::Apis::Core::Hashable # The number of hybrid inspection requests aborted because the job ran # out of quota or was ended before they could be processed. - # Corresponds to the JSON property `hybridRequestsAborted` + # Corresponds to the JSON property `abortedCount` # @return [Fixnum] - attr_accessor :hybrid_requests_aborted + attr_accessor :aborted_count # The number of hybrid requests currently being processed. Only populated # when called via method `getDlpJob`. # A burst of traffic may cause hybrid inspect requests to be enqueued. # Processing will take place as quickly as possible, but resource limitations # may impact how long a request is enqueued for. - # Corresponds to the JSON property `hybridRequestsPending` + # Corresponds to the JSON property `pendingCount` # @return [Fixnum] - attr_accessor :hybrid_requests_pending + attr_accessor :pending_count # The number of hybrid inspection requests processed within this job. - # Corresponds to the JSON property `hybridRequestsProcessed` + # Corresponds to the JSON property `processedCount` # @return [Fixnum] - attr_accessor :hybrid_requests_processed + attr_accessor :processed_count def initialize(**args) update!(**args) @@ -2957,17 +2925,14 @@ module Google # Update properties of this object def update!(**args) - @hybrid_requests_aborted = args[:hybrid_requests_aborted] if args.key?(:hybrid_requests_aborted) - @hybrid_requests_pending = args[:hybrid_requests_pending] if args.key?(:hybrid_requests_pending) - @hybrid_requests_processed = args[:hybrid_requests_processed] if args.key?(:hybrid_requests_processed) + @aborted_count = args[:aborted_count] if args.key?(:aborted_count) + @pending_count = args[:pending_count] if args.key?(:pending_count) + @processed_count = args[:processed_count] if args.key?(:processed_count) end end # Configuration to control jobs where the content being inspected is outside # of Google Cloud Platform. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. class GooglePrivacyDlpV2HybridOptions include Google::Apis::Core::Hashable @@ -3000,9 +2965,6 @@ module Google attr_accessor :required_finding_label_keys # Instructions regarding the table content being inspected. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. # Corresponds to the JSON property `tableOptions` # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2TableOptions] attr_accessor :table_options @@ -4456,9 +4418,6 @@ module Google # Job trigger option for hybrid jobs. Jobs must be manually created # and finished. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. class GooglePrivacyDlpV2Manual include Google::Apis::Core::Hashable @@ -5494,10 +5453,7 @@ module Google class GooglePrivacyDlpV2Result include Google::Apis::Core::Hashable - # Statistics related to processing hybrid inspect requests - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. + # Statistics related to processing hybrid inspect requests. # Corresponds to the JSON property `hybridStats` # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectStatistics] attr_accessor :hybrid_stats @@ -5696,9 +5652,6 @@ module Google # Configuration to control jobs where the content being inspected is outside # of Google Cloud Platform. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. # Corresponds to the JSON property `hybridOptions` # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2HybridOptions] attr_accessor :hybrid_options @@ -6034,9 +5987,6 @@ module Google end # Instructions regarding the table content being inspected. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. class GooglePrivacyDlpV2TableOptions include Google::Apis::Core::Hashable @@ -6350,9 +6300,6 @@ module Google # Job trigger option for hybrid jobs. Jobs must be manually created # and finished. - # Early access feature is in a pre-release state and might change or have - # limited support. For more information, see - # https://cloud.google.com/products#product-launch-stages. # Corresponds to the JSON property `manual` # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2Manual] attr_accessor :manual diff --git a/generated/google/apis/dlp_v2/representations.rb b/generated/google/apis/dlp_v2/representations.rb index df09cc303..fc5ff8b57 100644 --- a/generated/google/apis/dlp_v2/representations.rb +++ b/generated/google/apis/dlp_v2/representations.rb @@ -1938,9 +1938,9 @@ module Google class GooglePrivacyDlpV2HybridInspectStatistics # @private class Representation < Google::Apis::Core::JsonRepresentation - property :hybrid_requests_aborted, :numeric_string => true, as: 'hybridRequestsAborted' - property :hybrid_requests_pending, :numeric_string => true, as: 'hybridRequestsPending' - property :hybrid_requests_processed, :numeric_string => true, as: 'hybridRequestsProcessed' + property :aborted_count, :numeric_string => true, as: 'abortedCount' + property :pending_count, :numeric_string => true, as: 'pendingCount' + property :processed_count, :numeric_string => true, as: 'processedCount' end end diff --git a/generated/google/apis/firebase_v1beta1.rb b/generated/google/apis/firebase_v1beta1.rb index 7993f6d11..42b2e6561 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 = '20200215' + REVISION = '20200309' # 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/service.rb b/generated/google/apis/firebase_v1beta1/service.rb index 710aee324..96afe91da 100644 --- a/generated/google/apis/firebase_v1beta1/service.rb +++ b/generated/google/apis/firebase_v1beta1/service.rb @@ -588,7 +588,7 @@ module Google # the provisioning process. The `Operation` is automatically deleted after # completion, so there is no need to call `DeleteOperation`. # @param [String] parent - # The parent Project for which to list Apps, in the format: + # The parent Project in which to create an App, in the format: #
projects/projectId # @param [Google::Apis::FirebaseV1beta1::AndroidApp] android_app_object # @param [String] fields @@ -1028,7 +1028,7 @@ module Google # the provisioning process. The `Operation` is automatically deleted after # completion, so there is no need to call `DeleteOperation`. # @param [String] parent - # The parent Project for which to list Apps, in the format: + # The parent Project in which to create an App, in the format: #
projects/projectId # @param [Google::Apis::FirebaseV1beta1::IosApp] ios_app_object # @param [String] fields @@ -1220,7 +1220,7 @@ module Google # the provisioning process. The `Operation` is automatically deleted after # completion, so there is no need to call `DeleteOperation`. # @param [String] parent - # The parent Project for which to list Apps, in the format: + # The parent Project in which to create an App, in the format: #
projects/projectId # @param [Google::Apis::FirebaseV1beta1::WebApp] web_app_object # @param [String] fields diff --git a/generated/google/apis/firebaserules_v1.rb b/generated/google/apis/firebaserules_v1.rb index 313ffac34..35c90fcd1 100644 --- a/generated/google/apis/firebaserules_v1.rb +++ b/generated/google/apis/firebaserules_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://firebase.google.com/docs/storage/security module FirebaserulesV1 VERSION = 'V1' - REVISION = '20200206' + REVISION = '20200303' # 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/iap_v1beta1.rb b/generated/google/apis/iap_v1beta1.rb index 859b1a743..6ff65f997 100644 --- a/generated/google/apis/iap_v1beta1.rb +++ b/generated/google/apis/iap_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/iap module IapV1beta1 VERSION = 'V1beta1' - REVISION = '20200117' + REVISION = '20200309' # 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/ml_v1.rb b/generated/google/apis/ml_v1.rb index c5469b6ab..8bf5931dd 100644 --- a/generated/google/apis/ml_v1.rb +++ b/generated/google/apis/ml_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/ml/ module MlV1 VERSION = 'V1' - REVISION = '20200229' + REVISION = '20200307' # 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/ml_v1/classes.rb b/generated/google/apis/ml_v1/classes.rb index 126f67a22..bdc59b4e1 100644 --- a/generated/google/apis/ml_v1/classes.rb +++ b/generated/google/apis/ml_v1/classes.rb @@ -83,6 +83,55 @@ module Google end end + # + class GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig + include Google::Apis::Core::Hashable + + # True if measurement.elapsed_time is used as the x-axis of each + # Trials Decay Curve. Otherwise, Measurement.steps will be used as the + # x-axis. + # Corresponds to the JSON property `useElapsedTime` + # @return [Boolean] + attr_accessor :use_elapsed_time + alias_method :use_elapsed_time?, :use_elapsed_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @use_elapsed_time = args[:use_elapsed_time] if args.key?(:use_elapsed_time) + end + end + + # The median automated stopping rule stops a pending trial if the trial's + # best objective_value is strictly below the median 'performance' of all + # completed trials reported up to the trial's last measurement. + # Currently, 'performance' refers to the running average of the objective + # values reported by the trial in each measurement. + class GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig + include Google::Apis::Core::Hashable + + # True if median automated stopping rule applies on + # measurement.use_elapsed_time. it means that elapsed_time field of + # latest measurement of current trial is used to compute median objective + # value for each completed trials. + # Corresponds to the JSON property `useElapsedTime` + # @return [Boolean] + attr_accessor :use_elapsed_time + alias_method :use_elapsed_time?, :use_elapsed_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @use_elapsed_time = args[:use_elapsed_time] if args.key?(:use_elapsed_time) + end + end + # An observed value of a metric. class GoogleCloudMlV1HyperparameterOutputHyperparameterMetric include Google::Apis::Core::Hashable @@ -108,6 +157,329 @@ module Google end end + # A message representing a metric in the measurement. + class GoogleCloudMlV1MeasurementMetric + include Google::Apis::Core::Hashable + + # Required. Metric name. + # Corresponds to the JSON property `metric` + # @return [String] + attr_accessor :metric + + # Required. The value for this metric. + # Corresponds to the JSON property `value` + # @return [Float] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric = args[:metric] if args.key?(:metric) + @value = args[:value] if args.key?(:value) + end + end + + # + class GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec + include Google::Apis::Core::Hashable + + # Must be specified if type is `CATEGORICAL`. + # The list of possible categories. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @values = args[:values] if args.key?(:values) + end + end + + # + class GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec + include Google::Apis::Core::Hashable + + # Must be specified if type is `DISCRETE`. + # A list of feasible points. + # The list should be in strictly increasing order. For instance, this + # parameter might have possible settings of 1.5, 2.5, and 4.0. This list + # should not contain more than 1,000 values. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @values = args[:values] if args.key?(:values) + end + end + + # + class GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec + include Google::Apis::Core::Hashable + + # Must be specified if type is `DOUBLE`. Maximum value of the parameter. + # Corresponds to the JSON property `maxValue` + # @return [Float] + attr_accessor :max_value + + # Must be specified if type is `DOUBLE`. Minimum value of the parameter. + # Corresponds to the JSON property `minValue` + # @return [Float] + attr_accessor :min_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @max_value = args[:max_value] if args.key?(:max_value) + @min_value = args[:min_value] if args.key?(:min_value) + end + end + + # + class GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec + include Google::Apis::Core::Hashable + + # Must be specified if type is `INTEGER`. Maximum value of the parameter. + # Corresponds to the JSON property `maxValue` + # @return [Fixnum] + attr_accessor :max_value + + # Must be specified if type is `INTEGER`. Minimum value of the parameter. + # Corresponds to the JSON property `minValue` + # @return [Fixnum] + attr_accessor :min_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @max_value = args[:max_value] if args.key?(:max_value) + @min_value = args[:min_value] if args.key?(:min_value) + end + end + + # Represents the spec to match categorical values from parent parameter. + class GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec + include Google::Apis::Core::Hashable + + # Matches values of the parent parameter with type 'CATEGORICAL'. + # All values must exist in `categorical_value_spec` of parent parameter. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @values = args[:values] if args.key?(:values) + end + end + + # Represents the spec to match discrete values from parent parameter. + class GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec + include Google::Apis::Core::Hashable + + # Matches values of the parent parameter with type 'DISCRETE'. + # All values must exist in `discrete_value_spec` of parent parameter. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @values = args[:values] if args.key?(:values) + end + end + + # Represents the spec to match integer values from parent parameter. + class GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec + include Google::Apis::Core::Hashable + + # Matches values of the parent parameter with type 'INTEGER'. + # All values must lie in `integer_value_spec` of parent parameter. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @values = args[:values] if args.key?(:values) + end + end + + # Represents a metric to optimize. + class GoogleCloudMlV1StudyConfigMetricSpec + include Google::Apis::Core::Hashable + + # Required. The optimization goal of the metric. + # Corresponds to the JSON property `goal` + # @return [String] + attr_accessor :goal + + # Required. The name of the metric. + # Corresponds to the JSON property `metric` + # @return [String] + attr_accessor :metric + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @goal = args[:goal] if args.key?(:goal) + @metric = args[:metric] if args.key?(:metric) + end + end + + # Represents a single parameter to optimize. + class GoogleCloudMlV1StudyConfigParameterSpec + include Google::Apis::Core::Hashable + + # The value spec for a 'CATEGORICAL' parameter. + # Corresponds to the JSON property `categoricalValueSpec` + # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec] + attr_accessor :categorical_value_spec + + # A child node is active if the parameter's value matches the child node's + # matching_parent_values. + # If two items in child_parameter_specs have the same name, they must have + # disjoint matching_parent_values. + # Corresponds to the JSON property `childParameterSpecs` + # @return [Array] + attr_accessor :child_parameter_specs + + # The value spec for a 'DISCRETE' parameter. + # Corresponds to the JSON property `discreteValueSpec` + # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec] + attr_accessor :discrete_value_spec + + # The value spec for a 'DOUBLE' parameter. + # Corresponds to the JSON property `doubleValueSpec` + # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec] + attr_accessor :double_value_spec + + # The value spec for an 'INTEGER' parameter. + # Corresponds to the JSON property `integerValueSpec` + # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec] + attr_accessor :integer_value_spec + + # Required. The parameter name must be unique amongst all ParameterSpecs. + # Corresponds to the JSON property `parameter` + # @return [String] + attr_accessor :parameter + + # Represents the spec to match categorical values from parent parameter. + # Corresponds to the JSON property `parentCategoricalValues` + # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec] + attr_accessor :parent_categorical_values + + # Represents the spec to match discrete values from parent parameter. + # Corresponds to the JSON property `parentDiscreteValues` + # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec] + attr_accessor :parent_discrete_values + + # Represents the spec to match integer values from parent parameter. + # Corresponds to the JSON property `parentIntValues` + # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec] + attr_accessor :parent_int_values + + # How the parameter should be scaled. + # Leave unset for categorical parameters. + # Corresponds to the JSON property `scaleType` + # @return [String] + attr_accessor :scale_type + + # Required. The type of the parameter. + # 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) + @categorical_value_spec = args[:categorical_value_spec] if args.key?(:categorical_value_spec) + @child_parameter_specs = args[:child_parameter_specs] if args.key?(:child_parameter_specs) + @discrete_value_spec = args[:discrete_value_spec] if args.key?(:discrete_value_spec) + @double_value_spec = args[:double_value_spec] if args.key?(:double_value_spec) + @integer_value_spec = args[:integer_value_spec] if args.key?(:integer_value_spec) + @parameter = args[:parameter] if args.key?(:parameter) + @parent_categorical_values = args[:parent_categorical_values] if args.key?(:parent_categorical_values) + @parent_discrete_values = args[:parent_discrete_values] if args.key?(:parent_discrete_values) + @parent_int_values = args[:parent_int_values] if args.key?(:parent_int_values) + @scale_type = args[:scale_type] if args.key?(:scale_type) + @type = args[:type] if args.key?(:type) + end + end + + # A message representing a parameter to be tuned. + class GoogleCloudMlV1TrialParameter + include Google::Apis::Core::Hashable + + # Must be set if ParameterType is DOUBLE or DISCRETE. + # Corresponds to the JSON property `floatValue` + # @return [Float] + attr_accessor :float_value + + # Must be set if ParameterType is INTEGER + # Corresponds to the JSON property `intValue` + # @return [Fixnum] + attr_accessor :int_value + + # The name of the parameter. + # Corresponds to the JSON property `parameter` + # @return [String] + attr_accessor :parameter + + # Must be set if ParameterTypeis CATEGORICAL + # Corresponds to the JSON property `stringValue` + # @return [String] + attr_accessor :string_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @float_value = args[:float_value] if args.key?(:float_value) + @int_value = args[:int_value] if args.key?(:int_value) + @parameter = args[:parameter] if args.key?(:parameter) + @string_value = args[:string_value] if args.key?(:string_value) + end + end + # Represents a hardware accelerator request config. # Note that the AcceleratorConfig can be used in both Jobs and Versions. # Learn more about [accelerators for training](/ml-engine/docs/using-gpus) and @@ -137,6 +509,25 @@ module Google end end + # The request message for the AddTrialMeasurement service method. + class GoogleCloudMlV1AddTrialMeasurementRequest + include Google::Apis::Core::Hashable + + # A message representing a Measurement. + # Corresponds to the JSON property `measurement` + # @return [Google::Apis::MlV1::GoogleCloudMlV1Measurement] + attr_accessor :measurement + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @measurement = args[:measurement] if args.key?(:measurement) + end + end + # Options for automatically scaling a model. class GoogleCloudMlV1AutoScaling include Google::Apis::Core::Hashable @@ -197,6 +588,36 @@ module Google end end + # Configuration for Automated Early Stopping of Trials. If no + # implementation_config is set, automated early stopping will not be run. + class GoogleCloudMlV1AutomatedStoppingConfig + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `decayCurveStoppingConfig` + # @return [Google::Apis::MlV1::GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig] + attr_accessor :decay_curve_stopping_config + + # The median automated stopping rule stops a pending trial if the trial's + # best objective_value is strictly below the median 'performance' of all + # completed trials reported up to the trial's last measurement. + # Currently, 'performance' refers to the running average of the objective + # values reported by the trial in each measurement. + # Corresponds to the JSON property `medianAutomatedStoppingConfig` + # @return [Google::Apis::MlV1::GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig] + attr_accessor :median_automated_stopping_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @decay_curve_stopping_config = args[:decay_curve_stopping_config] if args.key?(:decay_curve_stopping_config) + @median_automated_stopping_config = args[:median_automated_stopping_config] if args.key?(:median_automated_stopping_config) + end + end + # Represents output related to a built-in algorithm Job. class GoogleCloudMlV1BuiltInAlgorithmOutput include Google::Apis::Core::Hashable @@ -275,6 +696,120 @@ module Google end end + # This message will be placed in the metadata field of a + # google.longrunning.Operation associated with a CheckTrialEarlyStoppingState + # request. + class GoogleCloudMlV1CheckTrialEarlyStoppingStateMetatdata + include Google::Apis::Core::Hashable + + # The time operation was submitted. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The name of the study that the trial belongs to. + # Corresponds to the JSON property `study` + # @return [String] + attr_accessor :study + + # The Trial name. + # Corresponds to the JSON property `trial` + # @return [String] + attr_accessor :trial + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @study = args[:study] if args.key?(:study) + @trial = args[:trial] if args.key?(:trial) + end + end + + # The request message for the CheckTrialEarlyStoppingState service method. + class GoogleCloudMlV1CheckTrialEarlyStoppingStateRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The message will be placed in the response field of a completed + # google.longrunning.Operation associated with a CheckTrialEarlyStoppingState + # request. + class GoogleCloudMlV1CheckTrialEarlyStoppingStateResponse + include Google::Apis::Core::Hashable + + # The time operation processing completed. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # True if the Trial should stop. + # Corresponds to the JSON property `shouldStop` + # @return [Boolean] + attr_accessor :should_stop + alias_method :should_stop?, :should_stop + + # The time operation was started. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_time = args[:end_time] if args.key?(:end_time) + @should_stop = args[:should_stop] if args.key?(:should_stop) + @start_time = args[:start_time] if args.key?(:start_time) + end + end + + # The request message for the CompleteTrial service method. + class GoogleCloudMlV1CompleteTrialRequest + include Google::Apis::Core::Hashable + + # A message representing a Measurement. + # Corresponds to the JSON property `finalMeasurement` + # @return [Google::Apis::MlV1::GoogleCloudMlV1Measurement] + attr_accessor :final_measurement + + # Optional. A human readable reason why the Trial was infeasible. This should + # only be provided if `trial_infeasible` is true. + # Corresponds to the JSON property `infeasibleReason` + # @return [String] + attr_accessor :infeasible_reason + + # Optional. True if the trial cannot be run with the given Parameter, and + # final_measurement will be ignored. + # Corresponds to the JSON property `trialInfeasible` + # @return [Boolean] + attr_accessor :trial_infeasible + alias_method :trial_infeasible?, :trial_infeasible + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @final_measurement = args[:final_measurement] if args.key?(:final_measurement) + @infeasible_reason = args[:infeasible_reason] if args.key?(:infeasible_reason) + @trial_infeasible = args[:trial_infeasible] if args.key?(:trial_infeasible) + end + end + # class GoogleCloudMlV1Config include Google::Apis::Core::Hashable @@ -366,8 +901,8 @@ module Google # Message holding configuration options for explaining model predictions. # There are two feature attribution methods supported for TensorFlow models: # integrated gradients and sampled Shapley. - # Learn more about feature - # attributions. + # [Learn more about feature + # attributions.](/ml-engine/docs/ai-explanations/overview) class GoogleCloudMlV1ExplanationConfig include Google::Apis::Core::Hashable @@ -385,6 +920,14 @@ module Google # @return [Google::Apis::MlV1::GoogleCloudMlV1SampledShapleyAttribution] attr_accessor :sampled_shapley_attribution + # Attributes credit by computing the XRAI taking advantage + # of the model's fully differentiable structure. Refer to this paper for + # more details: https://arxiv.org/abs/1906.02825 + # Currently only implemented for models with natural image inputs. + # Corresponds to the JSON property `xraiAttribution` + # @return [Google::Apis::MlV1::GoogleCloudMlV1XraiAttribution] + attr_accessor :xrai_attribution + def initialize(**args) update!(**args) end @@ -393,6 +936,7 @@ module Google def update!(**args) @integrated_gradients_attribution = args[:integrated_gradients_attribution] if args.key?(:integrated_gradients_attribution) @sampled_shapley_attribution = args[:sampled_shapley_attribution] if args.key?(:sampled_shapley_attribution) + @xrai_attribution = args[:xrai_attribution] if args.key?(:xrai_attribution) end end @@ -793,6 +1337,44 @@ module Google end end + # + class GoogleCloudMlV1ListStudiesResponse + include Google::Apis::Core::Hashable + + # The Studies associated with the project. + # Corresponds to the JSON property `studies` + # @return [Array] + attr_accessor :studies + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @studies = args[:studies] if args.key?(:studies) + end + end + + # The response message for the ListTrials method. + class GoogleCloudMlV1ListTrialsResponse + include Google::Apis::Core::Hashable + + # The trials associated with the study. + # Corresponds to the JSON property `trials` + # @return [Array] + attr_accessor :trials + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @trials = args[:trials] if args.key?(:trials) + end + end + # Response message for the ListVersions method. class GoogleCloudMlV1ListVersionsResponse include Google::Apis::Core::Hashable @@ -866,6 +1448,39 @@ module Google end end + # A message representing a Measurement. + class GoogleCloudMlV1Measurement + include Google::Apis::Core::Hashable + + # Time that the Trial has been running at the point of this Measurement. + # Corresponds to the JSON property `elapsedTime` + # @return [String] + attr_accessor :elapsed_time + + # Provides a list of metrics that act as inputs into the objective + # function. + # Corresponds to the JSON property `metrics` + # @return [Array] + attr_accessor :metrics + + # The number of steps a machine learning model has been trained for. + # Must be non-negative. + # Corresponds to the JSON property `stepCount` + # @return [Fixnum] + attr_accessor :step_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @elapsed_time = args[:elapsed_time] if args.key?(:elapsed_time) + @metrics = args[:metrics] if args.key?(:metrics) + @step_count = args[:step_count] if args.key?(:step_count) + end + end + # Represents a machine learning solution. # A model can have multiple versions, each of which is a deployed, trained # model ready to receive prediction requests. The model itself is just a @@ -1478,6 +2093,205 @@ module Google end end + # + class GoogleCloudMlV1StopTrialRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A message representing a Study. + class GoogleCloudMlV1Study + include Google::Apis::Core::Hashable + + # Output only. Time that the study was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Output only. A human readable reason why the Study is inactive. + # This should be empty if a study is ACTIVE or COMPLETED. + # Corresponds to the JSON property `inactiveReason` + # @return [String] + attr_accessor :inactive_reason + + # Output only. The name of a study. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The detailed state of a study. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Represents configuration of a study. + # Corresponds to the JSON property `studyConfig` + # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfig] + attr_accessor :study_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @inactive_reason = args[:inactive_reason] if args.key?(:inactive_reason) + @name = args[:name] if args.key?(:name) + @state = args[:state] if args.key?(:state) + @study_config = args[:study_config] if args.key?(:study_config) + end + end + + # Represents configuration of a study. + class GoogleCloudMlV1StudyConfig + include Google::Apis::Core::Hashable + + # The search algorithm specified for the study. + # Corresponds to the JSON property `algorithm` + # @return [String] + attr_accessor :algorithm + + # Configuration for Automated Early Stopping of Trials. If no + # implementation_config is set, automated early stopping will not be run. + # Corresponds to the JSON property `automatedStoppingConfig` + # @return [Google::Apis::MlV1::GoogleCloudMlV1AutomatedStoppingConfig] + attr_accessor :automated_stopping_config + + # + # Corresponds to the JSON property `metrics` + # @return [Array] + attr_accessor :metrics + + # Required. The set of parameters to tune. + # Corresponds to the JSON property `parameters` + # @return [Array] + attr_accessor :parameters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @algorithm = args[:algorithm] if args.key?(:algorithm) + @automated_stopping_config = args[:automated_stopping_config] if args.key?(:automated_stopping_config) + @metrics = args[:metrics] if args.key?(:metrics) + @parameters = args[:parameters] if args.key?(:parameters) + end + end + + # Metadata field of a google.longrunning.Operation associated + # with a SuggestTrialsRequest. + class GoogleCloudMlV1SuggestTrialsMetadata + include Google::Apis::Core::Hashable + + # The identifier of the client that is requesting the suggestion. + # Corresponds to the JSON property `clientId` + # @return [String] + attr_accessor :client_id + + # The time operation was submitted. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The name of the study that the trial belongs to. + # Corresponds to the JSON property `study` + # @return [String] + attr_accessor :study + + # The number of suggestions requested. + # Corresponds to the JSON property `suggestionCount` + # @return [Fixnum] + attr_accessor :suggestion_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @client_id = args[:client_id] if args.key?(:client_id) + @create_time = args[:create_time] if args.key?(:create_time) + @study = args[:study] if args.key?(:study) + @suggestion_count = args[:suggestion_count] if args.key?(:suggestion_count) + end + end + + # The request message for the SuggestTrial service method. + class GoogleCloudMlV1SuggestTrialsRequest + include Google::Apis::Core::Hashable + + # Required. The identifier of the client that is requesting the suggestion. + # If multiple SuggestTrialsRequests have the same `client_id`, + # the service will return the identical suggested trial if the trial is + # pending, and provide a new trial if the last suggested trial was completed. + # Corresponds to the JSON property `clientId` + # @return [String] + attr_accessor :client_id + + # Required. The number of suggestions requested. + # Corresponds to the JSON property `suggestionCount` + # @return [Fixnum] + attr_accessor :suggestion_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @client_id = args[:client_id] if args.key?(:client_id) + @suggestion_count = args[:suggestion_count] if args.key?(:suggestion_count) + end + end + + # This message will be placed in the response field of a completed + # google.longrunning.Operation associated with a SuggestTrials request. + class GoogleCloudMlV1SuggestTrialsResponse + include Google::Apis::Core::Hashable + + # The time operation processing completed. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # The time operation was started. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # The state of the study. + # Corresponds to the JSON property `studyState` + # @return [String] + attr_accessor :study_state + + # A list of Trials. + # Corresponds to the JSON property `trials` + # @return [Array] + attr_accessor :trials + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @study_state = args[:study_state] if args.key?(:study_state) + @trials = args[:trials] if args.key?(:trials) + end + end + # Represents input parameters for a training job. When using the gcloud command # to submit your training job, you can specify the input parameters as # command-line arguments and/or in a YAML configuration file referenced from @@ -1776,6 +2590,84 @@ module Google end end + # A message representing a Trial. + class GoogleCloudMlV1Trial + include Google::Apis::Core::Hashable + + # Output only. The identifier of the client that originally requested this trial. + # Corresponds to the JSON property `clientId` + # @return [String] + attr_accessor :client_id + + # Output only. Time the Trial's status changed to COMPLETED. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # A message representing a Measurement. + # Corresponds to the JSON property `finalMeasurement` + # @return [Google::Apis::MlV1::GoogleCloudMlV1Measurement] + attr_accessor :final_measurement + + # Output only. A human readable string describing why the Trial is + # infeasible. This should only be set if trial_infeasible is true. + # Corresponds to the JSON property `infeasibleReason` + # @return [String] + attr_accessor :infeasible_reason + + # A list of measurements that are strictly lexicographically + # ordered by their induced tuples (steps, elapsed_time). + # These are used for early stopping computations. + # Corresponds to the JSON property `measurements` + # @return [Array] + attr_accessor :measurements + + # Output only. Name of the trial assigned by the service. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The parameters of the Trial. + # Corresponds to the JSON property `parameters` + # @return [Array] + attr_accessor :parameters + + # Output only. Time the Trial was started. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # The detailed state of a trial. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output only. True if the parameters in this trial should not be attempted + # again. + # Corresponds to the JSON property `trialInfeasible` + # @return [Boolean] + attr_accessor :trial_infeasible + alias_method :trial_infeasible?, :trial_infeasible + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @client_id = args[:client_id] if args.key?(:client_id) + @end_time = args[:end_time] if args.key?(:end_time) + @final_measurement = args[:final_measurement] if args.key?(:final_measurement) + @infeasible_reason = args[:infeasible_reason] if args.key?(:infeasible_reason) + @measurements = args[:measurements] if args.key?(:measurements) + @name = args[:name] if args.key?(:name) + @parameters = args[:parameters] if args.key?(:parameters) + @start_time = args[:start_time] if args.key?(:start_time) + @state = args[:state] if args.key?(:state) + @trial_infeasible = args[:trial_infeasible] if args.key?(:trial_infeasible) + end + end + # Represents a version of the model. # Each version is a trained model deployed in the cloud, ready to handle # prediction requests. A model can have multiple versions. You can get @@ -1843,8 +2735,8 @@ module Google # Message holding configuration options for explaining model predictions. # There are two feature attribution methods supported for TensorFlow models: # integrated gradients and sampled Shapley. - # Learn more about feature - # attributions. + # [Learn more about feature + # attributions.](/ml-engine/docs/ai-explanations/overview) # Corresponds to the JSON property `explanationConfig` # @return [Google::Apis::MlV1::GoogleCloudMlV1ExplanationConfig] attr_accessor :explanation_config @@ -2068,6 +2960,30 @@ module Google end end + # Attributes credit by computing the XRAI taking advantage + # of the model's fully differentiable structure. Refer to this paper for + # more details: https://arxiv.org/abs/1906.02825 + # Currently only implemented for models with natural image inputs. + class GoogleCloudMlV1XraiAttribution + include Google::Apis::Core::Hashable + + # Number of steps for approximating the path integral. + # A good value to start is 50 and gradually increase until the + # sum to diff property is met within the desired error range. + # Corresponds to the JSON property `numIntegralSteps` + # @return [Fixnum] + attr_accessor :num_integral_steps + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @num_integral_steps = args[:num_integral_steps] if args.key?(:num_integral_steps) + end + end + # Specifies the audit configuration for a service. # The configuration determines which permission types are logged, and what # identities, if any, are exempted from logging. diff --git a/generated/google/apis/ml_v1/representations.rb b/generated/google/apis/ml_v1/representations.rb index e04127970..e97c109f5 100644 --- a/generated/google/apis/ml_v1/representations.rb +++ b/generated/google/apis/ml_v1/representations.rb @@ -28,24 +28,114 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudMlV1HyperparameterOutputHyperparameterMetric class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudMlV1MeasurementMetric + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1StudyConfigMetricSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1StudyConfigParameterSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1TrialParameter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudMlV1AcceleratorConfig class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudMlV1AddTrialMeasurementRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudMlV1AutoScaling class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudMlV1AutomatedStoppingConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudMlV1BuiltInAlgorithmOutput class Representation < Google::Apis::Core::JsonRepresentation; end @@ -64,6 +154,30 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudMlV1CheckTrialEarlyStoppingStateMetatdata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1CheckTrialEarlyStoppingStateRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1CheckTrialEarlyStoppingStateResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1CompleteTrialRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudMlV1Config class Representation < Google::Apis::Core::JsonRepresentation; end @@ -136,6 +250,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudMlV1ListStudiesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1ListTrialsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudMlV1ListVersionsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -154,6 +280,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudMlV1Measurement + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudMlV1Model class Representation < Google::Apis::Core::JsonRepresentation; end @@ -220,6 +352,42 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudMlV1StopTrialRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1Study + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1StudyConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1SuggestTrialsMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1SuggestTrialsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudMlV1SuggestTrialsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudMlV1TrainingInput class Representation < Google::Apis::Core::JsonRepresentation; end @@ -232,12 +400,24 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudMlV1Trial + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudMlV1Version class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudMlV1XraiAttribution + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleIamV1AuditConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -319,6 +499,20 @@ module Google end end + class GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :use_elapsed_time, as: 'useElapsedTime' + end + end + + class GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :use_elapsed_time, as: 'useElapsedTime' + end + end + class GoogleCloudMlV1HyperparameterOutputHyperparameterMetric # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -327,6 +521,108 @@ module Google end end + class GoogleCloudMlV1MeasurementMetric + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metric, as: 'metric' + property :value, as: 'value' + end + end + + class GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :values, as: 'values' + end + end + + class GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :values, as: 'values' + end + end + + class GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :max_value, as: 'maxValue' + property :min_value, as: 'minValue' + end + end + + class GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :max_value, :numeric_string => true, as: 'maxValue' + property :min_value, :numeric_string => true, as: 'minValue' + end + end + + class GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :values, as: 'values' + end + end + + class GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :values, as: 'values' + end + end + + class GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :values, as: 'values' + end + end + + class GoogleCloudMlV1StudyConfigMetricSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :goal, as: 'goal' + property :metric, as: 'metric' + end + end + + class GoogleCloudMlV1StudyConfigParameterSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :categorical_value_spec, as: 'categoricalValueSpec', class: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec::Representation + + collection :child_parameter_specs, as: 'childParameterSpecs', class: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpec::Representation + + property :discrete_value_spec, as: 'discreteValueSpec', class: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec::Representation + + property :double_value_spec, as: 'doubleValueSpec', class: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec::Representation + + property :integer_value_spec, as: 'integerValueSpec', class: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec::Representation + + property :parameter, as: 'parameter' + property :parent_categorical_values, as: 'parentCategoricalValues', class: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec::Representation + + property :parent_discrete_values, as: 'parentDiscreteValues', class: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec::Representation + + property :parent_int_values, as: 'parentIntValues', class: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec::Representation + + property :scale_type, as: 'scaleType' + property :type, as: 'type' + end + end + + class GoogleCloudMlV1TrialParameter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :float_value, as: 'floatValue' + property :int_value, :numeric_string => true, as: 'intValue' + property :parameter, as: 'parameter' + property :string_value, as: 'stringValue' + end + end + class GoogleCloudMlV1AcceleratorConfig # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -335,6 +631,14 @@ module Google end end + class GoogleCloudMlV1AddTrialMeasurementRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :measurement, as: 'measurement', class: Google::Apis::MlV1::GoogleCloudMlV1Measurement, decorator: Google::Apis::MlV1::GoogleCloudMlV1Measurement::Representation + + end + end + class GoogleCloudMlV1AutoScaling # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -342,6 +646,16 @@ module Google end end + class GoogleCloudMlV1AutomatedStoppingConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :decay_curve_stopping_config, as: 'decayCurveStoppingConfig', class: Google::Apis::MlV1::GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig, decorator: Google::Apis::MlV1::GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig::Representation + + property :median_automated_stopping_config, as: 'medianAutomatedStoppingConfig', class: Google::Apis::MlV1::GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig, decorator: Google::Apis::MlV1::GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig::Representation + + end + end + class GoogleCloudMlV1BuiltInAlgorithmOutput # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -366,6 +680,40 @@ module Google end end + class GoogleCloudMlV1CheckTrialEarlyStoppingStateMetatdata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :study, as: 'study' + property :trial, as: 'trial' + end + end + + class GoogleCloudMlV1CheckTrialEarlyStoppingStateRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudMlV1CheckTrialEarlyStoppingStateResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_time, as: 'endTime' + property :should_stop, as: 'shouldStop' + property :start_time, as: 'startTime' + end + end + + class GoogleCloudMlV1CompleteTrialRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :final_measurement, as: 'finalMeasurement', class: Google::Apis::MlV1::GoogleCloudMlV1Measurement, decorator: Google::Apis::MlV1::GoogleCloudMlV1Measurement::Representation + + property :infeasible_reason, as: 'infeasibleReason' + property :trial_infeasible, as: 'trialInfeasible' + end + end + class GoogleCloudMlV1Config # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -395,6 +743,8 @@ module Google property :sampled_shapley_attribution, as: 'sampledShapleyAttribution', class: Google::Apis::MlV1::GoogleCloudMlV1SampledShapleyAttribution, decorator: Google::Apis::MlV1::GoogleCloudMlV1SampledShapleyAttribution::Representation + property :xrai_attribution, as: 'xraiAttribution', class: Google::Apis::MlV1::GoogleCloudMlV1XraiAttribution, decorator: Google::Apis::MlV1::GoogleCloudMlV1XraiAttribution::Representation + end end @@ -498,6 +848,22 @@ module Google end end + class GoogleCloudMlV1ListStudiesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :studies, as: 'studies', class: Google::Apis::MlV1::GoogleCloudMlV1Study, decorator: Google::Apis::MlV1::GoogleCloudMlV1Study::Representation + + end + end + + class GoogleCloudMlV1ListTrialsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :trials, as: 'trials', class: Google::Apis::MlV1::GoogleCloudMlV1Trial, decorator: Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation + + end + end + class GoogleCloudMlV1ListVersionsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -523,6 +889,16 @@ module Google end end + class GoogleCloudMlV1Measurement + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :elapsed_time, as: 'elapsedTime' + collection :metrics, as: 'metrics', class: Google::Apis::MlV1::GoogleCloudMlV1MeasurementMetric, decorator: Google::Apis::MlV1::GoogleCloudMlV1MeasurementMetric::Representation + + property :step_count, :numeric_string => true, as: 'stepCount' + end + end + class GoogleCloudMlV1Model # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -641,6 +1017,66 @@ module Google end end + class GoogleCloudMlV1StopTrialRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudMlV1Study + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :inactive_reason, as: 'inactiveReason' + property :name, as: 'name' + property :state, as: 'state' + property :study_config, as: 'studyConfig', class: Google::Apis::MlV1::GoogleCloudMlV1StudyConfig, decorator: Google::Apis::MlV1::GoogleCloudMlV1StudyConfig::Representation + + end + end + + class GoogleCloudMlV1StudyConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :algorithm, as: 'algorithm' + property :automated_stopping_config, as: 'automatedStoppingConfig', class: Google::Apis::MlV1::GoogleCloudMlV1AutomatedStoppingConfig, decorator: Google::Apis::MlV1::GoogleCloudMlV1AutomatedStoppingConfig::Representation + + collection :metrics, as: 'metrics', class: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigMetricSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigMetricSpec::Representation + + collection :parameters, as: 'parameters', class: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpec::Representation + + end + end + + class GoogleCloudMlV1SuggestTrialsMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :client_id, as: 'clientId' + property :create_time, as: 'createTime' + property :study, as: 'study' + property :suggestion_count, as: 'suggestionCount' + end + end + + class GoogleCloudMlV1SuggestTrialsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :client_id, as: 'clientId' + property :suggestion_count, as: 'suggestionCount' + end + end + + class GoogleCloudMlV1SuggestTrialsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + property :study_state, as: 'studyState' + collection :trials, as: 'trials', class: Google::Apis::MlV1::GoogleCloudMlV1Trial, decorator: Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation + + end + end + class GoogleCloudMlV1TrainingInput # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -688,6 +1124,25 @@ module Google end end + class GoogleCloudMlV1Trial + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :client_id, as: 'clientId' + property :end_time, as: 'endTime' + property :final_measurement, as: 'finalMeasurement', class: Google::Apis::MlV1::GoogleCloudMlV1Measurement, decorator: Google::Apis::MlV1::GoogleCloudMlV1Measurement::Representation + + property :infeasible_reason, as: 'infeasibleReason' + collection :measurements, as: 'measurements', class: Google::Apis::MlV1::GoogleCloudMlV1Measurement, decorator: Google::Apis::MlV1::GoogleCloudMlV1Measurement::Representation + + property :name, as: 'name' + collection :parameters, as: 'parameters', class: Google::Apis::MlV1::GoogleCloudMlV1TrialParameter, decorator: Google::Apis::MlV1::GoogleCloudMlV1TrialParameter::Representation + + property :start_time, as: 'startTime' + property :state, as: 'state' + property :trial_infeasible, as: 'trialInfeasible' + end + end + class GoogleCloudMlV1Version # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -721,6 +1176,13 @@ module Google end end + class GoogleCloudMlV1XraiAttribution + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :num_integral_steps, as: 'numIntegralSteps' + end + end + class GoogleIamV1AuditConfig # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/ml_v1/service.rb b/generated/google/apis/ml_v1/service.rb index 8ba931059..5d281e6ad 100644 --- a/generated/google/apis/ml_v1/service.rb +++ b/generated/google/apis/ml_v1/service.rb @@ -614,6 +614,426 @@ module Google execute_or_queue_command(command, &block) end + # Creates a study. + # @param [String] parent + # Required. The project and location that the study belongs to. + # Format: projects/`project`/locations/`location` + # @param [Google::Apis::MlV1::GoogleCloudMlV1Study] google_cloud_ml_v1__study_object + # @param [String] study_id + # Required. The ID to use for the study, which will become the final component + # of + # the study's resource name. + # @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::MlV1::GoogleCloudMlV1Study] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleCloudMlV1Study] + # + # @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 create_project_location_study(parent, google_cloud_ml_v1__study_object = nil, study_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/studies', options) + command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Study::Representation + command.request_object = google_cloud_ml_v1__study_object + command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Study::Representation + command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Study + command.params['parent'] = parent unless parent.nil? + command.query['studyId'] = study_id unless study_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a study. + # @param [String] name + # Required. The study name. + # @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::MlV1::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleProtobufEmpty] + # + # @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 delete_project_location_study(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a study. + # @param [String] name + # Required. The study name. + # @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::MlV1::GoogleCloudMlV1Study] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleCloudMlV1Study] + # + # @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 get_project_location_study(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Study::Representation + command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Study + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all the studies in a region for an associated project. + # @param [String] parent + # Required. The project and location that the study belongs to. + # Format: projects/`project`/locations/`location` + # @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::MlV1::GoogleCloudMlV1ListStudiesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleCloudMlV1ListStudiesResponse] + # + # @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_project_location_studies(parent, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/studies', options) + command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListStudiesResponse::Representation + command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListStudiesResponse + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Adds a measurement of the objective metrics to a Trial. This measurement + # is assumed to have been taken before the Trial is complete. + # @param [String] name + # Required. The trial name. + # @param [Google::Apis::MlV1::GoogleCloudMlV1AddTrialMeasurementRequest] google_cloud_ml_v1__add_trial_measurement_request_object + # @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::MlV1::GoogleCloudMlV1Trial] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleCloudMlV1Trial] + # + # @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 add_project_location_study_trial_measurement(name, google_cloud_ml_v1__add_trial_measurement_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:addMeasurement', options) + command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1AddTrialMeasurementRequest::Representation + command.request_object = google_cloud_ml_v1__add_trial_measurement_request_object + command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation + command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Trial + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Checks whether a trial should stop or not. + # @param [String] name + # Required. The trial name. + # @param [Google::Apis::MlV1::GoogleCloudMlV1CheckTrialEarlyStoppingStateRequest] google_cloud_ml_v1__check_trial_early_stopping_state_request_object + # @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::MlV1::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleLongrunningOperation] + # + # @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 check_project_location_study_trial_early_stopping_state(name, google_cloud_ml_v1__check_trial_early_stopping_state_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:checkEarlyStoppingState', options) + command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1CheckTrialEarlyStoppingStateRequest::Representation + command.request_object = google_cloud_ml_v1__check_trial_early_stopping_state_request_object + command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Marks a Trial as complete. + # @param [String] name + # Required. The trial name. + # @param [Google::Apis::MlV1::GoogleCloudMlV1CompleteTrialRequest] google_cloud_ml_v1__complete_trial_request_object + # @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::MlV1::GoogleCloudMlV1Trial] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleCloudMlV1Trial] + # + # @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 complete_project_location_study_trial(name, google_cloud_ml_v1__complete_trial_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:complete', options) + command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1CompleteTrialRequest::Representation + command.request_object = google_cloud_ml_v1__complete_trial_request_object + command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation + command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Trial + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Adds a user provided trial to a Study. + # @param [String] parent + # Required. The name of the study that the trial belongs to. + # @param [Google::Apis::MlV1::GoogleCloudMlV1Trial] google_cloud_ml_v1__trial_object + # @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::MlV1::GoogleCloudMlV1Trial] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleCloudMlV1Trial] + # + # @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 create_project_location_study_trial(parent, google_cloud_ml_v1__trial_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/trials', options) + command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation + command.request_object = google_cloud_ml_v1__trial_object + command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation + command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Trial + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a Trial. + # @param [String] name + # Required. The trial name. + # @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::MlV1::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleProtobufEmpty] + # + # @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 delete_project_location_study_trial(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a Trial. + # @param [String] name + # Required. The trial name. + # @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::MlV1::GoogleCloudMlV1Trial] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleCloudMlV1Trial] + # + # @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 get_project_location_study_trial(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation + command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Trial + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists the trials associated with a Study. + # @param [String] parent + # Required. The name of the study that the trial belongs to. + # @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::MlV1::GoogleCloudMlV1ListTrialsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleCloudMlV1ListTrialsResponse] + # + # @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_project_location_study_trials(parent, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/trials', options) + command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListTrialsResponse::Representation + command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListTrialsResponse + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Stops a trial. + # @param [String] name + # Required. The trial name. + # @param [Google::Apis::MlV1::GoogleCloudMlV1StopTrialRequest] google_cloud_ml_v1__stop_trial_request_object + # @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::MlV1::GoogleCloudMlV1Trial] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleCloudMlV1Trial] + # + # @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 stop_project_location_study_trial(name, google_cloud_ml_v1__stop_trial_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:stop', options) + command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1StopTrialRequest::Representation + command.request_object = google_cloud_ml_v1__stop_trial_request_object + command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation + command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Trial + command.params['name'] = name unless name.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 a long-running operation associated with the generation of trial + # suggestions. + # @param [String] parent + # Required. The name of the study that the trial belongs to. + # @param [Google::Apis::MlV1::GoogleCloudMlV1SuggestTrialsRequest] google_cloud_ml_v1__suggest_trials_request_object + # @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::MlV1::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleLongrunningOperation] + # + # @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 suggest_project_location_study_trial(parent, google_cloud_ml_v1__suggest_trials_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/trials:suggest', options) + command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1SuggestTrialsRequest::Representation + command.request_object = google_cloud_ml_v1__suggest_trials_request_object + command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Creates a model which will later contain one or more versions. # You must add at least one version before you can request predictions from # the model. Add versions by calling diff --git a/generated/google/apis/recommender_v1beta1.rb b/generated/google/apis/recommender_v1beta1.rb index 16e1572f7..65f1f12dc 100644 --- a/generated/google/apis/recommender_v1beta1.rb +++ b/generated/google/apis/recommender_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/recommender/docs/ module RecommenderV1beta1 VERSION = 'V1beta1' - REVISION = '20200210' + REVISION = '20200308' # 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/recommender_v1beta1/classes.rb b/generated/google/apis/recommender_v1beta1/classes.rb index 5841e46e1..66699a8de 100644 --- a/generated/google/apis/recommender_v1beta1/classes.rb +++ b/generated/google/apis/recommender_v1beta1/classes.rb @@ -72,6 +72,166 @@ module Google end end + # An insight along with the information used to derive the insight. The insight + # may have associated recomendations as well. + class GoogleCloudRecommenderV1beta1Insight + include Google::Apis::Core::Hashable + + # Recommendations derived from this insight. + # Corresponds to the JSON property `associatedRecommendations` + # @return [Array] + attr_accessor :associated_recommendations + + # Category being targeted by the insight. + # Corresponds to the JSON property `category` + # @return [String] + attr_accessor :category + + # A struct of custom fields to explain the insight. + # Example: "grantedPermissionsCount": "1000" + # Corresponds to the JSON property `content` + # @return [Hash] + attr_accessor :content + + # Free-form human readable summary in English. The maximum length is 500 + # characters. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Fingerprint of the Insight. Provides optimistic locking when updating + # states. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Insight subtype. Insight content schema will be stable for a given subtype. + # Corresponds to the JSON property `insightSubtype` + # @return [String] + attr_accessor :insight_subtype + + # Timestamp of the latest data used to generate the insight. + # Corresponds to the JSON property `lastRefreshTime` + # @return [String] + attr_accessor :last_refresh_time + + # Name of the insight. + # * A project insight is represented as + # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID] + # /insights/[insight_id] + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Observation period that led to the insight. The source data used to + # generate the insight ends at last_refresh_time and begins at + # (last_refresh_time - observation_period). + # Corresponds to the JSON property `observationPeriod` + # @return [String] + attr_accessor :observation_period + + # Information related to insight state. + # Corresponds to the JSON property `stateInfo` + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1InsightStateInfo] + attr_accessor :state_info + + # Fully qualified resource names that this insight is targeting. + # Corresponds to the JSON property `targetResources` + # @return [Array] + attr_accessor :target_resources + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @associated_recommendations = args[:associated_recommendations] if args.key?(:associated_recommendations) + @category = args[:category] if args.key?(:category) + @content = args[:content] if args.key?(:content) + @description = args[:description] if args.key?(:description) + @etag = args[:etag] if args.key?(:etag) + @insight_subtype = args[:insight_subtype] if args.key?(:insight_subtype) + @last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time) + @name = args[:name] if args.key?(:name) + @observation_period = args[:observation_period] if args.key?(:observation_period) + @state_info = args[:state_info] if args.key?(:state_info) + @target_resources = args[:target_resources] if args.key?(:target_resources) + end + end + + # Reference to an associated recommendation. + class GoogleCloudRecommenderV1beta1InsightRecommendationReference + include Google::Apis::Core::Hashable + + # Recommendation resource name, e.g. + # projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/ + # recommendations/[RECOMMENDATION_ID] + # Corresponds to the JSON property `recommendation` + # @return [String] + attr_accessor :recommendation + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @recommendation = args[:recommendation] if args.key?(:recommendation) + end + end + + # Information related to insight state. + class GoogleCloudRecommenderV1beta1InsightStateInfo + include Google::Apis::Core::Hashable + + # Insight state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # A map of metadata for the state, provided by user or automations systems. + # Corresponds to the JSON property `stateMetadata` + # @return [Hash] + attr_accessor :state_metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @state = args[:state] if args.key?(:state) + @state_metadata = args[:state_metadata] if args.key?(:state_metadata) + end + end + + # Response to the `ListInsights` method. + class GoogleCloudRecommenderV1beta1ListInsightsResponse + include Google::Apis::Core::Hashable + + # The set of insights for the `parent` resource. + # Corresponds to the JSON property `insights` + # @return [Array] + attr_accessor :insights + + # A token that can be used to request the next page of results. This field is + # empty if there are no additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @insights = args[:insights] if args.key?(:insights) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + # Response to the `ListRecommendations` method. class GoogleCloudRecommenderV1beta1ListRecommendationsResponse include Google::Apis::Core::Hashable @@ -98,6 +258,33 @@ module Google end end + # Request for the `MarkInsightAccepted` method. + class GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest + include Google::Apis::Core::Hashable + + # Required. Fingerprint of the Insight. Provides optimistic locking. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Optional. State properties user wish to include with this state. Full replace + # of the + # current state_metadata. + # Corresponds to the JSON property `stateMetadata` + # @return [Hash] + attr_accessor :state_metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @state_metadata = args[:state_metadata] if args.key?(:state_metadata) + end + end + # Request for the `MarkRecommendationClaimed` Method. class GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest include Google::Apis::Core::Hashable @@ -329,6 +516,11 @@ module Google # @return [Array] attr_accessor :additional_impact + # Insights that led to this recommendation. + # Corresponds to the JSON property `associatedInsights` + # @return [Array] + attr_accessor :associated_insights + # Contains what resources are changing and how they are changing. # Corresponds to the JSON property `content` # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationContent] @@ -386,6 +578,7 @@ module Google # Update properties of this object def update!(**args) @additional_impact = args[:additional_impact] if args.key?(:additional_impact) + @associated_insights = args[:associated_insights] if args.key?(:associated_insights) @content = args[:content] if args.key?(:content) @description = args[:description] if args.key?(:description) @etag = args[:etag] if args.key?(:etag) @@ -418,6 +611,27 @@ module Google end end + # Reference to an associated insight. + class GoogleCloudRecommenderV1beta1RecommendationInsightReference + include Google::Apis::Core::Hashable + + # Insight resource name, e.g. + # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/ + # insights/[INSIGHT_ID] + # Corresponds to the JSON property `insight` + # @return [String] + attr_accessor :insight + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @insight = args[:insight] if args.key?(:insight) + end + end + # Information for state. Contains state and metadata. class GoogleCloudRecommenderV1beta1RecommendationStateInfo include Google::Apis::Core::Hashable diff --git a/generated/google/apis/recommender_v1beta1/representations.rb b/generated/google/apis/recommender_v1beta1/representations.rb index 1de117a67..7c443d46d 100644 --- a/generated/google/apis/recommender_v1beta1/representations.rb +++ b/generated/google/apis/recommender_v1beta1/representations.rb @@ -34,12 +34,42 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudRecommenderV1beta1Insight + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1InsightRecommendationReference + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1InsightStateInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1ListInsightsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudRecommenderV1beta1ListRecommendationsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -82,6 +112,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudRecommenderV1beta1RecommendationInsightReference + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudRecommenderV1beta1RecommendationStateInfo class Representation < Google::Apis::Core::JsonRepresentation; end @@ -118,6 +154,49 @@ module Google end end + class GoogleCloudRecommenderV1beta1Insight + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :associated_recommendations, as: 'associatedRecommendations', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1InsightRecommendationReference, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1InsightRecommendationReference::Representation + + property :category, as: 'category' + hash :content, as: 'content' + property :description, as: 'description' + property :etag, as: 'etag' + property :insight_subtype, as: 'insightSubtype' + property :last_refresh_time, as: 'lastRefreshTime' + property :name, as: 'name' + property :observation_period, as: 'observationPeriod' + property :state_info, as: 'stateInfo', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1InsightStateInfo, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1InsightStateInfo::Representation + + collection :target_resources, as: 'targetResources' + end + end + + class GoogleCloudRecommenderV1beta1InsightRecommendationReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :recommendation, as: 'recommendation' + end + end + + class GoogleCloudRecommenderV1beta1InsightStateInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :state, as: 'state' + hash :state_metadata, as: 'stateMetadata' + end + end + + class GoogleCloudRecommenderV1beta1ListInsightsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :insights, as: 'insights', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + class GoogleCloudRecommenderV1beta1ListRecommendationsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -127,6 +206,14 @@ module Google end end + class GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, as: 'etag' + hash :state_metadata, as: 'stateMetadata' + end + end + class GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -182,6 +269,8 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation collection :additional_impact, as: 'additionalImpact', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Impact, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Impact::Representation + collection :associated_insights, as: 'associatedInsights', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationInsightReference, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationInsightReference::Representation + property :content, as: 'content', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationContent, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationContent::Representation property :description, as: 'description' @@ -204,6 +293,13 @@ module Google end end + class GoogleCloudRecommenderV1beta1RecommendationInsightReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :insight, as: 'insight' + end + end + class GoogleCloudRecommenderV1beta1RecommendationStateInfo # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/recommender_v1beta1/service.rb b/generated/google/apis/recommender_v1beta1/service.rb index d21cf6b11..343ecacd0 100644 --- a/generated/google/apis/recommender_v1beta1/service.rb +++ b/generated/google/apis/recommender_v1beta1/service.rb @@ -47,6 +47,129 @@ module Google @batch_path = 'batch' end + # Gets the requested insight. Requires the recommender.*.get IAM permission + # for the specified insight type. + # @param [String] name + # Required. Name of the insight. + # @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::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight] + # + # @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 get_project_location_insight_type_insight(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight::Representation + command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists insights for a Cloud project. Requires the recommender.*.list IAM + # permission for the specified insight type. + # @param [String] parent + # Required. The container resource on which to execute the request. + # Acceptable formats: + # 1. + # "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]" + # , + # LOCATION here refers to GCP Locations: + # https://cloud.google.com/about/locations/ + # @param [String] filter + # Optional. Filter expression to restrict the insights returned. Supported + # filter fields: state + # Eg: `state:"DISMISSED" or state:"ACTIVE" + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive + # values are ignored. If not specified, the server will determine the number + # of results to return. + # @param [String] page_token + # Optional. If present, retrieves the next batch of results from the preceding + # call to + # this method. `page_token` must be the value of `next_page_token` from the + # previous response. The values of other method parameters must be identical + # to those in the previous call. + # @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::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListInsightsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListInsightsResponse] + # + # @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_project_location_insight_type_insights(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/insights', options) + command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListInsightsResponse::Representation + command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListInsightsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Marks the Insight State as Accepted. Users can use this method to + # indicate to the Recommender API that they have applied some action based + # on the insight. This stops the insight content from being updated. + # MarkInsightAccepted can be applied to insights in ACTIVE state. Requires + # the recommender.*.update IAM permission for the specified insight. + # @param [String] name + # Required. Name of the insight. + # @param [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest] google_cloud_recommender_v1beta1_mark_insight_accepted_request_object + # @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::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight] + # + # @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 mark_project_location_insight_type_insight_accepted(name, google_cloud_recommender_v1beta1_mark_insight_accepted_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+name}:markAccepted', options) + command.request_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest::Representation + command.request_object = google_cloud_recommender_v1beta1_mark_insight_accepted_request_object + command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight::Representation + command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Gets the requested recommendation. Requires the recommender.*.get # IAM permission for the specified recommender. # @param [String] name diff --git a/generated/google/apis/serviceusage_v1beta1.rb b/generated/google/apis/serviceusage_v1beta1.rb index 1cd4249e4..461300f15 100644 --- a/generated/google/apis/serviceusage_v1beta1.rb +++ b/generated/google/apis/serviceusage_v1beta1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/service-usage/ module ServiceusageV1beta1 VERSION = 'V1beta1' - REVISION = '20200305' + REVISION = '20200308' # 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/serviceusage_v1beta1/classes.rb b/generated/google/apis/serviceusage_v1beta1/classes.rb index c372d3fc2..eb22e4d5a 100644 --- a/generated/google/apis/serviceusage_v1beta1/classes.rb +++ b/generated/google/apis/serviceusage_v1beta1/classes.rb @@ -623,6 +623,116 @@ module Google end end + # Consumer quota settings for a quota limit. + class ConsumerQuotaLimit + include Google::Apis::Core::Hashable + + # Whether admin overrides are allowed on this limit + # Corresponds to the JSON property `allowsAdminOverrides` + # @return [Boolean] + attr_accessor :allows_admin_overrides + alias_method :allows_admin_overrides?, :allows_admin_overrides + + # Whether this limit is precise or imprecise. + # Corresponds to the JSON property `isPrecise` + # @return [Boolean] + attr_accessor :is_precise + alias_method :is_precise?, :is_precise + + # The name of the parent metric of this limit. + # An example name would be: + # `compute.googleapis.com/cpus` + # Corresponds to the JSON property `metric` + # @return [String] + attr_accessor :metric + + # The resource name of the quota limit. + # An example name would be: + # `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute. + # googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` + # The resource name is intended to be opaque and should not be parsed for + # its component strings, since its representation could change in the future. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Summary of the enforced quota buckets, organized by quota dimension, + # ordered from least specific to most specific (for example, the global + # default bucket, with no quota dimensions, will always appear first). + # Corresponds to the JSON property `quotaBuckets` + # @return [Array] + attr_accessor :quota_buckets + + # The limit unit. + # An example unit would be + # `1/`project`/`region`` + # Note that ``project`` and ``region`` are not placeholders in this example; + # the literal characters ``` and ``` occur in the string. + # Corresponds to the JSON property `unit` + # @return [String] + attr_accessor :unit + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @allows_admin_overrides = args[:allows_admin_overrides] if args.key?(:allows_admin_overrides) + @is_precise = args[:is_precise] if args.key?(:is_precise) + @metric = args[:metric] if args.key?(:metric) + @name = args[:name] if args.key?(:name) + @quota_buckets = args[:quota_buckets] if args.key?(:quota_buckets) + @unit = args[:unit] if args.key?(:unit) + end + end + + # Consumer quota settings for a quota metric. + class ConsumerQuotaMetric + include Google::Apis::Core::Hashable + + # The consumer quota for each quota limit defined on the metric. + # Corresponds to the JSON property `consumerQuotaLimits` + # @return [Array] + attr_accessor :consumer_quota_limits + + # The display name of the metric. + # An example name would be: + # "CPUs" + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The name of the metric. + # An example name would be: + # `compute.googleapis.com/cpus` + # Corresponds to the JSON property `metric` + # @return [String] + attr_accessor :metric + + # The resource name of the quota settings on this metric for this consumer. + # An example name would be: + # `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute. + # googleapis.com%2Fcpus + # The resource name is intended to be opaque and should not be parsed for + # its component strings, since its representation could change in the future. + # 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) + @consumer_quota_limits = args[:consumer_quota_limits] if args.key?(:consumer_quota_limits) + @display_name = args[:display_name] if args.key?(:display_name) + @metric = args[:metric] if args.key?(:metric) + @name = args[:name] if args.key?(:name) + end + end + # `Context` defines which contexts an API requests. # Example: # context: @@ -2518,6 +2628,84 @@ module Google end end + # Response message for ListAdminOverrides. + class ListAdminOverridesResponse + include Google::Apis::Core::Hashable + + # Token identifying which result to start with; returned by a previous list + # call. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Admin overrides on this limit. + # Corresponds to the JSON property `overrides` + # @return [Array] + attr_accessor :overrides + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @overrides = args[:overrides] if args.key?(:overrides) + end + end + + # Response message for ListConsumerOverrides. + class ListConsumerOverridesResponse + include Google::Apis::Core::Hashable + + # Token identifying which result to start with; returned by a previous list + # call. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Consumer overrides on this limit. + # Corresponds to the JSON property `overrides` + # @return [Array] + attr_accessor :overrides + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @overrides = args[:overrides] if args.key?(:overrides) + end + end + + # Response message for ListConsumerQuotaMetrics + class ListConsumerQuotaMetricsResponse + include Google::Apis::Core::Hashable + + # Quota settings for the consumer, organized by quota metric. + # Corresponds to the JSON property `metrics` + # @return [Array] + attr_accessor :metrics + + # Token identifying which result to start with; returned by a previous list + # call. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metrics = args[:metrics] if args.key?(:metrics) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + # The response message for Operations.ListOperations. class ListOperationsResponse include Google::Apis::Core::Hashable @@ -2543,6 +2731,32 @@ module Google end end + # Response message for ListProducerOverrides. + class ListProducerOverridesResponse + include Google::Apis::Core::Hashable + + # Token identifying which result to start with; returned by a previous list + # call. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Producer overrides on this limit. + # Corresponds to the JSON property `overrides` + # @return [Array] + attr_accessor :overrides + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @overrides = args[:overrides] if args.key?(:overrides) + end + end + # Response message for the `ListServices` method. class ListServicesResponse include Google::Apis::Core::Hashable @@ -3529,6 +3743,64 @@ module Google end end + # A quota bucket is a quota provisioning unit for a specific set of dimensions. + class QuotaBucket + include Google::Apis::Core::Hashable + + # A quota override + # Corresponds to the JSON property `adminOverride` + # @return [Google::Apis::ServiceusageV1beta1::QuotaOverride] + attr_accessor :admin_override + + # A quota override + # Corresponds to the JSON property `consumerOverride` + # @return [Google::Apis::ServiceusageV1beta1::QuotaOverride] + attr_accessor :consumer_override + + # The default limit of this quota bucket, as specified by the service + # configuration. + # Corresponds to the JSON property `defaultLimit` + # @return [Fixnum] + attr_accessor :default_limit + + # The dimensions of this quota bucket. + # If this map is empty, this is the global bucket, which is the default quota + # value applied to all requests that do not have a more specific override. + # If this map is nonempty, the default limit, effective limit, and quota + # overrides apply only to requests that have the dimensions given in the map. + # For example, if the map has key "region" and value "us-east-1", then the + # specified effective limit is only effective in that region, and the + # specified overrides apply only in that region. + # Corresponds to the JSON property `dimensions` + # @return [Hash] + attr_accessor :dimensions + + # The effective limit of this quota bucket. Equal to default_limit if there + # are no overrides. + # Corresponds to the JSON property `effectiveLimit` + # @return [Fixnum] + attr_accessor :effective_limit + + # A quota override + # Corresponds to the JSON property `producerOverride` + # @return [Google::Apis::ServiceusageV1beta1::QuotaOverride] + attr_accessor :producer_override + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @admin_override = args[:admin_override] if args.key?(:admin_override) + @consumer_override = args[:consumer_override] if args.key?(:consumer_override) + @default_limit = args[:default_limit] if args.key?(:default_limit) + @dimensions = args[:dimensions] if args.key?(:dimensions) + @effective_limit = args[:effective_limit] if args.key?(:effective_limit) + @producer_override = args[:producer_override] if args.key?(:producer_override) + end + end + # `QuotaLimit` defines a specific limit that applies over a specified duration # for a limit type. There can be at most one limit for a duration and limit # type combination defined within a `QuotaGroup`. diff --git a/generated/google/apis/serviceusage_v1beta1/representations.rb b/generated/google/apis/serviceusage_v1beta1/representations.rb index 97ebdba06..8755ba6b1 100644 --- a/generated/google/apis/serviceusage_v1beta1/representations.rb +++ b/generated/google/apis/serviceusage_v1beta1/representations.rb @@ -100,6 +100,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ConsumerQuotaLimit + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ConsumerQuotaMetric + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Context class Representation < Google::Apis::Core::JsonRepresentation; end @@ -280,12 +292,36 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListAdminOverridesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListConsumerOverridesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListConsumerQuotaMetricsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListOperationsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class ListProducerOverridesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListServicesResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -394,6 +430,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class QuotaBucket + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class QuotaLimit class Representation < Google::Apis::Core::JsonRepresentation; end @@ -610,6 +652,30 @@ module Google end end + class ConsumerQuotaLimit + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :allows_admin_overrides, as: 'allowsAdminOverrides' + property :is_precise, as: 'isPrecise' + property :metric, as: 'metric' + property :name, as: 'name' + collection :quota_buckets, as: 'quotaBuckets', class: Google::Apis::ServiceusageV1beta1::QuotaBucket, decorator: Google::Apis::ServiceusageV1beta1::QuotaBucket::Representation + + property :unit, as: 'unit' + end + end + + class ConsumerQuotaMetric + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :consumer_quota_limits, as: 'consumerQuotaLimits', class: Google::Apis::ServiceusageV1beta1::ConsumerQuotaLimit, decorator: Google::Apis::ServiceusageV1beta1::ConsumerQuotaLimit::Representation + + property :display_name, as: 'displayName' + property :metric, as: 'metric' + property :name, as: 'name' + end + end + class Context # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -952,6 +1018,33 @@ module Google end end + class ListAdminOverridesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :overrides, as: 'overrides', class: Google::Apis::ServiceusageV1beta1::QuotaOverride, decorator: Google::Apis::ServiceusageV1beta1::QuotaOverride::Representation + + end + end + + class ListConsumerOverridesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :overrides, as: 'overrides', class: Google::Apis::ServiceusageV1beta1::QuotaOverride, decorator: Google::Apis::ServiceusageV1beta1::QuotaOverride::Representation + + end + end + + class ListConsumerQuotaMetricsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :metrics, as: 'metrics', class: Google::Apis::ServiceusageV1beta1::ConsumerQuotaMetric, decorator: Google::Apis::ServiceusageV1beta1::ConsumerQuotaMetric::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + class ListOperationsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -961,6 +1054,15 @@ module Google end end + class ListProducerOverridesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :overrides, as: 'overrides', class: Google::Apis::ServiceusageV1beta1::QuotaOverride, decorator: Google::Apis::ServiceusageV1beta1::QuotaOverride::Representation + + end + end + class ListServicesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1142,6 +1244,21 @@ module Google end end + class QuotaBucket + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :admin_override, as: 'adminOverride', class: Google::Apis::ServiceusageV1beta1::QuotaOverride, decorator: Google::Apis::ServiceusageV1beta1::QuotaOverride::Representation + + property :consumer_override, as: 'consumerOverride', class: Google::Apis::ServiceusageV1beta1::QuotaOverride, decorator: Google::Apis::ServiceusageV1beta1::QuotaOverride::Representation + + property :default_limit, :numeric_string => true, as: 'defaultLimit' + hash :dimensions, as: 'dimensions' + property :effective_limit, :numeric_string => true, as: 'effectiveLimit' + property :producer_override, as: 'producerOverride', class: Google::Apis::ServiceusageV1beta1::QuotaOverride, decorator: Google::Apis::ServiceusageV1beta1::QuotaOverride::Representation + + end + end + class QuotaLimit # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/serviceusage_v1beta1/service.rb b/generated/google/apis/serviceusage_v1beta1/service.rb index 2013d15ea..551dcbbfb 100644 --- a/generated/google/apis/serviceusage_v1beta1/service.rb +++ b/generated/google/apis/serviceusage_v1beta1/service.rb @@ -335,6 +335,521 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + + # Retrieves a summary of quota information for a specific quota metric + # @param [String] name + # The resource name of the quota limit. + # An example name would be: + # projects/123/services/serviceusage.googleapis.com/quotas/metrics/serviceusage. + # googleapis.com%2Fmutate_requests + # @param [String] view + # Specifies the level of detail for quota information in the response. + # @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::ServiceusageV1beta1::ConsumerQuotaMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::ConsumerQuotaMetric] + # + # @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 get_service_consumer_quota_metric(name, view: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ServiceusageV1beta1::ConsumerQuotaMetric::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::ConsumerQuotaMetric + command.params['name'] = name unless name.nil? + command.query['view'] = view unless view.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Retrieves a summary of all quota information visible to the service + # consumer, organized by service metric. Each metric includes information + # about all of its defined limits. Each limit includes the limit + # configuration (quota unit, preciseness, default value), the current + # effective limit value, and all of the overrides applied to the limit. + # @param [String] parent + # Parent of the quotas resource. + # Some example names would be: + # projects/123/services/serviceconsumermanagement.googleapis.com + # folders/345/services/serviceconsumermanagement.googleapis.com + # organizations/456/services/serviceconsumermanagement.googleapis.com + # @param [Fixnum] page_size + # Requested size of the next page of data. + # @param [String] page_token + # Token identifying which result to start with; returned by a previous list + # call. + # @param [String] view + # Specifies the level of detail for quota information in the response. + # @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::ServiceusageV1beta1::ListConsumerQuotaMetricsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::ListConsumerQuotaMetricsResponse] + # + # @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_service_consumer_quota_metrics(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/consumerQuotaMetrics', options) + command.response_representation = Google::Apis::ServiceusageV1beta1::ListConsumerQuotaMetricsResponse::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::ListConsumerQuotaMetricsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['view'] = view unless view.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Retrieves a summary of quota information for a specific quota limit. + # @param [String] name + # The resource name of the quota limit. + # Use the quota limit resource name returned by previous + # ListConsumerQuotaMetrics and GetConsumerQuotaMetric API calls. + # @param [String] view + # Specifies the level of detail for quota information in the response. + # @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::ServiceusageV1beta1::ConsumerQuotaLimit] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::ConsumerQuotaLimit] + # + # @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 get_service_consumer_quota_metric_limit(name, view: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ServiceusageV1beta1::ConsumerQuotaLimit::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::ConsumerQuotaLimit + command.params['name'] = name unless name.nil? + command.query['view'] = view unless view.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates an admin override. + # An admin override is applied by an administrator of a parent folder or + # parent organization of the consumer receiving the override. An admin + # override is intended to limit the amount of quota the consumer can use out + # of the total quota pool allocated to all children of the folder or + # organization. + # @param [String] parent + # The resource name of the parent quota limit, returned by a + # ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. + # An example name would be: + # `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute. + # googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` + # @param [Google::Apis::ServiceusageV1beta1::QuotaOverride] quota_override_object + # @param [Boolean] force + # Whether to force the creation of the quota override. + # If creating an override would cause the effective quota for the consumer to + # decrease by more than 10 percent, the call is rejected, as a safety measure + # to avoid accidentally decreasing quota too quickly. Setting the force + # parameter to true ignores this restriction. + # @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::ServiceusageV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::Operation] + # + # @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 create_service_consumer_quota_metric_limit_admin_override(parent, quota_override_object = nil, force: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/adminOverrides', options) + command.request_representation = Google::Apis::ServiceusageV1beta1::QuotaOverride::Representation + command.request_object = quota_override_object + command.response_representation = Google::Apis::ServiceusageV1beta1::Operation::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['force'] = force unless force.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes an admin override. + # @param [String] name + # The resource name of the override to delete. + # An example name would be: + # `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute. + # googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d` + # @param [Boolean] force + # Whether to force the deletion of the quota override. + # If deleting an override would cause the effective quota for the consumer to + # decrease by more than 10 percent, the call is rejected, as a safety measure + # to avoid accidentally decreasing quota too quickly. Setting the force + # parameter to true ignores this restriction. + # @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::ServiceusageV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::Operation] + # + # @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 delete_service_consumer_quota_metric_limit_admin_override(name, force: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ServiceusageV1beta1::Operation::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::Operation + command.params['name'] = name unless name.nil? + command.query['force'] = force unless force.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all admin overrides on this limit. + # @param [String] parent + # The resource name of the parent quota limit, returned by a + # ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. + # An example name would be: + # `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute. + # googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` + # @param [Fixnum] page_size + # Requested size of the next page of data. + # @param [String] page_token + # Token identifying which result to start with; returned by a previous list + # call. + # @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::ServiceusageV1beta1::ListAdminOverridesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::ListAdminOverridesResponse] + # + # @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_service_consumer_quota_metric_limit_admin_overrides(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/adminOverrides', options) + command.response_representation = Google::Apis::ServiceusageV1beta1::ListAdminOverridesResponse::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::ListAdminOverridesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates an admin override. + # @param [String] name + # The resource name of the override to update. + # An example name would be: + # `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute. + # googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d` + # @param [Google::Apis::ServiceusageV1beta1::QuotaOverride] quota_override_object + # @param [Boolean] force + # Whether to force the update of the quota override. + # If updating an override would cause the effective quota for the consumer to + # decrease by more than 10 percent, the call is rejected, as a safety measure + # to avoid accidentally decreasing quota too quickly. Setting the force + # parameter to true ignores this restriction. + # @param [String] update_mask + # Update only the specified fields of the override. + # If unset, all fields will be updated. + # @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::ServiceusageV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::Operation] + # + # @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 patch_service_consumer_quota_metric_limit_admin_override(name, quota_override_object = nil, force: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::ServiceusageV1beta1::QuotaOverride::Representation + command.request_object = quota_override_object + command.response_representation = Google::Apis::ServiceusageV1beta1::Operation::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::Operation + command.params['name'] = name unless name.nil? + command.query['force'] = force unless force.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a consumer override. + # A consumer override is applied to the consumer on its own authority to + # limit its own quota usage. Consumer overrides cannot be used to grant more + # quota than would be allowed by admin overrides, producer overrides, or the + # default limit of the service. + # @param [String] parent + # The resource name of the parent quota limit, returned by a + # ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. + # An example name would be: + # `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute. + # googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` + # @param [Google::Apis::ServiceusageV1beta1::QuotaOverride] quota_override_object + # @param [Boolean] force + # Whether to force the creation of the quota override. + # If creating an override would cause the effective quota for the consumer to + # decrease by more than 10 percent, the call is rejected, as a safety measure + # to avoid accidentally decreasing quota too quickly. Setting the force + # parameter to true ignores this restriction. + # @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::ServiceusageV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::Operation] + # + # @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 create_service_consumer_quota_metric_limit_consumer_override(parent, quota_override_object = nil, force: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/consumerOverrides', options) + command.request_representation = Google::Apis::ServiceusageV1beta1::QuotaOverride::Representation + command.request_object = quota_override_object + command.response_representation = Google::Apis::ServiceusageV1beta1::Operation::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['force'] = force unless force.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a consumer override. + # @param [String] name + # The resource name of the override to delete. + # An example name would be: + # `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute. + # googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d` + # @param [Boolean] force + # Whether to force the deletion of the quota override. + # If deleting an override would cause the effective quota for the consumer to + # decrease by more than 10 percent, the call is rejected, as a safety measure + # to avoid accidentally decreasing quota too quickly. Setting the force + # parameter to true ignores this restriction. + # @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::ServiceusageV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::Operation] + # + # @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 delete_service_consumer_quota_metric_limit_consumer_override(name, force: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ServiceusageV1beta1::Operation::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::Operation + command.params['name'] = name unless name.nil? + command.query['force'] = force unless force.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all consumer overrides on this limit. + # @param [String] parent + # The resource name of the parent quota limit, returned by a + # ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. + # An example name would be: + # `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute. + # googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` + # @param [Fixnum] page_size + # Requested size of the next page of data. + # @param [String] page_token + # Token identifying which result to start with; returned by a previous list + # call. + # @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::ServiceusageV1beta1::ListConsumerOverridesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::ListConsumerOverridesResponse] + # + # @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_service_consumer_quota_metric_limit_consumer_overrides(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/consumerOverrides', options) + command.response_representation = Google::Apis::ServiceusageV1beta1::ListConsumerOverridesResponse::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::ListConsumerOverridesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a consumer override. + # @param [String] name + # The resource name of the override to update. + # An example name would be: + # `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute. + # googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d` + # @param [Google::Apis::ServiceusageV1beta1::QuotaOverride] quota_override_object + # @param [Boolean] force + # Whether to force the update of the quota override. + # If updating an override would cause the effective quota for the consumer to + # decrease by more than 10 percent, the call is rejected, as a safety measure + # to avoid accidentally decreasing quota too quickly. Setting the force + # parameter to true ignores this restriction. + # @param [String] update_mask + # Update only the specified fields of the override. + # If unset, all fields will be updated. + # @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::ServiceusageV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::Operation] + # + # @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 patch_service_consumer_quota_metric_limit_consumer_override(name, quota_override_object = nil, force: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::ServiceusageV1beta1::QuotaOverride::Representation + command.request_object = quota_override_object + command.response_representation = Google::Apis::ServiceusageV1beta1::Operation::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::Operation + command.params['name'] = name unless name.nil? + command.query['force'] = force unless force.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all producer overrides on this limit. + # Unlike other types of overrides, producer overrides are under the control + # of the service producer and cannot be modified using this API. + # @param [String] parent + # The resource name of the parent quota limit, returned by a + # ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. + # An example name would be: + # `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute. + # googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` + # @param [Fixnum] page_size + # Requested size of the next page of data. + # @param [String] page_token + # Token identifying which result to start with; returned by a previous list + # call. + # @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::ServiceusageV1beta1::ListProducerOverridesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServiceusageV1beta1::ListProducerOverridesResponse] + # + # @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_service_consumer_quota_metric_limit_producer_overrides(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/producerOverrides', options) + command.response_representation = Google::Apis::ServiceusageV1beta1::ListProducerOverridesResponse::Representation + command.response_class = Google::Apis::ServiceusageV1beta1::ListProducerOverridesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.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 diff --git a/generated/google/apis/tpu_v1.rb b/generated/google/apis/tpu_v1.rb index bc1646836..f153d5ff3 100644 --- a/generated/google/apis/tpu_v1.rb +++ b/generated/google/apis/tpu_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/tpu/ module TpuV1 VERSION = 'V1' - REVISION = '20200116' + REVISION = '20200309' # 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/tpu_v1alpha1.rb b/generated/google/apis/tpu_v1alpha1.rb index 75bb90ebf..49a928177 100644 --- a/generated/google/apis/tpu_v1alpha1.rb +++ b/generated/google/apis/tpu_v1alpha1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/tpu/ module TpuV1alpha1 VERSION = 'V1alpha1' - REVISION = '20200116' + REVISION = '20200309' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'