diff --git a/src/CloudDataplex.php b/src/CloudDataplex.php index c1b7ec0f19..f60918df03 100644 --- a/src/CloudDataplex.php +++ b/src/CloudDataplex.php @@ -355,6 +355,37 @@ public function __construct($clientOrConfig = [], $rootUrl = null) 'type' => 'string', ], ], + ],'lookupEntryLinks' => [ + 'path' => 'v1/{+name}:lookupEntryLinks', + 'httpMethod' => 'GET', + 'parameters' => [ + 'name' => [ + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ], + 'entry' => [ + 'location' => 'query', + 'type' => 'string', + ], + 'entryLinkTypes' => [ + 'location' => 'query', + 'type' => 'string', + 'repeated' => true, + ], + 'entryMode' => [ + 'location' => 'query', + 'type' => 'string', + ], + 'pageSize' => [ + 'location' => 'query', + 'type' => 'integer', + ], + 'pageToken' => [ + 'location' => 'query', + 'type' => 'string', + ], + ], ],'searchEntries' => [ 'path' => 'v1/{+name}:searchEntries', 'httpMethod' => 'POST', diff --git a/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRule.php b/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRule.php index 343592d462..4f0467f2f3 100644 --- a/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRule.php +++ b/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRule.php @@ -17,14 +17,17 @@ namespace Google\Service\CloudDataplex; -class GoogleCloudDataplexV1DataQualityRule extends \Google\Model +class GoogleCloudDataplexV1DataQualityRule extends \Google\Collection { + protected $collection_key = 'debugQueries'; /** * Optional. The unnested column which this rule is evaluated against. * * @var string */ public $column; + protected $debugQueriesType = GoogleCloudDataplexV1DataQualityRuleDebugQuery::class; + protected $debugQueriesDataType = 'array'; /** * Optional. Description of the rule. The maximum length is 1,024 characters. * @@ -105,6 +108,23 @@ public function getColumn() { return $this->column; } + /** + * Optional. Specifies the debug queries for this rule. Currently, only one + * query is supported, but this may be expanded in the future. + * + * @param GoogleCloudDataplexV1DataQualityRuleDebugQuery[] $debugQueries + */ + public function setDebugQueries($debugQueries) + { + $this->debugQueries = $debugQueries; + } + /** + * @return GoogleCloudDataplexV1DataQualityRuleDebugQuery[] + */ + public function getDebugQueries() + { + return $this->debugQueries; + } /** * Optional. Description of the rule. The maximum length is 1,024 characters. * diff --git a/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleDebugQuery.php b/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleDebugQuery.php new file mode 100644 index 0000000000..3064736c33 --- /dev/null +++ b/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleDebugQuery.php @@ -0,0 +1,72 @@ +description = $description; + } + /** + * @return string + */ + public function getDescription() + { + return $this->description; + } + /** + * Required. Specifies the SQL statement to be executed. + * + * @param string $sqlStatement + */ + public function setSqlStatement($sqlStatement) + { + $this->sqlStatement = $sqlStatement; + } + /** + * @return string + */ + public function getSqlStatement() + { + return $this->sqlStatement; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GoogleCloudDataplexV1DataQualityRuleDebugQuery::class, 'Google_Service_CloudDataplex_GoogleCloudDataplexV1DataQualityRuleDebugQuery'); diff --git a/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleResult.php b/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleResult.php index db6c6d30e4..66c3dafd93 100644 --- a/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleResult.php +++ b/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleResult.php @@ -17,8 +17,9 @@ namespace Google\Service\CloudDataplex; -class GoogleCloudDataplexV1DataQualityRuleResult extends \Google\Model +class GoogleCloudDataplexV1DataQualityRuleResult extends \Google\Collection { + protected $collection_key = 'debugQueriesResultSets'; /** * Output only. The number of rows returned by the SQL statement in a SQL * assertion rule.This field is only valid for SQL assertion rules. @@ -26,6 +27,8 @@ class GoogleCloudDataplexV1DataQualityRuleResult extends \Google\Model * @var string */ public $assertionRowCount; + protected $debugQueriesResultSetsType = GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResultSet::class; + protected $debugQueriesResultSetsDataType = 'array'; /** * Output only. The number of rows a rule was evaluated against.This field is * only valid for row-level type rules.Evaluated count can be configured to @@ -90,6 +93,23 @@ public function getAssertionRowCount() { return $this->assertionRowCount; } + /** + * Output only. Contains the results of all debug queries for this rule. The + * number of result sets will correspond to the number of debug_queries. + * + * @param GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResultSet[] $debugQueriesResultSets + */ + public function setDebugQueriesResultSets($debugQueriesResultSets) + { + $this->debugQueriesResultSets = $debugQueriesResultSets; + } + /** + * @return GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResultSet[] + */ + public function getDebugQueriesResultSets() + { + return $this->debugQueriesResultSets; + } /** * Output only. The number of rows a rule was evaluated against.This field is * only valid for row-level type rules.Evaluated count can be configured to diff --git a/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResult.php b/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResult.php new file mode 100644 index 0000000000..0a72154674 --- /dev/null +++ b/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResult.php @@ -0,0 +1,98 @@ +name = $name; + } + /** + * @return string + */ + public function getName() + { + return $this->name; + } + /** + * Indicates the data type of the result. For more information, see BigQuery + * data types (https://cloud.google.com/bigquery/docs/reference/standard- + * sql/data-types). + * + * @param string $type + */ + public function setType($type) + { + $this->type = $type; + } + /** + * @return string + */ + public function getType() + { + return $this->type; + } + /** + * Represents the value of the result as a string. + * + * @param string $value + */ + public function setValue($value) + { + $this->value = $value; + } + /** + * @return string + */ + public function getValue() + { + return $this->value; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResult::class, 'Google_Service_CloudDataplex_GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResult'); diff --git a/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResultSet.php b/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResultSet.php new file mode 100644 index 0000000000..2aee787ee7 --- /dev/null +++ b/src/CloudDataplex/GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResultSet.php @@ -0,0 +1,45 @@ +results = $results; + } + /** + * @return GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResult[] + */ + public function getResults() + { + return $this->results; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResultSet::class, 'Google_Service_CloudDataplex_GoogleCloudDataplexV1DataQualityRuleResultDebugQueryResultSet'); diff --git a/src/CloudDataplex/GoogleCloudDataplexV1LookupEntryLinksResponse.php b/src/CloudDataplex/GoogleCloudDataplexV1LookupEntryLinksResponse.php new file mode 100644 index 0000000000..cc5d1e1b97 --- /dev/null +++ b/src/CloudDataplex/GoogleCloudDataplexV1LookupEntryLinksResponse.php @@ -0,0 +1,69 @@ +entryLinks = $entryLinks; + } + /** + * @return GoogleCloudDataplexV1EntryLink[] + */ + public function getEntryLinks() + { + return $this->entryLinks; + } + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * @param string $nextPageToken + */ + public function setNextPageToken($nextPageToken) + { + $this->nextPageToken = $nextPageToken; + } + /** + * @return string + */ + public function getNextPageToken() + { + return $this->nextPageToken; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GoogleCloudDataplexV1LookupEntryLinksResponse::class, 'Google_Service_CloudDataplex_GoogleCloudDataplexV1LookupEntryLinksResponse'); diff --git a/src/CloudDataplex/Resource/ProjectsLocations.php b/src/CloudDataplex/Resource/ProjectsLocations.php index 0ee2599fd7..327fd5a274 100644 --- a/src/CloudDataplex/Resource/ProjectsLocations.php +++ b/src/CloudDataplex/Resource/ProjectsLocations.php @@ -18,6 +18,7 @@ namespace Google\Service\CloudDataplex\Resource; use Google\Service\CloudDataplex\GoogleCloudDataplexV1Entry; +use Google\Service\CloudDataplex\GoogleCloudDataplexV1LookupEntryLinksResponse; use Google\Service\CloudDataplex\GoogleCloudDataplexV1SearchEntriesResponse; use Google\Service\CloudDataplex\GoogleCloudLocationListLocationsResponse; use Google\Service\CloudDataplex\GoogleCloudLocationLocation; @@ -103,6 +104,39 @@ public function lookupEntry($name, $optParams = []) $params = array_merge($params, $optParams); return $this->call('lookupEntry', [$params], GoogleCloudDataplexV1Entry::class); } + /** + * Looks up Entry Links referencing the specified Entry. + * (locations.lookupEntryLinks) + * + * @param string $name Required. The project to which the request should be + * attributed to Format: + * projects/{project_id_or_number}/locations/{location_id}. + * @param array $optParams Optional parameters. + * + * @opt_param string entry Required. The resource name of the referred Entry. + * Format: projects/{project_id_or_number}/locations/{location_id}/entryGroups/{ + * entry_group_id}/entries/{entry_id}. Entry Links which references this entry + * will be returned in the response. + * @opt_param string entryLinkTypes Entry link types to filter the response by. + * If empty, all entry link types will be returned. At most 10 entry link types + * can be specified. + * @opt_param string entryMode Mode of entry reference. + * @opt_param int pageSize Maximum number of EntryLinks to return. The service + * may return fewer than this value. If unspecified, at most 10 EntryLinks will + * be returned. The maximum value is 10; values above 10 will be coerced to 10. + * @opt_param string pageToken Page token received from a previous + * LookupEntryLinks call. Provide this to retrieve the subsequent page. When + * paginating, all other parameters that are provided to the LookupEntryLinks + * request must match the call that provided the page token. + * @return GoogleCloudDataplexV1LookupEntryLinksResponse + * @throws \Google\Service\Exception + */ + public function lookupEntryLinks($name, $optParams = []) + { + $params = ['name' => $name]; + $params = array_merge($params, $optParams); + return $this->call('lookupEntryLinks', [$params], GoogleCloudDataplexV1LookupEntryLinksResponse::class); + } /** * Searches for Entries matching the given query and scope. * (locations.searchEntries)