diff --git a/generated/google/apis/androidmanagement_v1.rb b/generated/google/apis/androidmanagement_v1.rb index 28c65cedb..28be97bca 100644 --- a/generated/google/apis/androidmanagement_v1.rb +++ b/generated/google/apis/androidmanagement_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/android/management module AndroidmanagementV1 VERSION = 'V1' - REVISION = '20191001' + REVISION = '20191107' # Manage Android devices and apps for your customers AUTH_ANDROIDMANAGEMENT = 'https://www.googleapis.com/auth/androidmanagement' diff --git a/generated/google/apis/appengine_v1.rb b/generated/google/apis/appengine_v1.rb index 5a4555c58..34f179f7f 100644 --- a/generated/google/apis/appengine_v1.rb +++ b/generated/google/apis/appengine_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/appengine/docs/admin-api/ module AppengineV1 VERSION = 'V1' - REVISION = '20191016' + REVISION = '20191106' # View and manage your applications deployed on Google App Engine AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin' diff --git a/generated/google/apis/appengine_v1/classes.rb b/generated/google/apis/appengine_v1/classes.rb index 6174ffc38..73bcef1ce 100644 --- a/generated/google/apis/appengine_v1/classes.rb +++ b/generated/google/apis/appengine_v1/classes.rb @@ -2231,7 +2231,7 @@ module Google # application that handles customer requests might include separate services to # handle tasks such as backend data analysis or API requests from mobile devices. # Each service has a collection of versions that define a specific set of code - # used to implement the functionality of that service. + # used to implement the functionality of that service. Next tag: 6 class Service include Google::Apis::Core::Hashable diff --git a/generated/google/apis/appengine_v1beta.rb b/generated/google/apis/appengine_v1beta.rb index e13df7410..87780f718 100644 --- a/generated/google/apis/appengine_v1beta.rb +++ b/generated/google/apis/appengine_v1beta.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/appengine/docs/admin-api/ module AppengineV1beta VERSION = 'V1beta' - REVISION = '20191016' + REVISION = '20191106' # View and manage your applications deployed on Google App Engine AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin' diff --git a/generated/google/apis/appengine_v1beta/classes.rb b/generated/google/apis/appengine_v1beta/classes.rb index 328c13660..937d042c3 100644 --- a/generated/google/apis/appengine_v1beta/classes.rb +++ b/generated/google/apis/appengine_v1beta/classes.rb @@ -2348,7 +2348,7 @@ module Google # application that handles customer requests might include separate services to # handle tasks such as backend data analysis or API requests from mobile devices. # Each service has a collection of versions that define a specific set of code - # used to implement the functionality of that service. + # used to implement the functionality of that service. Next tag: 6 class Service include Google::Apis::Core::Hashable diff --git a/generated/google/apis/cloudbuild_v1.rb b/generated/google/apis/cloudbuild_v1.rb index fb00b4473..8847a5a4b 100644 --- a/generated/google/apis/cloudbuild_v1.rb +++ b/generated/google/apis/cloudbuild_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/cloud-build/docs/ module CloudbuildV1 VERSION = 'V1' - REVISION = '20190824' + REVISION = '20191109' # 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/cloudbuild_v1/classes.rb b/generated/google/apis/cloudbuild_v1/classes.rb index 45a49dc9a..bd40d5ae8 100644 --- a/generated/google/apis/cloudbuild_v1/classes.rb +++ b/generated/google/apis/cloudbuild_v1/classes.rb @@ -1089,12 +1089,17 @@ module Google # @return [String] attr_accessor :project_id - # Name of the Cloud Source Repository. If omitted, the name "default" is - # assumed. + # Required. Name of the Cloud Source Repository. # Corresponds to the JSON property `repoName` # @return [String] attr_accessor :repo_name + # Substitutions to use in a triggered build. + # Should only be used with RunBuildTrigger + # Corresponds to the JSON property `substitutions` + # @return [Hash] + attr_accessor :substitutions + # Regex matching tags to build. # The syntax of the regular expressions accepted is the syntax accepted by # RE2 and described at https://github.com/google/re2/wiki/Syntax @@ -1113,6 +1118,7 @@ module Google @dir = args[:dir] if args.key?(:dir) @project_id = args[:project_id] if args.key?(:project_id) @repo_name = args[:repo_name] if args.key?(:repo_name) + @substitutions = args[:substitutions] if args.key?(:substitutions) @tag_name = args[:tag_name] if args.key?(:tag_name) end end diff --git a/generated/google/apis/cloudbuild_v1/representations.rb b/generated/google/apis/cloudbuild_v1/representations.rb index c13021b4f..d05c406fa 100644 --- a/generated/google/apis/cloudbuild_v1/representations.rb +++ b/generated/google/apis/cloudbuild_v1/representations.rb @@ -462,6 +462,7 @@ module Google property :dir, as: 'dir' property :project_id, as: 'projectId' property :repo_name, as: 'repoName' + hash :substitutions, as: 'substitutions' property :tag_name, as: 'tagName' end end diff --git a/generated/google/apis/cloudbuild_v1/service.rb b/generated/google/apis/cloudbuild_v1/service.rb index 014c0a7c4..95379261e 100644 --- a/generated/google/apis/cloudbuild_v1/service.rb +++ b/generated/google/apis/cloudbuild_v1/service.rb @@ -170,9 +170,9 @@ module Google # Cancels a build in progress. # @param [String] project_id - # ID of the project. + # Required. ID of the project. # @param [String] id - # ID of the build. + # Required. ID of the build. # @param [Google::Apis::CloudbuildV1::CancelBuildRequest] cancel_build_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -209,7 +209,7 @@ module Google # ID. Pass the build ID to `GetBuild` to determine the build status (such as # `SUCCESS` or `FAILURE`). # @param [String] project_id - # ID of the project. + # Required. ID of the project. # @param [Google::Apis::CloudbuildV1::Build] build_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -244,9 +244,9 @@ module Google # The `Build` that is returned includes its status (such as `SUCCESS`, # `FAILURE`, or `WORKING`), and timing information. # @param [String] project_id - # ID of the project. + # Required. ID of the project. # @param [String] id - # ID of the build. + # Required. ID of the build. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -279,7 +279,7 @@ module Google # Previously requested builds may still be in-progress, or may have finished # successfully or unsuccessfully. # @param [String] project_id - # ID of the project. + # Required. ID of the project. # @param [String] filter # The raw filter text to constrain the results. # @param [Fixnum] page_size @@ -337,9 +337,9 @@ module Google # object, which may or may not be available depending on the bucket's # lifecycle management settings. # @param [String] project_id - # ID of the project. + # Required. ID of the project. # @param [String] id - # Build ID of the original build. + # Required. Build ID of the original build. # @param [Google::Apis::CloudbuildV1::RetryBuildRequest] retry_build_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -374,7 +374,7 @@ module Google # Creates a new `BuildTrigger`. # This API is experimental. # @param [String] project_id - # ID of the project for which to configure automatic builds. + # Required. ID of the project for which to configure automatic builds. # @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -408,9 +408,9 @@ module Google # Deletes a `BuildTrigger` by its project ID and trigger ID. # This API is experimental. # @param [String] project_id - # ID of the project that owns the trigger. + # Required. ID of the project that owns the trigger. # @param [String] trigger_id - # ID of the `BuildTrigger` to delete. + # Required. ID of the `BuildTrigger` to delete. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -442,9 +442,9 @@ module Google # Returns information about a `BuildTrigger`. # This API is experimental. # @param [String] project_id - # ID of the project that owns the trigger. + # Required. ID of the project that owns the trigger. # @param [String] trigger_id - # ID of the `BuildTrigger` to get. + # Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -476,7 +476,7 @@ module Google # Lists existing `BuildTrigger`s. # This API is experimental. # @param [String] project_id - # ID of the project for which to list BuildTriggers. + # Required. ID of the project for which to list BuildTriggers. # @param [Fixnum] page_size # Number of results to return in the list. # @param [String] page_token @@ -513,9 +513,9 @@ module Google # Updates a `BuildTrigger` by its project ID and trigger ID. # This API is experimental. # @param [String] project_id - # ID of the project that owns the trigger. + # Required. ID of the project that owns the trigger. # @param [String] trigger_id - # ID of the `BuildTrigger` to update. + # Required. ID of the `BuildTrigger` to update. # @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -549,9 +549,9 @@ module Google # Runs a `BuildTrigger` at a particular source revision. # @param [String] project_id - # ID of the project. + # Required. ID of the project. # @param [String] trigger_id - # ID of the trigger. + # Required. ID of the trigger. # @param [Google::Apis::CloudbuildV1::RepoSource] repo_source_object # @param [String] fields # Selector specifying which fields to include in a partial response. diff --git a/generated/google/apis/cloudbuild_v1alpha1.rb b/generated/google/apis/cloudbuild_v1alpha1.rb index 6c70b3f80..27066fd19 100644 --- a/generated/google/apis/cloudbuild_v1alpha1.rb +++ b/generated/google/apis/cloudbuild_v1alpha1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/cloud-build/docs/ module CloudbuildV1alpha1 VERSION = 'V1alpha1' - REVISION = '20190824' + REVISION = '20191109' # 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/cloudbuild_v1alpha1/classes.rb b/generated/google/apis/cloudbuild_v1alpha1/classes.rb index 6b8040fbe..992fcec41 100644 --- a/generated/google/apis/cloudbuild_v1alpha1/classes.rb +++ b/generated/google/apis/cloudbuild_v1alpha1/classes.rb @@ -752,12 +752,17 @@ module Google # @return [String] attr_accessor :project_id - # Name of the Cloud Source Repository. If omitted, the name "default" is - # assumed. + # Required. Name of the Cloud Source Repository. # Corresponds to the JSON property `repoName` # @return [String] attr_accessor :repo_name + # Substitutions to use in a triggered build. + # Should only be used with RunBuildTrigger + # Corresponds to the JSON property `substitutions` + # @return [Hash] + attr_accessor :substitutions + # Regex matching tags to build. # The syntax of the regular expressions accepted is the syntax accepted by # RE2 and described at https://github.com/google/re2/wiki/Syntax @@ -776,6 +781,7 @@ module Google @dir = args[:dir] if args.key?(:dir) @project_id = args[:project_id] if args.key?(:project_id) @repo_name = args[:repo_name] if args.key?(:repo_name) + @substitutions = args[:substitutions] if args.key?(:substitutions) @tag_name = args[:tag_name] if args.key?(:tag_name) end end diff --git a/generated/google/apis/cloudbuild_v1alpha1/representations.rb b/generated/google/apis/cloudbuild_v1alpha1/representations.rb index 880d09aec..06dd7b039 100644 --- a/generated/google/apis/cloudbuild_v1alpha1/representations.rb +++ b/generated/google/apis/cloudbuild_v1alpha1/representations.rb @@ -329,6 +329,7 @@ module Google property :dir, as: 'dir' property :project_id, as: 'projectId' property :repo_name, as: 'repoName' + hash :substitutions, as: 'substitutions' property :tag_name, as: 'tagName' end end diff --git a/generated/google/apis/dlp_v2.rb b/generated/google/apis/dlp_v2.rb index 046db8e4c..298df4f12 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 = '20191102' + REVISION = '20191111' # 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 07e23cb5e..1c3972aa6 100644 --- a/generated/google/apis/dlp_v2/classes.rb +++ b/generated/google/apis/dlp_v2/classes.rb @@ -1064,6 +1064,12 @@ module Google # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] attr_accessor :deidentify_template + # The geographic location to store the deidentification template. Reserved + # for future extensions. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + # The template id can contain uppercase and lowercase letters, # numbers, and hyphens; that is, it must match the regular # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 @@ -1079,6 +1085,7 @@ module Google # Update properties of this object def update!(**args) @deidentify_template = args[:deidentify_template] if args.key?(:deidentify_template) + @location_id = args[:location_id] if args.key?(:location_id) @template_id = args[:template_id] if args.key?(:template_id) end end @@ -1102,6 +1109,12 @@ module Google # @return [String] attr_accessor :job_id + # The geographic location to store and process the job. Reserved for + # future extensions. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + # Configuration for a risk analysis job. See # https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more. # Corresponds to the JSON property `riskJob` @@ -1116,6 +1129,7 @@ module Google def update!(**args) @inspect_job = args[:inspect_job] if args.key?(:inspect_job) @job_id = args[:job_id] if args.key?(:job_id) + @location_id = args[:location_id] if args.key?(:location_id) @risk_job = args[:risk_job] if args.key?(:risk_job) end end @@ -1132,6 +1146,12 @@ module Google # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] attr_accessor :inspect_template + # The geographic location to store the inspection template. Reserved for + # future extensions. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + # The template id can contain uppercase and lowercase letters, # numbers, and hyphens; that is, it must match the regular # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 @@ -1147,6 +1167,7 @@ module Google # Update properties of this object def update!(**args) @inspect_template = args[:inspect_template] if args.key?(:inspect_template) + @location_id = args[:location_id] if args.key?(:location_id) @template_id = args[:template_id] if args.key?(:template_id) end end @@ -1161,6 +1182,12 @@ module Google # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] attr_accessor :job_trigger + # The geographic location to store the job trigger. Reserved for + # future extensions. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + # The trigger id can contain uppercase and lowercase letters, # numbers, and hyphens; that is, it must match the regular # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 @@ -1176,6 +1203,7 @@ module Google # Update properties of this object def update!(**args) @job_trigger = args[:job_trigger] if args.key?(:job_trigger) + @location_id = args[:location_id] if args.key?(:location_id) @trigger_id = args[:trigger_id] if args.key?(:trigger_id) end end @@ -1189,6 +1217,12 @@ module Google # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoTypeConfig] attr_accessor :config + # The geographic location to store the stored infoType. Reserved for + # future extensions. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + # The storedInfoType ID can contain uppercase and lowercase letters, # numbers, and hyphens; that is, it must match the regular # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 @@ -1204,6 +1238,7 @@ module Google # Update properties of this object def update!(**args) @config = args[:config] if args.key?(:config) + @location_id = args[:location_id] if args.key?(:location_id) @stored_info_type_id = args[:stored_info_type_id] if args.key?(:stored_info_type_id) end end @@ -1353,14 +1388,14 @@ module Google # that the FFX mode natively supports. This happens before/after # encryption/decryption. # Each character listed must appear only once. - # Number of characters must be in the range [2, 62]. + # Number of characters must be in the range [2, 95]. # This must be encoded as ASCII. # The order of characters does not matter. # Corresponds to the JSON property `customAlphabet` # @return [String] attr_accessor :custom_alphabet - # The native way to select the alphabet. Must be in the range [2, 62]. + # The native way to select the alphabet. Must be in the range [2, 95]. # Corresponds to the JSON property `radix` # @return [Fixnum] attr_accessor :radix @@ -1697,9 +1732,9 @@ module Google # The geographic location to process de-identification. Reserved for future # extensions. - # Corresponds to the JSON property `location` + # Corresponds to the JSON property `locationId` # @return [String] - attr_accessor :location + attr_accessor :location_id def initialize(**args) update!(**args) @@ -1712,7 +1747,7 @@ module Google @inspect_config = args[:inspect_config] if args.key?(:inspect_config) @inspect_template_name = args[:inspect_template_name] if args.key?(:inspect_template_name) @item = args[:item] if args.key?(:item) - @location = args[:location] if args.key?(:location) + @location_id = args[:location_id] if args.key?(:location_id) end end @@ -2890,9 +2925,9 @@ module Google # The geographic location to process content inspection. Reserved for future # extensions. - # Corresponds to the JSON property `location` + # Corresponds to the JSON property `locationId` # @return [String] - attr_accessor :location + attr_accessor :location_id def initialize(**args) update!(**args) @@ -2903,7 +2938,7 @@ module Google @inspect_config = args[:inspect_config] if args.key?(:inspect_config) @inspect_template_name = args[:inspect_template_name] if args.key?(:inspect_template_name) @item = args[:item] if args.key?(:item) - @location = args[:location] if args.key?(:location) + @location_id = args[:location_id] if args.key?(:location_id) end end @@ -4771,9 +4806,9 @@ module Google # The geographic location to process the request. Reserved for future # extensions. - # Corresponds to the JSON property `location` + # Corresponds to the JSON property `locationId` # @return [String] - attr_accessor :location + attr_accessor :location_id def initialize(**args) update!(**args) @@ -4785,7 +4820,7 @@ module Google @image_redaction_configs = args[:image_redaction_configs] if args.key?(:image_redaction_configs) @include_findings = args[:include_findings] if args.key?(:include_findings) @inspect_config = args[:inspect_config] if args.key?(:inspect_config) - @location = args[:location] if args.key?(:location) + @location_id = args[:location_id] if args.key?(:location_id) end end @@ -4878,9 +4913,9 @@ module Google # The geographic location to process content reidentification. Reserved for # future extensions. - # Corresponds to the JSON property `location` + # Corresponds to the JSON property `locationId` # @return [String] - attr_accessor :location + attr_accessor :location_id # The configuration that controls how the data will change. # Corresponds to the JSON property `reidentifyConfig` @@ -4906,7 +4941,7 @@ module Google @inspect_config = args[:inspect_config] if args.key?(:inspect_config) @inspect_template_name = args[:inspect_template_name] if args.key?(:inspect_template_name) @item = args[:item] if args.key?(:item) - @location = args[:location] if args.key?(:location) + @location_id = args[:location_id] if args.key?(:location_id) @reidentify_config = args[:reidentify_config] if args.key?(:reidentify_config) @reidentify_template_name = args[:reidentify_template_name] if args.key?(:reidentify_template_name) end diff --git a/generated/google/apis/dlp_v2/representations.rb b/generated/google/apis/dlp_v2/representations.rb index 082038582..20f146318 100644 --- a/generated/google/apis/dlp_v2/representations.rb +++ b/generated/google/apis/dlp_v2/representations.rb @@ -1365,6 +1365,7 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :deidentify_template, as: 'deidentifyTemplate', class: Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate, decorator: Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation + property :location_id, as: 'locationId' property :template_id, as: 'templateId' end end @@ -1375,6 +1376,7 @@ module Google property :inspect_job, as: 'inspectJob', class: Google::Apis::DlpV2::GooglePrivacyDlpV2InspectJobConfig, decorator: Google::Apis::DlpV2::GooglePrivacyDlpV2InspectJobConfig::Representation property :job_id, as: 'jobId' + property :location_id, as: 'locationId' property :risk_job, as: 'riskJob', class: Google::Apis::DlpV2::GooglePrivacyDlpV2RiskAnalysisJobConfig, decorator: Google::Apis::DlpV2::GooglePrivacyDlpV2RiskAnalysisJobConfig::Representation end @@ -1385,6 +1387,7 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :inspect_template, as: 'inspectTemplate', class: Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate, decorator: Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation + property :location_id, as: 'locationId' property :template_id, as: 'templateId' end end @@ -1394,6 +1397,7 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :job_trigger, as: 'jobTrigger', class: Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger, decorator: Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation + property :location_id, as: 'locationId' property :trigger_id, as: 'triggerId' end end @@ -1403,6 +1407,7 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :config, as: 'config', class: Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoTypeConfig, decorator: Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoTypeConfig::Representation + property :location_id, as: 'locationId' property :stored_info_type_id, as: 'storedInfoTypeId' end end @@ -1538,7 +1543,7 @@ module Google property :inspect_template_name, as: 'inspectTemplateName' property :item, as: 'item', class: Google::Apis::DlpV2::GooglePrivacyDlpV2ContentItem, decorator: Google::Apis::DlpV2::GooglePrivacyDlpV2ContentItem::Representation - property :location, as: 'location' + property :location_id, as: 'locationId' end end @@ -1872,7 +1877,7 @@ module Google property :inspect_template_name, as: 'inspectTemplateName' property :item, as: 'item', class: Google::Apis::DlpV2::GooglePrivacyDlpV2ContentItem, decorator: Google::Apis::DlpV2::GooglePrivacyDlpV2ContentItem::Representation - property :location, as: 'location' + property :location_id, as: 'locationId' end end @@ -2449,7 +2454,7 @@ module Google property :include_findings, as: 'includeFindings' property :inspect_config, as: 'inspectConfig', class: Google::Apis::DlpV2::GooglePrivacyDlpV2InspectConfig, decorator: Google::Apis::DlpV2::GooglePrivacyDlpV2InspectConfig::Representation - property :location, as: 'location' + property :location_id, as: 'locationId' end end @@ -2479,7 +2484,7 @@ module Google property :inspect_template_name, as: 'inspectTemplateName' property :item, as: 'item', class: Google::Apis::DlpV2::GooglePrivacyDlpV2ContentItem, decorator: Google::Apis::DlpV2::GooglePrivacyDlpV2ContentItem::Representation - property :location, as: 'location' + property :location_id, as: 'locationId' property :reidentify_config, as: 'reidentifyConfig', class: Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyConfig, decorator: Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyConfig::Representation property :reidentify_template_name, as: 'reidentifyTemplateName' diff --git a/generated/google/apis/dlp_v2/service.rb b/generated/google/apis/dlp_v2/service.rb index d6410c05d..788f5d22a 100644 --- a/generated/google/apis/dlp_v2/service.rb +++ b/generated/google/apis/dlp_v2/service.rb @@ -59,7 +59,7 @@ module Google # Optional BCP-47 language code for localized infoType friendly # names. If omitted, or if localized strings are not available, # en-US strings will be returned. - # @param [String] location + # @param [String] location_id # The geographic location to list info types. Reserved for future # extensions. # @param [String] fields @@ -79,13 +79,13 @@ module Google # @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_info_types(filter: nil, language_code: nil, location: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_info_types(filter: nil, language_code: nil, location_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/infoTypes', options) command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInfoTypesResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInfoTypesResponse command.query['filter'] = filter unless filter.nil? command.query['languageCode'] = language_code unless language_code.nil? - command.query['location'] = location unless location.nil? + command.query['locationId'] = location_id unless location_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -94,7 +94,7 @@ module Google # Returns a list of the sensitive information types that the DLP API # supports. See https://cloud.google.com/dlp/docs/infotypes-reference to # learn more. - # @param [String] location + # @param [String] location_id # The geographic location to list info types. Reserved for future # extensions. # @param [String] filter @@ -121,11 +121,11 @@ module Google # @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_location_info_types(location, filter: nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/locations/{location}/infoTypes', options) + def list_location_info_types(location_id, filter: nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/locations/{locationId}/infoTypes', options) command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInfoTypesResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInfoTypesResponse - command.params['location'] = location unless location.nil? + command.params['locationId'] = location_id unless location_id.nil? command.query['filter'] = filter unless filter.nil? command.query['languageCode'] = language_code unless language_code.nil? command.query['fields'] = fields unless fields.nil? @@ -246,6 +246,9 @@ module Google # @param [String] parent # Required. The parent resource name, for example projects/my-project-id or # organizations/my-org-id. + # @param [String] location_id + # The geographic location where deidentifications templates will be retrieved + # from. Use `-` for all locations. Reserved for future extensions. # @param [String] order_by # Optional comma separated list of fields to order by, # followed by `asc` or `desc` postfix. This list is case-insensitive, @@ -280,11 +283,12 @@ module Google # @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_organization_deidentify_templates(parent, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_organization_deidentify_templates(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/deidentifyTemplates', options) command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse command.params['parent'] = parent unless parent.nil? + command.query['locationId'] = location_id unless location_id.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? @@ -440,6 +444,9 @@ module Google # @param [String] parent # Required. The parent resource name, for example projects/my-project-id or # organizations/my-org-id. + # @param [String] location_id + # The geographic location where inspection templates will be retrieved from. + # Use `-` for all locations. Reserved for future extensions. # @param [String] order_by # Optional comma separated list of fields to order by, # followed by `asc` or `desc` postfix. This list is case-insensitive, @@ -474,11 +481,12 @@ module Google # @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_organization_inspect_templates(parent, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_organization_inspect_templates(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/inspectTemplates', options) command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse command.params['parent'] = parent unless parent.nil? + command.query['locationId'] = location_id unless location_id.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? @@ -523,6 +531,617 @@ module Google execute_or_queue_command(command, &block) end + # Creates a DeidentifyTemplate for re-using frequently used configuration + # for de-identifying content, images, and storage. + # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + # more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id or + # organizations/my-org-id. + # @param [String] location_id + # The geographic location to store the deidentification template. Reserved + # for future extensions. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDeidentifyTemplateRequest] google_privacy_dlp_v2_create_deidentify_template_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::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] + # + # @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_organization_location_deidentify_template(parent, location_id, google_privacy_dlp_v2_create_deidentify_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/locations/{locationId}/deidentifyTemplates', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDeidentifyTemplateRequest::Representation + command.request_object = google_privacy_dlp_v2_create_deidentify_template_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_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 DeidentifyTemplate. + # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + # more. + # @param [String] name + # Required. Resource name of the organization and deidentify template to be + # deleted, + # for example `organizations/433245324/deidentifyTemplates/432452342` or + # projects/project-id/deidentifyTemplates/432452342. + # @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::DlpV2::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::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_organization_location_deidentify_template(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DlpV2::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 DeidentifyTemplate. + # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + # more. + # @param [String] name + # Required. Resource name of the organization and deidentify template to be read, + # for + # example `organizations/433245324/deidentifyTemplates/432452342` or + # projects/project-id/deidentifyTemplates/432452342. + # @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::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] + # + # @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_organization_location_deidentify_template(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate + 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 DeidentifyTemplates. + # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + # more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id or + # organizations/my-org-id. + # @param [String] location_id + # The geographic location where deidentifications templates will be retrieved + # from. Use `-` for all locations. Reserved for future extensions. + # @param [String] order_by + # Optional comma separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case-insensitive, + # default sorting order is ascending, redundant space characters are + # insignificant. + # Example: `name asc,update_time, create_time desc` + # Supported fields are: + # - `create_time`: corresponds to time the template was created. + # - `update_time`: corresponds to time the template was last updated. + # - `name`: corresponds to template's name. + # - `display_name`: corresponds to template's display name. + # @param [Fixnum] page_size + # Optional size of the page, can be limited by server. If zero server returns + # a page of max size 100. + # @param [String] page_token + # Optional page token to continue retrieval. Comes from previous call + # to `ListDeidentifyTemplates`. + # @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::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse] + # + # @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_organization_location_deidentify_templates(parent, location_id, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/locations/{locationId}/deidentifyTemplates', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_id.nil? + command.query['orderBy'] = order_by unless order_by.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 the DeidentifyTemplate. + # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + # more. + # @param [String] name + # Required. Resource name of organization and deidentify template to be updated, + # for + # example `organizations/433245324/deidentifyTemplates/432452342` or + # projects/project-id/deidentifyTemplates/432452342. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest] google_privacy_dlp_v2_update_deidentify_template_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::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] + # + # @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_organization_location_deidentify_template(name, google_privacy_dlp_v2_update_deidentify_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2/{+name}', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest::Representation + command.request_object = google_privacy_dlp_v2_update_deidentify_template_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate + 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 + + # Creates an InspectTemplate for re-using frequently used configuration + # for inspecting content, images, and storage. + # See https://cloud.google.com/dlp/docs/creating-templates to learn more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id or + # organizations/my-org-id. + # @param [String] location_id + # The geographic location to store the inspection template. Reserved for + # future extensions. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateInspectTemplateRequest] google_privacy_dlp_v2_create_inspect_template_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::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] + # + # @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_organization_location_inspect_template(parent, location_id, google_privacy_dlp_v2_create_inspect_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/locations/{locationId}/inspectTemplates', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateInspectTemplateRequest::Representation + command.request_object = google_privacy_dlp_v2_create_inspect_template_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_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 an InspectTemplate. + # See https://cloud.google.com/dlp/docs/creating-templates to learn more. + # @param [String] name + # Required. Resource name of the organization and inspectTemplate to be deleted, + # for + # example `organizations/433245324/inspectTemplates/432452342` or + # projects/project-id/inspectTemplates/432452342. + # @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::DlpV2::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::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_organization_location_inspect_template(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DlpV2::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 an InspectTemplate. + # See https://cloud.google.com/dlp/docs/creating-templates to learn more. + # @param [String] name + # Required. Resource name of the organization and inspectTemplate to be read, + # for + # example `organizations/433245324/inspectTemplates/432452342` or + # projects/project-id/inspectTemplates/432452342. + # @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::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] + # + # @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_organization_location_inspect_template(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate + 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 InspectTemplates. + # See https://cloud.google.com/dlp/docs/creating-templates to learn more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id or + # organizations/my-org-id. + # @param [String] location_id + # The geographic location where inspection templates will be retrieved from. + # Use `-` for all locations. Reserved for future extensions. + # @param [String] order_by + # Optional comma separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case-insensitive, + # default sorting order is ascending, redundant space characters are + # insignificant. + # Example: `name asc,update_time, create_time desc` + # Supported fields are: + # - `create_time`: corresponds to time the template was created. + # - `update_time`: corresponds to time the template was last updated. + # - `name`: corresponds to template's name. + # - `display_name`: corresponds to template's display name. + # @param [Fixnum] page_size + # Optional size of the page, can be limited by server. If zero server returns + # a page of max size 100. + # @param [String] page_token + # Optional page token to continue retrieval. Comes from previous call + # to `ListInspectTemplates`. + # @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::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse] + # + # @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_organization_location_inspect_templates(parent, location_id, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/locations/{locationId}/inspectTemplates', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_id.nil? + command.query['orderBy'] = order_by unless order_by.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 the InspectTemplate. + # See https://cloud.google.com/dlp/docs/creating-templates to learn more. + # @param [String] name + # Required. Resource name of organization and inspectTemplate to be updated, for + # example `organizations/433245324/inspectTemplates/432452342` or + # projects/project-id/inspectTemplates/432452342. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateInspectTemplateRequest] google_privacy_dlp_v2_update_inspect_template_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::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] + # + # @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_organization_location_inspect_template(name, google_privacy_dlp_v2_update_inspect_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2/{+name}', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateInspectTemplateRequest::Representation + command.request_object = google_privacy_dlp_v2_update_inspect_template_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate + 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 + + # Creates a pre-built stored infoType to be used for inspection. + # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + # learn more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id or + # organizations/my-org-id. + # @param [String] location_id + # The geographic location to store the stored infoType. Reserved for + # future extensions. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateStoredInfoTypeRequest] google_privacy_dlp_v2_create_stored_info_type_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::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] + # + # @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_organization_location_stored_info_type(parent, location_id, google_privacy_dlp_v2_create_stored_info_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/locations/{locationId}/storedInfoTypes', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateStoredInfoTypeRequest::Representation + command.request_object = google_privacy_dlp_v2_create_stored_info_type_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_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 stored infoType. + # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + # learn more. + # @param [String] name + # Required. Resource name of the organization and storedInfoType to be deleted, + # for + # example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # @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::DlpV2::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::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_organization_location_stored_info_type(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DlpV2::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 stored infoType. + # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + # learn more. + # @param [String] name + # Required. Resource name of the organization and storedInfoType to be read, for + # example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # @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::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] + # + # @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_organization_location_stored_info_type(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType + 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 stored infoTypes. + # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + # learn more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id or + # organizations/my-org-id. + # @param [String] location_id + # The geographic location where stored infoTypes will be retrieved from. + # Use `-` for all locations. Reserved for future extensions. + # @param [String] order_by + # Optional comma separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case-insensitive, + # default sorting order is ascending, redundant space characters are + # insignificant. + # Example: `name asc, display_name, create_time desc` + # Supported fields are: + # - `create_time`: corresponds to time the most recent version of the + # resource was created. + # - `state`: corresponds to the state of the resource. + # - `name`: corresponds to resource name. + # - `display_name`: corresponds to info type's display name. + # @param [Fixnum] page_size + # Optional size of the page, can be limited by server. If zero server returns + # a page of max size 100. + # @param [String] page_token + # Optional page token to continue retrieval. Comes from previous call + # to `ListStoredInfoTypes`. + # @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::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse] + # + # @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_organization_location_stored_info_types(parent, location_id, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/locations/{locationId}/storedInfoTypes', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_id.nil? + command.query['orderBy'] = order_by unless order_by.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 the stored infoType by creating a new version. The existing version + # will continue to be used until the new version is ready. + # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + # learn more. + # @param [String] name + # Required. Resource name of organization and storedInfoType to be updated, for + # example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest] google_privacy_dlp_v2_update_stored_info_type_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::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] + # + # @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_organization_location_stored_info_type(name, google_privacy_dlp_v2_update_stored_info_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2/{+name}', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest::Representation + command.request_object = google_privacy_dlp_v2_update_stored_info_type_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType + 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 + # Creates a pre-built stored infoType to be used for inspection. # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to # learn more. @@ -634,6 +1253,9 @@ module Google # @param [String] parent # Required. The parent resource name, for example projects/my-project-id or # organizations/my-org-id. + # @param [String] location_id + # The geographic location where stored infoTypes will be retrieved from. + # Use `-` for all locations. Reserved for future extensions. # @param [String] order_by # Optional comma separated list of fields to order by, # followed by `asc` or `desc` postfix. This list is case-insensitive, @@ -669,11 +1291,12 @@ module Google # @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_organization_stored_info_types(parent, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_organization_stored_info_types(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/storedInfoTypes', options) command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse command.params['parent'] = parent unless parent.nil? + command.query['locationId'] = location_id unless location_id.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? @@ -948,6 +1571,9 @@ module Google # @param [String] parent # Required. The parent resource name, for example projects/my-project-id or # organizations/my-org-id. + # @param [String] location_id + # The geographic location where deidentifications templates will be retrieved + # from. Use `-` for all locations. Reserved for future extensions. # @param [String] order_by # Optional comma separated list of fields to order by, # followed by `asc` or `desc` postfix. This list is case-insensitive, @@ -982,11 +1608,12 @@ module Google # @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_deidentify_templates(parent, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_deidentify_templates(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/deidentifyTemplates', options) command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse command.params['parent'] = parent unless parent.nil? + command.query['locationId'] = location_id unless location_id.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? @@ -1203,6 +1830,9 @@ module Google # * inspected_storage = cloud_storage AND (state = done OR state = canceled) # * end_time > \"2017-12-12T00:00:00+00:00\" # The length of this field should be no more than 500 characters. + # @param [String] location_id + # The geographic location where jobs will be retrieved from. + # Use `-` for all locations. Reserved for future extensions. # @param [String] order_by # Optional comma separated list of fields to order by, # followed by `asc` or `desc` postfix. This list is case-insensitive, @@ -1237,12 +1867,13 @@ module Google # @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_dlp_jobs(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_dlp_jobs(parent, filter: nil, location_id: nil, order_by: nil, page_size: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/dlpJobs', options) command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? + command.query['locationId'] = location_id unless location_id.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? @@ -1400,6 +2031,9 @@ module Google # @param [String] parent # Required. The parent resource name, for example projects/my-project-id or # organizations/my-org-id. + # @param [String] location_id + # The geographic location where inspection templates will be retrieved from. + # Use `-` for all locations. Reserved for future extensions. # @param [String] order_by # Optional comma separated list of fields to order by, # followed by `asc` or `desc` postfix. This list is case-insensitive, @@ -1434,11 +2068,12 @@ module Google # @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_inspect_templates(parent, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_inspect_templates(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/inspectTemplates', options) command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse command.params['parent'] = parent unless parent.nil? + command.query['locationId'] = location_id unless location_id.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? @@ -1641,6 +2276,9 @@ module Google # * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) # * last_run_time > \"2017-12-12T00:00:00+00:00\" # The length of this field should be no more than 500 characters. + # @param [String] location_id + # The geographic location where job triggers will be retrieved from. + # Use `-` for all locations. Reserved for future extensions. # @param [String] order_by # Optional comma separated list of triggeredJob fields to order by, # followed by `asc` or `desc` postfix. This list is case-insensitive, @@ -1677,12 +2315,13 @@ module Google # @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_job_triggers(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_job_triggers(parent, filter: nil, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/jobTriggers', options) command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? + command.query['locationId'] = location_id unless location_id.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? @@ -1735,7 +2374,7 @@ module Google # be all types, but may change over time as detectors are updated. # @param [String] parent # The parent resource name, for example projects/my-project-id. - # @param [String] location + # @param [String] location_id # The geographic location to process de-identification. Reserved for future # extensions. # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentRequest] google_privacy_dlp_v2_deidentify_content_request_object @@ -1756,14 +2395,14 @@ module Google # @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 deidentify_project_location_content(parent, location, google_privacy_dlp_v2_deidentify_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v2/{+parent}/locations/{location}/content:deidentify', options) + def deidentify_project_location_content(parent, location_id, google_privacy_dlp_v2_deidentify_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/locations/{locationId}/content:deidentify', options) command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentRequest::Representation command.request_object = google_privacy_dlp_v2_deidentify_content_request_object command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentResponse command.params['parent'] = parent unless parent.nil? - command.params['location'] = location unless location.nil? + command.params['locationId'] = location_id unless location_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -1778,7 +2417,7 @@ module Google # and https://cloud.google.com/dlp/docs/inspecting-text, # @param [String] parent # The parent resource name, for example projects/my-project-id. - # @param [String] location + # @param [String] location_id # The geographic location to process content inspection. Reserved for future # extensions. # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentRequest] google_privacy_dlp_v2_inspect_content_request_object @@ -1799,14 +2438,14 @@ module Google # @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 inspect_project_location_content(parent, location, google_privacy_dlp_v2_inspect_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v2/{+parent}/locations/{location}/content:inspect', options) + def inspect_project_location_content(parent, location_id, google_privacy_dlp_v2_inspect_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/locations/{locationId}/content:inspect', options) command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentRequest::Representation command.request_object = google_privacy_dlp_v2_inspect_content_request_object command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentResponse command.params['parent'] = parent unless parent.nil? - command.params['location'] = location unless location.nil? + command.params['locationId'] = location_id unless location_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -1819,7 +2458,7 @@ module Google # to learn more. # @param [String] parent # Required. The parent resource name. - # @param [String] location + # @param [String] location_id # The geographic location to process content reidentification. Reserved for # future extensions. # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentRequest] google_privacy_dlp_v2_reidentify_content_request_object @@ -1840,14 +2479,447 @@ module Google # @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 reidentify_project_location_content(parent, location, google_privacy_dlp_v2_reidentify_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v2/{+parent}/locations/{location}/content:reidentify', options) + def reidentify_project_location_content(parent, location_id, google_privacy_dlp_v2_reidentify_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/locations/{locationId}/content:reidentify', options) command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentRequest::Representation command.request_object = google_privacy_dlp_v2_reidentify_content_request_object command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentResponse command.params['parent'] = parent unless parent.nil? - command.params['location'] = location unless location.nil? + command.params['locationId'] = location_id unless location_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 + + # Creates a DeidentifyTemplate for re-using frequently used configuration + # for de-identifying content, images, and storage. + # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + # more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id or + # organizations/my-org-id. + # @param [String] location_id + # The geographic location to store the deidentification template. Reserved + # for future extensions. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDeidentifyTemplateRequest] google_privacy_dlp_v2_create_deidentify_template_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::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] + # + # @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_deidentify_template(parent, location_id, google_privacy_dlp_v2_create_deidentify_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/locations/{locationId}/deidentifyTemplates', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDeidentifyTemplateRequest::Representation + command.request_object = google_privacy_dlp_v2_create_deidentify_template_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_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 DeidentifyTemplate. + # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + # more. + # @param [String] name + # Required. Resource name of the organization and deidentify template to be + # deleted, + # for example `organizations/433245324/deidentifyTemplates/432452342` or + # projects/project-id/deidentifyTemplates/432452342. + # @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::DlpV2::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::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_deidentify_template(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DlpV2::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 DeidentifyTemplate. + # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + # more. + # @param [String] name + # Required. Resource name of the organization and deidentify template to be read, + # for + # example `organizations/433245324/deidentifyTemplates/432452342` or + # projects/project-id/deidentifyTemplates/432452342. + # @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::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] + # + # @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_deidentify_template(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate + 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 DeidentifyTemplates. + # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + # more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id or + # organizations/my-org-id. + # @param [String] location_id + # The geographic location where deidentifications templates will be retrieved + # from. Use `-` for all locations. Reserved for future extensions. + # @param [String] order_by + # Optional comma separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case-insensitive, + # default sorting order is ascending, redundant space characters are + # insignificant. + # Example: `name asc,update_time, create_time desc` + # Supported fields are: + # - `create_time`: corresponds to time the template was created. + # - `update_time`: corresponds to time the template was last updated. + # - `name`: corresponds to template's name. + # - `display_name`: corresponds to template's display name. + # @param [Fixnum] page_size + # Optional size of the page, can be limited by server. If zero server returns + # a page of max size 100. + # @param [String] page_token + # Optional page token to continue retrieval. Comes from previous call + # to `ListDeidentifyTemplates`. + # @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::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse] + # + # @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_deidentify_templates(parent, location_id, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/locations/{locationId}/deidentifyTemplates', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_id.nil? + command.query['orderBy'] = order_by unless order_by.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 the DeidentifyTemplate. + # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + # more. + # @param [String] name + # Required. Resource name of organization and deidentify template to be updated, + # for + # example `organizations/433245324/deidentifyTemplates/432452342` or + # projects/project-id/deidentifyTemplates/432452342. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest] google_privacy_dlp_v2_update_deidentify_template_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::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] + # + # @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_project_location_deidentify_template(name, google_privacy_dlp_v2_update_deidentify_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2/{+name}', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest::Representation + command.request_object = google_privacy_dlp_v2_update_deidentify_template_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate + 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 + + # Starts asynchronous cancellation on a long-running DlpJob. The server + # makes a best effort to cancel the DlpJob, but success is not + # guaranteed. + # See https://cloud.google.com/dlp/docs/inspecting-storage and + # https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + # @param [String] name + # Required. The name of the DlpJob resource to be cancelled. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CancelDlpJobRequest] google_privacy_dlp_v2_cancel_dlp_job_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::DlpV2::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::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 cancel_project_location_dlp_job(name, google_privacy_dlp_v2_cancel_dlp_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+name}:cancel', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CancelDlpJobRequest::Representation + command.request_object = google_privacy_dlp_v2_cancel_dlp_job_request_object + command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DlpV2::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 + + # Creates a new job to inspect storage or calculate risk metrics. + # See https://cloud.google.com/dlp/docs/inspecting-storage and + # https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + # When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id. + # @param [String] location_id + # The geographic location to store and process the job. Reserved for + # future extensions. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDlpJobRequest] google_privacy_dlp_v2_create_dlp_job_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::DlpV2::GooglePrivacyDlpV2DlpJob] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob] + # + # @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_dlp_job(parent, location_id, google_privacy_dlp_v2_create_dlp_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/locations/{locationId}/dlpJobs', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDlpJobRequest::Representation + command.request_object = google_privacy_dlp_v2_create_dlp_job_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_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 long-running DlpJob. This method indicates that the client is + # no longer interested in the DlpJob result. The job will be cancelled if + # possible. + # See https://cloud.google.com/dlp/docs/inspecting-storage and + # https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + # @param [String] name + # Required. The name of the DlpJob resource to be deleted. + # @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::DlpV2::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::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_dlp_job(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DlpV2::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 the latest state of a long-running DlpJob. + # See https://cloud.google.com/dlp/docs/inspecting-storage and + # https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + # @param [String] name + # Required. The name of the DlpJob resource. + # @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::DlpV2::GooglePrivacyDlpV2DlpJob] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob] + # + # @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_dlp_job(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob + 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 DlpJobs that match the specified filter in the request. + # See https://cloud.google.com/dlp/docs/inspecting-storage and + # https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id. + # @param [String] location_id + # The geographic location where jobs will be retrieved from. + # Use `-` for all locations. Reserved for future extensions. + # @param [String] filter + # Optional. Allows filtering. + # Supported syntax: + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of ` `. + # * Supported fields/values for inspect jobs: + # - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED + # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + # - `trigger_name` - The resource name of the trigger that created job. + # - 'end_time` - Corresponds to time the job finished. + # - 'start_time` - Corresponds to time the job finished. + # * Supported fields for risk analysis jobs: + # - `state` - RUNNING|CANCELED|FINISHED|FAILED + # - 'end_time` - Corresponds to time the job finished. + # - 'start_time` - Corresponds to time the job finished. + # * The operator must be `=` or `!=`. + # Examples: + # * inspected_storage = cloud_storage AND state = done + # * inspected_storage = cloud_storage OR inspected_storage = bigquery + # * inspected_storage = cloud_storage AND (state = done OR state = canceled) + # * end_time > \"2017-12-12T00:00:00+00:00\" + # The length of this field should be no more than 500 characters. + # @param [String] order_by + # Optional comma separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case-insensitive, + # default sorting order is ascending, redundant space characters are + # insignificant. + # Example: `name asc, end_time asc, create_time desc` + # Supported fields are: + # - `create_time`: corresponds to time the job was created. + # - `end_time`: corresponds to time the job ended. + # - `name`: corresponds to job's name. + # - `state`: corresponds to `state` + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] type + # The type of job. Defaults to `DlpJobType.INSPECT` + # @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::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse] + # + # @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_dlp_jobs(parent, location_id, filter: nil, order_by: nil, page_size: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/locations/{locationId}/dlpJobs', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_id.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['type'] = type unless type.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -1862,7 +2934,7 @@ module Google # be all types, but may change over time as detectors are updated. # @param [String] parent # The parent resource name, for example projects/my-project-id. - # @param [String] location + # @param [String] location_id # The geographic location to process the request. Reserved for future # extensions. # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageRequest] google_privacy_dlp_v2_redact_image_request_object @@ -1883,14 +2955,670 @@ module Google # @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 redact_project_location_image(parent, location, google_privacy_dlp_v2_redact_image_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v2/{+parent}/locations/{location}/image:redact', options) + def redact_project_location_image(parent, location_id, google_privacy_dlp_v2_redact_image_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/locations/{locationId}/image:redact', options) command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageRequest::Representation command.request_object = google_privacy_dlp_v2_redact_image_request_object command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageResponse command.params['parent'] = parent unless parent.nil? - command.params['location'] = location unless location.nil? + command.params['locationId'] = location_id unless location_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 + + # Creates an InspectTemplate for re-using frequently used configuration + # for inspecting content, images, and storage. + # See https://cloud.google.com/dlp/docs/creating-templates to learn more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id or + # organizations/my-org-id. + # @param [String] location_id + # The geographic location to store the inspection template. Reserved for + # future extensions. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateInspectTemplateRequest] google_privacy_dlp_v2_create_inspect_template_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::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] + # + # @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_inspect_template(parent, location_id, google_privacy_dlp_v2_create_inspect_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/locations/{locationId}/inspectTemplates', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateInspectTemplateRequest::Representation + command.request_object = google_privacy_dlp_v2_create_inspect_template_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_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 an InspectTemplate. + # See https://cloud.google.com/dlp/docs/creating-templates to learn more. + # @param [String] name + # Required. Resource name of the organization and inspectTemplate to be deleted, + # for + # example `organizations/433245324/inspectTemplates/432452342` or + # projects/project-id/inspectTemplates/432452342. + # @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::DlpV2::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::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_inspect_template(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DlpV2::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 an InspectTemplate. + # See https://cloud.google.com/dlp/docs/creating-templates to learn more. + # @param [String] name + # Required. Resource name of the organization and inspectTemplate to be read, + # for + # example `organizations/433245324/inspectTemplates/432452342` or + # projects/project-id/inspectTemplates/432452342. + # @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::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] + # + # @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_inspect_template(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate + 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 InspectTemplates. + # See https://cloud.google.com/dlp/docs/creating-templates to learn more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id or + # organizations/my-org-id. + # @param [String] location_id + # The geographic location where inspection templates will be retrieved from. + # Use `-` for all locations. Reserved for future extensions. + # @param [String] order_by + # Optional comma separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case-insensitive, + # default sorting order is ascending, redundant space characters are + # insignificant. + # Example: `name asc,update_time, create_time desc` + # Supported fields are: + # - `create_time`: corresponds to time the template was created. + # - `update_time`: corresponds to time the template was last updated. + # - `name`: corresponds to template's name. + # - `display_name`: corresponds to template's display name. + # @param [Fixnum] page_size + # Optional size of the page, can be limited by server. If zero server returns + # a page of max size 100. + # @param [String] page_token + # Optional page token to continue retrieval. Comes from previous call + # to `ListInspectTemplates`. + # @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::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse] + # + # @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_inspect_templates(parent, location_id, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/locations/{locationId}/inspectTemplates', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_id.nil? + command.query['orderBy'] = order_by unless order_by.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 the InspectTemplate. + # See https://cloud.google.com/dlp/docs/creating-templates to learn more. + # @param [String] name + # Required. Resource name of organization and inspectTemplate to be updated, for + # example `organizations/433245324/inspectTemplates/432452342` or + # projects/project-id/inspectTemplates/432452342. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateInspectTemplateRequest] google_privacy_dlp_v2_update_inspect_template_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::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] + # + # @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_project_location_inspect_template(name, google_privacy_dlp_v2_update_inspect_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2/{+name}', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateInspectTemplateRequest::Representation + command.request_object = google_privacy_dlp_v2_update_inspect_template_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate + 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 + + # Activate a job trigger. Causes the immediate execute of a trigger + # instead of waiting on the trigger event to occur. + # @param [String] name + # Required. Resource name of the trigger to activate, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2ActivateJobTriggerRequest] google_privacy_dlp_v2_activate_job_trigger_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::DlpV2::GooglePrivacyDlpV2DlpJob] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob] + # + # @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 activate_project_location_job_trigger(name, google_privacy_dlp_v2_activate_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+name}:activate', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ActivateJobTriggerRequest::Representation + command.request_object = google_privacy_dlp_v2_activate_job_trigger_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob + 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 + + # Creates a job trigger to run DLP actions such as scanning storage for + # sensitive information on a set schedule. + # See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id. + # @param [String] location_id + # The geographic location to store the job trigger. Reserved for + # future extensions. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateJobTriggerRequest] google_privacy_dlp_v2_create_job_trigger_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::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] + # + # @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_job_trigger(parent, location_id, google_privacy_dlp_v2_create_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/locations/{locationId}/jobTriggers', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateJobTriggerRequest::Representation + command.request_object = google_privacy_dlp_v2_create_job_trigger_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_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 job trigger. + # See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + # @param [String] name + # Required. Resource name of the project and the triggeredJob, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # @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::DlpV2::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::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_job_trigger(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DlpV2::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 job trigger. + # See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + # @param [String] name + # Required. Resource name of the project and the triggeredJob, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # @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::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] + # + # @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_job_trigger(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger + 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 job triggers. + # See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + # @param [String] parent + # Required. The parent resource name, for example `projects/my-project-id`. + # @param [String] location_id + # The geographic location where job triggers will be retrieved from. + # Use `-` for all locations. Reserved for future extensions. + # @param [String] filter + # Optional. Allows filtering. + # Supported syntax: + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of ` `. + # * Supported fields/values for inspect jobs: + # - `status` - HEALTHY|PAUSED|CANCELLED + # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + # - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by + # quotation marks. Nanoseconds are ignored. + # - 'error_count' - Number of errors that have occurred while running. + # * The operator must be `=` or `!=` for status and inspected_storage. + # Examples: + # * inspected_storage = cloud_storage AND status = HEALTHY + # * inspected_storage = cloud_storage OR inspected_storage = bigquery + # * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) + # * last_run_time > \"2017-12-12T00:00:00+00:00\" + # The length of this field should be no more than 500 characters. + # @param [String] order_by + # Optional comma separated list of triggeredJob fields to order by, + # followed by `asc` or `desc` postfix. This list is case-insensitive, + # default sorting order is ascending, redundant space characters are + # insignificant. + # Example: `name asc,update_time, create_time desc` + # Supported fields are: + # - `create_time`: corresponds to time the JobTrigger was created. + # - `update_time`: corresponds to time the JobTrigger was last updated. + # - `last_run_time`: corresponds to the last time the JobTrigger ran. + # - `name`: corresponds to JobTrigger's name. + # - `display_name`: corresponds to JobTrigger's display name. + # - `status`: corresponds to JobTrigger's status. + # @param [Fixnum] page_size + # Optional size of the page, can be limited by a server. + # @param [String] page_token + # Optional page token to continue retrieval. Comes from previous call + # to ListJobTriggers. `order_by` field must not + # change for subsequent calls. + # @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::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse] + # + # @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_job_triggers(parent, location_id, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/locations/{locationId}/jobTriggers', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_id.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.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 job trigger. + # See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + # @param [String] name + # Required. Resource name of the project and the triggeredJob, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateJobTriggerRequest] google_privacy_dlp_v2_update_job_trigger_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::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] + # + # @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_project_location_job_trigger(name, google_privacy_dlp_v2_update_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2/{+name}', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateJobTriggerRequest::Representation + command.request_object = google_privacy_dlp_v2_update_job_trigger_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger + 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 + + # Creates a pre-built stored infoType to be used for inspection. + # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + # learn more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id or + # organizations/my-org-id. + # @param [String] location_id + # The geographic location to store the stored infoType. Reserved for + # future extensions. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateStoredInfoTypeRequest] google_privacy_dlp_v2_create_stored_info_type_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::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] + # + # @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_stored_info_type(parent, location_id, google_privacy_dlp_v2_create_stored_info_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/locations/{locationId}/storedInfoTypes', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateStoredInfoTypeRequest::Representation + command.request_object = google_privacy_dlp_v2_create_stored_info_type_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_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 stored infoType. + # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + # learn more. + # @param [String] name + # Required. Resource name of the organization and storedInfoType to be deleted, + # for + # example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # @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::DlpV2::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::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_stored_info_type(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DlpV2::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 stored infoType. + # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + # learn more. + # @param [String] name + # Required. Resource name of the organization and storedInfoType to be read, for + # example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # @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::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] + # + # @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_stored_info_type(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType + 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 stored infoTypes. + # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + # learn more. + # @param [String] parent + # Required. The parent resource name, for example projects/my-project-id or + # organizations/my-org-id. + # @param [String] location_id + # The geographic location where stored infoTypes will be retrieved from. + # Use `-` for all locations. Reserved for future extensions. + # @param [String] order_by + # Optional comma separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case-insensitive, + # default sorting order is ascending, redundant space characters are + # insignificant. + # Example: `name asc, display_name, create_time desc` + # Supported fields are: + # - `create_time`: corresponds to time the most recent version of the + # resource was created. + # - `state`: corresponds to the state of the resource. + # - `name`: corresponds to resource name. + # - `display_name`: corresponds to info type's display name. + # @param [Fixnum] page_size + # Optional size of the page, can be limited by server. If zero server returns + # a page of max size 100. + # @param [String] page_token + # Optional page token to continue retrieval. Comes from previous call + # to `ListStoredInfoTypes`. + # @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::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse] + # + # @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_stored_info_types(parent, location_id, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/locations/{locationId}/storedInfoTypes', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse + command.params['parent'] = parent unless parent.nil? + command.params['locationId'] = location_id unless location_id.nil? + command.query['orderBy'] = order_by unless order_by.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 the stored infoType by creating a new version. The existing version + # will continue to be used until the new version is ready. + # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + # learn more. + # @param [String] name + # Required. Resource name of organization and storedInfoType to be updated, for + # example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest] google_privacy_dlp_v2_update_stored_info_type_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::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] + # + # @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_project_location_stored_info_type(name, google_privacy_dlp_v2_update_stored_info_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2/{+name}', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest::Representation + command.request_object = google_privacy_dlp_v2_update_stored_info_type_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType + 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) @@ -2007,6 +3735,9 @@ module Google # @param [String] parent # Required. The parent resource name, for example projects/my-project-id or # organizations/my-org-id. + # @param [String] location_id + # The geographic location where stored infoTypes will be retrieved from. + # Use `-` for all locations. Reserved for future extensions. # @param [String] order_by # Optional comma separated list of fields to order by, # followed by `asc` or `desc` postfix. This list is case-insensitive, @@ -2042,11 +3773,12 @@ module Google # @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_stored_info_types(parent, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_stored_info_types(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/storedInfoTypes', options) command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse command.params['parent'] = parent unless parent.nil? + command.query['locationId'] = location_id unless location_id.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? diff --git a/generated/google/apis/fcm_v1.rb b/generated/google/apis/fcm_v1.rb index 0282db64b..b02324945 100644 --- a/generated/google/apis/fcm_v1.rb +++ b/generated/google/apis/fcm_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://firebase.google.com/docs/cloud-messaging module FcmV1 VERSION = 'V1' - REVISION = '20191001' + REVISION = '20191111' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/fcm_v1/classes.rb b/generated/google/apis/fcm_v1/classes.rb index 4aa5a443e..c78cc0bf2 100644 --- a/generated/google/apis/fcm_v1/classes.rb +++ b/generated/google/apis/fcm_v1/classes.rb @@ -932,6 +932,11 @@ module Google class WebpushFcmOptions include Google::Apis::Core::Hashable + # Label associated with the message's analytics data. + # Corresponds to the JSON property `analyticsLabel` + # @return [String] + attr_accessor :analytics_label + # The link to open when the user clicks on the notification. # For all URL values, HTTPS is required. # Corresponds to the JSON property `link` @@ -944,6 +949,7 @@ module Google # Update properties of this object def update!(**args) + @analytics_label = args[:analytics_label] if args.key?(:analytics_label) @link = args[:link] if args.key?(:link) end end diff --git a/generated/google/apis/fcm_v1/representations.rb b/generated/google/apis/fcm_v1/representations.rb index 3f0711660..825053d56 100644 --- a/generated/google/apis/fcm_v1/representations.rb +++ b/generated/google/apis/fcm_v1/representations.rb @@ -252,6 +252,7 @@ module Google class WebpushFcmOptions # @private class Representation < Google::Apis::Core::JsonRepresentation + property :analytics_label, as: 'analyticsLabel' property :link, as: 'link' end end diff --git a/generated/google/apis/genomics_v2alpha1.rb b/generated/google/apis/genomics_v2alpha1.rb index 60072a51a..1ddcf4f52 100644 --- a/generated/google/apis/genomics_v2alpha1.rb +++ b/generated/google/apis/genomics_v2alpha1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/genomics module GenomicsV2alpha1 VERSION = 'V2alpha1' - REVISION = '20191102' + REVISION = '20191112' # 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/genomics_v2alpha1/classes.rb b/generated/google/apis/genomics_v2alpha1/classes.rb index 1abac36f4..7ab534e33 100644 --- a/generated/google/apis/genomics_v2alpha1/classes.rb +++ b/generated/google/apis/genomics_v2alpha1/classes.rb @@ -229,6 +229,11 @@ module Google # @return [Hash] attr_accessor :event + # A list of timestamped events. + # Corresponds to the JSON property `events` + # @return [Array] + attr_accessor :events + # The `Status` type defines a logical error model that is suitable for # different programming environments, including REST APIs and RPC APIs. It is # used by [gRPC](https://github.com/grpc). Each `Status` message contains @@ -252,6 +257,7 @@ module Google def update!(**args) @deadline_expired = args[:deadline_expired] if args.key?(:deadline_expired) @event = args[:event] if args.key?(:event) + @events = args[:events] if args.key?(:events) @result = args[:result] if args.key?(:result) @worker_status = args[:worker_status] if args.key?(:worker_status) end @@ -1193,6 +1199,32 @@ module Google end end + # An event that occured in the operation assigned to the + # worker and the time of occurance. + class TimestampedEvent + include Google::Apis::Core::Hashable + + # The event data. + # Corresponds to the JSON property `data` + # @return [Hash] + attr_accessor :data + + # The time when the event happened. + # Corresponds to the JSON property `timestamp` + # @return [String] + attr_accessor :timestamp + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data = args[:data] if args.key?(:data) + @timestamp = args[:timestamp] if args.key?(:timestamp) + end + end + # An event generated when the execution of a container results in a # non-zero exit status that was not otherwise ignored. Execution will # continue, but only actions that are flagged as `ALWAYS_RUN` will be diff --git a/generated/google/apis/genomics_v2alpha1/representations.rb b/generated/google/apis/genomics_v2alpha1/representations.rb index 9e911f793..bd3626ac4 100644 --- a/generated/google/apis/genomics_v2alpha1/representations.rb +++ b/generated/google/apis/genomics_v2alpha1/representations.rb @@ -214,6 +214,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class TimestampedEvent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class UnexpectedExitStatusEvent class Representation < Google::Apis::Core::JsonRepresentation; end @@ -284,6 +290,8 @@ module Google property :deadline_expired, as: 'deadlineExpired', class: Google::Apis::GenomicsV2alpha1::Empty, decorator: Google::Apis::GenomicsV2alpha1::Empty::Representation hash :event, as: 'event' + collection :events, as: 'events', class: Google::Apis::GenomicsV2alpha1::TimestampedEvent, decorator: Google::Apis::GenomicsV2alpha1::TimestampedEvent::Representation + property :result, as: 'result', class: Google::Apis::GenomicsV2alpha1::Status, decorator: Google::Apis::GenomicsV2alpha1::Status::Representation property :worker_status, as: 'workerStatus', class: Google::Apis::GenomicsV2alpha1::WorkerStatus, decorator: Google::Apis::GenomicsV2alpha1::WorkerStatus::Representation @@ -546,6 +554,14 @@ module Google end end + class TimestampedEvent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :data, as: 'data' + property :timestamp, as: 'timestamp' + end + end + class UnexpectedExitStatusEvent # @private class Representation < Google::Apis::Core::JsonRepresentation